Logo AND Algorithmique Numérique Distribuée

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