protected function createInGroupDefinition()
    {
        return [
            // Close of a grouping. Note that we avoid trouble with the "valid" inclusion of this character at the first
            // position by consuming it in the IN_GROUP_SPECIAL_FIRST state. Therefore, any further occurrences are
            // indeed valid closing of the current character grouping.
            '\]' => function (Stateful $lexer) {
                $lexer->popState();
                return self::T_GROUP_END;
            },
            // A range is CHAR1-CHAR2, where CHAR2 is not the closing of a group ("-" is permitted as the first or
            // last character of a character grouping.
            '.-[^\]]' => self::T_GROUP_RANGE,
            '\[:[a-z]+:\]' => self::T_GROUP_CHARACTER_CLASS,
            '.' => self::T_GROUP_CHARACTER
        ];
    }