File indexing completed on 2024-04-28 15:54:28

0001 /* A Bison parser, made by GNU Bison 2.5.  */
0002 
0003 /* Bison implementation for Yacc-like parsers in C
0004    
0005       Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
0006    
0007    This program is free software: you can redistribute it and/or modify
0008    it under the terms of the GNU General Public License as published by
0009    the Free Software Foundation, either version 3 of the License, or
0010    (at your option) any later version.
0011    
0012    This program is distributed in the hope that it will be useful,
0013    but WITHOUT ANY WARRANTY; without even the implied warranty of
0014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0015    GNU General Public License for more details.
0016    
0017    You should have received a copy of the GNU General Public License
0018    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
0019 
0020 /* As a special exception, you may create a larger work that contains
0021    part or all of the Bison parser skeleton and distribute that work
0022    under terms of your choice, so long as that work isn't itself a
0023    parser generator using the skeleton or a modified version thereof
0024    as a parser skeleton.  Alternatively, if you modify or redistribute
0025    the parser skeleton itself, you may (at your option) remove this
0026    special exception, which will cause the skeleton and the resulting
0027    Bison output files to be licensed under the GNU General Public
0028    License without this special exception.
0029    
0030    This special exception was added by the Free Software Foundation in
0031    version 2.2 of Bison.  */
0032 
0033 /* C LALR(1) parser skeleton written by Richard Stallman, by
0034    simplifying the original so-called "semantic" parser.  */
0035 
0036 /* All symbols defined below should begin with yy or YY, to avoid
0037    infringing on user name space.  This should be done even for local
0038    variables, as they might otherwise be expanded by user macros.
0039    There are some unavoidable exceptions within include files to
0040    define necessary library symbols; they are noted "INFRINGES ON
0041    USER NAME SPACE" below.  */
0042 
0043 /* Identify Bison output.  */
0044 #define YYBISON 1
0045 
0046 /* Bison version.  */
0047 #define YYBISON_VERSION "2.5"
0048 
0049 /* Skeleton name.  */
0050 #define YYSKELETON_NAME "yacc.c"
0051 
0052 /* Pure parsers.  */
0053 #define YYPURE 0
0054 
0055 /* Push parsers.  */
0056 #define YYPUSH 0
0057 
0058 /* Pull parsers.  */
0059 #define YYPULL 1
0060 
0061 /* Using locations.  */
0062 #define YYLSP_NEEDED 0
0063 
0064 
0065 
0066 /* Copy the first part of user declarations.  */
0067 
0068 /* Line 268 of yacc.c  */
0069 #line 2 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
0070 
0071 /* This file is part of kdev-pg-qt
0072    Copyright (C) 2005 Roberto Raggi <roberto@kdevelop.org>
0073    Copyright (C) 2006 Jakob Petsovits <jpetso@gmx.at>
0074 
0075    This library is free software; you can redistribute it and/or
0076    modify it under the terms of the GNU Library General Public
0077    License as published by the Free Software Foundation; either
0078    version 2 of the License, or (at your option) any later version.
0079 
0080    This library is distributed in the hope that it will be useful,
0081    but WITHOUT ANY WARRANTY; without even the implied warranty of
0082    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0083    Library General Public License for more details.
0084 
0085    You should have received a copy of the GNU Library General Public License
0086    along with this library; see the file COPYING.LIB.  If not, write to
0087    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0088    Boston, MA 02110-1301, USA.
0089 */
0090 
0091 #include "kdev-pg.h"
0092 #include "kdev-pg-clone-tree.h"
0093 #include "kdev-pg-regexp.h"
0094 #include "kdev-pg-unicode-loader.h"
0095 #include "kdev-pg-checker.h"
0096 
0097 #include <QFile>
0098 #include <cassert>
0099 
0100 extern int yylex();
0101 extern void yyerror(const char* msg);
0102 extern int yyLine;
0103 
0104 QString lexerEnv;
0105 
0106 namespace KDevPG
0107 {
0108     extern QFile file;
0109     extern QTextStream checkOut;
0110 }
0111 
0112 KDevPG::Model::OperatorItem *operatorNode = 0;
0113 QString r;
0114 
0115 
0116 
0117 /* Line 268 of yacc.c  */
0118 #line 119 "/home/jonathan/gitKDE/kdevelop-pg-qt/build/kdev-pg/kdev-pg-parser.cc"
0119 
0120 /* Enabling traces.  */
0121 #ifndef YYDEBUG
0122 # define YYDEBUG 0
0123 #endif
0124 
0125 /* Enabling verbose error messages.  */
0126 #ifdef YYERROR_VERBOSE
0127 # undef YYERROR_VERBOSE
0128 # define YYERROR_VERBOSE 1
0129 #else
0130 # define YYERROR_VERBOSE 0
0131 #endif
0132 
0133 /* Enabling the token table.  */
0134 #ifndef YYTOKEN_TABLE
0135 # define YYTOKEN_TABLE 0
0136 #endif
0137 
0138 
0139 /* Tokens.  */
0140 #ifndef YYTOKENTYPE
0141 # define YYTOKENTYPE
0142    /* Put the tokens into the symbol table, so that GDB and other debuggers
0143       know about them.  */
0144    enum yytokentype {
0145      T_IDENTIFIER = 258,
0146      T_ARROW = 259,
0147      T_TERMINAL = 260,
0148      T_CODE = 261,
0149      T_STRING = 262,
0150      T_UNQUOTED_STRING = 263,
0151      T_NUMBER = 264,
0152      T_TOKEN_DECLARATION = 265,
0153      T_TOKEN_STREAM_DECLARATION = 266,
0154      T_NAMESPACE_DECLARATION = 267,
0155      T_PARSERCLASS_DECLARATION = 268,
0156      T_LEXERCLASS_DECLARATION = 269,
0157      T_PUBLIC = 270,
0158      T_PRIVATE = 271,
0159      T_PROTECTED = 272,
0160      T_DECLARATION = 273,
0161      T_BITS = 274,
0162      T_CONSTRUCTOR = 275,
0163      T_DESTRUCTOR = 276,
0164      T_TRY_RECOVER = 277,
0165      T_TRY_ROLLBACK = 278,
0166      T_CATCH = 279,
0167      T_RULE_ARGUMENTS = 280,
0168      T_MEMBER = 281,
0169      T_TEMPORARY = 282,
0170      T_ARGUMENT = 283,
0171      T_EXPORT_MACRO = 284,
0172      T_NODE = 285,
0173      T_NODE_SEQUENCE = 286,
0174      T_TOKEN = 287,
0175      T_VARIABLE = 288,
0176      T_EXPORT_MACRO_HEADER = 289,
0177      T_AST_DECLARATION = 290,
0178      T_PARSER_DECLARATION_HEADER = 291,
0179      T_PARSER_BITS_HEADER = 292,
0180      T_AST_HEADER = 293,
0181      T_LEXER_DECLARATION_HEADER = 294,
0182      T_LEXER_BITS_HEADER = 295,
0183      T_PARSER_BASE = 296,
0184      T_AST_BASE = 297,
0185      T_LEXER_BASE = 298,
0186      T_BIN = 299,
0187      T_PRE = 300,
0188      T_POST = 301,
0189      T_TERN = 302,
0190      T_LOPR = 303,
0191      T_ROPR = 304,
0192      T_LEFT_ASSOC = 305,
0193      T_RIGHT_ASSOC = 306,
0194      T_IS_LEFT_ASSOC = 307,
0195      T_IS_RIGHT_ASSOC = 308,
0196      T_PRIORITY = 309,
0197      T_PAREN = 310,
0198      T_INLINE = 311,
0199      T_LEXER = 312,
0200      T_INPUT_STREAM = 313,
0201      T_INPUT_ENCODING = 314,
0202      T_TABLE_LEXER = 315,
0203      T_SEQUENCE_LEXER = 316,
0204      T_NAMED_REGEXP = 317,
0205      T_CONTINUE = 318,
0206      T_RANGE = 319,
0207      T_FAIL = 320,
0208      T_LOOKAHEAD = 321,
0209      T_BARRIER = 322,
0210      T_ENTER_RULE_SET = 323,
0211      T_LEAVE_RULE_SET = 324
0212    };
0213 #endif
0214 
0215 
0216 
0217 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
0218 typedef union YYSTYPE
0219 {
0220 
0221 /* Line 293 of yacc.c  */
0222 #line 49 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
0223 
0224     KDevPG::Model::Node *item;
0225     char* str;
0226     KDevPG::Model::VariableDeclarationItem::DeclarationType declarationType;
0227     KDevPG::Model::VariableDeclarationItem::StorageType     storageType;
0228     KDevPG::Model::VariableDeclarationItem::VariableType    variableType;
0229     KDevPG::Model::Operator                                *operatorInformation;
0230     KDevPG::GNFA                                           *nfa;
0231 
0232 
0233 
0234 /* Line 293 of yacc.c  */
0235 #line 236 "/home/jonathan/gitKDE/kdevelop-pg-qt/build/kdev-pg/kdev-pg-parser.cc"
0236 } YYSTYPE;
0237 # define YYSTYPE_IS_TRIVIAL 1
0238 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
0239 # define YYSTYPE_IS_DECLARED 1
0240 #endif
0241 
0242 
0243 /* Copy the second part of user declarations.  */
0244 
0245 
0246 /* Line 343 of yacc.c  */
0247 #line 248 "/home/jonathan/gitKDE/kdevelop-pg-qt/build/kdev-pg/kdev-pg-parser.cc"
0248 
0249 #ifdef short
0250 # undef short
0251 #endif
0252 
0253 #ifdef YYTYPE_UINT8
0254 typedef YYTYPE_UINT8 yytype_uint8;
0255 #else
0256 typedef unsigned char yytype_uint8;
0257 #endif
0258 
0259 #ifdef YYTYPE_INT8
0260 typedef YYTYPE_INT8 yytype_int8;
0261 #elif (defined __STDC__ || defined __C99__FUNC__ \
0262      || defined __cplusplus || defined _MSC_VER)
0263 typedef signed char yytype_int8;
0264 #else
0265 typedef short int yytype_int8;
0266 #endif
0267 
0268 #ifdef YYTYPE_UINT16
0269 typedef YYTYPE_UINT16 yytype_uint16;
0270 #else
0271 typedef unsigned short int yytype_uint16;
0272 #endif
0273 
0274 #ifdef YYTYPE_INT16
0275 typedef YYTYPE_INT16 yytype_int16;
0276 #else
0277 typedef short int yytype_int16;
0278 #endif
0279 
0280 #ifndef YYSIZE_T
0281 # ifdef __SIZE_TYPE__
0282 #  define YYSIZE_T __SIZE_TYPE__
0283 # elif defined size_t
0284 #  define YYSIZE_T size_t
0285 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
0286      || defined __cplusplus || defined _MSC_VER)
0287 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
0288 #  define YYSIZE_T size_t
0289 # else
0290 #  define YYSIZE_T unsigned int
0291 # endif
0292 #endif
0293 
0294 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
0295 
0296 #ifndef YY_
0297 # if defined YYENABLE_NLS && YYENABLE_NLS
0298 #  if ENABLE_NLS
0299 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
0300 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
0301 #  endif
0302 # endif
0303 # ifndef YY_
0304 #  define YY_(msgid) msgid
0305 # endif
0306 #endif
0307 
0308 /* Suppress unused-variable warnings by "using" E.  */
0309 #if ! defined lint || defined __GNUC__
0310 # define YYUSE(e) ((void) (e))
0311 #else
0312 # define YYUSE(e) /* empty */
0313 #endif
0314 
0315 /* Identity function, used to suppress warnings about constant conditions.  */
0316 #ifndef lint
0317 # define YYID(n) (n)
0318 #else
0319 #if (defined __STDC__ || defined __C99__FUNC__ \
0320      || defined __cplusplus || defined _MSC_VER)
0321 static int
0322 YYID (int yyi)
0323 #else
0324 static int
0325 YYID (yyi)
0326     int yyi;
0327 #endif
0328 {
0329   return yyi;
0330 }
0331 #endif
0332 
0333 #if ! defined yyoverflow || YYERROR_VERBOSE
0334 
0335 /* The parser invokes alloca or malloc; define the necessary symbols.  */
0336 
0337 # ifdef YYSTACK_USE_ALLOCA
0338 #  if YYSTACK_USE_ALLOCA
0339 #   ifdef __GNUC__
0340 #    define YYSTACK_ALLOC __builtin_alloca
0341 #   elif defined __BUILTIN_VA_ARG_INCR
0342 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
0343 #   elif defined _AIX
0344 #    define YYSTACK_ALLOC __alloca
0345 #   elif defined _MSC_VER
0346 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
0347 #    define alloca _alloca
0348 #   else
0349 #    define YYSTACK_ALLOC alloca
0350 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
0351      || defined __cplusplus || defined _MSC_VER)
0352 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
0353 #     ifndef EXIT_SUCCESS
0354 #      define EXIT_SUCCESS 0
0355 #     endif
0356 #    endif
0357 #   endif
0358 #  endif
0359 # endif
0360 
0361 # ifdef YYSTACK_ALLOC
0362    /* Pacify GCC's `empty if-body' warning.  */
0363 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
0364 #  ifndef YYSTACK_ALLOC_MAXIMUM
0365     /* The OS might guarantee only one guard page at the bottom of the stack,
0366        and a page size can be as small as 4096 bytes.  So we cannot safely
0367        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
0368        to allow for a few compiler-allocated temporary stack slots.  */
0369 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
0370 #  endif
0371 # else
0372 #  define YYSTACK_ALLOC YYMALLOC
0373 #  define YYSTACK_FREE YYFREE
0374 #  ifndef YYSTACK_ALLOC_MAXIMUM
0375 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
0376 #  endif
0377 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
0378        && ! ((defined YYMALLOC || defined malloc) \
0379          && (defined YYFREE || defined free)))
0380 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
0381 #   ifndef EXIT_SUCCESS
0382 #    define EXIT_SUCCESS 0
0383 #   endif
0384 #  endif
0385 #  ifndef YYMALLOC
0386 #   define YYMALLOC malloc
0387 #   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
0388      || defined __cplusplus || defined _MSC_VER)
0389 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
0390 #   endif
0391 #  endif
0392 #  ifndef YYFREE
0393 #   define YYFREE free
0394 #   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
0395      || defined __cplusplus || defined _MSC_VER)
0396 void free (void *); /* INFRINGES ON USER NAME SPACE */
0397 #   endif
0398 #  endif
0399 # endif
0400 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
0401 
0402 
0403 #if (! defined yyoverflow \
0404      && (! defined __cplusplus \
0405      || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
0406 
0407 /* A type that is properly aligned for any stack member.  */
0408 union yyalloc
0409 {
0410   yytype_int16 yyss_alloc;
0411   YYSTYPE yyvs_alloc;
0412 };
0413 
0414 /* The size of the maximum gap between one aligned stack and the next.  */
0415 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
0416 
0417 /* The size of an array large to enough to hold all stacks, each with
0418    N elements.  */
0419 # define YYSTACK_BYTES(N) \
0420      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
0421       + YYSTACK_GAP_MAXIMUM)
0422 
0423 # define YYCOPY_NEEDED 1
0424 
0425 /* Relocate STACK from its old location to the new one.  The
0426    local variables YYSIZE and YYSTACKSIZE give the old and new number of
0427    elements in the stack, and YYPTR gives the new location of the
0428    stack.  Advance YYPTR to a properly aligned location for the next
0429    stack.  */
0430 # define YYSTACK_RELOCATE(Stack_alloc, Stack)               \
0431     do                                  \
0432       {                                 \
0433     YYSIZE_T yynewbytes;                        \
0434     YYCOPY (&yyptr->Stack_alloc, Stack, yysize);            \
0435     Stack = &yyptr->Stack_alloc;                    \
0436     yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
0437     yyptr += yynewbytes / sizeof (*yyptr);              \
0438       }                                 \
0439     while (YYID (0))
0440 
0441 #endif
0442 
0443 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
0444 /* Copy COUNT objects from FROM to TO.  The source and destination do
0445    not overlap.  */
0446 # ifndef YYCOPY
0447 #  if defined __GNUC__ && 1 < __GNUC__
0448 #   define YYCOPY(To, From, Count) \
0449       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
0450 #  else
0451 #   define YYCOPY(To, From, Count)      \
0452       do                    \
0453     {                   \
0454       YYSIZE_T yyi;             \
0455       for (yyi = 0; yyi < (Count); yyi++)   \
0456         (To)[yyi] = (From)[yyi];        \
0457     }                   \
0458       while (YYID (0))
0459 #  endif
0460 # endif
0461 #endif /* !YYCOPY_NEEDED */
0462 
0463 /* YYFINAL -- State number of the termination state.  */
0464 #define YYFINAL  4
0465 /* YYLAST -- Last index in YYTABLE.  */
0466 #define YYLAST   394
0467 
0468 /* YYNTOKENS -- Number of terminals.  */
0469 #define YYNTOKENS  89
0470 /* YYNNTS -- Number of nonterminals.  */
0471 #define YYNNTS  60
0472 /* YYNRULES -- Number of rules.  */
0473 #define YYNRULES  178
0474 /* YYNRULES -- Number of states.  */
0475 #define YYNSTATES  350
0476 
0477 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
0478 #define YYUNDEFTOK  2
0479 #define YYMAXUTOK   324
0480 
0481 #define YYTRANSLATE(YYX)                        \
0482   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
0483 
0484 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
0485 static const yytype_uint8 yytranslate[] =
0486 {
0487        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0488        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0489        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0490        2,     2,     2,     2,     2,    86,     2,     2,    74,     2,
0491       71,    72,    79,    80,    84,     2,    83,     2,    85,     2,
0492        2,     2,     2,     2,     2,     2,     2,     2,    88,    10,
0493        2,    87,     2,    77,    78,     2,     2,     2,     2,     2,
0494        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0495        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0496        2,    81,     2,    82,    75,     2,     2,     2,     2,     2,
0497        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0498        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0499        2,     2,     2,     2,    73,     2,    76,     2,     2,     2,
0500        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0501        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0502        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0503        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0504        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0505        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0506        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0507        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0508        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0509        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0510        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0511        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0512        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
0513        5,     6,     7,     8,     9,    11,    12,    13,    14,    15,
0514       16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
0515       26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
0516       36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
0517       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
0518       56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
0519       66,    67,    68,    69,    70
0520 };
0521 
0522 #if YYDEBUG
0523 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
0524    YYRHS.  */
0525 static const yytype_uint16 yyprhs[] =
0526 {
0527        0,     0,     3,     4,    10,    12,    15,    18,    24,    27,
0528       33,    37,    39,    41,    44,    48,    51,    54,    57,    60,
0529       63,    66,    69,    72,    75,    78,    82,    85,    88,    89,
0530       96,    97,   103,   104,   111,   112,   119,   120,   131,   132,
0531      143,   144,   149,   150,   155,   156,   161,   162,   164,   166,
0532      167,   171,   173,   177,   179,   183,   185,   188,   191,   193,
0533      196,   198,   202,   204,   207,   210,   212,   216,   220,   222,
0534      224,   226,   228,   229,   233,   235,   239,   241,   245,   247,
0535      250,   253,   255,   258,   260,   264,   266,   269,   272,   274,
0536      278,   282,   284,   286,   288,   290,   292,   293,   299,   305,
0537      311,   316,   321,   323,   328,   332,   339,   340,   344,   346,
0538      350,   352,   354,   357,   361,   366,   369,   371,   376,   385,
0539      386,   388,   390,   392,   394,   397,   400,   402,   405,   407,
0540      411,   414,   416,   418,   421,   423,   427,   429,   433,   441,
0541      449,   454,   455,   458,   459,   461,   464,   465,   475,   485,
0542      492,   497,   503,   507,   511,   516,   520,   522,   524,   527,
0543      529,   531,   534,   537,   542,   546,   549,   551,   553,   556,
0544      563,   569,   577,   584,   585,   587,   589,   591,   593
0545 };
0546 
0547 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
0548 static const yytype_int16 yyrhs[] =
0549 {
0550       90,     0,    -1,    -1,   137,    91,    92,   123,   137,    -1,
0551       93,    -1,    92,    93,    -1,    14,   121,    -1,    14,    71,
0552       20,    72,     6,    -1,    15,   121,    -1,    15,    71,    20,
0553       72,     6,    -1,    11,   122,    10,    -1,    61,    -1,    62,
0554       -1,    60,     7,    -1,    12,     3,    10,    -1,    30,     7,
0555       -1,    35,     7,    -1,    13,     6,    -1,    36,     6,    -1,
0556       37,     7,    -1,    38,     7,    -1,    39,     7,    -1,    40,
0557        7,    -1,    59,     7,    -1,    41,     7,    -1,    43,     3,
0558        7,    -1,    42,     7,    -1,    44,     7,    -1,    -1,    58,
0559        7,    94,     4,    96,    10,    -1,    -1,    58,    95,     4,
0560       96,    10,    -1,    -1,   105,     4,     3,    10,    97,    96,
0561       -1,    -1,   105,   137,   104,    10,    98,    96,    -1,    -1,
0562      105,    67,    71,   105,    72,   137,   104,    10,    99,    96,
0563       -1,    -1,   105,    68,    71,   105,    72,   137,   104,    10,
0564      100,    96,    -1,    -1,    66,     6,   101,    96,    -1,    -1,
0565       69,     6,   102,    96,    -1,    -1,    70,     6,   103,    96,
0566       -1,    -1,     5,    -1,    64,    -1,    -1,   105,    73,   106,
0567       -1,   106,    -1,   106,    74,   107,    -1,   107,    -1,   108,
0568       75,   107,    -1,   108,    -1,    76,   108,    -1,    77,   108,
0569       -1,   109,    -1,   109,   110,    -1,   110,    -1,   110,    78,
0570      111,    -1,   111,    -1,   111,    79,    -1,   111,    80,    -1,
0571      112,    -1,    71,   105,    72,    -1,    81,   113,    82,    -1,
0572       83,    -1,     7,    -1,     8,    -1,    63,    -1,    -1,   113,
0573       73,   114,    -1,   114,    -1,   114,    74,   115,    -1,   115,
0574       -1,   116,    75,   115,    -1,   116,    -1,    76,   116,    -1,
0575       77,   116,    -1,   117,    -1,   117,   118,    -1,   118,    -1,
0576      118,    78,   119,    -1,   119,    -1,   119,    79,    -1,   119,
0577       80,    -1,   120,    -1,    71,   105,    72,    -1,    81,   113,
0578       82,    -1,    83,    -1,     7,    -1,    65,    -1,     8,    -1,
0579       63,    -1,    -1,    71,    16,    19,    72,     6,    -1,    71,
0580       18,    19,    72,     6,    -1,    71,    17,    19,    72,     6,
0581       -1,    71,    21,    72,     6,    -1,    71,    22,    72,     6,
0582       -1,     5,    -1,     5,    71,     7,    72,    -1,   122,    84,
0583        5,    -1,   122,    84,     5,    71,     7,    72,    -1,    -1,
0584      123,   135,    10,    -1,    85,    -1,    71,   134,    72,    -1,
0585      126,    -1,   125,    -1,    57,     3,    -1,   128,   129,   125,
0586       -1,    86,   128,   129,   125,    -1,     3,   127,    -1,     5,
0587       -1,    23,    71,   134,    72,    -1,    24,    71,   134,    72,
0588       25,    71,   134,    72,    -1,    -1,    26,    -1,     3,    -1,
0589       87,    -1,    88,    -1,   124,    80,    -1,   124,    79,    -1,
0590      124,    -1,    77,   124,    -1,   130,    -1,   131,    78,   124,
0591       -1,   131,     6,    -1,     6,    -1,   131,    -1,   132,   131,
0592       -1,   132,    -1,    77,     6,   132,    -1,   133,    -1,   134,
0593       73,   133,    -1,   134,     4,     3,     6,    81,   144,    82,
0594       -1,   134,     4,     3,    81,   144,    82,   137,    -1,   134,
0595        4,     3,   137,    -1,    -1,   136,   139,    -1,    -1,     6,
0596       -1,   140,   138,    -1,    -1,    49,   125,   138,    50,     3,
0597       81,   144,    82,   137,    -1,    49,   125,   138,    50,     3,
0598        6,    81,   144,    82,    -1,    49,   125,   138,    50,     3,
0599      137,    -1,    45,   143,   141,   142,    -1,    48,   143,   143,
0600      141,   142,    -1,    46,   143,   141,    -1,    47,   143,   141,
0601       -1,    47,   143,   141,   142,    -1,    56,   143,   143,    -1,
0602       85,    -1,     9,    -1,    55,     6,    -1,    51,    -1,    52,
0603       -1,    53,     6,    -1,    54,     6,    -1,    77,     6,     5,
0604        6,    -1,    77,     6,     5,    -1,     5,     6,    -1,     5,
0605       -1,   145,    -1,   144,   145,    -1,   146,   147,   148,     3,
0606       88,     3,    -1,   146,   147,    33,     3,    10,    -1,   146,
0607      147,   148,    86,     3,    88,     3,    -1,   146,   147,    33,
0608       86,     3,    10,    -1,    -1,    29,    -1,    27,    -1,    28,
0609       -1,    31,    -1,    34,    -1
0610 };
0611 
0612 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
0613 static const yytype_uint16 yyrline[] =
0614 {
0615        0,    94,    94,    94,   101,   102,   106,   108,   110,   112,
0616      114,   115,   129,   143,   170,   172,   174,   176,   178,   180,
0617      182,   184,   186,   188,   190,   192,   194,   196,   198,   198,
0618      199,   199,   204,   203,   207,   206,   217,   216,   249,   248,
0619      291,   290,   295,   294,   299,   298,   302,   306,   309,   312,
0620      316,   317,   321,   322,   326,   327,   331,   332,   333,   337,
0621      338,   342,   343,   347,   348,   349,   353,   354,   355,   356,
0622      357,   358,   373,   377,   378,   382,   383,   387,   388,   392,
0623      393,   394,   398,   399,   403,   404,   408,   409,   410,   414,
0624      415,   416,   417,   418,   441,   442,   457,   462,   464,   466,
0625      468,   470,   475,   476,   477,   478,   482,   484,   488,   489,
0626      490,   491,   492,   493,   494,   498,   499,   503,   508,   515,
0627      516,   520,   530,   531,   535,   536,   537,   538,   542,   543,
0628      548,   549,   553,   554,   558,   559,   563,   564,   568,   573,
0629      578,   580,   580,   590,   591,   596,   597,   601,   609,   617,
0630      628,   629,   630,   631,   632,   633,   637,   638,   639,   643,
0631      644,   645,   652,   662,   663,   664,   665,   669,   670,   682,
0632      684,   686,   688,   693,   694,   698,   699,   703,   704
0633 };
0634 #endif
0635 
0636 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
0637 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
0638    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
0639 static const char *const yytname[] =
0640 {
0641   "$end", "error", "$undefined", "T_IDENTIFIER", "T_ARROW", "T_TERMINAL",
0642   "T_CODE", "T_STRING", "T_UNQUOTED_STRING", "T_NUMBER", "';'",
0643   "T_TOKEN_DECLARATION", "T_TOKEN_STREAM_DECLARATION",
0644   "T_NAMESPACE_DECLARATION", "T_PARSERCLASS_DECLARATION",
0645   "T_LEXERCLASS_DECLARATION", "T_PUBLIC", "T_PRIVATE", "T_PROTECTED",
0646   "T_DECLARATION", "T_BITS", "T_CONSTRUCTOR", "T_DESTRUCTOR",
0647   "T_TRY_RECOVER", "T_TRY_ROLLBACK", "T_CATCH", "T_RULE_ARGUMENTS",
0648   "T_MEMBER", "T_TEMPORARY", "T_ARGUMENT", "T_EXPORT_MACRO", "T_NODE",
0649   "T_NODE_SEQUENCE", "T_TOKEN", "T_VARIABLE", "T_EXPORT_MACRO_HEADER",
0650   "T_AST_DECLARATION", "T_PARSER_DECLARATION_HEADER",
0651   "T_PARSER_BITS_HEADER", "T_AST_HEADER", "T_LEXER_DECLARATION_HEADER",
0652   "T_LEXER_BITS_HEADER", "T_PARSER_BASE", "T_AST_BASE", "T_LEXER_BASE",
0653   "T_BIN", "T_PRE", "T_POST", "T_TERN", "T_LOPR", "T_ROPR", "T_LEFT_ASSOC",
0654   "T_RIGHT_ASSOC", "T_IS_LEFT_ASSOC", "T_IS_RIGHT_ASSOC", "T_PRIORITY",
0655   "T_PAREN", "T_INLINE", "T_LEXER", "T_INPUT_STREAM", "T_INPUT_ENCODING",
0656   "T_TABLE_LEXER", "T_SEQUENCE_LEXER", "T_NAMED_REGEXP", "T_CONTINUE",
0657   "T_RANGE", "T_FAIL", "T_LOOKAHEAD", "T_BARRIER", "T_ENTER_RULE_SET",
0658   "T_LEAVE_RULE_SET", "'('", "')'", "'|'", "'&'", "'^'", "'~'", "'?'",
0659   "'@'", "'*'", "'+'", "'['", "']'", "'.'", "','", "'0'", "'#'", "'='",
0660   "':'", "$accept", "system", "$@1", "declarations", "declaration", "$@2",
0661   "$@3", "lexer_declaration_rest", "$@4", "$@5", "$@6", "$@7", "$@8",
0662   "$@9", "$@10", "opt_lexer_action", "regexp", "regexp1", "regexp2",
0663   "regexp3", "regexp4", "regexp5", "regexp6", "regexp7", "aregexp",
0664   "aregexp1", "aregexp2", "aregexp3", "aregexp4", "aregexp5", "aregexp6",
0665   "aregexp7", "member_declaration_rest", "declared_tokens", "rules",
0666   "primary_item", "primary_atom", "try_item", "rule_arguments_opt", "name",
0667   "scope", "unary_item", "postfix_item", "item_sequence",
0668   "conditional_item", "option_item", "item", "$@11", "code_opt",
0669   "operatorDeclarations", "operatorRule", "operatorDeclaration",
0670   "priority", "assoc", "operator", "variableDeclarations",
0671   "variableDeclaration", "declarationType_opt", "storageType",
0672   "variableType", 0
0673 };
0674 #endif
0675 
0676 # ifdef YYPRINT
0677 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
0678    token YYLEX-NUM.  */
0679 static const yytype_uint16 yytoknum[] =
0680 {
0681        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
0682       59,   265,   266,   267,   268,   269,   270,   271,   272,   273,
0683      274,   275,   276,   277,   278,   279,   280,   281,   282,   283,
0684      284,   285,   286,   287,   288,   289,   290,   291,   292,   293,
0685      294,   295,   296,   297,   298,   299,   300,   301,   302,   303,
0686      304,   305,   306,   307,   308,   309,   310,   311,   312,   313,
0687      314,   315,   316,   317,   318,   319,   320,   321,   322,   323,
0688      324,    40,    41,   124,    38,    94,   126,    63,    64,    42,
0689       43,    91,    93,    46,    44,    48,    35,    61,    58
0690 };
0691 # endif
0692 
0693 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
0694 static const yytype_uint8 yyr1[] =
0695 {
0696        0,    89,    91,    90,    92,    92,    93,    93,    93,    93,
0697       93,    93,    93,    93,    93,    93,    93,    93,    93,    93,
0698       93,    93,    93,    93,    93,    93,    93,    93,    94,    93,
0699       95,    93,    97,    96,    98,    96,    99,    96,   100,    96,
0700      101,    96,   102,    96,   103,    96,    96,   104,   104,   104,
0701      105,   105,   106,   106,   107,   107,   108,   108,   108,   109,
0702      109,   110,   110,   111,   111,   111,   112,   112,   112,   112,
0703      112,   112,   112,   113,   113,   114,   114,   115,   115,   116,
0704      116,   116,   117,   117,   118,   118,   119,   119,   119,   120,
0705      120,   120,   120,   120,   120,   120,   120,   121,   121,   121,
0706      121,   121,   122,   122,   122,   122,   123,   123,   124,   124,
0707      124,   124,   124,   124,   124,   125,   125,   126,   126,   127,
0708      127,   128,   129,   129,   130,   130,   130,   130,   131,   131,
0709      131,   131,   132,   132,   133,   133,   134,   134,   135,   135,
0710      135,   136,   135,   137,   137,   138,   138,   139,   139,   139,
0711      140,   140,   140,   140,   140,   140,   141,   141,   141,   142,
0712      142,   142,   142,   143,   143,   143,   143,   144,   144,   145,
0713      145,   145,   145,   146,   146,   147,   147,   148,   148
0714 };
0715 
0716 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
0717 static const yytype_uint8 yyr2[] =
0718 {
0719        0,     2,     0,     5,     1,     2,     2,     5,     2,     5,
0720        3,     1,     1,     2,     3,     2,     2,     2,     2,     2,
0721        2,     2,     2,     2,     2,     3,     2,     2,     0,     6,
0722        0,     5,     0,     6,     0,     6,     0,    10,     0,    10,
0723        0,     4,     0,     4,     0,     4,     0,     1,     1,     0,
0724        3,     1,     3,     1,     3,     1,     2,     2,     1,     2,
0725        1,     3,     1,     2,     2,     1,     3,     3,     1,     1,
0726        1,     1,     0,     3,     1,     3,     1,     3,     1,     2,
0727        2,     1,     2,     1,     3,     1,     2,     2,     1,     3,
0728        3,     1,     1,     1,     1,     1,     0,     5,     5,     5,
0729        4,     4,     1,     4,     3,     6,     0,     3,     1,     3,
0730        1,     1,     2,     3,     4,     2,     1,     4,     8,     0,
0731        1,     1,     1,     1,     2,     2,     1,     2,     1,     3,
0732        2,     1,     1,     2,     1,     3,     1,     3,     7,     7,
0733        4,     0,     2,     0,     1,     2,     0,     9,     9,     6,
0734        4,     5,     3,     3,     4,     3,     1,     1,     2,     1,
0735        1,     2,     2,     4,     3,     2,     1,     1,     2,     6,
0736        5,     7,     6,     0,     1,     1,     1,     1,     1
0737 };
0738 
0739 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
0740    Performed when YYTABLE doesn't specify something else to do.  Zero
0741    means the default is an error.  */
0742 static const yytype_uint8 yydefact[] =
0743 {
0744      143,   144,     0,     2,     1,     0,     0,     0,     0,     0,
0745        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
0746        0,     0,    30,     0,     0,    11,    12,   106,     4,   102,
0747        0,     0,    17,     0,     6,     0,     8,    15,    16,    18,
0748       19,    20,    21,    22,    24,    26,     0,    27,    28,     0,
0749       23,    13,     5,   141,     0,    10,     0,    14,     0,     0,
0750        0,     0,     0,     0,     0,    25,     0,    72,   119,   116,
0751      131,     0,     0,     0,     0,     0,   108,     0,   126,   111,
0752      110,     0,   128,   132,   134,   136,     0,     0,     0,     3,
0753        0,   104,     0,     0,     0,     0,     0,     0,     0,    72,
0754       69,    70,    71,     0,     0,     0,    72,    72,    72,    96,
0755       68,     0,   143,    51,    53,    55,    58,    60,    62,    65,
0756      120,   115,     0,     0,   112,   131,     0,     0,   127,   121,
0757        0,   125,   124,   122,   123,     0,   130,     0,     0,   133,
0758        0,     0,   107,     0,   142,   103,     0,     0,     0,     0,
0759        7,   100,   101,     9,     0,    40,    42,    44,     0,    56,
0760       57,    92,    94,    95,    93,    72,    96,    96,    96,    91,
0761        0,    74,    76,    78,    81,    83,    85,    88,    31,     0,
0762        0,     0,    72,    49,    72,    72,    59,    72,    63,    64,
0763        0,     0,   109,   135,     0,   119,   113,   129,   143,   137,
0764      146,     0,    97,    99,    98,    29,    72,    72,    72,    66,
0765        0,    79,    80,     0,    96,    67,    96,    96,    82,    96,
0766       86,    87,     0,    72,    72,    50,    47,    48,     0,    52,
0767       54,    61,   117,     0,   114,   144,   173,   140,     0,     0,
0768        0,     0,     0,     0,   146,   105,    41,    43,    45,    89,
0769       90,    73,    75,    77,    84,    32,     0,     0,    34,     0,
0770      173,   174,   173,   167,     0,   166,     0,     0,     0,     0,
0771        0,     0,     0,   145,    72,   143,   143,    72,     0,   173,
0772      143,   168,   175,   176,     0,   165,     0,   157,     0,   156,
0773        0,   152,   153,     0,   155,   143,    33,    49,    49,    35,
0774        0,   138,   139,   177,     0,   178,     0,   164,   158,   159,
0775      160,     0,     0,   150,   154,     0,   144,   173,   149,     0,
0776        0,   118,     0,     0,     0,     0,   163,   161,   162,   151,
0777      173,   173,    36,    38,   170,     0,     0,     0,   173,   143,
0778       72,    72,   172,   169,     0,   148,   147,    37,    39,   171
0779 };
0780 
0781 /* YYDEFGOTO[NTERM-NUM].  */
0782 static const yytype_int16 yydefgoto[] =
0783 {
0784       -1,     2,     5,    27,    28,    66,    49,   111,   274,   277,
0785      340,   341,   206,   207,   208,   228,   112,   113,   114,   115,
0786      116,   117,   118,   119,   170,   171,   172,   173,   174,   175,
0787      176,   177,    34,    30,    53,    78,    79,    80,   121,    81,
0788      135,    82,    83,    84,    85,    86,    87,    88,     3,   243,
0789      144,   244,   290,   313,   267,   262,   263,   264,   284,   306
0790 };
0791 
0792 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
0793    STATE-NUM.  */
0794 #define YYPACT_NINF -258
0795 static const yytype_int16 yypact[] =
0796 {
0797       12,  -258,    21,  -258,  -258,   236,    19,    28,    51,     9,
0798       15,    59,    63,    72,    91,   125,   133,   155,   164,   166,
0799      119,   169,   184,   200,   205,  -258,  -258,   236,  -258,    56,
0800       34,   142,  -258,   267,  -258,   283,  -258,  -258,  -258,  -258,
0801     -258,  -258,  -258,  -258,  -258,  -258,   221,  -258,  -258,   139,
0802     -258,  -258,  -258,     6,   238,  -258,   194,  -258,   170,   206,
0803      295,   185,   230,   243,   244,  -258,   313,    65,    42,  -258,
0804      318,   248,   249,   319,    10,    22,  -258,   320,    88,  -258,
0805     -258,   116,  -258,    26,    17,  -258,    43,   311,   275,  -258,
0806      253,   255,   256,   257,   258,   321,   325,   326,   327,    65,
0807     -258,  -258,  -258,   328,   329,   330,   143,   143,   143,    98,
0808     -258,   331,   192,   263,  -258,   264,   130,   260,   136,  -258,
0809     -258,  -258,    10,    10,  -258,  -258,   145,    17,  -258,  -258,
0810      116,  -258,  -258,  -258,  -258,    50,  -258,    14,    14,    26,
0811      337,    10,  -258,    50,  -258,  -258,   335,   338,   339,   340,
0812     -258,  -258,  -258,  -258,   333,  -258,  -258,  -258,   162,  -258,
0813     -258,  -258,  -258,  -258,  -258,   143,    98,    98,    98,  -258,
0814      -34,   273,  -258,   274,   107,   270,   157,  -258,  -258,   347,
0815      280,   281,   143,     0,   143,   143,   260,   158,  -258,  -258,
0816      180,   182,  -258,    17,    50,   332,  -258,  -258,    20,  -258,
0817      108,   282,  -258,  -258,  -258,  -258,    65,    65,    65,  -258,
0818      191,  -258,  -258,   -17,    98,  -258,    98,    98,   270,   175,
0819     -258,  -258,   343,   143,   143,   263,  -258,  -258,   345,  -258,
0820     -258,   136,  -258,   334,  -258,   276,   336,  -258,     5,     5,
0821        5,     5,     5,   306,   108,  -258,  -258,  -258,  -258,  -258,
0822     -258,   273,  -258,  -258,   157,  -258,   195,   197,  -258,   289,
0823      336,  -258,     7,  -258,   254,   355,   356,    -1,    -1,    -1,
0824        5,     5,   360,  -258,    65,    12,    12,    65,    10,   115,
0825       12,  -258,  -258,  -258,   161,  -258,   359,  -258,   361,  -258,
0826      106,  -258,   106,    -1,  -258,    36,  -258,     0,     0,  -258,
0827      218,  -258,  -258,  -258,     4,  -258,    11,   362,  -258,  -258,
0828     -258,   363,   364,  -258,  -258,   106,   285,   336,  -258,   365,
0829      366,  -258,   367,   368,   284,   370,  -258,  -258,  -258,  -258,
0830      336,   118,  -258,  -258,  -258,   369,   371,   290,   120,    12,
0831       65,    65,  -258,  -258,   377,  -258,  -258,  -258,  -258,  -258
0832 };
0833 
0834 /* YYPGOTO[NTERM-NUM].  */
0835 static const yytype_int16 yypgoto[] =
0836 {
0837     -258,  -258,  -258,  -258,   354,  -258,  -258,   -97,  -258,  -258,
0838     -258,  -258,  -258,  -258,  -258,    -5,  -103,   202,   122,   201,
0839     -258,   266,   196,  -258,   217,   172,    94,   146,  -258,   213,
0840      171,  -258,   378,  -258,  -258,   -14,   -10,  -258,  -258,   312,
0841      261,  -258,   -80,   265,   252,   -73,  -258,  -258,   -53,   150,
0842     -258,  -258,  -217,  -257,    -9,  -191,  -219,  -258,  -258,  -258
0843 };
0844 
0845 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
0846    positive, shift that token.  If negative, reduce the rule which
0847    number is the opposite.  If YYTABLE_NINF, syntax error.  */
0848 #define YYTABLE_NINF -145
0849 static const yytype_int16 yytable[] =
0850 {
0851       89,   126,   154,   158,   139,   226,  -143,   322,   287,    68,
0852      265,    69,    70,    68,   324,    69,   125,    68,     1,    69,
0853       68,     4,    69,   125,    29,    68,   235,    69,   127,    71,
0854       72,    31,   136,    71,    72,   314,   261,    71,    72,   214,
0855       71,    72,   316,   281,    55,    71,    72,   140,   215,   190,
0856      191,   291,   292,   195,   288,    69,   214,    32,   329,   183,
0857      281,   128,   210,    73,   227,   250,    37,    73,   120,   279,
0858       38,    73,   100,   101,    73,   -46,   315,    74,    39,    73,
0859       33,    74,   266,    75,   289,    74,    35,    75,    74,   280,
0860      323,    76,    77,    74,   138,    76,    77,   325,    40,    76,
0861       77,   236,    76,    77,   137,   161,   162,    76,    77,   246,
0862      247,   248,   281,   139,   161,   162,   141,   317,    56,   281,
0863      256,   257,    46,   197,   128,   196,   331,    54,   102,  -121,
0864     -121,   103,    41,   200,   104,   105,   106,   100,   101,   338,
0865       42,   107,   108,    67,   261,   237,   109,   261,   110,   261,
0866      100,   101,    57,   238,   239,   240,   241,   309,   310,   311,
0867      312,   163,    43,   164,   242,   100,   101,   131,   132,   165,
0868      163,    44,   164,    45,   166,   167,    47,   296,   165,   168,
0869      299,   169,   161,   162,   234,   -96,   -96,   -96,   168,    92,
0870      169,    48,   303,   102,   304,   305,   179,   301,     1,    91,
0871      339,   106,   345,   133,   134,   300,   102,    50,   -72,   -72,
0872      -72,   109,    51,   110,   106,   188,   189,   192,   141,   107,
0873      108,   102,   297,   298,   109,    93,   110,   302,    65,   106,
0874      268,   269,   270,   271,   209,   182,   220,   221,   163,   109,
0875      164,   110,   318,   347,   348,    90,   165,     6,     7,     8,
0876        9,    10,   232,   141,   233,   141,   168,    95,   169,   180,
0877      181,   293,   294,   249,   182,   182,    11,   275,   182,   276,
0878      182,    12,    13,    14,    15,    16,    17,    18,    19,    20,
0879       21,   282,   283,    58,    59,    60,   346,    61,    62,    63,
0880      321,   141,   319,   320,    22,    23,    24,    25,    26,    58,
0881       59,    60,    96,    64,    62,    63,   229,   230,   159,   160,
0882      252,   253,   211,   212,    94,    97,    98,    99,  -144,   122,
0883      123,   142,   124,   129,   143,   145,   146,   150,   147,   148,
0884      149,   151,   152,   153,   155,   156,   157,   184,   187,   185,
0885      198,   178,   201,   205,   202,   203,   204,   216,   219,   217,
0886      222,   223,   224,   255,   245,   258,   272,   260,   120,   259,
0887      278,   285,   286,   295,   307,   261,   330,   308,   326,   327,
0888      328,   335,   336,   337,   343,   332,   333,   334,   344,   342,
0889      349,    52,   186,   231,   225,   213,   251,   218,    36,   130,
0890      254,   194,   193,   199,   273
0891 };
0892 
0893 #define yypact_value_is_default(yystate) \
0894   ((yystate) == (-258))
0895 
0896 #define yytable_value_is_error(yytable_value) \
0897   YYID (0)
0898 
0899 static const yytype_uint16 yycheck[] =
0900 {
0901       53,    74,    99,   106,    84,     5,     0,     3,     9,     3,
0902        5,     5,     6,     3,     3,     5,     6,     3,     6,     5,
0903        3,     0,     5,     6,     5,     3,     6,     5,     6,    23,
0904       24,     3,     6,    23,    24,   292,    29,    23,    24,    73,
0905       23,    24,     6,   262,    10,    23,    24,     4,    82,   122,
0906      123,   268,   269,     3,    55,     5,    73,     6,   315,   112,
0907      279,    75,   165,    57,    64,    82,     7,    57,    26,   260,
0908        7,    57,     7,     8,    57,    10,   293,    71,     6,    57,
0909       71,    71,    77,    77,    85,    71,    71,    77,    71,    82,
0910       86,    85,    86,    71,    77,    85,    86,    86,     7,    85,
0911       86,    81,    85,    86,    78,     7,     8,    85,    86,   206,
0912      207,   208,   331,   193,     7,     8,    73,    81,    84,   338,
0913      223,   224,     3,   137,   138,   135,   317,    71,    63,    87,
0914       88,    66,     7,   143,    69,    70,    71,     7,     8,   330,
0915        7,    76,    77,     4,    29,   198,    81,    29,    83,    29,
0916        7,     8,    10,    45,    46,    47,    48,    51,    52,    53,
0917       54,    63,     7,    65,    56,     7,     8,    79,    80,    71,
0918       63,     7,    65,     7,    76,    77,     7,   274,    71,    81,
0919      277,    83,     7,     8,   194,    78,    79,    80,    81,    19,
0920       83,     7,    31,    63,    33,    34,     4,    82,     6,     5,
0921       82,    71,    82,    87,    88,   278,    63,     7,    78,    79,
0922       80,    81,     7,    83,    71,    79,    80,    72,    73,    76,
0923       77,    63,   275,   276,    81,    19,    83,   280,     7,    71,
0924      239,   240,   241,   242,    72,    73,    79,    80,    63,    81,
0925       65,    83,   295,   340,   341,     7,    71,    11,    12,    13,
0926       14,    15,    72,    73,    72,    73,    81,    72,    83,    67,
0927       68,   270,   271,    72,    73,    73,    30,    72,    73,    72,
0928       73,    35,    36,    37,    38,    39,    40,    41,    42,    43,
0929       44,    27,    28,    16,    17,    18,   339,    20,    21,    22,
0930       72,    73,   297,   298,    58,    59,    60,    61,    62,    16,
0931       17,    18,    72,    20,    21,    22,   184,   185,   107,   108,
0932      216,   217,   166,   167,    19,    72,    72,     4,     0,    71,
0933       71,    10,     3,     3,    49,    72,    71,     6,    72,    72,
0934       72,     6,     6,     6,     6,     6,     6,    74,    78,    75,
0935        3,    10,     7,    10,     6,     6,     6,    74,    78,    75,
0936        3,    71,    71,    10,    72,    10,    50,    81,    26,    25,
0937       71,     6,     6,     3,     5,    29,    81,     6,     6,     6,
0938        6,     3,    88,     3,     3,    10,    10,    10,    88,    10,
0939        3,    27,   116,   187,   182,   168,   214,   174,    10,    77,
0940      219,   130,   127,   141,   244
0941 };
0942 
0943 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
0944    symbol of state STATE-NUM.  */
0945 static const yytype_uint8 yystos[] =
0946 {
0947        0,     6,    90,   137,     0,    91,    11,    12,    13,    14,
0948       15,    30,    35,    36,    37,    38,    39,    40,    41,    42,
0949       43,    44,    58,    59,    60,    61,    62,    92,    93,     5,
0950      122,     3,     6,    71,   121,    71,   121,     7,     7,     6,
0951        7,     7,     7,     7,     7,     7,     3,     7,     7,    95,
0952        7,     7,    93,   123,    71,    10,    84,    10,    16,    17,
0953       18,    20,    21,    22,    20,     7,    94,     4,     3,     5,
0954        6,    23,    24,    57,    71,    77,    85,    86,   124,   125,
0955      126,   128,   130,   131,   132,   133,   134,   135,   136,   137,
0956        7,     5,    19,    19,    19,    72,    72,    72,    72,     4,
0957        7,     8,    63,    66,    69,    70,    71,    76,    77,    81,
0958       83,    96,   105,   106,   107,   108,   109,   110,   111,   112,
0959       26,   127,    71,    71,     3,     6,   134,     6,   124,     3,
0960      128,    79,    80,    87,    88,   129,     6,    78,    77,   131,
0961        4,    73,    10,    49,   139,    72,    71,    72,    72,    72,
0962        6,     6,     6,     6,    96,     6,     6,     6,   105,   108,
0963      108,     7,     8,    63,    65,    71,    76,    77,    81,    83,
0964      113,   114,   115,   116,   117,   118,   119,   120,    10,     4,
0965       67,    68,    73,   137,    74,    75,   110,    78,    79,    80,
0966      134,   134,    72,   132,   129,     3,   125,   124,     3,   133,
0967      125,     7,     6,     6,     6,    10,   101,   102,   103,    72,
0968      105,   116,   116,   113,    73,    82,    74,    75,   118,    78,
0969       79,    80,     3,    71,    71,   106,     5,    64,   104,   107,
0970      107,   111,    72,    72,   125,     6,    81,   137,    45,    46,
0971       47,    48,    56,   138,   140,    72,    96,    96,    96,    72,
0972       82,   114,   115,   115,   119,    10,   105,   105,    10,    25,
0973       81,    29,   144,   145,   146,     5,    77,   143,   143,   143,
0974      143,   143,    50,   138,    97,    72,    72,    98,    71,   144,
0975       82,   145,    27,    28,   147,     6,     6,     9,    55,    85,
0976      141,   141,   141,   143,   143,     3,    96,   137,   137,    96,
0977      134,    82,   137,    31,    33,    34,   148,     5,     6,    51,
0978       52,    53,    54,   142,   142,   141,     6,    81,   137,   104,
0979      104,    72,     3,    86,     3,    86,     6,     6,     6,   142,
0980       81,   144,    10,    10,    10,     3,    88,     3,   144,    82,
0981       99,   100,    10,     3,    88,    82,   137,    96,    96,     3
0982 };
0983 
0984 #define yyerrok     (yyerrstatus = 0)
0985 #define yyclearin   (yychar = YYEMPTY)
0986 #define YYEMPTY     (-2)
0987 #define YYEOF       0
0988 
0989 #define YYACCEPT    goto yyacceptlab
0990 #define YYABORT     goto yyabortlab
0991 #define YYERROR     goto yyerrorlab
0992 
0993 
0994 /* Like YYERROR except do call yyerror.  This remains here temporarily
0995    to ease the transition to the new meaning of YYERROR, for GCC.
0996    Once GCC version 2 has supplanted version 1, this can go.  However,
0997    YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
0998    in Bison 2.4.2's NEWS entry, where a plan to phase it out is
0999    discussed.  */
1000 
1001 #define YYFAIL      goto yyerrlab
1002 #if defined YYFAIL
1003   /* This is here to suppress warnings from the GCC cpp's
1004      -Wunused-macros.  Normally we don't worry about that warning, but
1005      some users do, and we want to make it easy for users to remove
1006      YYFAIL uses, which will produce warnings from Bison 2.5.  */
1007 #endif
1008 
1009 #define YYRECOVERING()  (!!yyerrstatus)
1010 
1011 #define YYBACKUP(Token, Value)                  \
1012 do                              \
1013   if (yychar == YYEMPTY && yylen == 1)              \
1014     {                               \
1015       yychar = (Token);                     \
1016       yylval = (Value);                     \
1017       YYPOPSTACK (1);                       \
1018       goto yybackup;                        \
1019     }                               \
1020   else                              \
1021     {                               \
1022       yyerror (YY_("syntax error: cannot back up")); \
1023       YYERROR;                          \
1024     }                               \
1025 while (YYID (0))
1026 
1027 
1028 #define YYTERROR    1
1029 #define YYERRCODE   256
1030 
1031 
1032 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1033    If N is 0, then set CURRENT to the empty location which ends
1034    the previous symbol: RHS[0] (always defined).  */
1035 
1036 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1037 #ifndef YYLLOC_DEFAULT
1038 # define YYLLOC_DEFAULT(Current, Rhs, N)                \
1039     do                                  \
1040       if (YYID (N))                                                    \
1041     {                               \
1042       (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;    \
1043       (Current).first_column = YYRHSLOC (Rhs, 1).first_column;  \
1044       (Current).last_line    = YYRHSLOC (Rhs, N).last_line;     \
1045       (Current).last_column  = YYRHSLOC (Rhs, N).last_column;   \
1046     }                               \
1047       else                              \
1048     {                               \
1049       (Current).first_line   = (Current).last_line   =      \
1050         YYRHSLOC (Rhs, 0).last_line;                \
1051       (Current).first_column = (Current).last_column =      \
1052         YYRHSLOC (Rhs, 0).last_column;              \
1053     }                               \
1054     while (YYID (0))
1055 #endif
1056 
1057 
1058 /* This macro is provided for backward compatibility. */
1059 
1060 #ifndef YY_LOCATION_PRINT
1061 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1062 #endif
1063 
1064 
1065 /* YYLEX -- calling `yylex' with the right arguments.  */
1066 
1067 #ifdef YYLEX_PARAM
1068 # define YYLEX yylex (YYLEX_PARAM)
1069 #else
1070 # define YYLEX yylex ()
1071 #endif
1072 
1073 /* Enable debugging if requested.  */
1074 #if YYDEBUG
1075 
1076 # ifndef YYFPRINTF
1077 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1078 #  define YYFPRINTF fprintf
1079 # endif
1080 
1081 # define YYDPRINTF(Args)            \
1082 do {                        \
1083   if (yydebug)                  \
1084     YYFPRINTF Args;             \
1085 } while (YYID (0))
1086 
1087 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)            \
1088 do {                                      \
1089   if (yydebug)                                \
1090     {                                     \
1091       YYFPRINTF (stderr, "%s ", Title);                   \
1092       yy_symbol_print (stderr,                        \
1093           Type, Value); \
1094       YYFPRINTF (stderr, "\n");                       \
1095     }                                     \
1096 } while (YYID (0))
1097 
1098 
1099 /*--------------------------------.
1100 | Print this symbol on YYOUTPUT.  |
1101 `--------------------------------*/
1102 
1103 /*ARGSUSED*/
1104 #if (defined __STDC__ || defined __C99__FUNC__ \
1105      || defined __cplusplus || defined _MSC_VER)
1106 static void
1107 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1108 #else
1109 static void
1110 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1111     FILE *yyoutput;
1112     int yytype;
1113     YYSTYPE const * const yyvaluep;
1114 #endif
1115 {
1116   if (!yyvaluep)
1117     return;
1118 # ifdef YYPRINT
1119   if (yytype < YYNTOKENS)
1120     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1121 # else
1122   YYUSE (yyoutput);
1123 # endif
1124   switch (yytype)
1125     {
1126       default:
1127     break;
1128     }
1129 }
1130 
1131 
1132 /*--------------------------------.
1133 | Print this symbol on YYOUTPUT.  |
1134 `--------------------------------*/
1135 
1136 #if (defined __STDC__ || defined __C99__FUNC__ \
1137      || defined __cplusplus || defined _MSC_VER)
1138 static void
1139 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1140 #else
1141 static void
1142 yy_symbol_print (yyoutput, yytype, yyvaluep)
1143     FILE *yyoutput;
1144     int yytype;
1145     YYSTYPE const * const yyvaluep;
1146 #endif
1147 {
1148   if (yytype < YYNTOKENS)
1149     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1150   else
1151     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1152 
1153   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1154   YYFPRINTF (yyoutput, ")");
1155 }
1156 
1157 /*------------------------------------------------------------------.
1158 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1159 | TOP (included).                                                   |
1160 `------------------------------------------------------------------*/
1161 
1162 #if (defined __STDC__ || defined __C99__FUNC__ \
1163      || defined __cplusplus || defined _MSC_VER)
1164 static void
1165 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1166 #else
1167 static void
1168 yy_stack_print (yybottom, yytop)
1169     yytype_int16 *yybottom;
1170     yytype_int16 *yytop;
1171 #endif
1172 {
1173   YYFPRINTF (stderr, "Stack now");
1174   for (; yybottom <= yytop; yybottom++)
1175     {
1176       int yybot = *yybottom;
1177       YYFPRINTF (stderr, " %d", yybot);
1178     }
1179   YYFPRINTF (stderr, "\n");
1180 }
1181 
1182 # define YY_STACK_PRINT(Bottom, Top)                \
1183 do {                                \
1184   if (yydebug)                          \
1185     yy_stack_print ((Bottom), (Top));               \
1186 } while (YYID (0))
1187 
1188 
1189 /*------------------------------------------------.
1190 | Report that the YYRULE is going to be reduced.  |
1191 `------------------------------------------------*/
1192 
1193 #if (defined __STDC__ || defined __C99__FUNC__ \
1194      || defined __cplusplus || defined _MSC_VER)
1195 static void
1196 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1197 #else
1198 static void
1199 yy_reduce_print (yyvsp, yyrule)
1200     YYSTYPE *yyvsp;
1201     int yyrule;
1202 #endif
1203 {
1204   int yynrhs = yyr2[yyrule];
1205   int yyi;
1206   unsigned long int yylno = yyrline[yyrule];
1207   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1208          yyrule - 1, yylno);
1209   /* The symbols being reduced.  */
1210   for (yyi = 0; yyi < yynrhs; yyi++)
1211     {
1212       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
1213       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1214                &(yyvsp[(yyi + 1) - (yynrhs)])
1215                            );
1216       YYFPRINTF (stderr, "\n");
1217     }
1218 }
1219 
1220 # define YY_REDUCE_PRINT(Rule)      \
1221 do {                    \
1222   if (yydebug)              \
1223     yy_reduce_print (yyvsp, Rule); \
1224 } while (YYID (0))
1225 
1226 /* Nonzero means print parse trace.  It is left uninitialized so that
1227    multiple parsers can coexist.  */
1228 int yydebug;
1229 #else /* !YYDEBUG */
1230 # define YYDPRINTF(Args)
1231 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1232 # define YY_STACK_PRINT(Bottom, Top)
1233 # define YY_REDUCE_PRINT(Rule)
1234 #endif /* !YYDEBUG */
1235 
1236 
1237 /* YYINITDEPTH -- initial size of the parser's stacks.  */
1238 #ifndef YYINITDEPTH
1239 # define YYINITDEPTH 200
1240 #endif
1241 
1242 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1243    if the built-in stack extension method is used).
1244 
1245    Do not make this value too large; the results are undefined if
1246    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1247    evaluated with infinite-precision integer arithmetic.  */
1248 
1249 #ifndef YYMAXDEPTH
1250 # define YYMAXDEPTH 10000
1251 #endif
1252 
1253 
1254 #if YYERROR_VERBOSE
1255 
1256 # ifndef yystrlen
1257 #  if defined __GLIBC__ && defined _STRING_H
1258 #   define yystrlen strlen
1259 #  else
1260 /* Return the length of YYSTR.  */
1261 #if (defined __STDC__ || defined __C99__FUNC__ \
1262      || defined __cplusplus || defined _MSC_VER)
1263 static YYSIZE_T
1264 yystrlen (const char *yystr)
1265 #else
1266 static YYSIZE_T
1267 yystrlen (yystr)
1268     const char *yystr;
1269 #endif
1270 {
1271   YYSIZE_T yylen;
1272   for (yylen = 0; yystr[yylen]; yylen++)
1273     continue;
1274   return yylen;
1275 }
1276 #  endif
1277 # endif
1278 
1279 # ifndef yystpcpy
1280 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1281 #   define yystpcpy stpcpy
1282 #  else
1283 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1284    YYDEST.  */
1285 #if (defined __STDC__ || defined __C99__FUNC__ \
1286      || defined __cplusplus || defined _MSC_VER)
1287 static char *
1288 yystpcpy (char *yydest, const char *yysrc)
1289 #else
1290 static char *
1291 yystpcpy (yydest, yysrc)
1292     char *yydest;
1293     const char *yysrc;
1294 #endif
1295 {
1296   char *yyd = yydest;
1297   const char *yys = yysrc;
1298 
1299   while ((*yyd++ = *yys++) != '\0')
1300     continue;
1301 
1302   return yyd - 1;
1303 }
1304 #  endif
1305 # endif
1306 
1307 # ifndef yytnamerr
1308 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1309    quotes and backslashes, so that it's suitable for yyerror.  The
1310    heuristic is that double-quoting is unnecessary unless the string
1311    contains an apostrophe, a comma, or backslash (other than
1312    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1313    null, do not copy; instead, return the length of what the result
1314    would have been.  */
1315 static YYSIZE_T
1316 yytnamerr (char *yyres, const char *yystr)
1317 {
1318   if (*yystr == '"')
1319     {
1320       YYSIZE_T yyn = 0;
1321       char const *yyp = yystr;
1322 
1323       for (;;)
1324     switch (*++yyp)
1325       {
1326       case '\'':
1327       case ',':
1328         goto do_not_strip_quotes;
1329 
1330       case '\\':
1331         if (*++yyp != '\\')
1332           goto do_not_strip_quotes;
1333         /* Fall through.  */
1334       default:
1335         if (yyres)
1336           yyres[yyn] = *yyp;
1337         yyn++;
1338         break;
1339 
1340       case '"':
1341         if (yyres)
1342           yyres[yyn] = '\0';
1343         return yyn;
1344       }
1345     do_not_strip_quotes: ;
1346     }
1347 
1348   if (! yyres)
1349     return yystrlen (yystr);
1350 
1351   return yystpcpy (yyres, yystr) - yyres;
1352 }
1353 # endif
1354 
1355 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1356    about the unexpected token YYTOKEN for the state stack whose top is
1357    YYSSP.
1358 
1359    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
1360    not large enough to hold the message.  In that case, also set
1361    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
1362    required number of bytes is too large to store.  */
1363 static int
1364 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1365                 yytype_int16 *yyssp, int yytoken)
1366 {
1367   YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
1368   YYSIZE_T yysize = yysize0;
1369   YYSIZE_T yysize1;
1370   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1371   /* Internationalized format string. */
1372   const char *yyformat = 0;
1373   /* Arguments of yyformat. */
1374   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1375   /* Number of reported tokens (one for the "unexpected", one per
1376      "expected"). */
1377   int yycount = 0;
1378 
1379   /* There are many possibilities here to consider:
1380      - Assume YYFAIL is not used.  It's too flawed to consider.  See
1381        <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1382        for details.  YYERROR is fine as it does not invoke this
1383        function.
1384      - If this state is a consistent state with a default action, then
1385        the only way this function was invoked is if the default action
1386        is an error action.  In that case, don't check for expected
1387        tokens because there are none.
1388      - The only way there can be no lookahead present (in yychar) is if
1389        this state is a consistent state with a default action.  Thus,
1390        detecting the absence of a lookahead is sufficient to determine
1391        that there is no unexpected or expected token to report.  In that
1392        case, just report a simple "syntax error".
1393      - Don't assume there isn't a lookahead just because this state is a
1394        consistent state with a default action.  There might have been a
1395        previous inconsistent state, consistent state with a non-default
1396        action, or user semantic action that manipulated yychar.
1397      - Of course, the expected token list depends on states to have
1398        correct lookahead information, and it depends on the parser not
1399        to perform extra reductions after fetching a lookahead from the
1400        scanner and before detecting a syntax error.  Thus, state merging
1401        (from LALR or IELR) and default reductions corrupt the expected
1402        token list.  However, the list is correct for canonical LR with
1403        one exception: it will still contain any token that will not be
1404        accepted due to an error action in a later state.
1405   */
1406   if (yytoken != YYEMPTY)
1407     {
1408       int yyn = yypact[*yyssp];
1409       yyarg[yycount++] = yytname[yytoken];
1410       if (!yypact_value_is_default (yyn))
1411         {
1412           /* Start YYX at -YYN if negative to avoid negative indexes in
1413              YYCHECK.  In other words, skip the first -YYN actions for
1414              this state because they are default actions.  */
1415           int yyxbegin = yyn < 0 ? -yyn : 0;
1416           /* Stay within bounds of both yycheck and yytname.  */
1417           int yychecklim = YYLAST - yyn + 1;
1418           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1419           int yyx;
1420 
1421           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1422             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1423                 && !yytable_value_is_error (yytable[yyx + yyn]))
1424               {
1425                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1426                   {
1427                     yycount = 1;
1428                     yysize = yysize0;
1429                     break;
1430                   }
1431                 yyarg[yycount++] = yytname[yyx];
1432                 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1433                 if (! (yysize <= yysize1
1434                        && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1435                   return 2;
1436                 yysize = yysize1;
1437               }
1438         }
1439     }
1440 
1441   switch (yycount)
1442     {
1443 # define YYCASE_(N, S)                      \
1444       case N:                               \
1445         yyformat = S;                       \
1446       break
1447       YYCASE_(0, YY_("syntax error"));
1448       YYCASE_(1, YY_("syntax error, unexpected %s"));
1449       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1450       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1451       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1452       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1453 # undef YYCASE_
1454     }
1455 
1456   yysize1 = yysize + yystrlen (yyformat);
1457   if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1458     return 2;
1459   yysize = yysize1;
1460 
1461   if (*yymsg_alloc < yysize)
1462     {
1463       *yymsg_alloc = 2 * yysize;
1464       if (! (yysize <= *yymsg_alloc
1465              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1466         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1467       return 1;
1468     }
1469 
1470   /* Avoid sprintf, as that infringes on the user's name space.
1471      Don't have undefined behavior even if the translation
1472      produced a string with the wrong number of "%s"s.  */
1473   {
1474     char *yyp = *yymsg;
1475     int yyi = 0;
1476     while ((*yyp = *yyformat) != '\0')
1477       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1478         {
1479           yyp += yytnamerr (yyp, yyarg[yyi++]);
1480           yyformat += 2;
1481         }
1482       else
1483         {
1484           yyp++;
1485           yyformat++;
1486         }
1487   }
1488   return 0;
1489 }
1490 #endif /* YYERROR_VERBOSE */
1491 
1492 /*-----------------------------------------------.
1493 | Release the memory associated to this symbol.  |
1494 `-----------------------------------------------*/
1495 
1496 /*ARGSUSED*/
1497 #if (defined __STDC__ || defined __C99__FUNC__ \
1498      || defined __cplusplus || defined _MSC_VER)
1499 static void
1500 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1501 #else
1502 static void
1503 yydestruct (yymsg, yytype, yyvaluep)
1504     const char *yymsg;
1505     int yytype;
1506     YYSTYPE *yyvaluep;
1507 #endif
1508 {
1509   YYUSE (yyvaluep);
1510 
1511   if (!yymsg)
1512     yymsg = "Deleting";
1513   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1514 
1515   switch (yytype)
1516     {
1517 
1518       default:
1519     break;
1520     }
1521 }
1522 
1523 
1524 /* Prevent warnings from -Wmissing-prototypes.  */
1525 #ifdef YYPARSE_PARAM
1526 #if defined __STDC__ || defined __cplusplus
1527 int yyparse (void *YYPARSE_PARAM);
1528 #else
1529 int yyparse ();
1530 #endif
1531 #else /* ! YYPARSE_PARAM */
1532 #if defined __STDC__ || defined __cplusplus
1533 int yyparse (void);
1534 #else
1535 int yyparse ();
1536 #endif
1537 #endif /* ! YYPARSE_PARAM */
1538 
1539 
1540 /* The lookahead symbol.  */
1541 int yychar;
1542 
1543 /* The semantic value of the lookahead symbol.  */
1544 YYSTYPE yylval;
1545 
1546 /* Number of syntax errors so far.  */
1547 int yynerrs;
1548 
1549 
1550 /*----------.
1551 | yyparse.  |
1552 `----------*/
1553 
1554 #ifdef YYPARSE_PARAM
1555 #if (defined __STDC__ || defined __C99__FUNC__ \
1556      || defined __cplusplus || defined _MSC_VER)
1557 int
1558 yyparse (void *YYPARSE_PARAM)
1559 #else
1560 int
1561 yyparse (YYPARSE_PARAM)
1562     void *YYPARSE_PARAM;
1563 #endif
1564 #else /* ! YYPARSE_PARAM */
1565 #if (defined __STDC__ || defined __C99__FUNC__ \
1566      || defined __cplusplus || defined _MSC_VER)
1567 int
1568 yyparse (void)
1569 #else
1570 int
1571 yyparse ()
1572 
1573 #endif
1574 #endif
1575 {
1576     int yystate;
1577     /* Number of tokens to shift before error messages enabled.  */
1578     int yyerrstatus;
1579 
1580     /* The stacks and their tools:
1581        `yyss': related to states.
1582        `yyvs': related to semantic values.
1583 
1584        Refer to the stacks thru separate pointers, to allow yyoverflow
1585        to reallocate them elsewhere.  */
1586 
1587     /* The state stack.  */
1588     yytype_int16 yyssa[YYINITDEPTH];
1589     yytype_int16 *yyss;
1590     yytype_int16 *yyssp;
1591 
1592     /* The semantic value stack.  */
1593     YYSTYPE yyvsa[YYINITDEPTH];
1594     YYSTYPE *yyvs;
1595     YYSTYPE *yyvsp;
1596 
1597     YYSIZE_T yystacksize;
1598 
1599   int yyn;
1600   int yyresult;
1601   /* Lookahead token as an internal (translated) token number.  */
1602   int yytoken;
1603   /* The variables used to return semantic value and location from the
1604      action routines.  */
1605   YYSTYPE yyval;
1606 
1607 #if YYERROR_VERBOSE
1608   /* Buffer for error messages, and its allocated size.  */
1609   char yymsgbuf[128];
1610   char *yymsg = yymsgbuf;
1611   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1612 #endif
1613 
1614 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1615 
1616   /* The number of symbols on the RHS of the reduced rule.
1617      Keep to zero when no symbol should be popped.  */
1618   int yylen = 0;
1619 
1620   yytoken = 0;
1621   yyss = yyssa;
1622   yyvs = yyvsa;
1623   yystacksize = YYINITDEPTH;
1624 
1625   YYDPRINTF ((stderr, "Starting parse\n"));
1626 
1627   yystate = 0;
1628   yyerrstatus = 0;
1629   yynerrs = 0;
1630   yychar = YYEMPTY; /* Cause a token to be read.  */
1631 
1632   /* Initialize stack pointers.
1633      Waste one element of value and location stack
1634      so that they stay on the same level as the state stack.
1635      The wasted elements are never initialized.  */
1636   yyssp = yyss;
1637   yyvsp = yyvs;
1638 
1639   goto yysetstate;
1640 
1641 /*------------------------------------------------------------.
1642 | yynewstate -- Push a new state, which is found in yystate.  |
1643 `------------------------------------------------------------*/
1644  yynewstate:
1645   /* In all cases, when you get here, the value and location stacks
1646      have just been pushed.  So pushing a state here evens the stacks.  */
1647   yyssp++;
1648 
1649  yysetstate:
1650   *yyssp = yystate;
1651 
1652   if (yyss + yystacksize - 1 <= yyssp)
1653     {
1654       /* Get the current used size of the three stacks, in elements.  */
1655       YYSIZE_T yysize = yyssp - yyss + 1;
1656 
1657 #ifdef yyoverflow
1658       {
1659     /* Give user a chance to reallocate the stack.  Use copies of
1660        these so that the &'s don't force the real ones into
1661        memory.  */
1662     YYSTYPE *yyvs1 = yyvs;
1663     yytype_int16 *yyss1 = yyss;
1664 
1665     /* Each stack pointer address is followed by the size of the
1666        data in use in that stack, in bytes.  This used to be a
1667        conditional around just the two extra args, but that might
1668        be undefined if yyoverflow is a macro.  */
1669     yyoverflow (YY_("memory exhausted"),
1670             &yyss1, yysize * sizeof (*yyssp),
1671             &yyvs1, yysize * sizeof (*yyvsp),
1672             &yystacksize);
1673 
1674     yyss = yyss1;
1675     yyvs = yyvs1;
1676       }
1677 #else /* no yyoverflow */
1678 # ifndef YYSTACK_RELOCATE
1679       goto yyexhaustedlab;
1680 # else
1681       /* Extend the stack our own way.  */
1682       if (YYMAXDEPTH <= yystacksize)
1683     goto yyexhaustedlab;
1684       yystacksize *= 2;
1685       if (YYMAXDEPTH < yystacksize)
1686     yystacksize = YYMAXDEPTH;
1687 
1688       {
1689     yytype_int16 *yyss1 = yyss;
1690     union yyalloc *yyptr =
1691       (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1692     if (! yyptr)
1693       goto yyexhaustedlab;
1694     YYSTACK_RELOCATE (yyss_alloc, yyss);
1695     YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1696 #  undef YYSTACK_RELOCATE
1697     if (yyss1 != yyssa)
1698       YYSTACK_FREE (yyss1);
1699       }
1700 # endif
1701 #endif /* no yyoverflow */
1702 
1703       yyssp = yyss + yysize - 1;
1704       yyvsp = yyvs + yysize - 1;
1705 
1706       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1707           (unsigned long int) yystacksize));
1708 
1709       if (yyss + yystacksize - 1 <= yyssp)
1710     YYABORT;
1711     }
1712 
1713   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1714 
1715   if (yystate == YYFINAL)
1716     YYACCEPT;
1717 
1718   goto yybackup;
1719 
1720 /*-----------.
1721 | yybackup.  |
1722 `-----------*/
1723 yybackup:
1724 
1725   /* Do appropriate processing given the current state.  Read a
1726      lookahead token if we need one and don't already have one.  */
1727 
1728   /* First try to decide what to do without reference to lookahead token.  */
1729   yyn = yypact[yystate];
1730   if (yypact_value_is_default (yyn))
1731     goto yydefault;
1732 
1733   /* Not known => get a lookahead token if don't already have one.  */
1734 
1735   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1736   if (yychar == YYEMPTY)
1737     {
1738       YYDPRINTF ((stderr, "Reading a token: "));
1739       yychar = YYLEX;
1740     }
1741 
1742   if (yychar <= YYEOF)
1743     {
1744       yychar = yytoken = YYEOF;
1745       YYDPRINTF ((stderr, "Now at end of input.\n"));
1746     }
1747   else
1748     {
1749       yytoken = YYTRANSLATE (yychar);
1750       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1751     }
1752 
1753   /* If the proper action on seeing token YYTOKEN is to reduce or to
1754      detect an error, take that action.  */
1755   yyn += yytoken;
1756   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1757     goto yydefault;
1758   yyn = yytable[yyn];
1759   if (yyn <= 0)
1760     {
1761       if (yytable_value_is_error (yyn))
1762         goto yyerrlab;
1763       yyn = -yyn;
1764       goto yyreduce;
1765     }
1766 
1767   /* Count tokens shifted since error; after three, turn off error
1768      status.  */
1769   if (yyerrstatus)
1770     yyerrstatus--;
1771 
1772   /* Shift the lookahead token.  */
1773   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1774 
1775   /* Discard the shifted token.  */
1776   yychar = YYEMPTY;
1777 
1778   yystate = yyn;
1779   *++yyvsp = yylval;
1780 
1781   goto yynewstate;
1782 
1783 
1784 /*-----------------------------------------------------------.
1785 | yydefault -- do the default action for the current state.  |
1786 `-----------------------------------------------------------*/
1787 yydefault:
1788   yyn = yydefact[yystate];
1789   if (yyn == 0)
1790     goto yyerrlab;
1791   goto yyreduce;
1792 
1793 
1794 /*-----------------------------.
1795 | yyreduce -- Do a reduction.  |
1796 `-----------------------------*/
1797 yyreduce:
1798   /* yyn is the number of a rule to reduce with.  */
1799   yylen = yyr2[yyn];
1800 
1801   /* If YYLEN is nonzero, implement the default value of the action:
1802      `$$ = $1'.
1803 
1804      Otherwise, the following line sets YYVAL to garbage.
1805      This behavior is undocumented and Bison
1806      users should not rely upon it.  Assigning to YYVAL
1807      unconditionally makes the parser a bit smaller, and it avoids a
1808      GCC warning that YYVAL may be used uninitialized.  */
1809   yyval = yyvsp[1-yylen];
1810 
1811 
1812   YY_REDUCE_PRINT (yyn);
1813   switch (yyn)
1814     {
1815         case 2:
1816 
1817 /* Line 1806 of yacc.c  */
1818 #line 94 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1819     { KDevPG::globalSystem.decl = (yyvsp[(1) - (1)].str); }
1820     break;
1821 
1822   case 3:
1823 
1824 /* Line 1806 of yacc.c  */
1825 #line 97 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1826     { KDevPG::globalSystem.bits += (yyvsp[(5) - (5)].str); }
1827     break;
1828 
1829   case 6:
1830 
1831 /* Line 1806 of yacc.c  */
1832 #line 107 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1833     { KDevPG::globalSystem.pushParserClassMember((yyvsp[(2) - (2)].item)); }
1834     break;
1835 
1836   case 7:
1837 
1838 /* Line 1806 of yacc.c  */
1839 #line 109 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1840     { KDevPG::globalSystem.bits += (yyvsp[(5) - (5)].str); }
1841     break;
1842 
1843   case 8:
1844 
1845 /* Line 1806 of yacc.c  */
1846 #line 111 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1847     { KDevPG::globalSystem.pushLexerClassMember((yyvsp[(2) - (2)].item)); }
1848     break;
1849 
1850   case 9:
1851 
1852 /* Line 1806 of yacc.c  */
1853 #line 113 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1854     { KDevPG::globalSystem.lexerBits += (yyvsp[(5) - (5)].str); }
1855     break;
1856 
1857   case 11:
1858 
1859 /* Line 1806 of yacc.c  */
1860 #line 116 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1861     { if(KDevPG::globalSystem.hasLexer)
1862         { KDevPG::checkOut << "** ERROR you have to specify the lexer-type (%table_lexer) before any lexer rules"; exit(-1); }
1863         switch(KDevPG::GDFA::type)
1864         {
1865           case KDevPG::SAscii: KDevPG::GDFA::type = KDevPG::TAscii; break;
1866           case KDevPG::SLatin1: KDevPG::GDFA::type = KDevPG::TLatin1; break;
1867           case KDevPG::SUtf8: KDevPG::GDFA::type = KDevPG::TUtf8; break;
1868           case KDevPG::SUcs2: KDevPG::GDFA::type = KDevPG::TUcs2; break;
1869           case KDevPG::SUtf16: KDevPG::GDFA::type = KDevPG::TUtf16; break;
1870 /*           case KDevPG::SUcs4: KDevPG::GDFA::type = KDevPG::TUcs4; break; */
1871           default: /* empty */;
1872         }
1873       }
1874     break;
1875 
1876   case 12:
1877 
1878 /* Line 1806 of yacc.c  */
1879 #line 130 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1880     { if(KDevPG::globalSystem.hasLexer)
1881       { KDevPG::checkOut << "** ERROR you have to specify the lexer-type (%sequence_lexer) before any lexer rules"; exit(-1); }
1882       switch(KDevPG::GDFA::type)
1883       {
1884         case KDevPG::TAscii: KDevPG::GDFA::type = KDevPG::SAscii; break;
1885         case KDevPG::TLatin1: KDevPG::GDFA::type = KDevPG::SLatin1; break;
1886         case KDevPG::TUtf8: KDevPG::GDFA::type = KDevPG::SUtf8; break;
1887         case KDevPG::TUcs2: KDevPG::GDFA::type = KDevPG::SUcs2; break;
1888         case KDevPG::TUtf16: KDevPG::GDFA::type = KDevPG::SUtf16; break;
1889 /*         case KDevPG::TUcs4: KDevPG::GDFA::type = KDevPG::SUcs4; break; */
1890         default: /* empty */;
1891       }
1892       }
1893     break;
1894 
1895   case 13:
1896 
1897 /* Line 1806 of yacc.c  */
1898 #line 144 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1899     {
1900         if(KDevPG::globalSystem.hasLexer)
1901         { KDevPG::checkOut << "** ERROR you have to specify the lexer-type (%sequence_lexer) before any lexer rules"; exit(-1); }
1902         int base = (KDevPG::GDFA::type / 4) * 4; // warning: magic constant: number of different codecs
1903         QString str = (yyvsp[(2) - (2)].str);
1904         str = str.toLower();
1905         str.replace('-', "");
1906         if(str == "ascii")
1907           /* base += 0*/;
1908         else if(str == "latin1")
1909           base += 1;
1910         else if(str == "utf8")
1911           base += 2;
1912         else if(str == "ucs2")
1913           base += 3;
1914         else if(str == "utf16")
1915           base += 4;
1916         else if(str == "ucs4" || str == "utf32")
1917           base += 5;
1918         else
1919         {
1920           KDevPG::checkOut << "** ERROR unknown codec  ``" << (yyvsp[(2) - (2)].str) << "''" << endl;
1921           exit(-1);
1922         }
1923         KDevPG::GDFA::type = KDevPG::AutomatonType(base);
1924       }
1925     break;
1926 
1927   case 14:
1928 
1929 /* Line 1806 of yacc.c  */
1930 #line 171 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1931     { KDevPG::globalSystem.tokenStream = (yyvsp[(2) - (3)].str);           }
1932     break;
1933 
1934   case 15:
1935 
1936 /* Line 1806 of yacc.c  */
1937 #line 173 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1938     { KDevPG::globalSystem.exportMacro = (yyvsp[(2) - (2)].str);           }
1939     break;
1940 
1941   case 16:
1942 
1943 /* Line 1806 of yacc.c  */
1944 #line 175 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1945     { KDevPG::globalSystem.exportMacroHeader = (yyvsp[(2) - (2)].str);     }
1946     break;
1947 
1948   case 17:
1949 
1950 /* Line 1806 of yacc.c  */
1951 #line 177 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1952     { KDevPG::globalSystem.namespaceCode = (yyvsp[(2) - (2)].str);         }
1953     break;
1954 
1955   case 18:
1956 
1957 /* Line 1806 of yacc.c  */
1958 #line 179 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1959     { KDevPG::globalSystem.astCode = (yyvsp[(2) - (2)].str);               }
1960     break;
1961 
1962   case 19:
1963 
1964 /* Line 1806 of yacc.c  */
1965 #line 181 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1966     { KDevPG::globalSystem.pushParserDeclarationHeader((yyvsp[(2) - (2)].str)); }
1967     break;
1968 
1969   case 20:
1970 
1971 /* Line 1806 of yacc.c  */
1972 #line 183 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1973     { KDevPG::globalSystem.pushParserBitsHeader((yyvsp[(2) - (2)].str)); }
1974     break;
1975 
1976   case 21:
1977 
1978 /* Line 1806 of yacc.c  */
1979 #line 185 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1980     { KDevPG::globalSystem.pushAstHeader((yyvsp[(2) - (2)].str)); }
1981     break;
1982 
1983   case 22:
1984 
1985 /* Line 1806 of yacc.c  */
1986 #line 187 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1987     { KDevPG::globalSystem.pushLexerDeclarationHeader((yyvsp[(2) - (2)].str)); }
1988     break;
1989 
1990   case 23:
1991 
1992 /* Line 1806 of yacc.c  */
1993 #line 189 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
1994     { KDevPG::globalSystem.inputStream = (yyvsp[(2) - (2)].str); }
1995     break;
1996 
1997   case 24:
1998 
1999 /* Line 1806 of yacc.c  */
2000 #line 191 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2001     { KDevPG::globalSystem.pushLexerBitsHeader((yyvsp[(2) - (2)].str)); }
2002     break;
2003 
2004   case 25:
2005 
2006 /* Line 1806 of yacc.c  */
2007 #line 193 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2008     { KDevPG::globalSystem.astBaseClasses[(yyvsp[(2) - (3)].str)] = (yyvsp[(3) - (3)].str); }
2009     break;
2010 
2011   case 26:
2012 
2013 /* Line 1806 of yacc.c  */
2014 #line 195 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2015     { KDevPG::globalSystem.parserBaseClass = (yyvsp[(2) - (2)].str); }
2016     break;
2017 
2018   case 27:
2019 
2020 /* Line 1806 of yacc.c  */
2021 #line 197 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2022     { KDevPG::globalSystem.lexerBaseClass = (yyvsp[(2) - (2)].str); }
2023     break;
2024 
2025   case 28:
2026 
2027 /* Line 1806 of yacc.c  */
2028 #line 198 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2029     { KDevPG::globalSystem.hasLexer = true; lexerEnv = (yyvsp[(2) - (2)].str); if(KDevPG::globalSystem.lexerActions[lexerEnv].empty()) KDevPG::globalSystem.lexerActions[lexerEnv].push_back("qDebug() << \"error\"; exit(-1);"); }
2030     break;
2031 
2032   case 30:
2033 
2034 /* Line 1806 of yacc.c  */
2035 #line 199 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2036     { KDevPG::globalSystem.hasLexer = true; KDevPG::loadUnicodeData(); lexerEnv = "start"; if(KDevPG::globalSystem.lexerActions["start"].empty()) KDevPG::globalSystem.lexerActions["start"].push_back("qDebug() << \"error\"; exit(-1);"); }
2037     break;
2038 
2039   case 32:
2040 
2041 /* Line 1806 of yacc.c  */
2042 #line 204 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2043     { KDevPG::globalSystem.regexpById[(yyvsp[(3) - (4)].str)] = (yyvsp[(1) - (4)].nfa);
2044             }
2045     break;
2046 
2047   case 34:
2048 
2049 /* Line 1806 of yacc.c  */
2050 #line 207 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2051     {
2052               if((yyvsp[(1) - (4)].nfa)->acceptsEpsilon())
2053                 KDevPG::checkOut << "** WARNING Lexer rule accepting the empty word at line " << yyLine << endl;
2054               else if((yyvsp[(1) - (4)].nfa)->isEmpty())
2055                 KDevPG::checkOut << "** WARNING Lexer rule not accepting anything at line " << yyLine << endl;
2056               QString s = QString((yyvsp[(2) - (4)].str)) + QString(r);
2057               KDevPG::globalSystem.lexerEnvs[lexerEnv].push_back((yyvsp[(1) - (4)].nfa));
2058               KDevPG::globalSystem.lexerActions[lexerEnv].push_back(s);
2059             }
2060     break;
2061 
2062   case 36:
2063 
2064 /* Line 1806 of yacc.c  */
2065 #line 217 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2066     {
2067               if((yyvsp[(1) - (8)].nfa)->acceptsEpsilon())
2068                 KDevPG::checkOut << "** WARNING Lexer rule accepting the empty word at line " << yyLine << endl;
2069               else if((yyvsp[(1) - (8)].nfa)->isEmpty())
2070                 KDevPG::checkOut << "** WARNING Lexer rule not accepting anything at line " << yyLine << endl;
2071               bool ignore = false;
2072               auto minLen = (yyvsp[(4) - (8)].nfa)->minLength(), maxLen = (yyvsp[(4) - (8)].nfa)->maxLength();
2073               if(minLen == 0)
2074               {
2075                 KDevPG::checkOut << "** WARNING Lexer rule specifying epsilon-lookahead at line " << yyLine << ", ignore the lookahead." << endl;
2076                 ignore = true;
2077               }
2078               else if(minLen != maxLen)
2079               {
2080                 KDevPG::checkOut << "** WARNING Invalid lookahead (no fixed length) at line " << yyLine << " (min length: " << (minLen == -1 ? "none" : QString::number(minLen)) << ", max length: " << (maxLen == -2 ? "infinity" : (maxLen == -1 ? "none" : QString::number(maxLen))) << "), ignore the lookahead." << endl;
2081                 ignore = true;
2082               }
2083               if(ignore)
2084               {
2085                 QString s = QString((yyvsp[(6) - (8)].str)) + QString(r);
2086                 KDevPG::globalSystem.lexerEnvs[lexerEnv].push_back((yyvsp[(1) - (8)].nfa));
2087                 KDevPG::globalSystem.lexerActions[lexerEnv].push_back(s);
2088               }
2089               else
2090               {
2091                 QString s = "Iterator::plain() -= " + QString::number(minLen) + "; " + QString((yyvsp[(6) - (8)].str)) + QString(r);
2092                 *(yyvsp[(1) - (8)].nfa) <<= *(yyvsp[(4) - (8)].nfa);
2093                 KDevPG::globalSystem.lexerEnvs[lexerEnv].push_back((yyvsp[(1) - (8)].nfa));
2094                 KDevPG::globalSystem.lexerActions[lexerEnv].push_back(s);
2095               }
2096             }
2097     break;
2098 
2099   case 38:
2100 
2101 /* Line 1806 of yacc.c  */
2102 #line 249 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2103     {
2104               if((yyvsp[(1) - (8)].nfa)->acceptsEpsilon())
2105                 KDevPG::checkOut << "** WARNING Lexer rule accepting the empty word at line " << yyLine << endl;
2106               else if((yyvsp[(1) - (8)].nfa)->isEmpty())
2107                 KDevPG::checkOut << "** WARNING Lexer rule not accepting anything at line " << yyLine << endl;
2108               bool ignore = false;
2109               auto minLen = (yyvsp[(4) - (8)].nfa)->minLength(), maxLen = (yyvsp[(4) - (8)].nfa)->maxLength();
2110               if(minLen == 0)
2111               {
2112                 KDevPG::checkOut << "** WARNING Lexer rule specifying epsilon-barrier at line " << yyLine << ", ignore the barrier." << endl;
2113                 ignore = true;
2114               }
2115               else if(minLen != maxLen)
2116               {
2117                 KDevPG::checkOut << "** WARNING Invalid barrier (no fixed length) at line " << yyLine << " (min length: " << (minLen == -1 ? "none" : QString::number(minLen)) << ", max length: " << (maxLen == -2 ? "infinity" : (maxLen == -1 ? "none" : QString::number(maxLen))) << "), ignore the barrier." << endl;
2118                 ignore = true;
2119               }
2120               if(ignore)
2121               {
2122                 QString s = QString((yyvsp[(6) - (8)].str)) + QString(r);
2123                 KDevPG::globalSystem.lexerEnvs[lexerEnv].push_back((yyvsp[(1) - (8)].nfa));
2124                 KDevPG::globalSystem.lexerActions[lexerEnv].push_back(s);
2125               }
2126               else
2127               {
2128                 KDevPG::GNFA exclude = KDevPG::GNFA::anything();
2129                 exclude <<= *(yyvsp[(4) - (8)].nfa);
2130                 exclude <<= KDevPG::GNFA::anything();
2131                 KDevPG::GNFA *staying = new KDevPG::GNFA(*(yyvsp[(1) - (8)].nfa));
2132                 *staying ^= exclude;
2133                 KDevPG::globalSystem.lexerEnvs[lexerEnv].push_back(staying);
2134                 KDevPG::globalSystem.lexerActions[lexerEnv].push_back(QString((yyvsp[(6) - (8)].str)) + QString(r));
2135                 // barrier should not get read partially
2136                 exclude <<= KDevPG::GNFA::anyChar();
2137                 *(yyvsp[(1) - (8)].nfa) <<= *(yyvsp[(4) - (8)].nfa);
2138                 *(yyvsp[(1) - (8)].nfa) ^= exclude;
2139                 QString s = "Iterator::plain() -= " + QString::number(minLen) + "; " + QString((yyvsp[(6) - (8)].str)) + QString(r);
2140                 KDevPG::globalSystem.lexerEnvs[lexerEnv].push_back((yyvsp[(1) - (8)].nfa));
2141                 KDevPG::globalSystem.lexerActions[lexerEnv].push_back(s);
2142               }
2143             }
2144     break;
2145 
2146   case 40:
2147 
2148 /* Line 1806 of yacc.c  */
2149 #line 291 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2150     {
2151               KDevPG::globalSystem.lexerActions[lexerEnv][0] = QString((yyvsp[(2) - (2)].str));
2152             }
2153     break;
2154 
2155   case 42:
2156 
2157 /* Line 1806 of yacc.c  */
2158 #line 295 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2159     {
2160               KDevPG::globalSystem.enteringCode[lexerEnv] = QString((yyvsp[(2) - (2)].str));
2161             }
2162     break;
2163 
2164   case 44:
2165 
2166 /* Line 1806 of yacc.c  */
2167 #line 299 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2168     {
2169               KDevPG::globalSystem.leavingCode[lexerEnv] = QString((yyvsp[(2) - (2)].str));
2170             }
2171     break;
2172 
2173   case 47:
2174 
2175 /* Line 1806 of yacc.c  */
2176 #line 306 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2177     {
2178         r = "\nlxRETURN(" + QString((yyvsp[(1) - (1)].str)) + ")\n";
2179       }
2180     break;
2181 
2182   case 48:
2183 
2184 /* Line 1806 of yacc.c  */
2185 #line 309 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2186     {
2187         r = "\nlxCONTINUE;\n";
2188       }
2189     break;
2190 
2191   case 49:
2192 
2193 /* Line 1806 of yacc.c  */
2194 #line 312 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2195     { r = "\nlxSKIP\n"; }
2196     break;
2197 
2198   case 50:
2199 
2200 /* Line 1806 of yacc.c  */
2201 #line 316 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2202     { (yyval.nfa) = new KDevPG::GNFA(*(yyvsp[(1) - (3)].nfa) |= *(yyvsp[(3) - (3)].nfa)); delete (yyvsp[(1) - (3)].nfa); delete (yyvsp[(3) - (3)].nfa); }
2203     break;
2204 
2205   case 51:
2206 
2207 /* Line 1806 of yacc.c  */
2208 #line 317 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2209     { (yyval.nfa) = (yyvsp[(1) - (1)].nfa); }
2210     break;
2211 
2212   case 52:
2213 
2214 /* Line 1806 of yacc.c  */
2215 #line 321 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2216     { (yyval.nfa) = new KDevPG::GNFA(*(yyvsp[(1) - (3)].nfa) &= *(yyvsp[(3) - (3)].nfa)); delete (yyvsp[(1) - (3)].nfa); delete (yyvsp[(3) - (3)].nfa); }
2217     break;
2218 
2219   case 53:
2220 
2221 /* Line 1806 of yacc.c  */
2222 #line 322 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2223     { (yyval.nfa) = (yyvsp[(1) - (1)].nfa); }
2224     break;
2225 
2226   case 54:
2227 
2228 /* Line 1806 of yacc.c  */
2229 #line 326 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2230     { (yyval.nfa) = new KDevPG::GNFA(*(yyvsp[(1) - (3)].nfa) ^= *(yyvsp[(3) - (3)].nfa)); delete (yyvsp[(1) - (3)].nfa); delete (yyvsp[(3) - (3)].nfa); }
2231     break;
2232 
2233   case 55:
2234 
2235 /* Line 1806 of yacc.c  */
2236 #line 327 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2237     { (yyval.nfa) = (yyvsp[(1) - (1)].nfa); }
2238     break;
2239 
2240   case 56:
2241 
2242 /* Line 1806 of yacc.c  */
2243 #line 331 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2244     { (yyval.nfa) = new KDevPG::GNFA((yyvsp[(2) - (2)].nfa)->negate()); delete (yyvsp[(2) - (2)].nfa); }
2245     break;
2246 
2247   case 57:
2248 
2249 /* Line 1806 of yacc.c  */
2250 #line 332 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2251     { (yyval.nfa) = new KDevPG::GNFA(*(yyvsp[(2) - (2)].nfa) |= KDevPG::GNFA::emptyWord()); delete (yyvsp[(2) - (2)].nfa); }
2252     break;
2253 
2254   case 58:
2255 
2256 /* Line 1806 of yacc.c  */
2257 #line 333 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2258     { (yyval.nfa) = (yyvsp[(1) - (1)].nfa); }
2259     break;
2260 
2261   case 59:
2262 
2263 /* Line 1806 of yacc.c  */
2264 #line 337 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2265     { (yyval.nfa) = new KDevPG::GNFA(*(yyvsp[(1) - (2)].nfa) <<= *(yyvsp[(2) - (2)].nfa)); delete (yyvsp[(1) - (2)].nfa); delete (yyvsp[(2) - (2)].nfa); }
2266     break;
2267 
2268   case 60:
2269 
2270 /* Line 1806 of yacc.c  */
2271 #line 338 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2272     { (yyval.nfa) = (yyvsp[(1) - (1)].nfa); }
2273     break;
2274 
2275   case 61:
2276 
2277 /* Line 1806 of yacc.c  */
2278 #line 342 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2279     { (yyval.nfa) = new KDevPG::GNFA(*(yyvsp[(1) - (3)].nfa)); KDevPG::GNFA *tmp = new KDevPG::GNFA(*(yyvsp[(3) - (3)].nfa) <<= *(yyvsp[(1) - (3)].nfa)); **tmp; *(yyval.nfa) <<= *tmp; delete tmp; delete (yyvsp[(1) - (3)].nfa); delete (yyvsp[(3) - (3)].nfa); }
2280     break;
2281 
2282   case 62:
2283 
2284 /* Line 1806 of yacc.c  */
2285 #line 343 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2286     { (yyval.nfa) = (yyvsp[(1) - (1)].nfa); }
2287     break;
2288 
2289   case 63:
2290 
2291 /* Line 1806 of yacc.c  */
2292 #line 347 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2293     { (yyval.nfa) = new KDevPG::GNFA(**(yyvsp[(1) - (2)].nfa)); delete (yyvsp[(1) - (2)].nfa); }
2294     break;
2295 
2296   case 64:
2297 
2298 /* Line 1806 of yacc.c  */
2299 #line 348 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2300     { (yyval.nfa) = new KDevPG::GNFA(*(yyvsp[(1) - (2)].nfa)); **(yyval.nfa); *(yyval.nfa) <<= *(yyvsp[(1) - (2)].nfa); delete (yyvsp[(1) - (2)].nfa); }
2301     break;
2302 
2303   case 65:
2304 
2305 /* Line 1806 of yacc.c  */
2306 #line 349 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2307     { (yyval.nfa) = (yyvsp[(1) - (1)].nfa); }
2308     break;
2309 
2310   case 66:
2311 
2312 /* Line 1806 of yacc.c  */
2313 #line 353 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2314     { (yyval.nfa) = new KDevPG::GNFA(*(yyvsp[(2) - (3)].nfa)); delete (yyvsp[(2) - (3)].nfa); }
2315     break;
2316 
2317   case 67:
2318 
2319 /* Line 1806 of yacc.c  */
2320 #line 354 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2321     { (yyval.nfa) = (yyvsp[(2) - (3)].nfa); }
2322     break;
2323 
2324   case 68:
2325 
2326 /* Line 1806 of yacc.c  */
2327 #line 355 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2328     { (yyval.nfa) = new KDevPG::GNFA(KDevPG::GNFA::anyChar()); }
2329     break;
2330 
2331   case 69:
2332 
2333 /* Line 1806 of yacc.c  */
2334 #line 356 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2335     { (yyval.nfa) = new KDevPG::GNFA(KDevPG::GNFA::word(KDevPG::unescaped(QByteArray((yyvsp[(1) - (1)].str))))); }
2336     break;
2337 
2338   case 70:
2339 
2340 /* Line 1806 of yacc.c  */
2341 #line 357 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2342     { (yyval.nfa) = new KDevPG::GNFA(KDevPG::GNFA::word(KDevPG::unescaped(QByteArray((yyvsp[(1) - (1)].str))))); }
2343     break;
2344 
2345   case 71:
2346 
2347 /* Line 1806 of yacc.c  */
2348 #line 358 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2349     {
2350                               if(!KDevPG::globalSystem.regexpById.contains((yyvsp[(1) - (1)].str)))
2351                               {
2352                                 KDevPG::checkOut << "** ERROR: no named regexp " << (yyvsp[(1) - (1)].str) << endl;
2353                                 exit(-1);
2354                               }
2355                               KDevPG::GNFA *regexp = KDevPG::globalSystem.regexpById[(yyvsp[(1) - (1)].str)];
2356                               if(!KDevPG::globalSystem.dfaForNfa.contains(regexp))
2357                               {
2358                                 KDevPG::globalSystem.dfaForNfa[regexp] = new KDevPG::GDFA(regexp->dfa());
2359                                 KDevPG::globalSystem.dfaForNfa[regexp]->minimize();
2360                                 *regexp = KDevPG::globalSystem.dfaForNfa[regexp]->nfa();
2361                               }
2362                               (yyval.nfa) = new KDevPG::GNFA(*regexp);
2363                             }
2364     break;
2365 
2366   case 72:
2367 
2368 /* Line 1806 of yacc.c  */
2369 #line 373 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2370     { (yyval.nfa) = new KDevPG::GNFA(KDevPG::GNFA::emptyWord()); }
2371     break;
2372 
2373   case 73:
2374 
2375 /* Line 1806 of yacc.c  */
2376 #line 377 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2377     { (yyval.nfa) = new KDevPG::GNFA(*(yyvsp[(1) - (3)].nfa) |= *(yyvsp[(3) - (3)].nfa)); delete (yyvsp[(1) - (3)].nfa); delete (yyvsp[(3) - (3)].nfa); }
2378     break;
2379 
2380   case 74:
2381 
2382 /* Line 1806 of yacc.c  */
2383 #line 378 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2384     { (yyval.nfa) = (yyvsp[(1) - (1)].nfa); }
2385     break;
2386 
2387   case 75:
2388 
2389 /* Line 1806 of yacc.c  */
2390 #line 382 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2391     { (yyval.nfa) = new KDevPG::GNFA(*(yyvsp[(1) - (3)].nfa) &= *(yyvsp[(3) - (3)].nfa)); delete (yyvsp[(1) - (3)].nfa); delete (yyvsp[(3) - (3)].nfa); }
2392     break;
2393 
2394   case 76:
2395 
2396 /* Line 1806 of yacc.c  */
2397 #line 383 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2398     { (yyval.nfa) = (yyvsp[(1) - (1)].nfa); }
2399     break;
2400 
2401   case 77:
2402 
2403 /* Line 1806 of yacc.c  */
2404 #line 387 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2405     { (yyval.nfa) = new KDevPG::GNFA(*(yyvsp[(1) - (3)].nfa) ^= *(yyvsp[(3) - (3)].nfa)); delete (yyvsp[(1) - (3)].nfa); delete (yyvsp[(3) - (3)].nfa); }
2406     break;
2407 
2408   case 78:
2409 
2410 /* Line 1806 of yacc.c  */
2411 #line 388 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2412     { (yyval.nfa) = (yyvsp[(1) - (1)].nfa); }
2413     break;
2414 
2415   case 79:
2416 
2417 /* Line 1806 of yacc.c  */
2418 #line 392 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2419     { (yyval.nfa) = new KDevPG::GNFA((yyvsp[(2) - (2)].nfa)->negate()); delete (yyvsp[(2) - (2)].nfa); }
2420     break;
2421 
2422   case 80:
2423 
2424 /* Line 1806 of yacc.c  */
2425 #line 393 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2426     { (yyval.nfa) = new KDevPG::GNFA(*(yyvsp[(2) - (2)].nfa) |= KDevPG::GNFA::emptyWord()); delete (yyvsp[(2) - (2)].nfa); }
2427     break;
2428 
2429   case 81:
2430 
2431 /* Line 1806 of yacc.c  */
2432 #line 394 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2433     { (yyval.nfa) = (yyvsp[(1) - (1)].nfa); }
2434     break;
2435 
2436   case 82:
2437 
2438 /* Line 1806 of yacc.c  */
2439 #line 398 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2440     { (yyval.nfa) = new KDevPG::GNFA(*(yyvsp[(1) - (2)].nfa) |= *(yyvsp[(2) - (2)].nfa)); delete (yyvsp[(1) - (2)].nfa); delete (yyvsp[(2) - (2)].nfa); }
2441     break;
2442 
2443   case 84:
2444 
2445 /* Line 1806 of yacc.c  */
2446 #line 403 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2447     { (yyval.nfa) = new KDevPG::GNFA(*(yyvsp[(1) - (3)].nfa)); KDevPG::GNFA *tmp = new KDevPG::GNFA(*(yyvsp[(3) - (3)].nfa) <<= *(yyvsp[(1) - (3)].nfa)); **tmp; *(yyval.nfa) <<= *tmp; delete tmp; delete (yyvsp[(1) - (3)].nfa); delete (yyvsp[(3) - (3)].nfa); }
2448     break;
2449 
2450   case 85:
2451 
2452 /* Line 1806 of yacc.c  */
2453 #line 404 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2454     { (yyval.nfa) = (yyvsp[(1) - (1)].nfa); }
2455     break;
2456 
2457   case 86:
2458 
2459 /* Line 1806 of yacc.c  */
2460 #line 408 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2461     { (yyval.nfa) = new KDevPG::GNFA(**(yyvsp[(1) - (2)].nfa)); delete (yyvsp[(1) - (2)].nfa); }
2462     break;
2463 
2464   case 87:
2465 
2466 /* Line 1806 of yacc.c  */
2467 #line 409 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2468     { (yyval.nfa) = new KDevPG::GNFA(*(yyvsp[(1) - (2)].nfa)); **(yyval.nfa); *(yyval.nfa) <<= *(yyvsp[(1) - (2)].nfa); delete (yyvsp[(1) - (2)].nfa); }
2469     break;
2470 
2471   case 88:
2472 
2473 /* Line 1806 of yacc.c  */
2474 #line 410 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2475     { (yyval.nfa) = (yyvsp[(1) - (1)].nfa); }
2476     break;
2477 
2478   case 89:
2479 
2480 /* Line 1806 of yacc.c  */
2481 #line 414 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2482     { (yyval.nfa) = new KDevPG::GNFA(*(yyvsp[(2) - (3)].nfa)); delete (yyvsp[(2) - (3)].nfa); }
2483     break;
2484 
2485   case 90:
2486 
2487 /* Line 1806 of yacc.c  */
2488 #line 415 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2489     { (yyval.nfa) = (yyvsp[(2) - (3)].nfa); }
2490     break;
2491 
2492   case 91:
2493 
2494 /* Line 1806 of yacc.c  */
2495 #line 416 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2496     { (yyval.nfa) = new KDevPG::GNFA(KDevPG::GNFA::anyChar()); }
2497     break;
2498 
2499   case 92:
2500 
2501 /* Line 1806 of yacc.c  */
2502 #line 417 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2503     { (yyval.nfa) = new KDevPG::GNFA(KDevPG::GNFA::word(KDevPG::unescaped(QByteArray((yyvsp[(1) - (1)].str))))); }
2504     break;
2505 
2506   case 93:
2507 
2508 /* Line 1806 of yacc.c  */
2509 #line 418 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2510     {
2511       quint32 begin, end;
2512       QString str = KDevPG::unescaped(QByteArray((yyvsp[(1) - (1)].str)));
2513       assert(str.size() >= 3 && str.size() <= 5);
2514       if(str[1] == '-')
2515       {
2516         begin = str[0].unicode();
2517         if(str.size() == 3)
2518           end = str[2].unicode();
2519         else
2520           end = QChar::surrogateToUcs4(str[2], str[3]);
2521       }
2522       else
2523       {
2524         begin = QChar::surrogateToUcs4(str[0], str[1]);
2525         assert(str[2] == '-');
2526         if(str.size() == 4)
2527           end = str[3].unicode();
2528         else
2529           end = QChar::surrogateToUcs4(str[3], str[4]);
2530       }
2531       (yyval.nfa) = new KDevPG::GNFA(KDevPG::GNFA::range(begin, end+1));
2532     }
2533     break;
2534 
2535   case 94:
2536 
2537 /* Line 1806 of yacc.c  */
2538 #line 441 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2539     { (yyval.nfa) = new KDevPG::GNFA(KDevPG::GNFA::collection(KDevPG::unescaped(QByteArray((yyvsp[(1) - (1)].str))))); }
2540     break;
2541 
2542   case 95:
2543 
2544 /* Line 1806 of yacc.c  */
2545 #line 442 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2546     {
2547                               if(!KDevPG::globalSystem.regexpById.contains((yyvsp[(1) - (1)].str)))
2548                               {
2549                                 KDevPG::checkOut << "** ERROR: no named regexp " << (yyvsp[(1) - (1)].str) << endl;
2550                                 exit(-1);
2551                               }
2552                               KDevPG::GNFA *regexp = KDevPG::globalSystem.regexpById[(yyvsp[(1) - (1)].str)];
2553                               if(!KDevPG::globalSystem.dfaForNfa.contains(regexp))
2554                               {
2555                                 KDevPG::globalSystem.dfaForNfa[regexp] = new KDevPG::GDFA(regexp->dfa());
2556                                 KDevPG::globalSystem.dfaForNfa[regexp]->minimize();
2557                                 *regexp = KDevPG::globalSystem.dfaForNfa[regexp]->nfa();
2558                               }
2559                               (yyval.nfa) = new KDevPG::GNFA(*regexp);
2560                             }
2561     break;
2562 
2563   case 96:
2564 
2565 /* Line 1806 of yacc.c  */
2566 #line 457 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2567     { (yyval.nfa) = new KDevPG::GNFA(KDevPG::GNFA::emptyWord()); }
2568     break;
2569 
2570   case 97:
2571 
2572 /* Line 1806 of yacc.c  */
2573 #line 463 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2574     { (yyval.item) = KDevPG::member(KDevPG::Settings::MemberItem::PublicDeclaration, (yyvsp[(5) - (5)].str));    }
2575     break;
2576 
2577   case 98:
2578 
2579 /* Line 1806 of yacc.c  */
2580 #line 465 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2581     { (yyval.item) = KDevPG::member(KDevPG::Settings::MemberItem::ProtectedDeclaration, (yyvsp[(5) - (5)].str)); }
2582     break;
2583 
2584   case 99:
2585 
2586 /* Line 1806 of yacc.c  */
2587 #line 467 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2588     { (yyval.item) = KDevPG::member(KDevPG::Settings::MemberItem::PrivateDeclaration, (yyvsp[(5) - (5)].str));   }
2589     break;
2590 
2591   case 100:
2592 
2593 /* Line 1806 of yacc.c  */
2594 #line 469 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2595     { (yyval.item) = KDevPG::member(KDevPG::Settings::MemberItem::ConstructorCode, (yyvsp[(4) - (4)].str));      }
2596     break;
2597 
2598   case 101:
2599 
2600 /* Line 1806 of yacc.c  */
2601 #line 471 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2602     { (yyval.item) = KDevPG::member(KDevPG::Settings::MemberItem::DestructorCode, (yyvsp[(4) - (4)].str));       }
2603     break;
2604 
2605   case 102:
2606 
2607 /* Line 1806 of yacc.c  */
2608 #line 475 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2609     { KDevPG::globalSystem.pushTerminal((yyvsp[(1) - (1)].str),(yyvsp[(1) - (1)].str)); }
2610     break;
2611 
2612   case 103:
2613 
2614 /* Line 1806 of yacc.c  */
2615 #line 476 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2616     { KDevPG::globalSystem.pushTerminal((yyvsp[(1) - (4)].str),(yyvsp[(3) - (4)].str)); }
2617     break;
2618 
2619   case 104:
2620 
2621 /* Line 1806 of yacc.c  */
2622 #line 477 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2623     { KDevPG::globalSystem.pushTerminal((yyvsp[(3) - (3)].str),(yyvsp[(3) - (3)].str)); }
2624     break;
2625 
2626   case 105:
2627 
2628 /* Line 1806 of yacc.c  */
2629 #line 479 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2630     { KDevPG::globalSystem.pushTerminal((yyvsp[(3) - (6)].str),(yyvsp[(5) - (6)].str)); }
2631     break;
2632 
2633   case 107:
2634 
2635 /* Line 1806 of yacc.c  */
2636 #line 484 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2637     { KDevPG::globalSystem.pushRule((yyvsp[(2) - (3)].item)); }
2638     break;
2639 
2640   case 108:
2641 
2642 /* Line 1806 of yacc.c  */
2643 #line 488 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2644     { (yyval.item) = KDevPG::globalSystem.zero(); }
2645     break;
2646 
2647   case 109:
2648 
2649 /* Line 1806 of yacc.c  */
2650 #line 489 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2651     { (yyval.item) = (yyvsp[(2) - (3)].item); }
2652     break;
2653 
2654   case 110:
2655 
2656 /* Line 1806 of yacc.c  */
2657 #line 490 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2658     { (yyval.item) = (yyvsp[(1) - (1)].item); }
2659     break;
2660 
2661   case 111:
2662 
2663 /* Line 1806 of yacc.c  */
2664 #line 491 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2665     { (yyval.item) = (yyvsp[(1) - (1)].item); }
2666     break;
2667 
2668   case 112:
2669 
2670 /* Line 1806 of yacc.c  */
2671 #line 492 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2672     { (yyval.item) = KDevPG::inlinedNonTerminal(KDevPG::globalSystem.pushSymbol((yyvsp[(2) - (2)].str))); }
2673     break;
2674 
2675   case 113:
2676 
2677 /* Line 1806 of yacc.c  */
2678 #line 493 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2679     { (yyval.item) = KDevPG::annotation((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].item), false, (yyvsp[(2) - (3)].storageType)); }
2680     break;
2681 
2682   case 114:
2683 
2684 /* Line 1806 of yacc.c  */
2685 #line 494 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2686     { (yyval.item) = KDevPG::annotation((yyvsp[(2) - (4)].str), (yyvsp[(4) - (4)].item), true, (yyvsp[(3) - (4)].storageType));  }
2687     break;
2688 
2689   case 115:
2690 
2691 /* Line 1806 of yacc.c  */
2692 #line 498 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2693     { (yyval.item) = KDevPG::nonTerminal(KDevPG::globalSystem.pushSymbol((yyvsp[(1) - (2)].str)), (yyvsp[(2) - (2)].str)); }
2694     break;
2695 
2696   case 116:
2697 
2698 /* Line 1806 of yacc.c  */
2699 #line 499 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2700     { (yyval.item) = KDevPG::globalSystem.terminal((yyvsp[(1) - (1)].str)); }
2701     break;
2702 
2703   case 117:
2704 
2705 /* Line 1806 of yacc.c  */
2706 #line 504 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2707     {
2708           KDevPG::globalSystem.needStateManagement = true;
2709           (yyval.item) = KDevPG::tryCatch((yyvsp[(3) - (4)].item), 0);
2710         }
2711     break;
2712 
2713   case 118:
2714 
2715 /* Line 1806 of yacc.c  */
2716 #line 509 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2717     {
2718           KDevPG::globalSystem.needStateManagement = true;
2719           (yyval.item) = KDevPG::tryCatch((yyvsp[(3) - (8)].item), (yyvsp[(7) - (8)].item));
2720         }
2721     break;
2722 
2723   case 119:
2724 
2725 /* Line 1806 of yacc.c  */
2726 #line 515 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2727     { (yyval.str) = const_cast<char*>(""); }
2728     break;
2729 
2730   case 120:
2731 
2732 /* Line 1806 of yacc.c  */
2733 #line 516 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2734     { (yyval.str) = (yyvsp[(1) - (1)].str); }
2735     break;
2736 
2737   case 121:
2738 
2739 /* Line 1806 of yacc.c  */
2740 #line 520 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2741     { (yyval.str) = (yyvsp[(1) - (1)].str); }
2742     break;
2743 
2744   case 122:
2745 
2746 /* Line 1806 of yacc.c  */
2747 #line 530 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2748     { (yyval.storageType) = KDevPG::Model::VariableDeclarationItem::StorageAstMember; }
2749     break;
2750 
2751   case 123:
2752 
2753 /* Line 1806 of yacc.c  */
2754 #line 531 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2755     { (yyval.storageType) = KDevPG::Model::VariableDeclarationItem::StorageTemporary;  }
2756     break;
2757 
2758   case 124:
2759 
2760 /* Line 1806 of yacc.c  */
2761 #line 535 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2762     { (yyval.item) = KDevPG::plus((yyvsp[(1) - (2)].item)); }
2763     break;
2764 
2765   case 125:
2766 
2767 /* Line 1806 of yacc.c  */
2768 #line 536 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2769     { (yyval.item) = KDevPG::star((yyvsp[(1) - (2)].item)); }
2770     break;
2771 
2772   case 126:
2773 
2774 /* Line 1806 of yacc.c  */
2775 #line 537 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2776     { (yyval.item) = (yyvsp[(1) - (1)].item); }
2777     break;
2778 
2779   case 127:
2780 
2781 /* Line 1806 of yacc.c  */
2782 #line 538 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2783     { (yyval.item) = KDevPG::alternative((yyvsp[(2) - (2)].item), KDevPG::globalSystem.zero()); }
2784     break;
2785 
2786   case 128:
2787 
2788 /* Line 1806 of yacc.c  */
2789 #line 542 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2790     { (yyval.item) = (yyvsp[(1) - (1)].item); }
2791     break;
2792 
2793   case 129:
2794 
2795 /* Line 1806 of yacc.c  */
2796 #line 544 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2797     {
2798           KDevPG::CloneTree cl;
2799           (yyval.item) = KDevPG::cons((yyvsp[(1) - (3)].item), KDevPG::star(KDevPG::cons(cl.clone((yyvsp[(3) - (3)].item)), cl.clone((yyvsp[(1) - (3)].item)))));
2800         }
2801     break;
2802 
2803   case 130:
2804 
2805 /* Line 1806 of yacc.c  */
2806 #line 548 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2807     { (yyval.item) = KDevPG::action((yyvsp[(1) - (2)].item), (yyvsp[(2) - (2)].str)); }
2808     break;
2809 
2810   case 131:
2811 
2812 /* Line 1806 of yacc.c  */
2813 #line 549 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2814     { (yyval.item) = KDevPG::action(0, (yyvsp[(1) - (1)].str)); }
2815     break;
2816 
2817   case 132:
2818 
2819 /* Line 1806 of yacc.c  */
2820 #line 553 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2821     { (yyval.item) = (yyvsp[(1) - (1)].item); }
2822     break;
2823 
2824   case 133:
2825 
2826 /* Line 1806 of yacc.c  */
2827 #line 554 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2828     { (yyval.item) = KDevPG::cons((yyvsp[(1) - (2)].item), (yyvsp[(2) - (2)].item)); }
2829     break;
2830 
2831   case 134:
2832 
2833 /* Line 1806 of yacc.c  */
2834 #line 558 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2835     { (yyval.item) = (yyvsp[(1) - (1)].item); }
2836     break;
2837 
2838   case 135:
2839 
2840 /* Line 1806 of yacc.c  */
2841 #line 559 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2842     { (yyval.item) = KDevPG::condition((yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].item)); }
2843     break;
2844 
2845   case 136:
2846 
2847 /* Line 1806 of yacc.c  */
2848 #line 563 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2849     { (yyval.item) = (yyvsp[(1) - (1)].item); }
2850     break;
2851 
2852   case 137:
2853 
2854 /* Line 1806 of yacc.c  */
2855 #line 564 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2856     { (yyval.item) = KDevPG::alternative((yyvsp[(1) - (3)].item), (yyvsp[(3) - (3)].item)); }
2857     break;
2858 
2859   case 138:
2860 
2861 /* Line 1806 of yacc.c  */
2862 #line 569 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2863     {
2864           (yyval.item) = KDevPG::evolve((yyvsp[(1) - (7)].item), KDevPG::globalSystem.pushSymbol((yyvsp[(3) - (7)].str)),
2865                           (KDevPG::Model::VariableDeclarationItem*) (yyvsp[(6) - (7)].item), (yyvsp[(4) - (7)].str));
2866         }
2867     break;
2868 
2869   case 139:
2870 
2871 /* Line 1806 of yacc.c  */
2872 #line 574 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2873     {
2874           (yyval.item) = KDevPG::evolve((yyvsp[(1) - (7)].item), KDevPG::globalSystem.pushSymbol((yyvsp[(3) - (7)].str)),
2875                           (KDevPG::Model::VariableDeclarationItem*) (yyvsp[(5) - (7)].item), (yyvsp[(7) - (7)].str));
2876         }
2877     break;
2878 
2879   case 140:
2880 
2881 /* Line 1806 of yacc.c  */
2882 #line 579 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2883     { (yyval.item) = KDevPG::evolve((yyvsp[(1) - (4)].item), KDevPG::globalSystem.pushSymbol((yyvsp[(3) - (4)].str)), 0, (yyvsp[(4) - (4)].str)); }
2884     break;
2885 
2886   case 141:
2887 
2888 /* Line 1806 of yacc.c  */
2889 #line 580 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2890     { if(KDevPG::globalSystem.generateAst == false)
2891         {
2892           qFatal("Operator-expression-parsing is not yet supported with --no-ast!");
2893           exit(-1);
2894         }
2895         operatorNode = KDevPG::createNode<KDevPG::Model::OperatorItem>();
2896       }
2897     break;
2898 
2899   case 142:
2900 
2901 /* Line 1806 of yacc.c  */
2902 #line 586 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2903     { KDevPG::globalSystem.needOperatorStack = true; (yyval.item) = (yyvsp[(2) - (2)].item); }
2904     break;
2905 
2906   case 143:
2907 
2908 /* Line 1806 of yacc.c  */
2909 #line 590 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2910     { (yyval.str) = const_cast<char*>(""); }
2911     break;
2912 
2913   case 144:
2914 
2915 /* Line 1806 of yacc.c  */
2916 #line 591 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2917     { (yyval.str) = (yyvsp[(1) - (1)].str); }
2918     break;
2919 
2920   case 146:
2921 
2922 /* Line 1806 of yacc.c  */
2923 #line 597 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2924     { ; }
2925     break;
2926 
2927   case 147:
2928 
2929 /* Line 1806 of yacc.c  */
2930 #line 602 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2931     {
2932               operatorNode->mBase = (KDevPG::Model::NonTerminalItem*)(yyvsp[(2) - (9)].item);
2933               operatorNode->mName = (yyvsp[(5) - (9)].str);
2934               if(!KDevPG::globalSystem.astBaseClasses.contains(operatorNode->mBase->mSymbol->mName))
2935                 KDevPG::globalSystem.astBaseClasses[operatorNode->mBase->mSymbol->mName] = KDevPG::capitalized(operatorNode->mName) + "Ast";
2936               (yyval.item) = KDevPG::evolve(operatorNode, KDevPG::globalSystem.pushSymbol((yyvsp[(5) - (9)].str)), (KDevPG::Model::VariableDeclarationItem*)(yyvsp[(7) - (9)].item), (yyvsp[(9) - (9)].str));
2937             }
2938     break;
2939 
2940   case 148:
2941 
2942 /* Line 1806 of yacc.c  */
2943 #line 610 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2944     {
2945               operatorNode->mBase = (KDevPG::Model::NonTerminalItem*)(yyvsp[(2) - (9)].item);
2946               operatorNode->mName = (yyvsp[(5) - (9)].str);
2947               if(!KDevPG::globalSystem.astBaseClasses.contains(operatorNode->mBase->mSymbol->mName))
2948                 KDevPG::globalSystem.astBaseClasses[operatorNode->mBase->mSymbol->mName] = KDevPG::capitalized(operatorNode->mName) + "Ast";
2949               (yyval.item) = KDevPG::evolve(operatorNode, KDevPG::globalSystem.pushSymbol((yyvsp[(5) - (9)].str)), (KDevPG::Model::VariableDeclarationItem*)(yyvsp[(8) - (9)].item), (yyvsp[(6) - (9)].str));
2950             }
2951     break;
2952 
2953   case 149:
2954 
2955 /* Line 1806 of yacc.c  */
2956 #line 618 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2957     {
2958               operatorNode->mBase = (KDevPG::Model::NonTerminalItem*)(yyvsp[(2) - (6)].item);
2959               operatorNode->mName = (yyvsp[(5) - (6)].str);
2960               if(!KDevPG::globalSystem.astBaseClasses.contains(operatorNode->mBase->mSymbol->mName))
2961                 KDevPG::globalSystem.astBaseClasses[operatorNode->mBase->mSymbol->mName] = KDevPG::capitalized(operatorNode->mName) + "Ast";
2962               (yyval.item) = KDevPG::evolve(operatorNode, KDevPG::globalSystem.pushSymbol((yyvsp[(5) - (6)].str)), 0, (yyvsp[(6) - (6)].str));
2963             }
2964     break;
2965 
2966   case 150:
2967 
2968 /* Line 1806 of yacc.c  */
2969 #line 628 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2970     { operatorNode->pushBin(*(yyvsp[(2) - (4)].operatorInformation), (yyvsp[(4) - (4)].str), (yyvsp[(3) - (4)].str)); free((yyvsp[(2) - (4)].operatorInformation)); }
2971     break;
2972 
2973   case 151:
2974 
2975 /* Line 1806 of yacc.c  */
2976 #line 629 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2977     { operatorNode->pushTern(*(yyvsp[(2) - (5)].operatorInformation), *(yyvsp[(3) - (5)].operatorInformation), (yyvsp[(5) - (5)].str), (yyvsp[(4) - (5)].str)); free((yyvsp[(2) - (5)].operatorInformation)); free((yyvsp[(3) - (5)].operatorInformation)); }
2978     break;
2979 
2980   case 152:
2981 
2982 /* Line 1806 of yacc.c  */
2983 #line 630 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2984     { operatorNode->pushPre(*(yyvsp[(2) - (3)].operatorInformation), (yyvsp[(3) - (3)].str)); free((yyvsp[(2) - (3)].operatorInformation)); }
2985     break;
2986 
2987   case 153:
2988 
2989 /* Line 1806 of yacc.c  */
2990 #line 631 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2991     { operatorNode->pushPost(*(yyvsp[(2) - (3)].operatorInformation), "0", (yyvsp[(3) - (3)].str)); free((yyvsp[(2) - (3)].operatorInformation)); free((yyvsp[(3) - (3)].str)); }
2992     break;
2993 
2994   case 154:
2995 
2996 /* Line 1806 of yacc.c  */
2997 #line 632 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
2998     { operatorNode->pushPost(*(yyvsp[(2) - (4)].operatorInformation), (yyvsp[(4) - (4)].str), (yyvsp[(3) - (4)].str)); free((yyvsp[(2) - (4)].operatorInformation)); }
2999     break;
3000 
3001   case 155:
3002 
3003 /* Line 1806 of yacc.c  */
3004 #line 633 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3005     { operatorNode->pushParen(*(yyvsp[(2) - (3)].operatorInformation), *(yyvsp[(3) - (3)].operatorInformation)); free((yyvsp[(2) - (3)].operatorInformation)); free((yyvsp[(3) - (3)].operatorInformation)); }
3006     break;
3007 
3008   case 156:
3009 
3010 /* Line 1806 of yacc.c  */
3011 #line 637 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3012     { (yyval.str) = (char*)"0"; }
3013     break;
3014 
3015   case 157:
3016 
3017 /* Line 1806 of yacc.c  */
3018 #line 638 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3019     { (yyval.str) = (yyvsp[(1) - (1)].str); }
3020     break;
3021 
3022   case 158:
3023 
3024 /* Line 1806 of yacc.c  */
3025 #line 639 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3026     { (yyval.str) = (yyvsp[(2) - (2)].str); }
3027     break;
3028 
3029   case 159:
3030 
3031 /* Line 1806 of yacc.c  */
3032 #line 643 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3033     { (yyval.str) = (char*)"1"; }
3034     break;
3035 
3036   case 160:
3037 
3038 /* Line 1806 of yacc.c  */
3039 #line 644 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3040     { (yyval.str) = (char*)"0"; }
3041     break;
3042 
3043   case 161:
3044 
3045 /* Line 1806 of yacc.c  */
3046 #line 645 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3047     { uint yyleng = strlen((yyvsp[(2) - (2)].str));
3048                                      char *tmp = (char*)calloc(yyleng+7, sizeof(char));
3049                                      tmp[0] = '(';
3050                                      strcpy(tmp+1, (yyvsp[(2) - (2)].str));
3051                                      strcpy(tmp+yyleng+6-6+1, "?1:0)");
3052                                      (yyval.str) = tmp;
3053                                    }
3054     break;
3055 
3056   case 162:
3057 
3058 /* Line 1806 of yacc.c  */
3059 #line 652 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3060     { uint yyleng = strlen((yyvsp[(2) - (2)].str));
3061                                      char *tmp = (char*)calloc(yyleng+7, sizeof(char));
3062                                      tmp[0] = '(';
3063                                      strcpy(tmp+1, (yyvsp[(2) - (2)].str));
3064                                      strcpy(tmp+yyleng+6-6+1, "?0:1)");
3065                                      (yyval.str) = tmp;
3066                                    }
3067     break;
3068 
3069   case 163:
3070 
3071 /* Line 1806 of yacc.c  */
3072 #line 662 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3073     { (yyval.operatorInformation) = KDevPG::makeOperator(KDevPG::globalSystem.terminal((yyvsp[(3) - (4)].str)), (yyvsp[(2) - (4)].str), (yyvsp[(4) - (4)].str)); }
3074     break;
3075 
3076   case 164:
3077 
3078 /* Line 1806 of yacc.c  */
3079 #line 663 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3080     { (yyval.operatorInformation) = KDevPG::makeOperator(KDevPG::globalSystem.terminal((yyvsp[(3) - (3)].str)), (yyvsp[(2) - (3)].str), ""); }
3081     break;
3082 
3083   case 165:
3084 
3085 /* Line 1806 of yacc.c  */
3086 #line 664 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3087     { (yyval.operatorInformation) = KDevPG::makeOperator(KDevPG::globalSystem.terminal((yyvsp[(1) - (2)].str)), "", (yyvsp[(2) - (2)].str)); }
3088     break;
3089 
3090   case 166:
3091 
3092 /* Line 1806 of yacc.c  */
3093 #line 665 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3094     { (yyval.operatorInformation) = KDevPG::makeOperator(KDevPG::globalSystem.terminal((yyvsp[(1) - (1)].str)), "", ""); }
3095     break;
3096 
3097   case 167:
3098 
3099 /* Line 1806 of yacc.c  */
3100 #line 669 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3101     { (yyval.item) = (yyvsp[(1) - (1)].item); }
3102     break;
3103 
3104   case 168:
3105 
3106 /* Line 1806 of yacc.c  */
3107 #line 671 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3108     {
3109           KDevPG::Model::VariableDeclarationItem *last = (KDevPG::Model::VariableDeclarationItem*) (yyvsp[(1) - (2)].item);
3110           while (last->mNext != 0) {
3111             last = last->mNext;
3112           }
3113           last->mNext = (KDevPG::Model::VariableDeclarationItem*) (yyvsp[(2) - (2)].item);
3114           (yyval.item) = (yyvsp[(1) - (2)].item);
3115         }
3116     break;
3117 
3118   case 169:
3119 
3120 /* Line 1806 of yacc.c  */
3121 #line 683 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3122     { (yyval.item) = KDevPG::variableDeclaration((yyvsp[(1) - (6)].declarationType), (yyvsp[(2) - (6)].storageType), (yyvsp[(3) - (6)].variableType), false, (yyvsp[(4) - (6)].str), (yyvsp[(6) - (6)].str)); }
3123     break;
3124 
3125   case 170:
3126 
3127 /* Line 1806 of yacc.c  */
3128 #line 685 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3129     { (yyval.item) = KDevPG::variableDeclaration((yyvsp[(1) - (5)].declarationType), (yyvsp[(2) - (5)].storageType), KDevPG::Model::VariableDeclarationItem::TypeToken, false, (yyvsp[(4) - (5)].str), ""); }
3130     break;
3131 
3132   case 171:
3133 
3134 /* Line 1806 of yacc.c  */
3135 #line 687 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3136     { (yyval.item) = KDevPG::variableDeclaration((yyvsp[(1) - (7)].declarationType), (yyvsp[(2) - (7)].storageType), (yyvsp[(3) - (7)].variableType), true, (yyvsp[(5) - (7)].str), (yyvsp[(7) - (7)].str)); }
3137     break;
3138 
3139   case 172:
3140 
3141 /* Line 1806 of yacc.c  */
3142 #line 689 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3143     { (yyval.item) = KDevPG::variableDeclaration((yyvsp[(1) - (6)].declarationType), (yyvsp[(2) - (6)].storageType), KDevPG::Model::VariableDeclarationItem::TypeToken, true, (yyvsp[(5) - (6)].str), ""); }
3144     break;
3145 
3146   case 173:
3147 
3148 /* Line 1806 of yacc.c  */
3149 #line 693 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3150     { (yyval.declarationType) = KDevPG::Model::VariableDeclarationItem::DeclarationLocal;     }
3151     break;
3152 
3153   case 174:
3154 
3155 /* Line 1806 of yacc.c  */
3156 #line 694 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3157     { (yyval.declarationType) = KDevPG::Model::VariableDeclarationItem::DeclarationArgument;  }
3158     break;
3159 
3160   case 175:
3161 
3162 /* Line 1806 of yacc.c  */
3163 #line 698 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3164     { (yyval.storageType) = KDevPG::Model::VariableDeclarationItem::StorageAstMember;    }
3165     break;
3166 
3167   case 176:
3168 
3169 /* Line 1806 of yacc.c  */
3170 #line 699 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3171     { (yyval.storageType) = KDevPG::Model::VariableDeclarationItem::StorageTemporary;     }
3172     break;
3173 
3174   case 177:
3175 
3176 /* Line 1806 of yacc.c  */
3177 #line 703 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3178     { (yyval.variableType) = KDevPG::Model::VariableDeclarationItem::TypeNode;             }
3179     break;
3180 
3181   case 178:
3182 
3183 /* Line 1806 of yacc.c  */
3184 #line 704 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3185     { (yyval.variableType) = KDevPG::Model::VariableDeclarationItem::TypeVariable;         }
3186     break;
3187 
3188 
3189 
3190 /* Line 1806 of yacc.c  */
3191 #line 3192 "/home/jonathan/gitKDE/kdevelop-pg-qt/build/kdev-pg/kdev-pg-parser.cc"
3192       default: break;
3193     }
3194   /* User semantic actions sometimes alter yychar, and that requires
3195      that yytoken be updated with the new translation.  We take the
3196      approach of translating immediately before every use of yytoken.
3197      One alternative is translating here after every semantic action,
3198      but that translation would be missed if the semantic action invokes
3199      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3200      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
3201      incorrect destructor might then be invoked immediately.  In the
3202      case of YYERROR or YYBACKUP, subsequent parser actions might lead
3203      to an incorrect destructor call or verbose syntax error message
3204      before the lookahead is translated.  */
3205   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3206 
3207   YYPOPSTACK (yylen);
3208   yylen = 0;
3209   YY_STACK_PRINT (yyss, yyssp);
3210 
3211   *++yyvsp = yyval;
3212 
3213   /* Now `shift' the result of the reduction.  Determine what state
3214      that goes to, based on the state we popped back to and the rule
3215      number reduced by.  */
3216 
3217   yyn = yyr1[yyn];
3218 
3219   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3220   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3221     yystate = yytable[yystate];
3222   else
3223     yystate = yydefgoto[yyn - YYNTOKENS];
3224 
3225   goto yynewstate;
3226 
3227 
3228 /*------------------------------------.
3229 | yyerrlab -- here on detecting error |
3230 `------------------------------------*/
3231 yyerrlab:
3232   /* Make sure we have latest lookahead translation.  See comments at
3233      user semantic actions for why this is necessary.  */
3234   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3235 
3236   /* If not already recovering from an error, report this error.  */
3237   if (!yyerrstatus)
3238     {
3239       ++yynerrs;
3240 #if ! YYERROR_VERBOSE
3241       yyerror (YY_("syntax error"));
3242 #else
3243 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3244                                         yyssp, yytoken)
3245       {
3246         char const *yymsgp = YY_("syntax error");
3247         int yysyntax_error_status;
3248         yysyntax_error_status = YYSYNTAX_ERROR;
3249         if (yysyntax_error_status == 0)
3250           yymsgp = yymsg;
3251         else if (yysyntax_error_status == 1)
3252           {
3253             if (yymsg != yymsgbuf)
3254               YYSTACK_FREE (yymsg);
3255             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3256             if (!yymsg)
3257               {
3258                 yymsg = yymsgbuf;
3259                 yymsg_alloc = sizeof yymsgbuf;
3260                 yysyntax_error_status = 2;
3261               }
3262             else
3263               {
3264                 yysyntax_error_status = YYSYNTAX_ERROR;
3265                 yymsgp = yymsg;
3266               }
3267           }
3268         yyerror (yymsgp);
3269         if (yysyntax_error_status == 2)
3270           goto yyexhaustedlab;
3271       }
3272 # undef YYSYNTAX_ERROR
3273 #endif
3274     }
3275 
3276 
3277 
3278   if (yyerrstatus == 3)
3279     {
3280       /* If just tried and failed to reuse lookahead token after an
3281      error, discard it.  */
3282 
3283       if (yychar <= YYEOF)
3284     {
3285       /* Return failure if at end of input.  */
3286       if (yychar == YYEOF)
3287         YYABORT;
3288     }
3289       else
3290     {
3291       yydestruct ("Error: discarding",
3292               yytoken, &yylval);
3293       yychar = YYEMPTY;
3294     }
3295     }
3296 
3297   /* Else will try to reuse lookahead token after shifting the error
3298      token.  */
3299   goto yyerrlab1;
3300 
3301 
3302 /*---------------------------------------------------.
3303 | yyerrorlab -- error raised explicitly by YYERROR.  |
3304 `---------------------------------------------------*/
3305 yyerrorlab:
3306 
3307   /* Pacify compilers like GCC when the user code never invokes
3308      YYERROR and the label yyerrorlab therefore never appears in user
3309      code.  */
3310   if (/*CONSTCOND*/ 0)
3311      goto yyerrorlab;
3312 
3313   /* Do not reclaim the symbols of the rule which action triggered
3314      this YYERROR.  */
3315   YYPOPSTACK (yylen);
3316   yylen = 0;
3317   YY_STACK_PRINT (yyss, yyssp);
3318   yystate = *yyssp;
3319   goto yyerrlab1;
3320 
3321 
3322 /*-------------------------------------------------------------.
3323 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
3324 `-------------------------------------------------------------*/
3325 yyerrlab1:
3326   yyerrstatus = 3;  /* Each real token shifted decrements this.  */
3327 
3328   for (;;)
3329     {
3330       yyn = yypact[yystate];
3331       if (!yypact_value_is_default (yyn))
3332     {
3333       yyn += YYTERROR;
3334       if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3335         {
3336           yyn = yytable[yyn];
3337           if (0 < yyn)
3338         break;
3339         }
3340     }
3341 
3342       /* Pop the current state because it cannot handle the error token.  */
3343       if (yyssp == yyss)
3344     YYABORT;
3345 
3346 
3347       yydestruct ("Error: popping",
3348           yystos[yystate], yyvsp);
3349       YYPOPSTACK (1);
3350       yystate = *yyssp;
3351       YY_STACK_PRINT (yyss, yyssp);
3352     }
3353 
3354   *++yyvsp = yylval;
3355 
3356 
3357   /* Shift the error token.  */
3358   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3359 
3360   yystate = yyn;
3361   goto yynewstate;
3362 
3363 
3364 /*-------------------------------------.
3365 | yyacceptlab -- YYACCEPT comes here.  |
3366 `-------------------------------------*/
3367 yyacceptlab:
3368   yyresult = 0;
3369   goto yyreturn;
3370 
3371 /*-----------------------------------.
3372 | yyabortlab -- YYABORT comes here.  |
3373 `-----------------------------------*/
3374 yyabortlab:
3375   yyresult = 1;
3376   goto yyreturn;
3377 
3378 #if !defined(yyoverflow) || YYERROR_VERBOSE
3379 /*-------------------------------------------------.
3380 | yyexhaustedlab -- memory exhaustion comes here.  |
3381 `-------------------------------------------------*/
3382 yyexhaustedlab:
3383   yyerror (YY_("memory exhausted"));
3384   yyresult = 2;
3385   /* Fall through.  */
3386 #endif
3387 
3388 yyreturn:
3389   if (yychar != YYEMPTY)
3390     {
3391       /* Make sure we have latest lookahead translation.  See comments at
3392          user semantic actions for why this is necessary.  */
3393       yytoken = YYTRANSLATE (yychar);
3394       yydestruct ("Cleanup: discarding lookahead",
3395                   yytoken, &yylval);
3396     }
3397   /* Do not reclaim the symbols of the rule which action triggered
3398      this YYABORT or YYACCEPT.  */
3399   YYPOPSTACK (yylen);
3400   YY_STACK_PRINT (yyss, yyssp);
3401   while (yyssp != yyss)
3402     {
3403       yydestruct ("Cleanup: popping",
3404           yystos[*yyssp], yyvsp);
3405       YYPOPSTACK (1);
3406     }
3407 #ifndef yyoverflow
3408   if (yyss != yyssa)
3409     YYSTACK_FREE (yyss);
3410 #endif
3411 #if YYERROR_VERBOSE
3412   if (yymsg != yymsgbuf)
3413     YYSTACK_FREE (yymsg);
3414 #endif
3415   /* Make sure YYID is used.  */
3416   return YYID (yyresult);
3417 }
3418 
3419 
3420 
3421 /* Line 2067 of yacc.c  */
3422 #line 707 "/home/jonathan/gitKDE/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy"
3423 
3424