Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge remote-tracking branch 'upstream/master' into issue95
[simgrid.git] / src / xbt / automaton / parserPromela.tab.cacc
1 /* A Bison parser, made by GNU Bison 3.7.6.  */
2
3 /* Bison implementation for Yacc-like parsers in C
4
5    Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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 <https://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 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38    especially those whose name start with YY_ or yy_.  They are
39    private implementation details that can be changed or removed.  */
40
41 /* All symbols defined below should begin with yy or YY, to avoid
42    infringing on user name space.  This should be done even for local
43    variables, as they might otherwise be expanded by user macros.
44    There are some unavoidable exceptions within include files to
45    define necessary library symbols; they are noted "INFRINGES ON
46    USER NAME SPACE" below.  */
47
48 /* Identify Bison output, and Bison version.  */
49 #define YYBISON 30706
50
51 /* Bison version string.  */
52 #define YYBISON_VERSION "3.7.6"
53
54 /* Skeleton name.  */
55 #define YYSKELETON_NAME "yacc.c"
56
57 /* Pure parsers.  */
58 #define YYPURE 0
59
60 /* Push parsers.  */
61 #define YYPUSH 0
62
63 /* Pull parsers.  */
64 #define YYPULL 1
65
66
67 /* Substitute the variable and function names.  */
68 #define yyparse         xbt_automaton_parser_parse
69 #define yylex           xbt_automaton_parser_lex
70 #define yyerror         xbt_automaton_parser_error
71 #define yydebug         xbt_automaton_parser_debug
72 #define yynerrs         xbt_automaton_parser_nerrs
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(const char* id, int src);
90 static void new_transition(const char* id, xbt_automaton_exp_label_t label);
91
92
93 #line 94 "parserPromela.tab.cacc"
94
95 # ifndef YY_CAST
96 #  ifdef __cplusplus
97 #   define YY_CAST(Type, Val) static_cast<Type> (Val)
98 #   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
99 #  else
100 #   define YY_CAST(Type, Val) ((Type) (Val))
101 #   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
102 #  endif
103 # endif
104 # ifndef YY_NULLPTR
105 #  if defined __cplusplus
106 #   if 201103L <= __cplusplus
107 #    define YY_NULLPTR nullptr
108 #   else
109 #    define YY_NULLPTR 0
110 #   endif
111 #  else
112 #   define YY_NULLPTR ((void*)0)
113 #  endif
114 # endif
115
116 #include "parserPromela.tab.hacc"
117 /* Symbol kind.  */
118 enum yysymbol_kind_t
119 {
120   YYSYMBOL_YYEMPTY = -2,
121   YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
122   YYSYMBOL_YYerror = 1,                    /* error  */
123   YYSYMBOL_YYUNDEF = 2,                    /* "invalid token"  */
124   YYSYMBOL_NEVER = 3,                      /* NEVER  */
125   YYSYMBOL_IF = 4,                         /* IF  */
126   YYSYMBOL_FI = 5,                         /* FI  */
127   YYSYMBOL_IMPLIES = 6,                    /* IMPLIES  */
128   YYSYMBOL_GOTO = 7,                       /* GOTO  */
129   YYSYMBOL_AND = 8,                        /* AND  */
130   YYSYMBOL_OR = 9,                         /* OR  */
131   YYSYMBOL_NOT = 10,                       /* NOT  */
132   YYSYMBOL_LEFT_PAR = 11,                  /* LEFT_PAR  */
133   YYSYMBOL_RIGHT_PAR = 12,                 /* RIGHT_PAR  */
134   YYSYMBOL_CASE = 13,                      /* CASE  */
135   YYSYMBOL_COLON = 14,                     /* COLON  */
136   YYSYMBOL_SEMI_COLON = 15,                /* SEMI_COLON  */
137   YYSYMBOL_CASE_TRUE = 16,                 /* CASE_TRUE  */
138   YYSYMBOL_LEFT_BRACE = 17,                /* LEFT_BRACE  */
139   YYSYMBOL_RIGHT_BRACE = 18,               /* RIGHT_BRACE  */
140   YYSYMBOL_LITT_ENT = 19,                  /* LITT_ENT  */
141   YYSYMBOL_LITT_CHAINE = 20,               /* LITT_CHAINE  */
142   YYSYMBOL_LITT_REEL = 21,                 /* LITT_REEL  */
143   YYSYMBOL_ID = 22,                        /* ID  */
144   YYSYMBOL_YYACCEPT = 23,                  /* $accept  */
145   YYSYMBOL_automaton = 24,                 /* automaton  */
146   YYSYMBOL_stateseq = 25,                  /* stateseq  */
147   YYSYMBOL_26_1 = 26,                      /* $@1  */
148   YYSYMBOL_option = 27,                    /* option  */
149   YYSYMBOL_exp = 28                        /* exp  */
150 };
151 typedef enum yysymbol_kind_t yysymbol_kind_t;
152
153
154
155
156 #ifdef short
157 # undef short
158 #endif
159
160 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
161    <limits.h> and (if available) <stdint.h> are included
162    so that the code can choose integer types of a good width.  */
163
164 #ifndef __PTRDIFF_MAX__
165 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
166 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
167 #  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
168 #  define YY_STDINT_H
169 # endif
170 #endif
171
172 /* Narrow types that promote to a signed type and that can represent a
173    signed or unsigned integer of at least N bits.  In tables they can
174    save space and decrease cache pressure.  Promoting to a signed type
175    helps avoid bugs in integer arithmetic.  */
176
177 #ifdef __INT_LEAST8_MAX__
178 typedef __INT_LEAST8_TYPE__ yytype_int8;
179 #elif defined YY_STDINT_H
180 typedef int_least8_t yytype_int8;
181 #else
182 typedef signed char yytype_int8;
183 #endif
184
185 #ifdef __INT_LEAST16_MAX__
186 typedef __INT_LEAST16_TYPE__ yytype_int16;
187 #elif defined YY_STDINT_H
188 typedef int_least16_t yytype_int16;
189 #else
190 typedef short yytype_int16;
191 #endif
192
193 /* Work around bug in HP-UX 11.23, which defines these macros
194    incorrectly for preprocessor constants.  This workaround can likely
195    be removed in 2023, as HPE has promised support for HP-UX 11.23
196    (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
197    <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>.  */
198 #ifdef __hpux
199 # undef UINT_LEAST8_MAX
200 # undef UINT_LEAST16_MAX
201 # define UINT_LEAST8_MAX 255
202 # define UINT_LEAST16_MAX 65535
203 #endif
204
205 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
206 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
207 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
208        && UINT_LEAST8_MAX <= INT_MAX)
209 typedef uint_least8_t yytype_uint8;
210 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
211 typedef unsigned char yytype_uint8;
212 #else
213 typedef short yytype_uint8;
214 #endif
215
216 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
217 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
218 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
219        && UINT_LEAST16_MAX <= INT_MAX)
220 typedef uint_least16_t yytype_uint16;
221 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
222 typedef unsigned short yytype_uint16;
223 #else
224 typedef int yytype_uint16;
225 #endif
226
227 #ifndef YYPTRDIFF_T
228 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
229 #  define YYPTRDIFF_T __PTRDIFF_TYPE__
230 #  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
231 # elif defined PTRDIFF_MAX
232 #  ifndef ptrdiff_t
233 #   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
234 #  endif
235 #  define YYPTRDIFF_T ptrdiff_t
236 #  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
237 # else
238 #  define YYPTRDIFF_T long
239 #  define YYPTRDIFF_MAXIMUM LONG_MAX
240 # endif
241 #endif
242
243 #ifndef YYSIZE_T
244 # ifdef __SIZE_TYPE__
245 #  define YYSIZE_T __SIZE_TYPE__
246 # elif defined size_t
247 #  define YYSIZE_T size_t
248 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
249 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
250 #  define YYSIZE_T size_t
251 # else
252 #  define YYSIZE_T unsigned
253 # endif
254 #endif
255
256 #define YYSIZE_MAXIMUM                                  \
257   YY_CAST (YYPTRDIFF_T,                                 \
258            (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
259             ? YYPTRDIFF_MAXIMUM                         \
260             : YY_CAST (YYSIZE_T, -1)))
261
262 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
263
264
265 /* Stored state numbers (used for stacks). */
266 typedef yytype_int8 yy_state_t;
267
268 /* State numbers in computations.  */
269 typedef int yy_state_fast_t;
270
271 #ifndef YY_
272 # if defined YYENABLE_NLS && YYENABLE_NLS
273 #  if ENABLE_NLS
274 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
275 #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
276 #  endif
277 # endif
278 # ifndef YY_
279 #  define YY_(Msgid) Msgid
280 # endif
281 #endif
282
283
284 #ifndef YY_ATTRIBUTE_PURE
285 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
286 #  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
287 # else
288 #  define YY_ATTRIBUTE_PURE
289 # endif
290 #endif
291
292 #ifndef YY_ATTRIBUTE_UNUSED
293 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
294 #  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
295 # else
296 #  define YY_ATTRIBUTE_UNUSED
297 # endif
298 #endif
299
300 /* Suppress unused-variable warnings by "using" E.  */
301 #if ! defined lint || defined __GNUC__
302 # define YY_USE(E) ((void) (E))
303 #else
304 # define YY_USE(E) /* empty */
305 #endif
306
307 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
308 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
309 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                            \
310     _Pragma ("GCC diagnostic push")                                     \
311     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
312     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
313 # define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
314     _Pragma ("GCC diagnostic pop")
315 #else
316 # define YY_INITIAL_VALUE(Value) Value
317 #endif
318 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
319 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
320 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
321 #endif
322 #ifndef YY_INITIAL_VALUE
323 # define YY_INITIAL_VALUE(Value) /* Nothing. */
324 #endif
325
326 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
327 # define YY_IGNORE_USELESS_CAST_BEGIN                          \
328     _Pragma ("GCC diagnostic push")                            \
329     _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
330 # define YY_IGNORE_USELESS_CAST_END            \
331     _Pragma ("GCC diagnostic pop")
332 #endif
333 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
334 # define YY_IGNORE_USELESS_CAST_BEGIN
335 # define YY_IGNORE_USELESS_CAST_END
336 #endif
337
338
339 #define YY_ASSERT(E) ((void) (0 && (E)))
340
341 #if !defined yyoverflow
342
343 /* The parser invokes alloca or malloc; define the necessary symbols.  */
344
345 # ifdef YYSTACK_USE_ALLOCA
346 #  if YYSTACK_USE_ALLOCA
347 #   ifdef __GNUC__
348 #    define YYSTACK_ALLOC __builtin_alloca
349 #   elif defined __BUILTIN_VA_ARG_INCR
350 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
351 #   elif defined _AIX
352 #    define YYSTACK_ALLOC __alloca
353 #   elif defined _MSC_VER
354 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
355 #    define alloca _alloca
356 #   else
357 #    define YYSTACK_ALLOC alloca
358 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
359 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
360       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
361 #     ifndef EXIT_SUCCESS
362 #      define EXIT_SUCCESS 0
363 #     endif
364 #    endif
365 #   endif
366 #  endif
367 # endif
368
369 # ifdef YYSTACK_ALLOC
370    /* Pacify GCC's 'empty if-body' warning.  */
371 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
372 #  ifndef YYSTACK_ALLOC_MAXIMUM
373     /* The OS might guarantee only one guard page at the bottom of the stack,
374        and a page size can be as small as 4096 bytes.  So we cannot safely
375        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
376        to allow for a few compiler-allocated temporary stack slots.  */
377 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
378 #  endif
379 # else
380 #  define YYSTACK_ALLOC YYMALLOC
381 #  define YYSTACK_FREE YYFREE
382 #  ifndef YYSTACK_ALLOC_MAXIMUM
383 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
384 #  endif
385 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
386        && ! ((defined YYMALLOC || defined malloc) \
387              && (defined YYFREE || defined free)))
388 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
389 #   ifndef EXIT_SUCCESS
390 #    define EXIT_SUCCESS 0
391 #   endif
392 #  endif
393 #  ifndef YYMALLOC
394 #   define YYMALLOC malloc
395 #   if ! defined malloc && ! defined EXIT_SUCCESS
396 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
397 #   endif
398 #  endif
399 #  ifndef YYFREE
400 #   define YYFREE free
401 #   if ! defined free && ! defined EXIT_SUCCESS
402 void free (void *); /* INFRINGES ON USER NAME SPACE */
403 #   endif
404 #  endif
405 # endif
406 #endif /* !defined yyoverflow */
407
408 #if (! defined yyoverflow \
409      && (! defined __cplusplus \
410          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
411
412 /* A type that is properly aligned for any stack member.  */
413 union yyalloc
414 {
415   yy_state_t yyss_alloc;
416   YYSTYPE yyvs_alloc;
417 };
418
419 /* The size of the maximum gap between one aligned stack and the next.  */
420 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
421
422 /* The size of an array large to enough to hold all stacks, each with
423    N elements.  */
424 # define YYSTACK_BYTES(N) \
425      ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
426       + YYSTACK_GAP_MAXIMUM)
427
428 # define YYCOPY_NEEDED 1
429
430 /* Relocate STACK from its old location to the new one.  The
431    local variables YYSIZE and YYSTACKSIZE give the old and new number of
432    elements in the stack, and YYPTR gives the new location of the
433    stack.  Advance YYPTR to a properly aligned location for the next
434    stack.  */
435 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
436     do                                                                  \
437       {                                                                 \
438         YYPTRDIFF_T yynewbytes;                                         \
439         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
440         Stack = &yyptr->Stack_alloc;                                    \
441         yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
442         yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
443       }                                                                 \
444     while (0)
445
446 #endif
447
448 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
449 /* Copy COUNT objects from SRC to DST.  The source and destination do
450    not overlap.  */
451 # ifndef YYCOPY
452 #  if defined __GNUC__ && 1 < __GNUC__
453 #   define YYCOPY(Dst, Src, Count) \
454       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
455 #  else
456 #   define YYCOPY(Dst, Src, Count)              \
457       do                                        \
458         {                                       \
459           YYPTRDIFF_T yyi;                      \
460           for (yyi = 0; yyi < (Count); yyi++)   \
461             (Dst)[yyi] = (Src)[yyi];            \
462         }                                       \
463       while (0)
464 #  endif
465 # endif
466 #endif /* !YYCOPY_NEEDED */
467
468 /* YYFINAL -- State number of the termination state.  */
469 #define YYFINAL  4
470 /* YYLAST -- Last index in YYTABLE.  */
471 #define YYLAST   28
472
473 /* YYNTOKENS -- Number of terminals.  */
474 #define YYNTOKENS  23
475 /* YYNNTS -- Number of nonterminals.  */
476 #define YYNNTS  6
477 /* YYNRULES -- Number of rules.  */
478 #define YYNRULES  13
479 /* YYNSTATES -- Number of states.  */
480 #define YYNSTATES  32
481
482 /* YYMAXUTOK -- Last valid token kind.  */
483 #define YYMAXUTOK   277
484
485
486 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
487    as returned by yylex, with out-of-bounds checking.  */
488 #define YYTRANSLATE(YYX)                                \
489   (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
490    ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
491    : YYSYMBOL_YYUNDEF)
492
493 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
494    as returned by yylex.  */
495 static const yytype_int8 yytranslate[] =
496 {
497        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
498        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
499        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
500        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
501        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
502        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
503        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
504        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
505        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
506        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
507        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
508        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
509        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
510        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
511        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
512        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
513        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
514        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
515        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
516        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
517        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
518        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
519        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
520        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
521        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
522        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
523        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
524       15,    16,    17,    18,    19,    20,    21,    22
525 };
526
527 #if YYDEBUG
528   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
529 static const yytype_int8 yyrline[] =
530 {
531        0,    60,    60,    63,    64,    64,    67,    68,    71,    72,
532       73,    74,    75,    76
533 };
534 #endif
535
536 /** Accessing symbol of state STATE.  */
537 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
538
539 #if YYDEBUG || 0
540 /* The user-facing name of the symbol whose (internal) number is
541    YYSYMBOL.  No bounds checking.  */
542 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
543
544 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
545    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
546 static const char *const yytname[] =
547 {
548   "\"end of file\"", "error", "\"invalid token\"", "NEVER", "IF", "FI",
549   "IMPLIES", "GOTO", "AND", "OR", "NOT", "LEFT_PAR", "RIGHT_PAR", "CASE",
550   "COLON", "SEMI_COLON", "CASE_TRUE", "LEFT_BRACE", "RIGHT_BRACE",
551   "LITT_ENT", "LITT_CHAINE", "LITT_REEL", "ID", "$accept", "automaton",
552   "stateseq", "$@1", "option", "exp", YY_NULLPTR
553 };
554
555 static const char *
556 yysymbol_name (yysymbol_kind_t yysymbol)
557 {
558   return yytname[yysymbol];
559 }
560 #endif
561
562 #ifdef YYPRINT
563 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
564    (internal) symbol number NUM (which must be that of a token).  */
565 static const yytype_int16 yytoknum[] =
566 {
567        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
568      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
569      275,   276,   277
570 };
571 #endif
572
573 #define YYPACT_NINF (-16)
574
575 #define yypact_value_is_default(Yyn) \
576   ((Yyn) == YYPACT_NINF)
577
578 #define YYTABLE_NINF (-1)
579
580 #define yytable_value_is_error(Yyn) \
581   0
582
583   /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
584      STATE-NUM.  */
585 static const yytype_int8 yypact[] =
586 {
587        0,   -15,    10,   -13,   -16,     2,     1,   -16,   -16,    16,
588        8,   -10,    17,   -10,   -10,   -16,   -16,     9,    11,   -16,
589       -1,    18,   -10,   -10,   -13,   -16,     5,   -16,   -16,   -16,
590        8,   -16
591 };
592
593   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
594      Performed when YYTABLE does not specify something else to do.  Zero
595      means the default is an error.  */
596 static const yytype_int8 yydefact[] =
597 {
598        0,     0,     0,     3,     1,     0,     0,     4,     2,     0,
599        6,     0,     0,     0,     0,    12,    13,     0,     0,    11,
600        0,     0,     0,     0,     3,     8,     0,    10,     9,     5,
601        6,     7
602 };
603
604   /* YYPGOTO[NTERM-NUM].  */
605 static const yytype_int8 yypgoto[] =
606 {
607      -16,   -16,     4,   -16,    -7,    -9
608 };
609
610   /* YYDEFGOTO[NTERM-NUM].  */
611 static const yytype_int8 yydefgoto[] =
612 {
613        0,     2,     6,     9,    12,    17
614 };
615
616   /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
617      positive, shift that token.  If negative, reduce the rule whose
618      number is the opposite.  If YYTABLE_NINF, syntax error.  */
619 static const yytype_int8 yytable[] =
620 {
621       13,    14,     3,     1,    19,    20,    15,    22,    23,     5,
622        4,    25,    16,    27,    28,    21,     7,    22,    23,     8,
623       10,    11,    18,    31,     0,    26,    24,    30,    29
624 };
625
626 static const yytype_int8 yycheck[] =
627 {
628       10,    11,    17,     3,    13,    14,    16,     8,     9,    22,
629        0,    12,    22,    22,    23,     6,    14,     8,     9,    18,
630        4,    13,     5,    30,    -1,     7,    15,    22,    24
631 };
632
633   /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
634      symbol of state STATE-NUM.  */
635 static const yytype_int8 yystos[] =
636 {
637        0,     3,    24,    17,     0,    22,    25,    14,    18,    26,
638        4,    13,    27,    10,    11,    16,    22,    28,     5,    28,
639       28,     6,     8,     9,    15,    12,     7,    28,    28,    25,
640       22,    27
641 };
642
643   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
644 static const yytype_int8 yyr1[] =
645 {
646        0,    23,    24,    25,    26,    25,    27,    27,    28,    28,
647       28,    28,    28,    28
648 };
649
650   /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
651 static const yytype_int8 yyr2[] =
652 {
653        0,     2,     4,     0,     0,     8,     0,     6,     3,     3,
654        3,     2,     1,     1
655 };
656
657
658 enum { YYENOMEM = -2 };
659
660 #define yyerrok         (yyerrstatus = 0)
661 #define yyclearin       (yychar = YYEMPTY)
662
663 #define YYACCEPT        goto yyacceptlab
664 #define YYABORT         goto yyabortlab
665 #define YYERROR         goto yyerrorlab
666
667
668 #define YYRECOVERING()  (!!yyerrstatus)
669
670 #define YYBACKUP(Token, Value)                                    \
671   do                                                              \
672     if (yychar == YYEMPTY)                                        \
673       {                                                           \
674         yychar = (Token);                                         \
675         yylval = (Value);                                         \
676         YYPOPSTACK (yylen);                                       \
677         yystate = *yyssp;                                         \
678         goto yybackup;                                            \
679       }                                                           \
680     else                                                          \
681       {                                                           \
682         yyerror (YY_("syntax error: cannot back up")); \
683         YYERROR;                                                  \
684       }                                                           \
685   while (0)
686
687 /* Backward compatibility with an undocumented macro.
688    Use YYerror or YYUNDEF. */
689 #define YYERRCODE YYUNDEF
690
691
692 /* Enable debugging if requested.  */
693 #if YYDEBUG
694
695 # ifndef YYFPRINTF
696 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
697 #  define YYFPRINTF fprintf
698 # endif
699
700 # define YYDPRINTF(Args)                        \
701 do {                                            \
702   if (yydebug)                                  \
703     YYFPRINTF Args;                             \
704 } while (0)
705
706 /* This macro is provided for backward compatibility. */
707 # ifndef YY_LOCATION_PRINT
708 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
709 # endif
710
711
712 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
713 do {                                                                      \
714   if (yydebug)                                                            \
715     {                                                                     \
716       YYFPRINTF (stderr, "%s ", Title);                                   \
717       yy_symbol_print (stderr,                                            \
718                   Kind, Value); \
719       YYFPRINTF (stderr, "\n");                                           \
720     }                                                                     \
721 } while (0)
722
723
724 /*-----------------------------------.
725 | Print this symbol's value on YYO.  |
726 `-----------------------------------*/
727
728 static void
729 yy_symbol_value_print (FILE *yyo,
730                        yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
731 {
732   FILE *yyoutput = yyo;
733   YY_USE (yyoutput);
734   if (!yyvaluep)
735     return;
736 # ifdef YYPRINT
737   if (yykind < YYNTOKENS)
738     YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
739 # endif
740   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
741   YY_USE (yykind);
742   YY_IGNORE_MAYBE_UNINITIALIZED_END
743 }
744
745
746 /*---------------------------.
747 | Print this symbol on YYO.  |
748 `---------------------------*/
749
750 static void
751 yy_symbol_print (FILE *yyo,
752                  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
753 {
754   YYFPRINTF (yyo, "%s %s (",
755              yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
756
757   yy_symbol_value_print (yyo, yykind, yyvaluep);
758   YYFPRINTF (yyo, ")");
759 }
760
761 /*------------------------------------------------------------------.
762 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
763 | TOP (included).                                                   |
764 `------------------------------------------------------------------*/
765
766 static void
767 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
768 {
769   YYFPRINTF (stderr, "Stack now");
770   for (; yybottom <= yytop; yybottom++)
771     {
772       int yybot = *yybottom;
773       YYFPRINTF (stderr, " %d", yybot);
774     }
775   YYFPRINTF (stderr, "\n");
776 }
777
778 # define YY_STACK_PRINT(Bottom, Top)                            \
779 do {                                                            \
780   if (yydebug)                                                  \
781     yy_stack_print ((Bottom), (Top));                           \
782 } while (0)
783
784
785 /*------------------------------------------------.
786 | Report that the YYRULE is going to be reduced.  |
787 `------------------------------------------------*/
788
789 static void
790 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
791                  int yyrule)
792 {
793   int yylno = yyrline[yyrule];
794   int yynrhs = yyr2[yyrule];
795   int yyi;
796   YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
797              yyrule - 1, yylno);
798   /* The symbols being reduced.  */
799   for (yyi = 0; yyi < yynrhs; yyi++)
800     {
801       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
802       yy_symbol_print (stderr,
803                        YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
804                        &yyvsp[(yyi + 1) - (yynrhs)]);
805       YYFPRINTF (stderr, "\n");
806     }
807 }
808
809 # define YY_REDUCE_PRINT(Rule)          \
810 do {                                    \
811   if (yydebug)                          \
812     yy_reduce_print (yyssp, yyvsp, Rule); \
813 } while (0)
814
815 /* Nonzero means print parse trace.  It is left uninitialized so that
816    multiple parsers can coexist.  */
817 int yydebug;
818 #else /* !YYDEBUG */
819 # define YYDPRINTF(Args) ((void) 0)
820 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
821 # define YY_STACK_PRINT(Bottom, Top)
822 # define YY_REDUCE_PRINT(Rule)
823 #endif /* !YYDEBUG */
824
825
826 /* YYINITDEPTH -- initial size of the parser's stacks.  */
827 #ifndef YYINITDEPTH
828 # define YYINITDEPTH 200
829 #endif
830
831 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
832    if the built-in stack extension method is used).
833
834    Do not make this value too large; the results are undefined if
835    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
836    evaluated with infinite-precision integer arithmetic.  */
837
838 #ifndef YYMAXDEPTH
839 # define YYMAXDEPTH 10000
840 #endif
841
842
843
844
845
846
847 /*-----------------------------------------------.
848 | Release the memory associated to this symbol.  |
849 `-----------------------------------------------*/
850
851 static void
852 yydestruct (const char *yymsg,
853             yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
854 {
855   YY_USE (yyvaluep);
856   if (!yymsg)
857     yymsg = "Deleting";
858   YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
859
860   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
861   YY_USE (yykind);
862   YY_IGNORE_MAYBE_UNINITIALIZED_END
863 }
864
865
866 /* Lookahead token kind.  */
867 int yychar;
868
869 /* The semantic value of the lookahead symbol.  */
870 YYSTYPE yylval;
871 /* Number of syntax errors so far.  */
872 int yynerrs;
873
874
875
876
877 /*----------.
878 | yyparse.  |
879 `----------*/
880
881 int
882 yyparse (void)
883 {
884     yy_state_fast_t yystate = 0;
885     /* Number of tokens to shift before error messages enabled.  */
886     int yyerrstatus = 0;
887
888     /* Refer to the stacks through separate pointers, to allow yyoverflow
889        to reallocate them elsewhere.  */
890
891     /* Their size.  */
892     YYPTRDIFF_T yystacksize = YYINITDEPTH;
893
894     /* The state stack: array, bottom, top.  */
895     yy_state_t yyssa[YYINITDEPTH];
896     yy_state_t *yyss = yyssa;
897     yy_state_t *yyssp = yyss;
898
899     /* The semantic value stack: array, bottom, top.  */
900     YYSTYPE yyvsa[YYINITDEPTH];
901     YYSTYPE *yyvs = yyvsa;
902     YYSTYPE *yyvsp = yyvs;
903
904   int yyn;
905   /* The return value of yyparse.  */
906   int yyresult;
907   /* Lookahead symbol kind.  */
908   yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
909   /* The variables used to return semantic value and location from the
910      action routines.  */
911   YYSTYPE yyval;
912
913
914
915 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
916
917   /* The number of symbols on the RHS of the reduced rule.
918      Keep to zero when no symbol should be popped.  */
919   int yylen = 0;
920
921   YYDPRINTF ((stderr, "Starting parse\n"));
922
923   yychar = YYEMPTY; /* Cause a token to be read.  */
924   goto yysetstate;
925
926
927 /*------------------------------------------------------------.
928 | yynewstate -- push a new state, which is found in yystate.  |
929 `------------------------------------------------------------*/
930 yynewstate:
931   /* In all cases, when you get here, the value and location stacks
932      have just been pushed.  So pushing a state here evens the stacks.  */
933   yyssp++;
934
935
936 /*--------------------------------------------------------------------.
937 | yysetstate -- set current state (the top of the stack) to yystate.  |
938 `--------------------------------------------------------------------*/
939 yysetstate:
940   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
941   YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
942   YY_IGNORE_USELESS_CAST_BEGIN
943   *yyssp = YY_CAST (yy_state_t, yystate);
944   YY_IGNORE_USELESS_CAST_END
945   YY_STACK_PRINT (yyss, yyssp);
946
947   if (yyss + yystacksize - 1 <= yyssp)
948 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
949     goto yyexhaustedlab;
950 #else
951     {
952       /* Get the current used size of the three stacks, in elements.  */
953       YYPTRDIFF_T yysize = yyssp - yyss + 1;
954
955 # if defined yyoverflow
956       {
957         /* Give user a chance to reallocate the stack.  Use copies of
958            these so that the &'s don't force the real ones into
959            memory.  */
960         yy_state_t *yyss1 = yyss;
961         YYSTYPE *yyvs1 = yyvs;
962
963         /* Each stack pointer address is followed by the size of the
964            data in use in that stack, in bytes.  This used to be a
965            conditional around just the two extra args, but that might
966            be undefined if yyoverflow is a macro.  */
967         yyoverflow (YY_("memory exhausted"),
968                     &yyss1, yysize * YYSIZEOF (*yyssp),
969                     &yyvs1, yysize * YYSIZEOF (*yyvsp),
970                     &yystacksize);
971         yyss = yyss1;
972         yyvs = yyvs1;
973       }
974 # else /* defined YYSTACK_RELOCATE */
975       /* Extend the stack our own way.  */
976       if (YYMAXDEPTH <= yystacksize)
977         goto yyexhaustedlab;
978       yystacksize *= 2;
979       if (YYMAXDEPTH < yystacksize)
980         yystacksize = YYMAXDEPTH;
981
982       {
983         yy_state_t *yyss1 = yyss;
984         union yyalloc *yyptr =
985           YY_CAST (union yyalloc *,
986                    YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
987         if (! yyptr)
988           goto yyexhaustedlab;
989         YYSTACK_RELOCATE (yyss_alloc, yyss);
990         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
991 #  undef YYSTACK_RELOCATE
992         if (yyss1 != yyssa)
993           YYSTACK_FREE (yyss1);
994       }
995 # endif
996
997       yyssp = yyss + yysize - 1;
998       yyvsp = yyvs + yysize - 1;
999
1000       YY_IGNORE_USELESS_CAST_BEGIN
1001       YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1002                   YY_CAST (long, yystacksize)));
1003       YY_IGNORE_USELESS_CAST_END
1004
1005       if (yyss + yystacksize - 1 <= yyssp)
1006         YYABORT;
1007     }
1008 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1009
1010   if (yystate == YYFINAL)
1011     YYACCEPT;
1012
1013   goto yybackup;
1014
1015
1016 /*-----------.
1017 | yybackup.  |
1018 `-----------*/
1019 yybackup:
1020   /* Do appropriate processing given the current state.  Read a
1021      lookahead token if we need one and don't already have one.  */
1022
1023   /* First try to decide what to do without reference to lookahead token.  */
1024   yyn = yypact[yystate];
1025   if (yypact_value_is_default (yyn))
1026     goto yydefault;
1027
1028   /* Not known => get a lookahead token if don't already have one.  */
1029
1030   /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
1031   if (yychar == YYEMPTY)
1032     {
1033       YYDPRINTF ((stderr, "Reading a token\n"));
1034       yychar = yylex ();
1035     }
1036
1037   if (yychar <= YYEOF)
1038     {
1039       yychar = YYEOF;
1040       yytoken = YYSYMBOL_YYEOF;
1041       YYDPRINTF ((stderr, "Now at end of input.\n"));
1042     }
1043   else if (yychar == YYerror)
1044     {
1045       /* The scanner already issued an error message, process directly
1046          to error recovery.  But do not keep the error token as
1047          lookahead, it is too special and may lead us to an endless
1048          loop in error recovery. */
1049       yychar = YYUNDEF;
1050       yytoken = YYSYMBOL_YYerror;
1051       goto yyerrlab1;
1052     }
1053   else
1054     {
1055       yytoken = YYTRANSLATE (yychar);
1056       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1057     }
1058
1059   /* If the proper action on seeing token YYTOKEN is to reduce or to
1060      detect an error, take that action.  */
1061   yyn += yytoken;
1062   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1063     goto yydefault;
1064   yyn = yytable[yyn];
1065   if (yyn <= 0)
1066     {
1067       if (yytable_value_is_error (yyn))
1068         goto yyerrlab;
1069       yyn = -yyn;
1070       goto yyreduce;
1071     }
1072
1073   /* Count tokens shifted since error; after three, turn off error
1074      status.  */
1075   if (yyerrstatus)
1076     yyerrstatus--;
1077
1078   /* Shift the lookahead token.  */
1079   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1080   yystate = yyn;
1081   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1082   *++yyvsp = yylval;
1083   YY_IGNORE_MAYBE_UNINITIALIZED_END
1084
1085   /* Discard the shifted token.  */
1086   yychar = YYEMPTY;
1087   goto yynewstate;
1088
1089
1090 /*-----------------------------------------------------------.
1091 | yydefault -- do the default action for the current state.  |
1092 `-----------------------------------------------------------*/
1093 yydefault:
1094   yyn = yydefact[yystate];
1095   if (yyn == 0)
1096     goto yyerrlab;
1097   goto yyreduce;
1098
1099
1100 /*-----------------------------.
1101 | yyreduce -- do a reduction.  |
1102 `-----------------------------*/
1103 yyreduce:
1104   /* yyn is the number of a rule to reduce with.  */
1105   yylen = yyr2[yyn];
1106
1107   /* If YYLEN is nonzero, implement the default value of the action:
1108      '$$ = $1'.
1109
1110      Otherwise, the following line sets YYVAL to garbage.
1111      This behavior is undocumented and Bison
1112      users should not rely upon it.  Assigning to YYVAL
1113      unconditionally makes the parser a bit smaller, and it avoids a
1114      GCC warning that YYVAL may be used uninitialized.  */
1115   yyval = yyvsp[1-yylen];
1116
1117
1118   YY_REDUCE_PRINT (yyn);
1119   switch (yyn)
1120     {
1121   case 4: /* $@1: %empty  */
1122 #line 64 "parserPromela.yacc"
1123                     { new_state((yyvsp[-1].string), 1);}
1124 #line 1125 "parserPromela.tab.cacc"
1125     break;
1126
1127   case 7: /* option: CASE exp IMPLIES GOTO ID option  */
1128 #line 68 "parserPromela.yacc"
1129                                          { new_transition((yyvsp[-1].string), (yyvsp[-4].label));}
1130 #line 1131 "parserPromela.tab.cacc"
1131     break;
1132
1133   case 8: /* exp: LEFT_PAR exp RIGHT_PAR  */
1134 #line 71 "parserPromela.yacc"
1135                              { (yyval.label) = (yyvsp[-1].label); }
1136 #line 1137 "parserPromela.tab.cacc"
1137     break;
1138
1139   case 9: /* exp: exp OR exp  */
1140 #line 72 "parserPromela.yacc"
1141                  { (yyval.label) = xbt_automaton_exp_label_new_or((yyvsp[-2].label), (yyvsp[0].label)); }
1142 #line 1143 "parserPromela.tab.cacc"
1143     break;
1144
1145   case 10: /* exp: exp AND exp  */
1146 #line 73 "parserPromela.yacc"
1147                   { (yyval.label) = xbt_automaton_exp_label_new_and((yyvsp[-2].label), (yyvsp[0].label)); }
1148 #line 1149 "parserPromela.tab.cacc"
1149     break;
1150
1151   case 11: /* exp: NOT exp  */
1152 #line 74 "parserPromela.yacc"
1153               { (yyval.label) = xbt_automaton_exp_label_new_not((yyvsp[0].label)); }
1154 #line 1155 "parserPromela.tab.cacc"
1155     break;
1156
1157   case 12: /* exp: CASE_TRUE  */
1158 #line 75 "parserPromela.yacc"
1159                 { (yyval.label) = xbt_automaton_exp_label_new_one(); }
1160 #line 1161 "parserPromela.tab.cacc"
1161     break;
1162
1163   case 13: /* exp: ID  */
1164 #line 76 "parserPromela.yacc"
1165          { (yyval.label) = xbt_automaton_exp_label_new_predicat((yyvsp[0].string)); }
1166 #line 1167 "parserPromela.tab.cacc"
1167     break;
1168
1169
1170 #line 1171 "parserPromela.tab.cacc"
1171
1172       default: break;
1173     }
1174   /* User semantic actions sometimes alter yychar, and that requires
1175      that yytoken be updated with the new translation.  We take the
1176      approach of translating immediately before every use of yytoken.
1177      One alternative is translating here after every semantic action,
1178      but that translation would be missed if the semantic action invokes
1179      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1180      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
1181      incorrect destructor might then be invoked immediately.  In the
1182      case of YYERROR or YYBACKUP, subsequent parser actions might lead
1183      to an incorrect destructor call or verbose syntax error message
1184      before the lookahead is translated.  */
1185   YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
1186
1187   YYPOPSTACK (yylen);
1188   yylen = 0;
1189
1190   *++yyvsp = yyval;
1191
1192   /* Now 'shift' the result of the reduction.  Determine what state
1193      that goes to, based on the state we popped back to and the rule
1194      number reduced by.  */
1195   {
1196     const int yylhs = yyr1[yyn] - YYNTOKENS;
1197     const int yyi = yypgoto[yylhs] + *yyssp;
1198     yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1199                ? yytable[yyi]
1200                : yydefgoto[yylhs]);
1201   }
1202
1203   goto yynewstate;
1204
1205
1206 /*--------------------------------------.
1207 | yyerrlab -- here on detecting error.  |
1208 `--------------------------------------*/
1209 yyerrlab:
1210   /* Make sure we have latest lookahead translation.  See comments at
1211      user semantic actions for why this is necessary.  */
1212   yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
1213   /* If not already recovering from an error, report this error.  */
1214   if (!yyerrstatus)
1215     {
1216       ++yynerrs;
1217       yyerror (YY_("syntax error"));
1218     }
1219
1220   if (yyerrstatus == 3)
1221     {
1222       /* If just tried and failed to reuse lookahead token after an
1223          error, discard it.  */
1224
1225       if (yychar <= YYEOF)
1226         {
1227           /* Return failure if at end of input.  */
1228           if (yychar == YYEOF)
1229             YYABORT;
1230         }
1231       else
1232         {
1233           yydestruct ("Error: discarding",
1234                       yytoken, &yylval);
1235           yychar = YYEMPTY;
1236         }
1237     }
1238
1239   /* Else will try to reuse lookahead token after shifting the error
1240      token.  */
1241   goto yyerrlab1;
1242
1243
1244 /*---------------------------------------------------.
1245 | yyerrorlab -- error raised explicitly by YYERROR.  |
1246 `---------------------------------------------------*/
1247 yyerrorlab:
1248   /* Pacify compilers when the user code never invokes YYERROR and the
1249      label yyerrorlab therefore never appears in user code.  */
1250   if (0)
1251     YYERROR;
1252
1253   /* Do not reclaim the symbols of the rule whose action triggered
1254      this YYERROR.  */
1255   YYPOPSTACK (yylen);
1256   yylen = 0;
1257   YY_STACK_PRINT (yyss, yyssp);
1258   yystate = *yyssp;
1259   goto yyerrlab1;
1260
1261
1262 /*-------------------------------------------------------------.
1263 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
1264 `-------------------------------------------------------------*/
1265 yyerrlab1:
1266   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1267
1268   /* Pop stack until we find a state that shifts the error token.  */
1269   for (;;)
1270     {
1271       yyn = yypact[yystate];
1272       if (!yypact_value_is_default (yyn))
1273         {
1274           yyn += YYSYMBOL_YYerror;
1275           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
1276             {
1277               yyn = yytable[yyn];
1278               if (0 < yyn)
1279                 break;
1280             }
1281         }
1282
1283       /* Pop the current state because it cannot handle the error token.  */
1284       if (yyssp == yyss)
1285         YYABORT;
1286
1287
1288       yydestruct ("Error: popping",
1289                   YY_ACCESSING_SYMBOL (yystate), yyvsp);
1290       YYPOPSTACK (1);
1291       yystate = *yyssp;
1292       YY_STACK_PRINT (yyss, yyssp);
1293     }
1294
1295   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1296   *++yyvsp = yylval;
1297   YY_IGNORE_MAYBE_UNINITIALIZED_END
1298
1299
1300   /* Shift the error token.  */
1301   YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
1302
1303   yystate = yyn;
1304   goto yynewstate;
1305
1306
1307 /*-------------------------------------.
1308 | yyacceptlab -- YYACCEPT comes here.  |
1309 `-------------------------------------*/
1310 yyacceptlab:
1311   yyresult = 0;
1312   goto yyreturn;
1313
1314
1315 /*-----------------------------------.
1316 | yyabortlab -- YYABORT comes here.  |
1317 `-----------------------------------*/
1318 yyabortlab:
1319   yyresult = 1;
1320   goto yyreturn;
1321
1322
1323 #if !defined yyoverflow
1324 /*-------------------------------------------------.
1325 | yyexhaustedlab -- memory exhaustion comes here.  |
1326 `-------------------------------------------------*/
1327 yyexhaustedlab:
1328   yyerror (YY_("memory exhausted"));
1329   yyresult = 2;
1330   goto yyreturn;
1331 #endif
1332
1333
1334 /*-------------------------------------------------------.
1335 | yyreturn -- parsing is finished, clean up and return.  |
1336 `-------------------------------------------------------*/
1337 yyreturn:
1338   if (yychar != YYEMPTY)
1339     {
1340       /* Make sure we have latest lookahead translation.  See comments at
1341          user semantic actions for why this is necessary.  */
1342       yytoken = YYTRANSLATE (yychar);
1343       yydestruct ("Cleanup: discarding lookahead",
1344                   yytoken, &yylval);
1345     }
1346   /* Do not reclaim the symbols of the rule whose action triggered
1347      this YYABORT or YYACCEPT.  */
1348   YYPOPSTACK (yylen);
1349   YY_STACK_PRINT (yyss, yyssp);
1350   while (yyssp != yyss)
1351     {
1352       yydestruct ("Cleanup: popping",
1353                   YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
1354       YYPOPSTACK (1);
1355     }
1356 #ifndef yyoverflow
1357   if (yyss != yyssa)
1358     YYSTACK_FREE (yyss);
1359 #endif
1360
1361   return yyresult;
1362 }
1363
1364 #line 79 "parserPromela.yacc"
1365
1366
1367
1368
1369 void yyerror(const char *s){
1370   fprintf (stderr, "%s\n", s);
1371 }
1372
1373
1374