Logo AND Algorithmique Numérique Distribuée

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