Logo AND Algorithmique Numérique Distribuée

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