Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change most mcmini tests to odpor reduction; the unchanged one fails to find the...
[simgrid.git] / src / xbt / automaton / parserPromela.tab.cacc
1 /* A Bison parser, made by GNU Bison 3.8.2.  */
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 30802
50
51 /* Bison version string.  */
52 #define YYBISON_VERSION "3.8.2"
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 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
308 #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
309 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
310 #  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
311     _Pragma ("GCC diagnostic push")                                     \
312     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
313 # else
314 #  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
315     _Pragma ("GCC diagnostic push")                                     \
316     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
317     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
318 # endif
319 # define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
320     _Pragma ("GCC diagnostic pop")
321 #else
322 # define YY_INITIAL_VALUE(Value) Value
323 #endif
324 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
325 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
326 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
327 #endif
328 #ifndef YY_INITIAL_VALUE
329 # define YY_INITIAL_VALUE(Value) /* Nothing. */
330 #endif
331
332 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
333 # define YY_IGNORE_USELESS_CAST_BEGIN                          \
334     _Pragma ("GCC diagnostic push")                            \
335     _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
336 # define YY_IGNORE_USELESS_CAST_END            \
337     _Pragma ("GCC diagnostic pop")
338 #endif
339 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
340 # define YY_IGNORE_USELESS_CAST_BEGIN
341 # define YY_IGNORE_USELESS_CAST_END
342 #endif
343
344
345 #define YY_ASSERT(E) ((void) (0 && (E)))
346
347 #if !defined yyoverflow
348
349 /* The parser invokes alloca or malloc; define the necessary symbols.  */
350
351 # ifdef YYSTACK_USE_ALLOCA
352 #  if YYSTACK_USE_ALLOCA
353 #   ifdef __GNUC__
354 #    define YYSTACK_ALLOC __builtin_alloca
355 #   elif defined __BUILTIN_VA_ARG_INCR
356 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
357 #   elif defined _AIX
358 #    define YYSTACK_ALLOC __alloca
359 #   elif defined _MSC_VER
360 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
361 #    define alloca _alloca
362 #   else
363 #    define YYSTACK_ALLOC alloca
364 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
365 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
366       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
367 #     ifndef EXIT_SUCCESS
368 #      define EXIT_SUCCESS 0
369 #     endif
370 #    endif
371 #   endif
372 #  endif
373 # endif
374
375 # ifdef YYSTACK_ALLOC
376    /* Pacify GCC's 'empty if-body' warning.  */
377 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
378 #  ifndef YYSTACK_ALLOC_MAXIMUM
379     /* The OS might guarantee only one guard page at the bottom of the stack,
380        and a page size can be as small as 4096 bytes.  So we cannot safely
381        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
382        to allow for a few compiler-allocated temporary stack slots.  */
383 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
384 #  endif
385 # else
386 #  define YYSTACK_ALLOC YYMALLOC
387 #  define YYSTACK_FREE YYFREE
388 #  ifndef YYSTACK_ALLOC_MAXIMUM
389 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
390 #  endif
391 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
392        && ! ((defined YYMALLOC || defined malloc) \
393              && (defined YYFREE || defined free)))
394 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
395 #   ifndef EXIT_SUCCESS
396 #    define EXIT_SUCCESS 0
397 #   endif
398 #  endif
399 #  ifndef YYMALLOC
400 #   define YYMALLOC malloc
401 #   if ! defined malloc && ! defined EXIT_SUCCESS
402 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
403 #   endif
404 #  endif
405 #  ifndef YYFREE
406 #   define YYFREE free
407 #   if ! defined free && ! defined EXIT_SUCCESS
408 void free (void *); /* INFRINGES ON USER NAME SPACE */
409 #   endif
410 #  endif
411 # endif
412 #endif /* !defined yyoverflow */
413
414 #if (! defined yyoverflow \
415      && (! defined __cplusplus \
416          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
417
418 /* A type that is properly aligned for any stack member.  */
419 union yyalloc
420 {
421   yy_state_t yyss_alloc;
422   YYSTYPE yyvs_alloc;
423 };
424
425 /* The size of the maximum gap between one aligned stack and the next.  */
426 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
427
428 /* The size of an array large to enough to hold all stacks, each with
429    N elements.  */
430 # define YYSTACK_BYTES(N) \
431      ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
432       + YYSTACK_GAP_MAXIMUM)
433
434 # define YYCOPY_NEEDED 1
435
436 /* Relocate STACK from its old location to the new one.  The
437    local variables YYSIZE and YYSTACKSIZE give the old and new number of
438    elements in the stack, and YYPTR gives the new location of the
439    stack.  Advance YYPTR to a properly aligned location for the next
440    stack.  */
441 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
442     do                                                                  \
443       {                                                                 \
444         YYPTRDIFF_T yynewbytes;                                         \
445         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
446         Stack = &yyptr->Stack_alloc;                                    \
447         yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
448         yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
449       }                                                                 \
450     while (0)
451
452 #endif
453
454 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
455 /* Copy COUNT objects from SRC to DST.  The source and destination do
456    not overlap.  */
457 # ifndef YYCOPY
458 #  if defined __GNUC__ && 1 < __GNUC__
459 #   define YYCOPY(Dst, Src, Count) \
460       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
461 #  else
462 #   define YYCOPY(Dst, Src, Count)              \
463       do                                        \
464         {                                       \
465           YYPTRDIFF_T yyi;                      \
466           for (yyi = 0; yyi < (Count); yyi++)   \
467             (Dst)[yyi] = (Src)[yyi];            \
468         }                                       \
469       while (0)
470 #  endif
471 # endif
472 #endif /* !YYCOPY_NEEDED */
473
474 /* YYFINAL -- State number of the termination state.  */
475 #define YYFINAL  4
476 /* YYLAST -- Last index in YYTABLE.  */
477 #define YYLAST   28
478
479 /* YYNTOKENS -- Number of terminals.  */
480 #define YYNTOKENS  23
481 /* YYNNTS -- Number of nonterminals.  */
482 #define YYNNTS  6
483 /* YYNRULES -- Number of rules.  */
484 #define YYNRULES  13
485 /* YYNSTATES -- Number of states.  */
486 #define YYNSTATES  32
487
488 /* YYMAXUTOK -- Last valid token kind.  */
489 #define YYMAXUTOK   277
490
491
492 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
493    as returned by yylex, with out-of-bounds checking.  */
494 #define YYTRANSLATE(YYX)                                \
495   (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
496    ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
497    : YYSYMBOL_YYUNDEF)
498
499 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
500    as returned by yylex.  */
501 static const yytype_int8 yytranslate[] =
502 {
503        0,     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,     2,     2,     2,     2,
523        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
524        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
525        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
526        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
527        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
528        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
529        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
530       15,    16,    17,    18,    19,    20,    21,    22
531 };
532
533 #if YYDEBUG
534 /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
535 static const yytype_int8 yyrline[] =
536 {
537        0,    60,    60,    63,    64,    64,    67,    68,    71,    72,
538       73,    74,    75,    76
539 };
540 #endif
541
542 /** Accessing symbol of state STATE.  */
543 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
544
545 #if YYDEBUG || 0
546 /* The user-facing name of the symbol whose (internal) number is
547    YYSYMBOL.  No bounds checking.  */
548 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
549
550 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
551    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
552 static const char *const yytname[] =
553 {
554   "\"end of file\"", "error", "\"invalid token\"", "NEVER", "IF", "FI",
555   "IMPLIES", "GOTO", "AND", "OR", "NOT", "LEFT_PAR", "RIGHT_PAR", "CASE",
556   "COLON", "SEMI_COLON", "CASE_TRUE", "LEFT_BRACE", "RIGHT_BRACE",
557   "LITT_ENT", "LITT_CHAINE", "LITT_REEL", "ID", "$accept", "automaton",
558   "stateseq", "$@1", "option", "exp", YY_NULLPTR
559 };
560
561 static const char *
562 yysymbol_name (yysymbol_kind_t yysymbol)
563 {
564   return yytname[yysymbol];
565 }
566 #endif
567
568 #define YYPACT_NINF (-16)
569
570 #define yypact_value_is_default(Yyn) \
571   ((Yyn) == YYPACT_NINF)
572
573 #define YYTABLE_NINF (-1)
574
575 #define yytable_value_is_error(Yyn) \
576   0
577
578 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
579    STATE-NUM.  */
580 static const yytype_int8 yypact[] =
581 {
582        0,   -15,    10,   -13,   -16,     2,     1,   -16,   -16,    16,
583        8,   -10,    17,   -10,   -10,   -16,   -16,     9,    11,   -16,
584       -1,    18,   -10,   -10,   -13,   -16,     5,   -16,   -16,   -16,
585        8,   -16
586 };
587
588 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
589    Performed when YYTABLE does not specify something else to do.  Zero
590    means the default is an error.  */
591 static const yytype_int8 yydefact[] =
592 {
593        0,     0,     0,     3,     1,     0,     0,     4,     2,     0,
594        6,     0,     0,     0,     0,    12,    13,     0,     0,    11,
595        0,     0,     0,     0,     3,     8,     0,    10,     9,     5,
596        6,     7
597 };
598
599 /* YYPGOTO[NTERM-NUM].  */
600 static const yytype_int8 yypgoto[] =
601 {
602      -16,   -16,     4,   -16,    -7,    -9
603 };
604
605 /* YYDEFGOTO[NTERM-NUM].  */
606 static const yytype_int8 yydefgoto[] =
607 {
608        0,     2,     6,     9,    12,    17
609 };
610
611 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
612    positive, shift that token.  If negative, reduce the rule whose
613    number is the opposite.  If YYTABLE_NINF, syntax error.  */
614 static const yytype_int8 yytable[] =
615 {
616       13,    14,     3,     1,    19,    20,    15,    22,    23,     5,
617        4,    25,    16,    27,    28,    21,     7,    22,    23,     8,
618       10,    11,    18,    31,     0,    26,    24,    30,    29
619 };
620
621 static const yytype_int8 yycheck[] =
622 {
623       10,    11,    17,     3,    13,    14,    16,     8,     9,    22,
624        0,    12,    22,    22,    23,     6,    14,     8,     9,    18,
625        4,    13,     5,    30,    -1,     7,    15,    22,    24
626 };
627
628 /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
629    state STATE-NUM.  */
630 static const yytype_int8 yystos[] =
631 {
632        0,     3,    24,    17,     0,    22,    25,    14,    18,    26,
633        4,    13,    27,    10,    11,    16,    22,    28,     5,    28,
634       28,     6,     8,     9,    15,    12,     7,    28,    28,    25,
635       22,    27
636 };
637
638 /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.  */
639 static const yytype_int8 yyr1[] =
640 {
641        0,    23,    24,    25,    26,    25,    27,    27,    28,    28,
642       28,    28,    28,    28
643 };
644
645 /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.  */
646 static const yytype_int8 yyr2[] =
647 {
648        0,     2,     4,     0,     0,     8,     0,     6,     3,     3,
649        3,     2,     1,     1
650 };
651
652
653 enum { YYENOMEM = -2 };
654
655 #define yyerrok         (yyerrstatus = 0)
656 #define yyclearin       (yychar = YYEMPTY)
657
658 #define YYACCEPT        goto yyacceptlab
659 #define YYABORT         goto yyabortlab
660 #define YYERROR         goto yyerrorlab
661 #define YYNOMEM         goto yyexhaustedlab
662
663
664 #define YYRECOVERING()  (!!yyerrstatus)
665
666 #define YYBACKUP(Token, Value)                                    \
667   do                                                              \
668     if (yychar == YYEMPTY)                                        \
669       {                                                           \
670         yychar = (Token);                                         \
671         yylval = (Value);                                         \
672         YYPOPSTACK (yylen);                                       \
673         yystate = *yyssp;                                         \
674         goto yybackup;                                            \
675       }                                                           \
676     else                                                          \
677       {                                                           \
678         yyerror (YY_("syntax error: cannot back up")); \
679         YYERROR;                                                  \
680       }                                                           \
681   while (0)
682
683 /* Backward compatibility with an undocumented macro.
684    Use YYerror or YYUNDEF. */
685 #define YYERRCODE YYUNDEF
686
687
688 /* Enable debugging if requested.  */
689 #if YYDEBUG
690
691 # ifndef YYFPRINTF
692 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
693 #  define YYFPRINTF fprintf
694 # endif
695
696 # define YYDPRINTF(Args)                        \
697 do {                                            \
698   if (yydebug)                                  \
699     YYFPRINTF Args;                             \
700 } while (0)
701
702
703
704
705 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
706 do {                                                                      \
707   if (yydebug)                                                            \
708     {                                                                     \
709       YYFPRINTF (stderr, "%s ", Title);                                   \
710       yy_symbol_print (stderr,                                            \
711                   Kind, Value); \
712       YYFPRINTF (stderr, "\n");                                           \
713     }                                                                     \
714 } while (0)
715
716
717 /*-----------------------------------.
718 | Print this symbol's value on YYO.  |
719 `-----------------------------------*/
720
721 static void
722 yy_symbol_value_print (FILE *yyo,
723                        yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
724 {
725   FILE *yyoutput = yyo;
726   YY_USE (yyoutput);
727   if (!yyvaluep)
728     return;
729   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
730   YY_USE (yykind);
731   YY_IGNORE_MAYBE_UNINITIALIZED_END
732 }
733
734
735 /*---------------------------.
736 | Print this symbol on YYO.  |
737 `---------------------------*/
738
739 static void
740 yy_symbol_print (FILE *yyo,
741                  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
742 {
743   YYFPRINTF (yyo, "%s %s (",
744              yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
745
746   yy_symbol_value_print (yyo, yykind, yyvaluep);
747   YYFPRINTF (yyo, ")");
748 }
749
750 /*------------------------------------------------------------------.
751 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
752 | TOP (included).                                                   |
753 `------------------------------------------------------------------*/
754
755 static void
756 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
757 {
758   YYFPRINTF (stderr, "Stack now");
759   for (; yybottom <= yytop; yybottom++)
760     {
761       int yybot = *yybottom;
762       YYFPRINTF (stderr, " %d", yybot);
763     }
764   YYFPRINTF (stderr, "\n");
765 }
766
767 # define YY_STACK_PRINT(Bottom, Top)                            \
768 do {                                                            \
769   if (yydebug)                                                  \
770     yy_stack_print ((Bottom), (Top));                           \
771 } while (0)
772
773
774 /*------------------------------------------------.
775 | Report that the YYRULE is going to be reduced.  |
776 `------------------------------------------------*/
777
778 static void
779 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
780                  int yyrule)
781 {
782   int yylno = yyrline[yyrule];
783   int yynrhs = yyr2[yyrule];
784   int yyi;
785   YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
786              yyrule - 1, yylno);
787   /* The symbols being reduced.  */
788   for (yyi = 0; yyi < yynrhs; yyi++)
789     {
790       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
791       yy_symbol_print (stderr,
792                        YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
793                        &yyvsp[(yyi + 1) - (yynrhs)]);
794       YYFPRINTF (stderr, "\n");
795     }
796 }
797
798 # define YY_REDUCE_PRINT(Rule)          \
799 do {                                    \
800   if (yydebug)                          \
801     yy_reduce_print (yyssp, yyvsp, Rule); \
802 } while (0)
803
804 /* Nonzero means print parse trace.  It is left uninitialized so that
805    multiple parsers can coexist.  */
806 int yydebug;
807 #else /* !YYDEBUG */
808 # define YYDPRINTF(Args) ((void) 0)
809 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
810 # define YY_STACK_PRINT(Bottom, Top)
811 # define YY_REDUCE_PRINT(Rule)
812 #endif /* !YYDEBUG */
813
814
815 /* YYINITDEPTH -- initial size of the parser's stacks.  */
816 #ifndef YYINITDEPTH
817 # define YYINITDEPTH 200
818 #endif
819
820 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
821    if the built-in stack extension method is used).
822
823    Do not make this value too large; the results are undefined if
824    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
825    evaluated with infinite-precision integer arithmetic.  */
826
827 #ifndef YYMAXDEPTH
828 # define YYMAXDEPTH 10000
829 #endif
830
831
832
833
834
835
836 /*-----------------------------------------------.
837 | Release the memory associated to this symbol.  |
838 `-----------------------------------------------*/
839
840 static void
841 yydestruct (const char *yymsg,
842             yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
843 {
844   YY_USE (yyvaluep);
845   if (!yymsg)
846     yymsg = "Deleting";
847   YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
848
849   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
850   YY_USE (yykind);
851   YY_IGNORE_MAYBE_UNINITIALIZED_END
852 }
853
854
855 /* Lookahead token kind.  */
856 int yychar;
857
858 /* The semantic value of the lookahead symbol.  */
859 YYSTYPE yylval;
860 /* Number of syntax errors so far.  */
861 int yynerrs;
862
863
864
865
866 /*----------.
867 | yyparse.  |
868 `----------*/
869
870 int
871 yyparse (void)
872 {
873     yy_state_fast_t yystate = 0;
874     /* Number of tokens to shift before error messages enabled.  */
875     int yyerrstatus = 0;
876
877     /* Refer to the stacks through separate pointers, to allow yyoverflow
878        to reallocate them elsewhere.  */
879
880     /* Their size.  */
881     YYPTRDIFF_T yystacksize = YYINITDEPTH;
882
883     /* The state stack: array, bottom, top.  */
884     yy_state_t yyssa[YYINITDEPTH];
885     yy_state_t *yyss = yyssa;
886     yy_state_t *yyssp = yyss;
887
888     /* The semantic value stack: array, bottom, top.  */
889     YYSTYPE yyvsa[YYINITDEPTH];
890     YYSTYPE *yyvs = yyvsa;
891     YYSTYPE *yyvsp = yyvs;
892
893   int yyn;
894   /* The return value of yyparse.  */
895   int yyresult;
896   /* Lookahead symbol kind.  */
897   yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
898   /* The variables used to return semantic value and location from the
899      action routines.  */
900   YYSTYPE yyval;
901
902
903
904 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
905
906   /* The number of symbols on the RHS of the reduced rule.
907      Keep to zero when no symbol should be popped.  */
908   int yylen = 0;
909
910   YYDPRINTF ((stderr, "Starting parse\n"));
911
912   yychar = YYEMPTY; /* Cause a token to be read.  */
913
914   goto yysetstate;
915
916
917 /*------------------------------------------------------------.
918 | yynewstate -- push a new state, which is found in yystate.  |
919 `------------------------------------------------------------*/
920 yynewstate:
921   /* In all cases, when you get here, the value and location stacks
922      have just been pushed.  So pushing a state here evens the stacks.  */
923   yyssp++;
924
925
926 /*--------------------------------------------------------------------.
927 | yysetstate -- set current state (the top of the stack) to yystate.  |
928 `--------------------------------------------------------------------*/
929 yysetstate:
930   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
931   YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
932   YY_IGNORE_USELESS_CAST_BEGIN
933   *yyssp = YY_CAST (yy_state_t, yystate);
934   YY_IGNORE_USELESS_CAST_END
935   YY_STACK_PRINT (yyss, yyssp);
936
937   if (yyss + yystacksize - 1 <= yyssp)
938 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
939     YYNOMEM;
940 #else
941     {
942       /* Get the current used size of the three stacks, in elements.  */
943       YYPTRDIFF_T yysize = yyssp - yyss + 1;
944
945 # if defined yyoverflow
946       {
947         /* Give user a chance to reallocate the stack.  Use copies of
948            these so that the &'s don't force the real ones into
949            memory.  */
950         yy_state_t *yyss1 = yyss;
951         YYSTYPE *yyvs1 = yyvs;
952
953         /* Each stack pointer address is followed by the size of the
954            data in use in that stack, in bytes.  This used to be a
955            conditional around just the two extra args, but that might
956            be undefined if yyoverflow is a macro.  */
957         yyoverflow (YY_("memory exhausted"),
958                     &yyss1, yysize * YYSIZEOF (*yyssp),
959                     &yyvs1, yysize * YYSIZEOF (*yyvsp),
960                     &yystacksize);
961         yyss = yyss1;
962         yyvs = yyvs1;
963       }
964 # else /* defined YYSTACK_RELOCATE */
965       /* Extend the stack our own way.  */
966       if (YYMAXDEPTH <= yystacksize)
967         YYNOMEM;
968       yystacksize *= 2;
969       if (YYMAXDEPTH < yystacksize)
970         yystacksize = YYMAXDEPTH;
971
972       {
973         yy_state_t *yyss1 = yyss;
974         union yyalloc *yyptr =
975           YY_CAST (union yyalloc *,
976                    YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
977         if (! yyptr)
978           YYNOMEM;
979         YYSTACK_RELOCATE (yyss_alloc, yyss);
980         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
981 #  undef YYSTACK_RELOCATE
982         if (yyss1 != yyssa)
983           YYSTACK_FREE (yyss1);
984       }
985 # endif
986
987       yyssp = yyss + yysize - 1;
988       yyvsp = yyvs + yysize - 1;
989
990       YY_IGNORE_USELESS_CAST_BEGIN
991       YYDPRINTF ((stderr, "Stack size increased to %ld\n",
992                   YY_CAST (long, yystacksize)));
993       YY_IGNORE_USELESS_CAST_END
994
995       if (yyss + yystacksize - 1 <= yyssp)
996         YYABORT;
997     }
998 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
999
1000
1001   if (yystate == YYFINAL)
1002     YYACCEPT;
1003
1004   goto yybackup;
1005
1006
1007 /*-----------.
1008 | yybackup.  |
1009 `-----------*/
1010 yybackup:
1011   /* Do appropriate processing given the current state.  Read a
1012      lookahead token if we need one and don't already have one.  */
1013
1014   /* First try to decide what to do without reference to lookahead token.  */
1015   yyn = yypact[yystate];
1016   if (yypact_value_is_default (yyn))
1017     goto yydefault;
1018
1019   /* Not known => get a lookahead token if don't already have one.  */
1020
1021   /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
1022   if (yychar == YYEMPTY)
1023     {
1024       YYDPRINTF ((stderr, "Reading a token\n"));
1025       yychar = yylex ();
1026     }
1027
1028   if (yychar <= YYEOF)
1029     {
1030       yychar = YYEOF;
1031       yytoken = YYSYMBOL_YYEOF;
1032       YYDPRINTF ((stderr, "Now at end of input.\n"));
1033     }
1034   else if (yychar == YYerror)
1035     {
1036       /* The scanner already issued an error message, process directly
1037          to error recovery.  But do not keep the error token as
1038          lookahead, it is too special and may lead us to an endless
1039          loop in error recovery. */
1040       yychar = YYUNDEF;
1041       yytoken = YYSYMBOL_YYerror;
1042       goto yyerrlab1;
1043     }
1044   else
1045     {
1046       yytoken = YYTRANSLATE (yychar);
1047       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1048     }
1049
1050   /* If the proper action on seeing token YYTOKEN is to reduce or to
1051      detect an error, take that action.  */
1052   yyn += yytoken;
1053   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1054     goto yydefault;
1055   yyn = yytable[yyn];
1056   if (yyn <= 0)
1057     {
1058       if (yytable_value_is_error (yyn))
1059         goto yyerrlab;
1060       yyn = -yyn;
1061       goto yyreduce;
1062     }
1063
1064   /* Count tokens shifted since error; after three, turn off error
1065      status.  */
1066   if (yyerrstatus)
1067     yyerrstatus--;
1068
1069   /* Shift the lookahead token.  */
1070   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1071   yystate = yyn;
1072   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1073   *++yyvsp = yylval;
1074   YY_IGNORE_MAYBE_UNINITIALIZED_END
1075
1076   /* Discard the shifted token.  */
1077   yychar = YYEMPTY;
1078   goto yynewstate;
1079
1080
1081 /*-----------------------------------------------------------.
1082 | yydefault -- do the default action for the current state.  |
1083 `-----------------------------------------------------------*/
1084 yydefault:
1085   yyn = yydefact[yystate];
1086   if (yyn == 0)
1087     goto yyerrlab;
1088   goto yyreduce;
1089
1090
1091 /*-----------------------------.
1092 | yyreduce -- do a reduction.  |
1093 `-----------------------------*/
1094 yyreduce:
1095   /* yyn is the number of a rule to reduce with.  */
1096   yylen = yyr2[yyn];
1097
1098   /* If YYLEN is nonzero, implement the default value of the action:
1099      '$$ = $1'.
1100
1101      Otherwise, the following line sets YYVAL to garbage.
1102      This behavior is undocumented and Bison
1103      users should not rely upon it.  Assigning to YYVAL
1104      unconditionally makes the parser a bit smaller, and it avoids a
1105      GCC warning that YYVAL may be used uninitialized.  */
1106   yyval = yyvsp[1-yylen];
1107
1108
1109   YY_REDUCE_PRINT (yyn);
1110   switch (yyn)
1111     {
1112   case 4: /* $@1: %empty  */
1113 #line 64 "parserPromela.yacc"
1114                     { new_state((yyvsp[-1].string), 1);}
1115 #line 1116 "parserPromela.tab.cacc"
1116     break;
1117
1118   case 7: /* option: CASE exp IMPLIES GOTO ID option  */
1119 #line 68 "parserPromela.yacc"
1120                                          { new_transition((yyvsp[-1].string), (yyvsp[-4].label));}
1121 #line 1122 "parserPromela.tab.cacc"
1122     break;
1123
1124   case 8: /* exp: LEFT_PAR exp RIGHT_PAR  */
1125 #line 71 "parserPromela.yacc"
1126                              { (yyval.label) = (yyvsp[-1].label); }
1127 #line 1128 "parserPromela.tab.cacc"
1128     break;
1129
1130   case 9: /* exp: exp OR exp  */
1131 #line 72 "parserPromela.yacc"
1132                  { (yyval.label) = xbt_automaton_exp_label_new_or((yyvsp[-2].label), (yyvsp[0].label)); }
1133 #line 1134 "parserPromela.tab.cacc"
1134     break;
1135
1136   case 10: /* exp: exp AND exp  */
1137 #line 73 "parserPromela.yacc"
1138                   { (yyval.label) = xbt_automaton_exp_label_new_and((yyvsp[-2].label), (yyvsp[0].label)); }
1139 #line 1140 "parserPromela.tab.cacc"
1140     break;
1141
1142   case 11: /* exp: NOT exp  */
1143 #line 74 "parserPromela.yacc"
1144               { (yyval.label) = xbt_automaton_exp_label_new_not((yyvsp[0].label)); }
1145 #line 1146 "parserPromela.tab.cacc"
1146     break;
1147
1148   case 12: /* exp: CASE_TRUE  */
1149 #line 75 "parserPromela.yacc"
1150                 { (yyval.label) = xbt_automaton_exp_label_new_one(); }
1151 #line 1152 "parserPromela.tab.cacc"
1152     break;
1153
1154   case 13: /* exp: ID  */
1155 #line 76 "parserPromela.yacc"
1156          { (yyval.label) = xbt_automaton_exp_label_new_predicat((yyvsp[0].string)); }
1157 #line 1158 "parserPromela.tab.cacc"
1158     break;
1159
1160
1161 #line 1162 "parserPromela.tab.cacc"
1162
1163       default: break;
1164     }
1165   /* User semantic actions sometimes alter yychar, and that requires
1166      that yytoken be updated with the new translation.  We take the
1167      approach of translating immediately before every use of yytoken.
1168      One alternative is translating here after every semantic action,
1169      but that translation would be missed if the semantic action invokes
1170      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1171      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
1172      incorrect destructor might then be invoked immediately.  In the
1173      case of YYERROR or YYBACKUP, subsequent parser actions might lead
1174      to an incorrect destructor call or verbose syntax error message
1175      before the lookahead is translated.  */
1176   YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
1177
1178   YYPOPSTACK (yylen);
1179   yylen = 0;
1180
1181   *++yyvsp = yyval;
1182
1183   /* Now 'shift' the result of the reduction.  Determine what state
1184      that goes to, based on the state we popped back to and the rule
1185      number reduced by.  */
1186   {
1187     const int yylhs = yyr1[yyn] - YYNTOKENS;
1188     const int yyi = yypgoto[yylhs] + *yyssp;
1189     yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1190                ? yytable[yyi]
1191                : yydefgoto[yylhs]);
1192   }
1193
1194   goto yynewstate;
1195
1196
1197 /*--------------------------------------.
1198 | yyerrlab -- here on detecting error.  |
1199 `--------------------------------------*/
1200 yyerrlab:
1201   /* Make sure we have latest lookahead translation.  See comments at
1202      user semantic actions for why this is necessary.  */
1203   yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
1204   /* If not already recovering from an error, report this error.  */
1205   if (!yyerrstatus)
1206     {
1207       ++yynerrs;
1208       yyerror (YY_("syntax error"));
1209     }
1210
1211   if (yyerrstatus == 3)
1212     {
1213       /* If just tried and failed to reuse lookahead token after an
1214          error, discard it.  */
1215
1216       if (yychar <= YYEOF)
1217         {
1218           /* Return failure if at end of input.  */
1219           if (yychar == YYEOF)
1220             YYABORT;
1221         }
1222       else
1223         {
1224           yydestruct ("Error: discarding",
1225                       yytoken, &yylval);
1226           yychar = YYEMPTY;
1227         }
1228     }
1229
1230   /* Else will try to reuse lookahead token after shifting the error
1231      token.  */
1232   goto yyerrlab1;
1233
1234
1235 /*---------------------------------------------------.
1236 | yyerrorlab -- error raised explicitly by YYERROR.  |
1237 `---------------------------------------------------*/
1238 yyerrorlab:
1239   /* Pacify compilers when the user code never invokes YYERROR and the
1240      label yyerrorlab therefore never appears in user code.  */
1241   if (0)
1242     YYERROR;
1243   ++yynerrs;
1244
1245   /* Do not reclaim the symbols of the rule whose action triggered
1246      this YYERROR.  */
1247   YYPOPSTACK (yylen);
1248   yylen = 0;
1249   YY_STACK_PRINT (yyss, yyssp);
1250   yystate = *yyssp;
1251   goto yyerrlab1;
1252
1253
1254 /*-------------------------------------------------------------.
1255 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
1256 `-------------------------------------------------------------*/
1257 yyerrlab1:
1258   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1259
1260   /* Pop stack until we find a state that shifts the error token.  */
1261   for (;;)
1262     {
1263       yyn = yypact[yystate];
1264       if (!yypact_value_is_default (yyn))
1265         {
1266           yyn += YYSYMBOL_YYerror;
1267           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
1268             {
1269               yyn = yytable[yyn];
1270               if (0 < yyn)
1271                 break;
1272             }
1273         }
1274
1275       /* Pop the current state because it cannot handle the error token.  */
1276       if (yyssp == yyss)
1277         YYABORT;
1278
1279
1280       yydestruct ("Error: popping",
1281                   YY_ACCESSING_SYMBOL (yystate), yyvsp);
1282       YYPOPSTACK (1);
1283       yystate = *yyssp;
1284       YY_STACK_PRINT (yyss, yyssp);
1285     }
1286
1287   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1288   *++yyvsp = yylval;
1289   YY_IGNORE_MAYBE_UNINITIALIZED_END
1290
1291
1292   /* Shift the error token.  */
1293   YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
1294
1295   yystate = yyn;
1296   goto yynewstate;
1297
1298
1299 /*-------------------------------------.
1300 | yyacceptlab -- YYACCEPT comes here.  |
1301 `-------------------------------------*/
1302 yyacceptlab:
1303   yyresult = 0;
1304   goto yyreturnlab;
1305
1306
1307 /*-----------------------------------.
1308 | yyabortlab -- YYABORT comes here.  |
1309 `-----------------------------------*/
1310 yyabortlab:
1311   yyresult = 1;
1312   goto yyreturnlab;
1313
1314
1315 /*-----------------------------------------------------------.
1316 | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here.  |
1317 `-----------------------------------------------------------*/
1318 yyexhaustedlab:
1319   yyerror (YY_("memory exhausted"));
1320   yyresult = 2;
1321   goto yyreturnlab;
1322
1323
1324 /*----------------------------------------------------------.
1325 | yyreturnlab -- parsing is finished, clean up and return.  |
1326 `----------------------------------------------------------*/
1327 yyreturnlab:
1328   if (yychar != YYEMPTY)
1329     {
1330       /* Make sure we have latest lookahead translation.  See comments at
1331          user semantic actions for why this is necessary.  */
1332       yytoken = YYTRANSLATE (yychar);
1333       yydestruct ("Cleanup: discarding lookahead",
1334                   yytoken, &yylval);
1335     }
1336   /* Do not reclaim the symbols of the rule whose action triggered
1337      this YYABORT or YYACCEPT.  */
1338   YYPOPSTACK (yylen);
1339   YY_STACK_PRINT (yyss, yyssp);
1340   while (yyssp != yyss)
1341     {
1342       yydestruct ("Cleanup: popping",
1343                   YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
1344       YYPOPSTACK (1);
1345     }
1346 #ifndef yyoverflow
1347   if (yyss != yyssa)
1348     YYSTACK_FREE (yyss);
1349 #endif
1350
1351   return yyresult;
1352 }
1353
1354 #line 79 "parserPromela.yacc"
1355
1356
1357
1358
1359 void yyerror(const char *s){
1360   fprintf (stderr, "%s\n", s);
1361 }
1362
1363
1364