Logo AND Algorithmique Numérique Distribuée

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