Logo AND Algorithmique Numérique Distribuée

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