Logo AND Algorithmique Numérique Distribuée

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