Logo AND Algorithmique Numérique Distribuée

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