Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Keep tabs in generated files.
[simgrid.git] / src / xbt / automaton / y.tab.c
1 /* A Bison parser, made by GNU Bison 2.5.  */
2
3 /* Bison implementation for Yacc-like parsers in C
4    
5       Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
6    
7    This program is free software: you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation, either version 3 of the License, or
10    (at your option) any later version.
11    
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16    
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19
20 /* As a special exception, you may create a larger work that contains
21    part or all of the Bison parser skeleton and distribute that work
22    under terms of your choice, so long as that work isn't itself a
23    parser generator using the skeleton or a modified version thereof
24    as a parser skeleton.  Alternatively, if you modify or redistribute
25    the parser skeleton itself, you may (at your option) remove this
26    special exception, which will cause the skeleton and the resulting
27    Bison output files to be licensed under the GNU General Public
28    License without this special exception.
29    
30    This special exception was added by the Free Software Foundation in
31    version 2.2 of Bison.  */
32
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34    simplifying the original so-called "semantic" parser.  */
35
36 /* All symbols defined below should begin with yy or YY, to avoid
37    infringing on user name space.  This should be done even for local
38    variables, as they might otherwise be expanded by user macros.
39    There are some unavoidable exceptions within include files to
40    define necessary library symbols; they are noted "INFRINGES ON
41    USER NAME SPACE" below.  */
42
43 /* Identify Bison output.  */
44 #define YYBISON 1
45
46 /* Bison version.  */
47 #define YYBISON_VERSION "2.5"
48
49 /* Skeleton name.  */
50 #define YYSKELETON_NAME "yacc.c"
51
52 /* Pure parsers.  */
53 #define YYPURE 0
54
55 /* Push parsers.  */
56 #define YYPUSH 0
57
58 /* Pull parsers.  */
59 #define YYPULL 1
60
61 /* Using locations.  */
62 #define YYLSP_NEEDED 0
63
64
65
66 /* Copy the first part of user declarations.  */
67
68 /* Line 268 of yacc.c  */
69 #line 1 "parserPromela.yacc"
70
71
72 #include "automaton_parse.yy.c"
73 #include <xbt/automaton.h>
74 #include <xbt/automatonparse_promela.h>
75
76 void yyerror(const char *s);
77
78
79
80 /* Line 268 of yacc.c  */
81 #line 82 "y.tab.c"
82
83 /* Enabling traces.  */
84 #ifndef YYDEBUG
85 # define YYDEBUG 0
86 #endif
87
88 /* Enabling verbose error messages.  */
89 #ifdef YYERROR_VERBOSE
90 # undef YYERROR_VERBOSE
91 # define YYERROR_VERBOSE 1
92 #else
93 # define YYERROR_VERBOSE 0
94 #endif
95
96 /* Enabling the token table.  */
97 #ifndef YYTOKEN_TABLE
98 # define YYTOKEN_TABLE 0
99 #endif
100
101
102 /* Tokens.  */
103 #ifndef YYTOKENTYPE
104 # define YYTOKENTYPE
105    /* Put the tokens into the symbol table, so that GDB and other debuggers
106       know about them.  */
107    enum yytokentype {
108      NEVER = 258,
109      IF = 259,
110      FI = 260,
111      IMPLIES = 261,
112      GOTO = 262,
113      AND = 263,
114      OR = 264,
115      NOT = 265,
116      LEFT_PAR = 266,
117      RIGHT_PAR = 267,
118      CASE = 268,
119      COLON = 269,
120      SEMI_COLON = 270,
121      CASE_TRUE = 271,
122      LEFT_BRACE = 272,
123      RIGHT_BRACE = 273,
124      LITT_ENT = 274,
125      LITT_CHAINE = 275,
126      LITT_REEL = 276,
127      ID = 277
128    };
129 #endif
130 /* Tokens.  */
131 #define NEVER 258
132 #define IF 259
133 #define FI 260
134 #define IMPLIES 261
135 #define GOTO 262
136 #define AND 263
137 #define OR 264
138 #define NOT 265
139 #define LEFT_PAR 266
140 #define RIGHT_PAR 267
141 #define CASE 268
142 #define COLON 269
143 #define SEMI_COLON 270
144 #define CASE_TRUE 271
145 #define LEFT_BRACE 272
146 #define RIGHT_BRACE 273
147 #define LITT_ENT 274
148 #define LITT_CHAINE 275
149 #define LITT_REEL 276
150 #define ID 277
151
152
153
154
155 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
156 typedef union YYSTYPE
157 {
158
159 /* Line 293 of yacc.c  */
160 #line 11 "parserPromela.yacc"
161
162   double real;
163   int integer;
164   char* string;
165   xbt_exp_label_t label;
166
167
168
169 /* Line 293 of yacc.c  */
170 #line 171 "y.tab.c"
171 } YYSTYPE;
172 # define YYSTYPE_IS_TRIVIAL 1
173 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
174 # define YYSTYPE_IS_DECLARED 1
175 #endif
176
177
178 /* Copy the second part of user declarations.  */
179
180
181 /* Line 343 of yacc.c  */
182 #line 183 "y.tab.c"
183
184 #ifdef short
185 # undef short
186 #endif
187
188 #ifdef YYTYPE_UINT8
189 typedef YYTYPE_UINT8 yytype_uint8;
190 #else
191 typedef unsigned char yytype_uint8;
192 #endif
193
194 #ifdef YYTYPE_INT8
195 typedef YYTYPE_INT8 yytype_int8;
196 #elif (defined __STDC__ || defined __C99__FUNC__ \
197      || defined __cplusplus || defined _MSC_VER)
198 typedef signed char yytype_int8;
199 #else
200 typedef short int yytype_int8;
201 #endif
202
203 #ifdef YYTYPE_UINT16
204 typedef YYTYPE_UINT16 yytype_uint16;
205 #else
206 typedef unsigned short int yytype_uint16;
207 #endif
208
209 #ifdef YYTYPE_INT16
210 typedef YYTYPE_INT16 yytype_int16;
211 #else
212 typedef short int yytype_int16;
213 #endif
214
215 #ifndef YYSIZE_T
216 # ifdef __SIZE_TYPE__
217 #  define YYSIZE_T __SIZE_TYPE__
218 # elif defined size_t
219 #  define YYSIZE_T size_t
220 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
221      || defined __cplusplus || defined _MSC_VER)
222 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
223 #  define YYSIZE_T size_t
224 # else
225 #  define YYSIZE_T unsigned int
226 # endif
227 #endif
228
229 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
230
231 #ifndef YY_
232 # if defined YYENABLE_NLS && YYENABLE_NLS
233 #  if ENABLE_NLS
234 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
235 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
236 #  endif
237 # endif
238 # ifndef YY_
239 #  define YY_(msgid) msgid
240 # endif
241 #endif
242
243 /* Suppress unused-variable warnings by "using" E.  */
244 #if ! defined lint || defined __GNUC__
245 # define YYUSE(e) ((void) (e))
246 #else
247 # define YYUSE(e) /* empty */
248 #endif
249
250 /* Identity function, used to suppress warnings about constant conditions.  */
251 #ifndef lint
252 # define YYID(n) (n)
253 #else
254 #if (defined __STDC__ || defined __C99__FUNC__ \
255      || defined __cplusplus || defined _MSC_VER)
256 static int
257 YYID (int yyi)
258 #else
259 static int
260 YYID (yyi)
261     int yyi;
262 #endif
263 {
264   return yyi;
265 }
266 #endif
267
268 #if ! defined yyoverflow || YYERROR_VERBOSE
269
270 /* The parser invokes alloca or malloc; define the necessary symbols.  */
271
272 # ifdef YYSTACK_USE_ALLOCA
273 #  if YYSTACK_USE_ALLOCA
274 #   ifdef __GNUC__
275 #    define YYSTACK_ALLOC __builtin_alloca
276 #   elif defined __BUILTIN_VA_ARG_INCR
277 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
278 #   elif defined _AIX
279 #    define YYSTACK_ALLOC __alloca
280 #   elif defined _MSC_VER
281 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
282 #    define alloca _alloca
283 #   else
284 #    define YYSTACK_ALLOC alloca
285 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
286      || defined __cplusplus || defined _MSC_VER)
287 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
288 #     ifndef EXIT_SUCCESS
289 #      define EXIT_SUCCESS 0
290 #     endif
291 #    endif
292 #   endif
293 #  endif
294 # endif
295
296 # ifdef YYSTACK_ALLOC
297    /* Pacify GCC's `empty if-body' warning.  */
298 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
299 #  ifndef YYSTACK_ALLOC_MAXIMUM
300     /* The OS might guarantee only one guard page at the bottom of the stack,
301        and a page size can be as small as 4096 bytes.  So we cannot safely
302        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
303        to allow for a few compiler-allocated temporary stack slots.  */
304 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
305 #  endif
306 # else
307 #  define YYSTACK_ALLOC YYMALLOC
308 #  define YYSTACK_FREE YYFREE
309 #  ifndef YYSTACK_ALLOC_MAXIMUM
310 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
311 #  endif
312 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
313        && ! ((defined YYMALLOC || defined malloc) \
314              && (defined YYFREE || defined free)))
315 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
316 #   ifndef EXIT_SUCCESS
317 #    define EXIT_SUCCESS 0
318 #   endif
319 #  endif
320 #  ifndef YYMALLOC
321 #   define YYMALLOC malloc
322 #   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
323      || defined __cplusplus || defined _MSC_VER)
324 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
325 #   endif
326 #  endif
327 #  ifndef YYFREE
328 #   define YYFREE free
329 #   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
330      || defined __cplusplus || defined _MSC_VER)
331 void free (void *); /* INFRINGES ON USER NAME SPACE */
332 #   endif
333 #  endif
334 # endif
335 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
336
337
338 #if (! defined yyoverflow \
339      && (! defined __cplusplus \
340          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
341
342 /* A type that is properly aligned for any stack member.  */
343 union yyalloc
344 {
345   yytype_int16 yyss_alloc;
346   YYSTYPE yyvs_alloc;
347 };
348
349 /* The size of the maximum gap between one aligned stack and the next.  */
350 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
351
352 /* The size of an array large to enough to hold all stacks, each with
353    N elements.  */
354 # define YYSTACK_BYTES(N) \
355      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
356       + YYSTACK_GAP_MAXIMUM)
357
358 # define YYCOPY_NEEDED 1
359
360 /* Relocate STACK from its old location to the new one.  The
361    local variables YYSIZE and YYSTACKSIZE give the old and new number of
362    elements in the stack, and YYPTR gives the new location of the
363    stack.  Advance YYPTR to a properly aligned location for the next
364    stack.  */
365 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
366     do                                                                  \
367       {                                                                 \
368         YYSIZE_T yynewbytes;                                            \
369         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
370         Stack = &yyptr->Stack_alloc;                                    \
371         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
372         yyptr += yynewbytes / sizeof (*yyptr);                          \
373       }                                                                 \
374     while (YYID (0))
375
376 #endif
377
378 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
379 /* Copy COUNT objects from FROM to TO.  The source and destination do
380    not overlap.  */
381 # ifndef YYCOPY
382 #  if defined __GNUC__ && 1 < __GNUC__
383 #   define YYCOPY(To, From, Count) \
384       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
385 #  else
386 #   define YYCOPY(To, From, Count)              \
387       do                                        \
388         {                                       \
389           YYSIZE_T yyi;                         \
390           for (yyi = 0; yyi < (Count); yyi++)   \
391             (To)[yyi] = (From)[yyi];            \
392         }                                       \
393       while (YYID (0))
394 #  endif
395 # endif
396 #endif /* !YYCOPY_NEEDED */
397
398 /* YYFINAL -- State number of the termination state.  */
399 #define YYFINAL  4
400 /* YYLAST -- Last index in YYTABLE.  */
401 #define YYLAST   28
402
403 /* YYNTOKENS -- Number of terminals.  */
404 #define YYNTOKENS  23
405 /* YYNNTS -- Number of nonterminals.  */
406 #define YYNNTS  6
407 /* YYNRULES -- Number of rules.  */
408 #define YYNRULES  13
409 /* YYNRULES -- Number of states.  */
410 #define YYNSTATES  32
411
412 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
413 #define YYUNDEFTOK  2
414 #define YYMAXUTOK   277
415
416 #define YYTRANSLATE(YYX)                                                \
417   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
418
419 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
420 static const yytype_uint8 yytranslate[] =
421 {
422        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
423        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
424        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
425        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
426        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
427        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
428        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
429        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
430        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
431        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
432        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
433        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
434        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
435        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
436        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
437        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
438        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
439        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
440        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
441        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
442        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
443        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
444        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
445        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
446        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
447        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
448        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
449       15,    16,    17,    18,    19,    20,    21,    22
450 };
451
452 #if YYDEBUG
453 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
454    YYRHS.  */
455 static const yytype_uint8 yyprhs[] =
456 {
457        0,     0,     3,     8,     9,    10,    19,    20,    27,    31,
458       35,    39,    42,    44
459 };
460
461 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
462 static const yytype_int8 yyrhs[] =
463 {
464       24,     0,    -1,     3,    17,    25,    18,    -1,    -1,    -1,
465       22,    14,    26,     4,    27,     5,    15,    25,    -1,    -1,
466       13,    28,     6,     7,    22,    27,    -1,    11,    28,    12,
467       -1,    28,     9,    28,    -1,    28,     8,    28,    -1,    10,
468       28,    -1,    16,    -1,    22,    -1
469 };
470
471 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
472 static const yytype_uint8 yyrline[] =
473 {
474        0,    48,    48,    51,    52,    52,    55,    56,    59,    60,
475       61,    62,    63,    64
476 };
477 #endif
478
479 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
480 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
481    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
482 static const char *const yytname[] =
483 {
484   "$end", "error", "$undefined", "NEVER", "IF", "FI", "IMPLIES", "GOTO",
485   "AND", "OR", "NOT", "LEFT_PAR", "RIGHT_PAR", "CASE", "COLON",
486   "SEMI_COLON", "CASE_TRUE", "LEFT_BRACE", "RIGHT_BRACE", "LITT_ENT",
487   "LITT_CHAINE", "LITT_REEL", "ID", "$accept", "automaton", "stateseq",
488   "$@1", "option", "exp", 0
489 };
490 #endif
491
492 # ifdef YYPRINT
493 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
494    token YYLEX-NUM.  */
495 static const yytype_uint16 yytoknum[] =
496 {
497        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
498      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
499      275,   276,   277
500 };
501 # endif
502
503 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
504 static const yytype_uint8 yyr1[] =
505 {
506        0,    23,    24,    25,    26,    25,    27,    27,    28,    28,
507       28,    28,    28,    28
508 };
509
510 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
511 static const yytype_uint8 yyr2[] =
512 {
513        0,     2,     4,     0,     0,     8,     0,     6,     3,     3,
514        3,     2,     1,     1
515 };
516
517 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
518    Performed when YYTABLE doesn't specify something else to do.  Zero
519    means the default is an error.  */
520 static const yytype_uint8 yydefact[] =
521 {
522        0,     0,     0,     3,     1,     0,     0,     4,     2,     0,
523        6,     0,     0,     0,     0,    12,    13,     0,     0,    11,
524        0,     0,     0,     0,     3,     8,     0,    10,     9,     5,
525        6,     7
526 };
527
528 /* YYDEFGOTO[NTERM-NUM].  */
529 static const yytype_int8 yydefgoto[] =
530 {
531       -1,     2,     6,     9,    12,    17
532 };
533
534 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
535    STATE-NUM.  */
536 #define YYPACT_NINF -16
537 static const yytype_int8 yypact[] =
538 {
539        0,   -15,    10,   -13,   -16,     2,     1,   -16,   -16,    16,
540        8,   -10,    17,   -10,   -10,   -16,   -16,     9,    11,   -16,
541       -1,    18,   -10,   -10,   -13,   -16,     5,   -16,   -16,   -16,
542        8,   -16
543 };
544
545 /* YYPGOTO[NTERM-NUM].  */
546 static const yytype_int8 yypgoto[] =
547 {
548      -16,   -16,     4,   -16,    -7,    -9
549 };
550
551 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
552    positive, shift that token.  If negative, reduce the rule which
553    number is the opposite.  If YYTABLE_NINF, syntax error.  */
554 #define YYTABLE_NINF -1
555 static const yytype_uint8 yytable[] =
556 {
557       13,    14,     3,     1,    19,    20,    15,    22,    23,     5,
558        4,    25,    16,    27,    28,    21,     7,    22,    23,     8,
559       10,    11,    18,    31,     0,    26,    24,    30,    29
560 };
561
562 #define yypact_value_is_default(yystate) \
563   ((yystate) == (-16))
564
565 #define yytable_value_is_error(yytable_value) \
566   YYID (0)
567
568 static const yytype_int8 yycheck[] =
569 {
570       10,    11,    17,     3,    13,    14,    16,     8,     9,    22,
571        0,    12,    22,    22,    23,     6,    14,     8,     9,    18,
572        4,    13,     5,    30,    -1,     7,    15,    22,    24
573 };
574
575 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
576    symbol of state STATE-NUM.  */
577 static const yytype_uint8 yystos[] =
578 {
579        0,     3,    24,    17,     0,    22,    25,    14,    18,    26,
580        4,    13,    27,    10,    11,    16,    22,    28,     5,    28,
581       28,     6,     8,     9,    15,    12,     7,    28,    28,    25,
582       22,    27
583 };
584
585 #define yyerrok         (yyerrstatus = 0)
586 #define yyclearin       (yychar = YYEMPTY)
587 #define YYEMPTY         (-2)
588 #define YYEOF           0
589
590 #define YYACCEPT        goto yyacceptlab
591 #define YYABORT         goto yyabortlab
592 #define YYERROR         goto yyerrorlab
593
594
595 /* Like YYERROR except do call yyerror.  This remains here temporarily
596    to ease the transition to the new meaning of YYERROR, for GCC.
597    Once GCC version 2 has supplanted version 1, this can go.  However,
598    YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
599    in Bison 2.4.2's NEWS entry, where a plan to phase it out is
600    discussed.  */
601
602 #define YYFAIL          goto yyerrlab
603 #if defined YYFAIL
604   /* This is here to suppress warnings from the GCC cpp's
605      -Wunused-macros.  Normally we don't worry about that warning, but
606      some users do, and we want to make it easy for users to remove
607      YYFAIL uses, which will produce warnings from Bison 2.5.  */
608 #endif
609
610 #define YYRECOVERING()  (!!yyerrstatus)
611
612 #define YYBACKUP(Token, Value)                                  \
613 do                                                              \
614   if (yychar == YYEMPTY && yylen == 1)                          \
615     {                                                           \
616       yychar = (Token);                                         \
617       yylval = (Value);                                         \
618       YYPOPSTACK (1);                                           \
619       goto yybackup;                                            \
620     }                                                           \
621   else                                                          \
622     {                                                           \
623       yyerror (YY_("syntax error: cannot back up")); \
624       YYERROR;                                                  \
625     }                                                           \
626 while (YYID (0))
627
628
629 #define YYTERROR        1
630 #define YYERRCODE       256
631
632
633 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
634    If N is 0, then set CURRENT to the empty location which ends
635    the previous symbol: RHS[0] (always defined).  */
636
637 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
638 #ifndef YYLLOC_DEFAULT
639 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
640     do                                                                  \
641       if (YYID (N))                                                    \
642         {                                                               \
643           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
644           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
645           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
646           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
647         }                                                               \
648       else                                                              \
649         {                                                               \
650           (Current).first_line   = (Current).last_line   =              \
651             YYRHSLOC (Rhs, 0).last_line;                                \
652           (Current).first_column = (Current).last_column =              \
653             YYRHSLOC (Rhs, 0).last_column;                              \
654         }                                                               \
655     while (YYID (0))
656 #endif
657
658
659 /* This macro is provided for backward compatibility. */
660
661 #ifndef YY_LOCATION_PRINT
662 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
663 #endif
664
665
666 /* YYLEX -- calling `yylex' with the right arguments.  */
667
668 #ifdef YYLEX_PARAM
669 # define YYLEX yylex (YYLEX_PARAM)
670 #else
671 # define YYLEX yylex ()
672 #endif
673
674 /* Enable debugging if requested.  */
675 #if YYDEBUG
676
677 # ifndef YYFPRINTF
678 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
679 #  define YYFPRINTF fprintf
680 # endif
681
682 # define YYDPRINTF(Args)                        \
683 do {                                            \
684   if (yydebug)                                  \
685     YYFPRINTF Args;                             \
686 } while (YYID (0))
687
688 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
689 do {                                                                      \
690   if (yydebug)                                                            \
691     {                                                                     \
692       YYFPRINTF (stderr, "%s ", Title);                                   \
693       yy_symbol_print (stderr,                                            \
694                   Type, Value); \
695       YYFPRINTF (stderr, "\n");                                           \
696     }                                                                     \
697 } while (YYID (0))
698
699
700 /*--------------------------------.
701 | Print this symbol on YYOUTPUT.  |
702 `--------------------------------*/
703
704 /*ARGSUSED*/
705 #if (defined __STDC__ || defined __C99__FUNC__ \
706      || defined __cplusplus || defined _MSC_VER)
707 static void
708 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
709 #else
710 static void
711 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
712     FILE *yyoutput;
713     int yytype;
714     YYSTYPE const * const yyvaluep;
715 #endif
716 {
717   if (!yyvaluep)
718     return;
719 # ifdef YYPRINT
720   if (yytype < YYNTOKENS)
721     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
722 # else
723   YYUSE (yyoutput);
724 # endif
725   switch (yytype)
726     {
727       default:
728         break;
729     }
730 }
731
732
733 /*--------------------------------.
734 | Print this symbol on YYOUTPUT.  |
735 `--------------------------------*/
736
737 #if (defined __STDC__ || defined __C99__FUNC__ \
738      || defined __cplusplus || defined _MSC_VER)
739 static void
740 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
741 #else
742 static void
743 yy_symbol_print (yyoutput, yytype, yyvaluep)
744     FILE *yyoutput;
745     int yytype;
746     YYSTYPE const * const yyvaluep;
747 #endif
748 {
749   if (yytype < YYNTOKENS)
750     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
751   else
752     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
753
754   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
755   YYFPRINTF (yyoutput, ")");
756 }
757
758 /*------------------------------------------------------------------.
759 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
760 | TOP (included).                                                   |
761 `------------------------------------------------------------------*/
762
763 #if (defined __STDC__ || defined __C99__FUNC__ \
764      || defined __cplusplus || defined _MSC_VER)
765 static void
766 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
767 #else
768 static void
769 yy_stack_print (yybottom, yytop)
770     yytype_int16 *yybottom;
771     yytype_int16 *yytop;
772 #endif
773 {
774   YYFPRINTF (stderr, "Stack now");
775   for (; yybottom <= yytop; yybottom++)
776     {
777       int yybot = *yybottom;
778       YYFPRINTF (stderr, " %d", yybot);
779     }
780   YYFPRINTF (stderr, "\n");
781 }
782
783 # define YY_STACK_PRINT(Bottom, Top)                            \
784 do {                                                            \
785   if (yydebug)                                                  \
786     yy_stack_print ((Bottom), (Top));                           \
787 } while (YYID (0))
788
789
790 /*------------------------------------------------.
791 | Report that the YYRULE is going to be reduced.  |
792 `------------------------------------------------*/
793
794 #if (defined __STDC__ || defined __C99__FUNC__ \
795      || defined __cplusplus || defined _MSC_VER)
796 static void
797 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
798 #else
799 static void
800 yy_reduce_print (yyvsp, yyrule)
801     YYSTYPE *yyvsp;
802     int yyrule;
803 #endif
804 {
805   int yynrhs = yyr2[yyrule];
806   int yyi;
807   unsigned long int yylno = yyrline[yyrule];
808   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
809              yyrule - 1, yylno);
810   /* The symbols being reduced.  */
811   for (yyi = 0; yyi < yynrhs; yyi++)
812     {
813       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
814       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
815                        &(yyvsp[(yyi + 1) - (yynrhs)])
816                                        );
817       YYFPRINTF (stderr, "\n");
818     }
819 }
820
821 # define YY_REDUCE_PRINT(Rule)          \
822 do {                                    \
823   if (yydebug)                          \
824     yy_reduce_print (yyvsp, Rule); \
825 } while (YYID (0))
826
827 /* Nonzero means print parse trace.  It is left uninitialized so that
828    multiple parsers can coexist.  */
829 int yydebug;
830 #else /* !YYDEBUG */
831 # define YYDPRINTF(Args)
832 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
833 # define YY_STACK_PRINT(Bottom, Top)
834 # define YY_REDUCE_PRINT(Rule)
835 #endif /* !YYDEBUG */
836
837
838 /* YYINITDEPTH -- initial size of the parser's stacks.  */
839 #ifndef YYINITDEPTH
840 # define YYINITDEPTH 200
841 #endif
842
843 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
844    if the built-in stack extension method is used).
845
846    Do not make this value too large; the results are undefined if
847    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
848    evaluated with infinite-precision integer arithmetic.  */
849
850 #ifndef YYMAXDEPTH
851 # define YYMAXDEPTH 10000
852 #endif
853
854
855 #if YYERROR_VERBOSE
856
857 # ifndef yystrlen
858 #  if defined __GLIBC__ && defined _STRING_H
859 #   define yystrlen strlen
860 #  else
861 /* Return the length of YYSTR.  */
862 #if (defined __STDC__ || defined __C99__FUNC__ \
863      || defined __cplusplus || defined _MSC_VER)
864 static YYSIZE_T
865 yystrlen (const char *yystr)
866 #else
867 static YYSIZE_T
868 yystrlen (yystr)
869     const char *yystr;
870 #endif
871 {
872   YYSIZE_T yylen;
873   for (yylen = 0; yystr[yylen]; yylen++)
874     continue;
875   return yylen;
876 }
877 #  endif
878 # endif
879
880 # ifndef yystpcpy
881 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
882 #   define yystpcpy stpcpy
883 #  else
884 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
885    YYDEST.  */
886 #if (defined __STDC__ || defined __C99__FUNC__ \
887      || defined __cplusplus || defined _MSC_VER)
888 static char *
889 yystpcpy (char *yydest, const char *yysrc)
890 #else
891 static char *
892 yystpcpy (yydest, yysrc)
893     char *yydest;
894     const char *yysrc;
895 #endif
896 {
897   char *yyd = yydest;
898   const char *yys = yysrc;
899
900   while ((*yyd++ = *yys++) != '\0')
901     continue;
902
903   return yyd - 1;
904 }
905 #  endif
906 # endif
907
908 # ifndef yytnamerr
909 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
910    quotes and backslashes, so that it's suitable for yyerror.  The
911    heuristic is that double-quoting is unnecessary unless the string
912    contains an apostrophe, a comma, or backslash (other than
913    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
914    null, do not copy; instead, return the length of what the result
915    would have been.  */
916 static YYSIZE_T
917 yytnamerr (char *yyres, const char *yystr)
918 {
919   if (*yystr == '"')
920     {
921       YYSIZE_T yyn = 0;
922       char const *yyp = yystr;
923
924       for (;;)
925         switch (*++yyp)
926           {
927           case '\'':
928           case ',':
929             goto do_not_strip_quotes;
930
931           case '\\':
932             if (*++yyp != '\\')
933               goto do_not_strip_quotes;
934             /* Fall through.  */
935           default:
936             if (yyres)
937               yyres[yyn] = *yyp;
938             yyn++;
939             break;
940
941           case '"':
942             if (yyres)
943               yyres[yyn] = '\0';
944             return yyn;
945           }
946     do_not_strip_quotes: ;
947     }
948
949   if (! yyres)
950     return yystrlen (yystr);
951
952   return yystpcpy (yyres, yystr) - yyres;
953 }
954 # endif
955
956 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
957    about the unexpected token YYTOKEN for the state stack whose top is
958    YYSSP.
959
960    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
961    not large enough to hold the message.  In that case, also set
962    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
963    required number of bytes is too large to store.  */
964 static int
965 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
966                 yytype_int16 *yyssp, int yytoken)
967 {
968   YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
969   YYSIZE_T yysize = yysize0;
970   YYSIZE_T yysize1;
971   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
972   /* Internationalized format string. */
973   const char *yyformat = 0;
974   /* Arguments of yyformat. */
975   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
976   /* Number of reported tokens (one for the "unexpected", one per
977      "expected"). */
978   int yycount = 0;
979
980   /* There are many possibilities here to consider:
981      - Assume YYFAIL is not used.  It's too flawed to consider.  See
982        <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
983        for details.  YYERROR is fine as it does not invoke this
984        function.
985      - If this state is a consistent state with a default action, then
986        the only way this function was invoked is if the default action
987        is an error action.  In that case, don't check for expected
988        tokens because there are none.
989      - The only way there can be no lookahead present (in yychar) is if
990        this state is a consistent state with a default action.  Thus,
991        detecting the absence of a lookahead is sufficient to determine
992        that there is no unexpected or expected token to report.  In that
993        case, just report a simple "syntax error".
994      - Don't assume there isn't a lookahead just because this state is a
995        consistent state with a default action.  There might have been a
996        previous inconsistent state, consistent state with a non-default
997        action, or user semantic action that manipulated yychar.
998      - Of course, the expected token list depends on states to have
999        correct lookahead information, and it depends on the parser not
1000        to perform extra reductions after fetching a lookahead from the
1001        scanner and before detecting a syntax error.  Thus, state merging
1002        (from LALR or IELR) and default reductions corrupt the expected
1003        token list.  However, the list is correct for canonical LR with
1004        one exception: it will still contain any token that will not be
1005        accepted due to an error action in a later state.
1006   */
1007   if (yytoken != YYEMPTY)
1008     {
1009       int yyn = yypact[*yyssp];
1010       yyarg[yycount++] = yytname[yytoken];
1011       if (!yypact_value_is_default (yyn))
1012         {
1013           /* Start YYX at -YYN if negative to avoid negative indexes in
1014              YYCHECK.  In other words, skip the first -YYN actions for
1015              this state because they are default actions.  */
1016           int yyxbegin = yyn < 0 ? -yyn : 0;
1017           /* Stay within bounds of both yycheck and yytname.  */
1018           int yychecklim = YYLAST - yyn + 1;
1019           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1020           int yyx;
1021
1022           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1023             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1024                 && !yytable_value_is_error (yytable[yyx + yyn]))
1025               {
1026                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1027                   {
1028                     yycount = 1;
1029                     yysize = yysize0;
1030                     break;
1031                   }
1032                 yyarg[yycount++] = yytname[yyx];
1033                 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1034                 if (! (yysize <= yysize1
1035                        && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1036                   return 2;
1037                 yysize = yysize1;
1038               }
1039         }
1040     }
1041
1042   switch (yycount)
1043     {
1044 # define YYCASE_(N, S)                      \
1045       case N:                               \
1046         yyformat = S;                       \
1047       break
1048       YYCASE_(0, YY_("syntax error"));
1049       YYCASE_(1, YY_("syntax error, unexpected %s"));
1050       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1051       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1052       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1053       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1054 # undef YYCASE_
1055     }
1056
1057   yysize1 = yysize + yystrlen (yyformat);
1058   if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1059     return 2;
1060   yysize = yysize1;
1061
1062   if (*yymsg_alloc < yysize)
1063     {
1064       *yymsg_alloc = 2 * yysize;
1065       if (! (yysize <= *yymsg_alloc
1066              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1067         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1068       return 1;
1069     }
1070
1071   /* Avoid sprintf, as that infringes on the user's name space.
1072      Don't have undefined behavior even if the translation
1073      produced a string with the wrong number of "%s"s.  */
1074   {
1075     char *yyp = *yymsg;
1076     int yyi = 0;
1077     while ((*yyp = *yyformat) != '\0')
1078       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1079         {
1080           yyp += yytnamerr (yyp, yyarg[yyi++]);
1081           yyformat += 2;
1082         }
1083       else
1084         {
1085           yyp++;
1086           yyformat++;
1087         }
1088   }
1089   return 0;
1090 }
1091 #endif /* YYERROR_VERBOSE */
1092
1093 /*-----------------------------------------------.
1094 | Release the memory associated to this symbol.  |
1095 `-----------------------------------------------*/
1096
1097 /*ARGSUSED*/
1098 #if (defined __STDC__ || defined __C99__FUNC__ \
1099      || defined __cplusplus || defined _MSC_VER)
1100 static void
1101 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1102 #else
1103 static void
1104 yydestruct (yymsg, yytype, yyvaluep)
1105     const char *yymsg;
1106     int yytype;
1107     YYSTYPE *yyvaluep;
1108 #endif
1109 {
1110   YYUSE (yyvaluep);
1111
1112   if (!yymsg)
1113     yymsg = "Deleting";
1114   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1115
1116   switch (yytype)
1117     {
1118
1119       default:
1120         break;
1121     }
1122 }
1123
1124
1125 /* Prevent warnings from -Wmissing-prototypes.  */
1126 #ifdef YYPARSE_PARAM
1127 #if defined __STDC__ || defined __cplusplus
1128 int yyparse (void *YYPARSE_PARAM);
1129 #else
1130 int yyparse ();
1131 #endif
1132 #else /* ! YYPARSE_PARAM */
1133 #if defined __STDC__ || defined __cplusplus
1134 int yyparse (void);
1135 #else
1136 int yyparse ();
1137 #endif
1138 #endif /* ! YYPARSE_PARAM */
1139
1140
1141 /* The lookahead symbol.  */
1142 int yychar;
1143
1144 /* The semantic value of the lookahead symbol.  */
1145 YYSTYPE yylval;
1146
1147 /* Number of syntax errors so far.  */
1148 int yynerrs;
1149
1150
1151 /*----------.
1152 | yyparse.  |
1153 `----------*/
1154
1155 #ifdef YYPARSE_PARAM
1156 #if (defined __STDC__ || defined __C99__FUNC__ \
1157      || defined __cplusplus || defined _MSC_VER)
1158 int
1159 yyparse (void *YYPARSE_PARAM)
1160 #else
1161 int
1162 yyparse (YYPARSE_PARAM)
1163     void *YYPARSE_PARAM;
1164 #endif
1165 #else /* ! YYPARSE_PARAM */
1166 #if (defined __STDC__ || defined __C99__FUNC__ \
1167      || defined __cplusplus || defined _MSC_VER)
1168 int
1169 yyparse (void)
1170 #else
1171 int
1172 yyparse ()
1173
1174 #endif
1175 #endif
1176 {
1177     int yystate;
1178     /* Number of tokens to shift before error messages enabled.  */
1179     int yyerrstatus;
1180
1181     /* The stacks and their tools:
1182        `yyss': related to states.
1183        `yyvs': related to semantic values.
1184
1185        Refer to the stacks thru separate pointers, to allow yyoverflow
1186        to reallocate them elsewhere.  */
1187
1188     /* The state stack.  */
1189     yytype_int16 yyssa[YYINITDEPTH];
1190     yytype_int16 *yyss;
1191     yytype_int16 *yyssp;
1192
1193     /* The semantic value stack.  */
1194     YYSTYPE yyvsa[YYINITDEPTH];
1195     YYSTYPE *yyvs;
1196     YYSTYPE *yyvsp;
1197
1198     YYSIZE_T yystacksize;
1199
1200   int yyn;
1201   int yyresult;
1202   /* Lookahead token as an internal (translated) token number.  */
1203   int yytoken;
1204   /* The variables used to return semantic value and location from the
1205      action routines.  */
1206   YYSTYPE yyval;
1207
1208 #if YYERROR_VERBOSE
1209   /* Buffer for error messages, and its allocated size.  */
1210   char yymsgbuf[128];
1211   char *yymsg = yymsgbuf;
1212   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1213 #endif
1214
1215 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1216
1217   /* The number of symbols on the RHS of the reduced rule.
1218      Keep to zero when no symbol should be popped.  */
1219   int yylen = 0;
1220
1221   yytoken = 0;
1222   yyss = yyssa;
1223   yyvs = yyvsa;
1224   yystacksize = YYINITDEPTH;
1225
1226   YYDPRINTF ((stderr, "Starting parse\n"));
1227
1228   yystate = 0;
1229   yyerrstatus = 0;
1230   yynerrs = 0;
1231   yychar = YYEMPTY; /* Cause a token to be read.  */
1232
1233   /* Initialize stack pointers.
1234      Waste one element of value and location stack
1235      so that they stay on the same level as the state stack.
1236      The wasted elements are never initialized.  */
1237   yyssp = yyss;
1238   yyvsp = yyvs;
1239
1240   goto yysetstate;
1241
1242 /*------------------------------------------------------------.
1243 | yynewstate -- Push a new state, which is found in yystate.  |
1244 `------------------------------------------------------------*/
1245  yynewstate:
1246   /* In all cases, when you get here, the value and location stacks
1247      have just been pushed.  So pushing a state here evens the stacks.  */
1248   yyssp++;
1249
1250  yysetstate:
1251   *yyssp = yystate;
1252
1253   if (yyss + yystacksize - 1 <= yyssp)
1254     {
1255       /* Get the current used size of the three stacks, in elements.  */
1256       YYSIZE_T yysize = yyssp - yyss + 1;
1257
1258 #ifdef yyoverflow
1259       {
1260         /* Give user a chance to reallocate the stack.  Use copies of
1261            these so that the &'s don't force the real ones into
1262            memory.  */
1263         YYSTYPE *yyvs1 = yyvs;
1264         yytype_int16 *yyss1 = yyss;
1265
1266         /* Each stack pointer address is followed by the size of the
1267            data in use in that stack, in bytes.  This used to be a
1268            conditional around just the two extra args, but that might
1269            be undefined if yyoverflow is a macro.  */
1270         yyoverflow (YY_("memory exhausted"),
1271                     &yyss1, yysize * sizeof (*yyssp),
1272                     &yyvs1, yysize * sizeof (*yyvsp),
1273                     &yystacksize);
1274
1275         yyss = yyss1;
1276         yyvs = yyvs1;
1277       }
1278 #else /* no yyoverflow */
1279 # ifndef YYSTACK_RELOCATE
1280       goto yyexhaustedlab;
1281 # else
1282       /* Extend the stack our own way.  */
1283       if (YYMAXDEPTH <= yystacksize)
1284         goto yyexhaustedlab;
1285       yystacksize *= 2;
1286       if (YYMAXDEPTH < yystacksize)
1287         yystacksize = YYMAXDEPTH;
1288
1289       {
1290         yytype_int16 *yyss1 = yyss;
1291         union yyalloc *yyptr =
1292           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1293         if (! yyptr)
1294           goto yyexhaustedlab;
1295         YYSTACK_RELOCATE (yyss_alloc, yyss);
1296         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1297 #  undef YYSTACK_RELOCATE
1298         if (yyss1 != yyssa)
1299           YYSTACK_FREE (yyss1);
1300       }
1301 # endif
1302 #endif /* no yyoverflow */
1303
1304       yyssp = yyss + yysize - 1;
1305       yyvsp = yyvs + yysize - 1;
1306
1307       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1308                   (unsigned long int) yystacksize));
1309
1310       if (yyss + yystacksize - 1 <= yyssp)
1311         YYABORT;
1312     }
1313
1314   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1315
1316   if (yystate == YYFINAL)
1317     YYACCEPT;
1318
1319   goto yybackup;
1320
1321 /*-----------.
1322 | yybackup.  |
1323 `-----------*/
1324 yybackup:
1325
1326   /* Do appropriate processing given the current state.  Read a
1327      lookahead token if we need one and don't already have one.  */
1328
1329   /* First try to decide what to do without reference to lookahead token.  */
1330   yyn = yypact[yystate];
1331   if (yypact_value_is_default (yyn))
1332     goto yydefault;
1333
1334   /* Not known => get a lookahead token if don't already have one.  */
1335
1336   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1337   if (yychar == YYEMPTY)
1338     {
1339       YYDPRINTF ((stderr, "Reading a token: "));
1340       yychar = YYLEX;
1341     }
1342
1343   if (yychar <= YYEOF)
1344     {
1345       yychar = yytoken = YYEOF;
1346       YYDPRINTF ((stderr, "Now at end of input.\n"));
1347     }
1348   else
1349     {
1350       yytoken = YYTRANSLATE (yychar);
1351       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1352     }
1353
1354   /* If the proper action on seeing token YYTOKEN is to reduce or to
1355      detect an error, take that action.  */
1356   yyn += yytoken;
1357   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1358     goto yydefault;
1359   yyn = yytable[yyn];
1360   if (yyn <= 0)
1361     {
1362       if (yytable_value_is_error (yyn))
1363         goto yyerrlab;
1364       yyn = -yyn;
1365       goto yyreduce;
1366     }
1367
1368   /* Count tokens shifted since error; after three, turn off error
1369      status.  */
1370   if (yyerrstatus)
1371     yyerrstatus--;
1372
1373   /* Shift the lookahead token.  */
1374   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1375
1376   /* Discard the shifted token.  */
1377   yychar = YYEMPTY;
1378
1379   yystate = yyn;
1380   *++yyvsp = yylval;
1381
1382   goto yynewstate;
1383
1384
1385 /*-----------------------------------------------------------.
1386 | yydefault -- do the default action for the current state.  |
1387 `-----------------------------------------------------------*/
1388 yydefault:
1389   yyn = yydefact[yystate];
1390   if (yyn == 0)
1391     goto yyerrlab;
1392   goto yyreduce;
1393
1394
1395 /*-----------------------------.
1396 | yyreduce -- Do a reduction.  |
1397 `-----------------------------*/
1398 yyreduce:
1399   /* yyn is the number of a rule to reduce with.  */
1400   yylen = yyr2[yyn];
1401
1402   /* If YYLEN is nonzero, implement the default value of the action:
1403      `$$ = $1'.
1404
1405      Otherwise, the following line sets YYVAL to garbage.
1406      This behavior is undocumented and Bison
1407      users should not rely upon it.  Assigning to YYVAL
1408      unconditionally makes the parser a bit smaller, and it avoids a
1409      GCC warning that YYVAL may be used uninitialized.  */
1410   yyval = yyvsp[1-yylen];
1411
1412
1413   YY_REDUCE_PRINT (yyn);
1414   switch (yyn)
1415     {
1416         case 4:
1417
1418 /* Line 1806 of yacc.c  */
1419 #line 52 "parserPromela.yacc"
1420     { new_state((yyvsp[(1) - (2)].string), 1);}
1421     break;
1422
1423   case 7:
1424
1425 /* Line 1806 of yacc.c  */
1426 #line 56 "parserPromela.yacc"
1427     { new_transition((yyvsp[(5) - (6)].string), (yyvsp[(2) - (6)].label));}
1428     break;
1429
1430   case 8:
1431
1432 /* Line 1806 of yacc.c  */
1433 #line 59 "parserPromela.yacc"
1434     { (yyval.label) = (yyvsp[(2) - (3)].label); }
1435     break;
1436
1437   case 9:
1438
1439 /* Line 1806 of yacc.c  */
1440 #line 60 "parserPromela.yacc"
1441     { (yyval.label) = new_label(0, (yyvsp[(1) - (3)].label), (yyvsp[(3) - (3)].label)); }
1442     break;
1443
1444   case 10:
1445
1446 /* Line 1806 of yacc.c  */
1447 #line 61 "parserPromela.yacc"
1448     { (yyval.label) = new_label(1, (yyvsp[(1) - (3)].label), (yyvsp[(3) - (3)].label)); }
1449     break;
1450
1451   case 11:
1452
1453 /* Line 1806 of yacc.c  */
1454 #line 62 "parserPromela.yacc"
1455     { (yyval.label) = new_label(2, (yyvsp[(2) - (2)].label)); }
1456     break;
1457
1458   case 12:
1459
1460 /* Line 1806 of yacc.c  */
1461 #line 63 "parserPromela.yacc"
1462     { (yyval.label) = new_label(4); }
1463     break;
1464
1465   case 13:
1466
1467 /* Line 1806 of yacc.c  */
1468 #line 64 "parserPromela.yacc"
1469     { (yyval.label) = new_label(3, (yyvsp[(1) - (1)].string)); }
1470     break;
1471
1472
1473
1474 /* Line 1806 of yacc.c  */
1475 #line 1476 "y.tab.c"
1476       default: break;
1477     }
1478   /* User semantic actions sometimes alter yychar, and that requires
1479      that yytoken be updated with the new translation.  We take the
1480      approach of translating immediately before every use of yytoken.
1481      One alternative is translating here after every semantic action,
1482      but that translation would be missed if the semantic action invokes
1483      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1484      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
1485      incorrect destructor might then be invoked immediately.  In the
1486      case of YYERROR or YYBACKUP, subsequent parser actions might lead
1487      to an incorrect destructor call or verbose syntax error message
1488      before the lookahead is translated.  */
1489   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1490
1491   YYPOPSTACK (yylen);
1492   yylen = 0;
1493   YY_STACK_PRINT (yyss, yyssp);
1494
1495   *++yyvsp = yyval;
1496
1497   /* Now `shift' the result of the reduction.  Determine what state
1498      that goes to, based on the state we popped back to and the rule
1499      number reduced by.  */
1500
1501   yyn = yyr1[yyn];
1502
1503   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1504   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1505     yystate = yytable[yystate];
1506   else
1507     yystate = yydefgoto[yyn - YYNTOKENS];
1508
1509   goto yynewstate;
1510
1511
1512 /*------------------------------------.
1513 | yyerrlab -- here on detecting error |
1514 `------------------------------------*/
1515 yyerrlab:
1516   /* Make sure we have latest lookahead translation.  See comments at
1517      user semantic actions for why this is necessary.  */
1518   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1519
1520   /* If not already recovering from an error, report this error.  */
1521   if (!yyerrstatus)
1522     {
1523       ++yynerrs;
1524 #if ! YYERROR_VERBOSE
1525       yyerror (YY_("syntax error"));
1526 #else
1527 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1528                                         yyssp, yytoken)
1529       {
1530         char const *yymsgp = YY_("syntax error");
1531         int yysyntax_error_status;
1532         yysyntax_error_status = YYSYNTAX_ERROR;
1533         if (yysyntax_error_status == 0)
1534           yymsgp = yymsg;
1535         else if (yysyntax_error_status == 1)
1536           {
1537             if (yymsg != yymsgbuf)
1538               YYSTACK_FREE (yymsg);
1539             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1540             if (!yymsg)
1541               {
1542                 yymsg = yymsgbuf;
1543                 yymsg_alloc = sizeof yymsgbuf;
1544                 yysyntax_error_status = 2;
1545               }
1546             else
1547               {
1548                 yysyntax_error_status = YYSYNTAX_ERROR;
1549                 yymsgp = yymsg;
1550               }
1551           }
1552         yyerror (yymsgp);
1553         if (yysyntax_error_status == 2)
1554           goto yyexhaustedlab;
1555       }
1556 # undef YYSYNTAX_ERROR
1557 #endif
1558     }
1559
1560
1561
1562   if (yyerrstatus == 3)
1563     {
1564       /* If just tried and failed to reuse lookahead token after an
1565          error, discard it.  */
1566
1567       if (yychar <= YYEOF)
1568         {
1569           /* Return failure if at end of input.  */
1570           if (yychar == YYEOF)
1571             YYABORT;
1572         }
1573       else
1574         {
1575           yydestruct ("Error: discarding",
1576                       yytoken, &yylval);
1577           yychar = YYEMPTY;
1578         }
1579     }
1580
1581   /* Else will try to reuse lookahead token after shifting the error
1582      token.  */
1583   goto yyerrlab1;
1584
1585
1586 /*---------------------------------------------------.
1587 | yyerrorlab -- error raised explicitly by YYERROR.  |
1588 `---------------------------------------------------*/
1589 yyerrorlab:
1590
1591   /* Pacify compilers like GCC when the user code never invokes
1592      YYERROR and the label yyerrorlab therefore never appears in user
1593      code.  */
1594   if (/*CONSTCOND*/ 0)
1595      goto yyerrorlab;
1596
1597   /* Do not reclaim the symbols of the rule which action triggered
1598      this YYERROR.  */
1599   YYPOPSTACK (yylen);
1600   yylen = 0;
1601   YY_STACK_PRINT (yyss, yyssp);
1602   yystate = *yyssp;
1603   goto yyerrlab1;
1604
1605
1606 /*-------------------------------------------------------------.
1607 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
1608 `-------------------------------------------------------------*/
1609 yyerrlab1:
1610   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1611
1612   for (;;)
1613     {
1614       yyn = yypact[yystate];
1615       if (!yypact_value_is_default (yyn))
1616         {
1617           yyn += YYTERROR;
1618           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1619             {
1620               yyn = yytable[yyn];
1621               if (0 < yyn)
1622                 break;
1623             }
1624         }
1625
1626       /* Pop the current state because it cannot handle the error token.  */
1627       if (yyssp == yyss)
1628         YYABORT;
1629
1630
1631       yydestruct ("Error: popping",
1632                   yystos[yystate], yyvsp);
1633       YYPOPSTACK (1);
1634       yystate = *yyssp;
1635       YY_STACK_PRINT (yyss, yyssp);
1636     }
1637
1638   *++yyvsp = yylval;
1639
1640
1641   /* Shift the error token.  */
1642   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1643
1644   yystate = yyn;
1645   goto yynewstate;
1646
1647
1648 /*-------------------------------------.
1649 | yyacceptlab -- YYACCEPT comes here.  |
1650 `-------------------------------------*/
1651 yyacceptlab:
1652   yyresult = 0;
1653   goto yyreturn;
1654
1655 /*-----------------------------------.
1656 | yyabortlab -- YYABORT comes here.  |
1657 `-----------------------------------*/
1658 yyabortlab:
1659   yyresult = 1;
1660   goto yyreturn;
1661
1662 #if !defined(yyoverflow) || YYERROR_VERBOSE
1663 /*-------------------------------------------------.
1664 | yyexhaustedlab -- memory exhaustion comes here.  |
1665 `-------------------------------------------------*/
1666 yyexhaustedlab:
1667   yyerror (YY_("memory exhausted"));
1668   yyresult = 2;
1669   /* Fall through.  */
1670 #endif
1671
1672 yyreturn:
1673   if (yychar != YYEMPTY)
1674     {
1675       /* Make sure we have latest lookahead translation.  See comments at
1676          user semantic actions for why this is necessary.  */
1677       yytoken = YYTRANSLATE (yychar);
1678       yydestruct ("Cleanup: discarding lookahead",
1679                   yytoken, &yylval);
1680     }
1681   /* Do not reclaim the symbols of the rule which action triggered
1682      this YYABORT or YYACCEPT.  */
1683   YYPOPSTACK (yylen);
1684   YY_STACK_PRINT (yyss, yyssp);
1685   while (yyssp != yyss)
1686     {
1687       yydestruct ("Cleanup: popping",
1688                   yystos[*yyssp], yyvsp);
1689       YYPOPSTACK (1);
1690     }
1691 #ifndef yyoverflow
1692   if (yyss != yyssa)
1693     YYSTACK_FREE (yyss);
1694 #endif
1695 #if YYERROR_VERBOSE
1696   if (yymsg != yymsgbuf)
1697     YYSTACK_FREE (yymsg);
1698 #endif
1699   /* Make sure YYID is used.  */
1700   return YYID (yyresult);
1701 }
1702
1703
1704
1705 /* Line 2067 of yacc.c  */
1706 #line 67 "parserPromela.yacc"
1707
1708
1709
1710
1711 void yyerror(const char *s){
1712   fprintf (stderr, "%s\n", s);
1713 }
1714
1715
1716
1717