Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Move include before any code.
[simgrid.git] / src / xbt / automaton / parserPromela.tab.cacc
1 /* A Bison parser, made by GNU Bison 3.4.1.  */
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.1"
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 0
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   YYUSE (yytype);
670 }
671
672
673 /*---------------------------.
674 | Print this symbol on YYO.  |
675 `---------------------------*/
676
677 static void
678 yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
679 {
680   YYFPRINTF (yyo, "%s %s (",
681              yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
682
683   yy_symbol_value_print (yyo, yytype, yyvaluep);
684   YYFPRINTF (yyo, ")");
685 }
686
687 /*------------------------------------------------------------------.
688 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
689 | TOP (included).                                                   |
690 `------------------------------------------------------------------*/
691
692 static void
693 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
694 {
695   YYFPRINTF (stderr, "Stack now");
696   for (; yybottom <= yytop; yybottom++)
697     {
698       int yybot = *yybottom;
699       YYFPRINTF (stderr, " %d", yybot);
700     }
701   YYFPRINTF (stderr, "\n");
702 }
703
704 # define YY_STACK_PRINT(Bottom, Top)                            \
705 do {                                                            \
706   if (yydebug)                                                  \
707     yy_stack_print ((Bottom), (Top));                           \
708 } while (0)
709
710
711 /*------------------------------------------------.
712 | Report that the YYRULE is going to be reduced.  |
713 `------------------------------------------------*/
714
715 static void
716 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
717 {
718   unsigned long yylno = yyrline[yyrule];
719   int yynrhs = yyr2[yyrule];
720   int yyi;
721   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
722              yyrule - 1, yylno);
723   /* The symbols being reduced.  */
724   for (yyi = 0; yyi < yynrhs; yyi++)
725     {
726       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
727       yy_symbol_print (stderr,
728                        yystos[yyssp[yyi + 1 - yynrhs]],
729                        &yyvsp[(yyi + 1) - (yynrhs)]
730                                               );
731       YYFPRINTF (stderr, "\n");
732     }
733 }
734
735 # define YY_REDUCE_PRINT(Rule)          \
736 do {                                    \
737   if (yydebug)                          \
738     yy_reduce_print (yyssp, yyvsp, Rule); \
739 } while (0)
740
741 /* Nonzero means print parse trace.  It is left uninitialized so that
742    multiple parsers can coexist.  */
743 int yydebug;
744 #else /* !YYDEBUG */
745 # define YYDPRINTF(Args)
746 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
747 # define YY_STACK_PRINT(Bottom, Top)
748 # define YY_REDUCE_PRINT(Rule)
749 #endif /* !YYDEBUG */
750
751
752 /* YYINITDEPTH -- initial size of the parser's stacks.  */
753 #ifndef YYINITDEPTH
754 # define YYINITDEPTH 200
755 #endif
756
757 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
758    if the built-in stack extension method is used).
759
760    Do not make this value too large; the results are undefined if
761    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
762    evaluated with infinite-precision integer arithmetic.  */
763
764 #ifndef YYMAXDEPTH
765 # define YYMAXDEPTH 10000
766 #endif
767
768
769 #if YYERROR_VERBOSE
770
771 # ifndef yystrlen
772 #  if defined __GLIBC__ && defined _STRING_H
773 #   define yystrlen strlen
774 #  else
775 /* Return the length of YYSTR.  */
776 static YYSIZE_T
777 yystrlen (const char *yystr)
778 {
779   YYSIZE_T yylen;
780   for (yylen = 0; yystr[yylen]; yylen++)
781     continue;
782   return yylen;
783 }
784 #  endif
785 # endif
786
787 # ifndef yystpcpy
788 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
789 #   define yystpcpy stpcpy
790 #  else
791 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
792    YYDEST.  */
793 static char *
794 yystpcpy (char *yydest, const char *yysrc)
795 {
796   char *yyd = yydest;
797   const char *yys = yysrc;
798
799   while ((*yyd++ = *yys++) != '\0')
800     continue;
801
802   return yyd - 1;
803 }
804 #  endif
805 # endif
806
807 # ifndef yytnamerr
808 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
809    quotes and backslashes, so that it's suitable for yyerror.  The
810    heuristic is that double-quoting is unnecessary unless the string
811    contains an apostrophe, a comma, or backslash (other than
812    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
813    null, do not copy; instead, return the length of what the result
814    would have been.  */
815 static YYSIZE_T
816 yytnamerr (char *yyres, const char *yystr)
817 {
818   if (*yystr == '"')
819     {
820       YYSIZE_T yyn = 0;
821       char const *yyp = yystr;
822
823       for (;;)
824         switch (*++yyp)
825           {
826           case '\'':
827           case ',':
828             goto do_not_strip_quotes;
829
830           case '\\':
831             if (*++yyp != '\\')
832               goto do_not_strip_quotes;
833             else
834               goto append;
835
836           append:
837           default:
838             if (yyres)
839               yyres[yyn] = *yyp;
840             yyn++;
841             break;
842
843           case '"':
844             if (yyres)
845               yyres[yyn] = '\0';
846             return yyn;
847           }
848     do_not_strip_quotes: ;
849     }
850
851   if (! yyres)
852     return yystrlen (yystr);
853
854   return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
855 }
856 # endif
857
858 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
859    about the unexpected token YYTOKEN for the state stack whose top is
860    YYSSP.
861
862    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
863    not large enough to hold the message.  In that case, also set
864    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
865    required number of bytes is too large to store.  */
866 static int
867 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
868                 yytype_int16 *yyssp, int yytoken)
869 {
870   YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
871   YYSIZE_T yysize = yysize0;
872   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
873   /* Internationalized format string. */
874   const char *yyformat = YY_NULLPTR;
875   /* Arguments of yyformat. */
876   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
877   /* Number of reported tokens (one for the "unexpected", one per
878      "expected"). */
879   int yycount = 0;
880
881   /* There are many possibilities here to consider:
882      - If this state is a consistent state with a default action, then
883        the only way this function was invoked is if the default action
884        is an error action.  In that case, don't check for expected
885        tokens because there are none.
886      - The only way there can be no lookahead present (in yychar) is if
887        this state is a consistent state with a default action.  Thus,
888        detecting the absence of a lookahead is sufficient to determine
889        that there is no unexpected or expected token to report.  In that
890        case, just report a simple "syntax error".
891      - Don't assume there isn't a lookahead just because this state is a
892        consistent state with a default action.  There might have been a
893        previous inconsistent state, consistent state with a non-default
894        action, or user semantic action that manipulated yychar.
895      - Of course, the expected token list depends on states to have
896        correct lookahead information, and it depends on the parser not
897        to perform extra reductions after fetching a lookahead from the
898        scanner and before detecting a syntax error.  Thus, state merging
899        (from LALR or IELR) and default reductions corrupt the expected
900        token list.  However, the list is correct for canonical LR with
901        one exception: it will still contain any token that will not be
902        accepted due to an error action in a later state.
903   */
904   if (yytoken != YYEMPTY)
905     {
906       int yyn = yypact[*yyssp];
907       yyarg[yycount++] = yytname[yytoken];
908       if (!yypact_value_is_default (yyn))
909         {
910           /* Start YYX at -YYN if negative to avoid negative indexes in
911              YYCHECK.  In other words, skip the first -YYN actions for
912              this state because they are default actions.  */
913           int yyxbegin = yyn < 0 ? -yyn : 0;
914           /* Stay within bounds of both yycheck and yytname.  */
915           int yychecklim = YYLAST - yyn + 1;
916           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
917           int yyx;
918
919           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
920             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
921                 && !yytable_value_is_error (yytable[yyx + yyn]))
922               {
923                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
924                   {
925                     yycount = 1;
926                     yysize = yysize0;
927                     break;
928                   }
929                 yyarg[yycount++] = yytname[yyx];
930                 {
931                   YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
932                   if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
933                     yysize = yysize1;
934                   else
935                     return 2;
936                 }
937               }
938         }
939     }
940
941   switch (yycount)
942     {
943 # define YYCASE_(N, S)                      \
944       case N:                               \
945         yyformat = S;                       \
946       break
947     default: /* Avoid compiler warnings. */
948       YYCASE_(0, YY_("syntax error"));
949       YYCASE_(1, YY_("syntax error, unexpected %s"));
950       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
951       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
952       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
953       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
954 # undef YYCASE_
955     }
956
957   {
958     YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
959     if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
960       yysize = yysize1;
961     else
962       return 2;
963   }
964
965   if (*yymsg_alloc < yysize)
966     {
967       *yymsg_alloc = 2 * yysize;
968       if (! (yysize <= *yymsg_alloc
969              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
970         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
971       return 1;
972     }
973
974   /* Avoid sprintf, as that infringes on the user's name space.
975      Don't have undefined behavior even if the translation
976      produced a string with the wrong number of "%s"s.  */
977   {
978     char *yyp = *yymsg;
979     int yyi = 0;
980     while ((*yyp = *yyformat) != '\0')
981       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
982         {
983           yyp += yytnamerr (yyp, yyarg[yyi++]);
984           yyformat += 2;
985         }
986       else
987         {
988           yyp++;
989           yyformat++;
990         }
991   }
992   return 0;
993 }
994 #endif /* YYERROR_VERBOSE */
995
996 /*-----------------------------------------------.
997 | Release the memory associated to this symbol.  |
998 `-----------------------------------------------*/
999
1000 static void
1001 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1002 {
1003   YYUSE (yyvaluep);
1004   if (!yymsg)
1005     yymsg = "Deleting";
1006   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1007
1008   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1009   YYUSE (yytype);
1010   YY_IGNORE_MAYBE_UNINITIALIZED_END
1011 }
1012
1013
1014
1015
1016 /* The lookahead symbol.  */
1017 int yychar;
1018
1019 /* The semantic value of the lookahead symbol.  */
1020 YYSTYPE yylval;
1021 /* Number of syntax errors so far.  */
1022 int yynerrs;
1023
1024
1025 /*----------.
1026 | yyparse.  |
1027 `----------*/
1028
1029 int
1030 yyparse (void)
1031 {
1032     int yystate;
1033     /* Number of tokens to shift before error messages enabled.  */
1034     int yyerrstatus;
1035
1036     /* The stacks and their tools:
1037        'yyss': related to states.
1038        'yyvs': related to semantic values.
1039
1040        Refer to the stacks through separate pointers, to allow yyoverflow
1041        to reallocate them elsewhere.  */
1042
1043     /* The state stack.  */
1044     yytype_int16 yyssa[YYINITDEPTH];
1045     yytype_int16 *yyss;
1046     yytype_int16 *yyssp;
1047
1048     /* The semantic value stack.  */
1049     YYSTYPE yyvsa[YYINITDEPTH];
1050     YYSTYPE *yyvs;
1051     YYSTYPE *yyvsp;
1052
1053     YYSIZE_T yystacksize;
1054
1055   int yyn;
1056   int yyresult;
1057   /* Lookahead token as an internal (translated) token number.  */
1058   int yytoken = 0;
1059   /* The variables used to return semantic value and location from the
1060      action routines.  */
1061   YYSTYPE yyval;
1062
1063 #if YYERROR_VERBOSE
1064   /* Buffer for error messages, and its allocated size.  */
1065   char yymsgbuf[128];
1066   char *yymsg = yymsgbuf;
1067   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1068 #endif
1069
1070 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1071
1072   /* The number of symbols on the RHS of the reduced rule.
1073      Keep to zero when no symbol should be popped.  */
1074   int yylen = 0;
1075
1076   yyssp = yyss = yyssa;
1077   yyvsp = yyvs = yyvsa;
1078   yystacksize = YYINITDEPTH;
1079
1080   YYDPRINTF ((stderr, "Starting parse\n"));
1081
1082   yystate = 0;
1083   yyerrstatus = 0;
1084   yynerrs = 0;
1085   yychar = YYEMPTY; /* Cause a token to be read.  */
1086   goto yysetstate;
1087
1088
1089 /*------------------------------------------------------------.
1090 | yynewstate -- push a new state, which is found in yystate.  |
1091 `------------------------------------------------------------*/
1092 yynewstate:
1093   /* In all cases, when you get here, the value and location stacks
1094      have just been pushed.  So pushing a state here evens the stacks.  */
1095   yyssp++;
1096
1097
1098 /*--------------------------------------------------------------------.
1099 | yynewstate -- set current state (the top of the stack) to yystate.  |
1100 `--------------------------------------------------------------------*/
1101 yysetstate:
1102   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1103   YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1104   *yyssp = (yytype_int16) yystate;
1105
1106   if (yyss + yystacksize - 1 <= yyssp)
1107 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1108     goto yyexhaustedlab;
1109 #else
1110     {
1111       /* Get the current used size of the three stacks, in elements.  */
1112       YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
1113
1114 # if defined yyoverflow
1115       {
1116         /* Give user a chance to reallocate the stack.  Use copies of
1117            these so that the &'s don't force the real ones into
1118            memory.  */
1119         YYSTYPE *yyvs1 = yyvs;
1120         yytype_int16 *yyss1 = yyss;
1121
1122         /* Each stack pointer address is followed by the size of the
1123            data in use in that stack, in bytes.  This used to be a
1124            conditional around just the two extra args, but that might
1125            be undefined if yyoverflow is a macro.  */
1126         yyoverflow (YY_("memory exhausted"),
1127                     &yyss1, yysize * sizeof (*yyssp),
1128                     &yyvs1, yysize * sizeof (*yyvsp),
1129                     &yystacksize);
1130         yyss = yyss1;
1131         yyvs = yyvs1;
1132       }
1133 # else /* defined YYSTACK_RELOCATE */
1134       /* Extend the stack our own way.  */
1135       if (YYMAXDEPTH <= yystacksize)
1136         goto yyexhaustedlab;
1137       yystacksize *= 2;
1138       if (YYMAXDEPTH < yystacksize)
1139         yystacksize = YYMAXDEPTH;
1140
1141       {
1142         yytype_int16 *yyss1 = yyss;
1143         union yyalloc *yyptr =
1144           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1145         if (! yyptr)
1146           goto yyexhaustedlab;
1147         YYSTACK_RELOCATE (yyss_alloc, yyss);
1148         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1149 # undef YYSTACK_RELOCATE
1150         if (yyss1 != yyssa)
1151           YYSTACK_FREE (yyss1);
1152       }
1153 # endif
1154
1155       yyssp = yyss + yysize - 1;
1156       yyvsp = yyvs + yysize - 1;
1157
1158       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1159                   (unsigned long) yystacksize));
1160
1161       if (yyss + yystacksize - 1 <= yyssp)
1162         YYABORT;
1163     }
1164 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1165
1166   if (yystate == YYFINAL)
1167     YYACCEPT;
1168
1169   goto yybackup;
1170
1171
1172 /*-----------.
1173 | yybackup.  |
1174 `-----------*/
1175 yybackup:
1176   /* Do appropriate processing given the current state.  Read a
1177      lookahead token if we need one and don't already have one.  */
1178
1179   /* First try to decide what to do without reference to lookahead token.  */
1180   yyn = yypact[yystate];
1181   if (yypact_value_is_default (yyn))
1182     goto yydefault;
1183
1184   /* Not known => get a lookahead token if don't already have one.  */
1185
1186   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1187   if (yychar == YYEMPTY)
1188     {
1189       YYDPRINTF ((stderr, "Reading a token: "));
1190       yychar = yylex ();
1191     }
1192
1193   if (yychar <= YYEOF)
1194     {
1195       yychar = yytoken = YYEOF;
1196       YYDPRINTF ((stderr, "Now at end of input.\n"));
1197     }
1198   else
1199     {
1200       yytoken = YYTRANSLATE (yychar);
1201       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1202     }
1203
1204   /* If the proper action on seeing token YYTOKEN is to reduce or to
1205      detect an error, take that action.  */
1206   yyn += yytoken;
1207   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1208     goto yydefault;
1209   yyn = yytable[yyn];
1210   if (yyn <= 0)
1211     {
1212       if (yytable_value_is_error (yyn))
1213         goto yyerrlab;
1214       yyn = -yyn;
1215       goto yyreduce;
1216     }
1217
1218   /* Count tokens shifted since error; after three, turn off error
1219      status.  */
1220   if (yyerrstatus)
1221     yyerrstatus--;
1222
1223   /* Shift the lookahead token.  */
1224   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1225
1226   /* Discard the shifted token.  */
1227   yychar = YYEMPTY;
1228
1229   yystate = yyn;
1230   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1231   *++yyvsp = yylval;
1232   YY_IGNORE_MAYBE_UNINITIALIZED_END
1233   goto yynewstate;
1234
1235
1236 /*-----------------------------------------------------------.
1237 | yydefault -- do the default action for the current state.  |
1238 `-----------------------------------------------------------*/
1239 yydefault:
1240   yyn = yydefact[yystate];
1241   if (yyn == 0)
1242     goto yyerrlab;
1243   goto yyreduce;
1244
1245
1246 /*-----------------------------.
1247 | yyreduce -- do a reduction.  |
1248 `-----------------------------*/
1249 yyreduce:
1250   /* yyn is the number of a rule to reduce with.  */
1251   yylen = yyr2[yyn];
1252
1253   /* If YYLEN is nonzero, implement the default value of the action:
1254      '$$ = $1'.
1255
1256      Otherwise, the following line sets YYVAL to garbage.
1257      This behavior is undocumented and Bison
1258      users should not rely upon it.  Assigning to YYVAL
1259      unconditionally makes the parser a bit smaller, and it avoids a
1260      GCC warning that YYVAL may be used uninitialized.  */
1261   yyval = yyvsp[1-yylen];
1262
1263
1264   YY_REDUCE_PRINT (yyn);
1265   switch (yyn)
1266     {
1267   case 4:
1268 #line 64 "parserPromela.yacc"
1269     { new_state((yyvsp[-1].string), 1);}
1270 #line 1271 "parserPromela.tab.cacc"
1271     break;
1272
1273   case 7:
1274 #line 68 "parserPromela.yacc"
1275     { new_transition((yyvsp[-1].string), (yyvsp[-4].label));}
1276 #line 1277 "parserPromela.tab.cacc"
1277     break;
1278
1279   case 8:
1280 #line 71 "parserPromela.yacc"
1281     { (yyval.label) = (yyvsp[-1].label); }
1282 #line 1283 "parserPromela.tab.cacc"
1283     break;
1284
1285   case 9:
1286 #line 72 "parserPromela.yacc"
1287     { (yyval.label) = xbt_automaton_exp_label_new_or((yyvsp[-2].label), (yyvsp[0].label)); }
1288 #line 1289 "parserPromela.tab.cacc"
1289     break;
1290
1291   case 10:
1292 #line 73 "parserPromela.yacc"
1293     { (yyval.label) = xbt_automaton_exp_label_new_and((yyvsp[-2].label), (yyvsp[0].label)); }
1294 #line 1295 "parserPromela.tab.cacc"
1295     break;
1296
1297   case 11:
1298 #line 74 "parserPromela.yacc"
1299     { (yyval.label) = xbt_automaton_exp_label_new_not((yyvsp[0].label)); }
1300 #line 1301 "parserPromela.tab.cacc"
1301     break;
1302
1303   case 12:
1304 #line 75 "parserPromela.yacc"
1305     { (yyval.label) = xbt_automaton_exp_label_new_one(); }
1306 #line 1307 "parserPromela.tab.cacc"
1307     break;
1308
1309   case 13:
1310 #line 76 "parserPromela.yacc"
1311     { (yyval.label) = xbt_automaton_exp_label_new_predicat((yyvsp[0].string)); }
1312 #line 1313 "parserPromela.tab.cacc"
1313     break;
1314
1315
1316 #line 1317 "parserPromela.tab.cacc"
1317
1318       default: break;
1319     }
1320   /* User semantic actions sometimes alter yychar, and that requires
1321      that yytoken be updated with the new translation.  We take the
1322      approach of translating immediately before every use of yytoken.
1323      One alternative is translating here after every semantic action,
1324      but that translation would be missed if the semantic action invokes
1325      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1326      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
1327      incorrect destructor might then be invoked immediately.  In the
1328      case of YYERROR or YYBACKUP, subsequent parser actions might lead
1329      to an incorrect destructor call or verbose syntax error message
1330      before the lookahead is translated.  */
1331   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1332
1333   YYPOPSTACK (yylen);
1334   yylen = 0;
1335   YY_STACK_PRINT (yyss, yyssp);
1336
1337   *++yyvsp = yyval;
1338
1339   /* Now 'shift' the result of the reduction.  Determine what state
1340      that goes to, based on the state we popped back to and the rule
1341      number reduced by.  */
1342   {
1343     const int yylhs = yyr1[yyn] - YYNTOKENS;
1344     const int yyi = yypgoto[yylhs] + *yyssp;
1345     yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1346                ? yytable[yyi]
1347                : yydefgoto[yylhs]);
1348   }
1349
1350   goto yynewstate;
1351
1352
1353 /*--------------------------------------.
1354 | yyerrlab -- here on detecting error.  |
1355 `--------------------------------------*/
1356 yyerrlab:
1357   /* Make sure we have latest lookahead translation.  See comments at
1358      user semantic actions for why this is necessary.  */
1359   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1360
1361   /* If not already recovering from an error, report this error.  */
1362   if (!yyerrstatus)
1363     {
1364       ++yynerrs;
1365 #if ! YYERROR_VERBOSE
1366       yyerror (YY_("syntax error"));
1367 #else
1368 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1369                                         yyssp, yytoken)
1370       {
1371         char const *yymsgp = YY_("syntax error");
1372         int yysyntax_error_status;
1373         yysyntax_error_status = YYSYNTAX_ERROR;
1374         if (yysyntax_error_status == 0)
1375           yymsgp = yymsg;
1376         else if (yysyntax_error_status == 1)
1377           {
1378             if (yymsg != yymsgbuf)
1379               YYSTACK_FREE (yymsg);
1380             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1381             if (!yymsg)
1382               {
1383                 yymsg = yymsgbuf;
1384                 yymsg_alloc = sizeof yymsgbuf;
1385                 yysyntax_error_status = 2;
1386               }
1387             else
1388               {
1389                 yysyntax_error_status = YYSYNTAX_ERROR;
1390                 yymsgp = yymsg;
1391               }
1392           }
1393         yyerror (yymsgp);
1394         if (yysyntax_error_status == 2)
1395           goto yyexhaustedlab;
1396       }
1397 # undef YYSYNTAX_ERROR
1398 #endif
1399     }
1400
1401
1402
1403   if (yyerrstatus == 3)
1404     {
1405       /* If just tried and failed to reuse lookahead token after an
1406          error, discard it.  */
1407
1408       if (yychar <= YYEOF)
1409         {
1410           /* Return failure if at end of input.  */
1411           if (yychar == YYEOF)
1412             YYABORT;
1413         }
1414       else
1415         {
1416           yydestruct ("Error: discarding",
1417                       yytoken, &yylval);
1418           yychar = YYEMPTY;
1419         }
1420     }
1421
1422   /* Else will try to reuse lookahead token after shifting the error
1423      token.  */
1424   goto yyerrlab1;
1425
1426
1427 /*---------------------------------------------------.
1428 | yyerrorlab -- error raised explicitly by YYERROR.  |
1429 `---------------------------------------------------*/
1430 yyerrorlab:
1431   /* Pacify compilers when the user code never invokes YYERROR and the
1432      label yyerrorlab therefore never appears in user code.  */
1433   if (0)
1434     YYERROR;
1435
1436   /* Do not reclaim the symbols of the rule whose action triggered
1437      this YYERROR.  */
1438   YYPOPSTACK (yylen);
1439   yylen = 0;
1440   YY_STACK_PRINT (yyss, yyssp);
1441   yystate = *yyssp;
1442   goto yyerrlab1;
1443
1444
1445 /*-------------------------------------------------------------.
1446 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
1447 `-------------------------------------------------------------*/
1448 yyerrlab1:
1449   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1450
1451   for (;;)
1452     {
1453       yyn = yypact[yystate];
1454       if (!yypact_value_is_default (yyn))
1455         {
1456           yyn += YYTERROR;
1457           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1458             {
1459               yyn = yytable[yyn];
1460               if (0 < yyn)
1461                 break;
1462             }
1463         }
1464
1465       /* Pop the current state because it cannot handle the error token.  */
1466       if (yyssp == yyss)
1467         YYABORT;
1468
1469
1470       yydestruct ("Error: popping",
1471                   yystos[yystate], yyvsp);
1472       YYPOPSTACK (1);
1473       yystate = *yyssp;
1474       YY_STACK_PRINT (yyss, yyssp);
1475     }
1476
1477   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1478   *++yyvsp = yylval;
1479   YY_IGNORE_MAYBE_UNINITIALIZED_END
1480
1481
1482   /* Shift the error token.  */
1483   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1484
1485   yystate = yyn;
1486   goto yynewstate;
1487
1488
1489 /*-------------------------------------.
1490 | yyacceptlab -- YYACCEPT comes here.  |
1491 `-------------------------------------*/
1492 yyacceptlab:
1493   yyresult = 0;
1494   goto yyreturn;
1495
1496
1497 /*-----------------------------------.
1498 | yyabortlab -- YYABORT comes here.  |
1499 `-----------------------------------*/
1500 yyabortlab:
1501   yyresult = 1;
1502   goto yyreturn;
1503
1504
1505 #if !defined yyoverflow || YYERROR_VERBOSE
1506 /*-------------------------------------------------.
1507 | yyexhaustedlab -- memory exhaustion comes here.  |
1508 `-------------------------------------------------*/
1509 yyexhaustedlab:
1510   yyerror (YY_("memory exhausted"));
1511   yyresult = 2;
1512   /* Fall through.  */
1513 #endif
1514
1515
1516 /*-----------------------------------------------------.
1517 | yyreturn -- parsing is finished, return the result.  |
1518 `-----------------------------------------------------*/
1519 yyreturn:
1520   if (yychar != YYEMPTY)
1521     {
1522       /* Make sure we have latest lookahead translation.  See comments at
1523          user semantic actions for why this is necessary.  */
1524       yytoken = YYTRANSLATE (yychar);
1525       yydestruct ("Cleanup: discarding lookahead",
1526                   yytoken, &yylval);
1527     }
1528   /* Do not reclaim the symbols of the rule whose action triggered
1529      this YYABORT or YYACCEPT.  */
1530   YYPOPSTACK (yylen);
1531   YY_STACK_PRINT (yyss, yyssp);
1532   while (yyssp != yyss)
1533     {
1534       yydestruct ("Cleanup: popping",
1535                   yystos[*yyssp], yyvsp);
1536       YYPOPSTACK (1);
1537     }
1538 #ifndef yyoverflow
1539   if (yyss != yyssa)
1540     YYSTACK_FREE (yyss);
1541 #endif
1542 #if YYERROR_VERBOSE
1543   if (yymsg != yymsgbuf)
1544     YYSTACK_FREE (yymsg);
1545 #endif
1546   return yyresult;
1547 }
1548 #line 79 "parserPromela.yacc"
1549
1550
1551
1552
1553 void yyerror(const char *s){
1554   fprintf (stderr, "%s\n", s);
1555 }
1556
1557
1558