X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/22434b3c5fb97be63441ce80192a32a1b310c4b7..e2f4c322102dab25d663a761157720cbbb11702d:/src/xbt/automaton/parserPromela.tab.cacc diff --git a/src/xbt/automaton/parserPromela.tab.cacc b/src/xbt/automaton/parserPromela.tab.cacc index 6a9502d0a2..480e0c2f2a 100644 --- a/src/xbt/automaton/parserPromela.tab.cacc +++ b/src/xbt/automaton/parserPromela.tab.cacc @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ +/* A Bison parser, made by GNU Bison 3.2.2. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,11 +40,14 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ +/* Undocumented macros, especially those whose name start with YY_, + are private implementation details. Do not rely on them. */ + /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.2" +#define YYBISON_VERSION "3.2.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -69,9 +72,13 @@ #define yylval xbt_automaton_parser_lval #define yychar xbt_automaton_parser_char -/* Copy the first part of user declarations. */ -#line 1 "parserPromela.yacc" /* yacc.c:339 */ +/* First part of user prologue. */ +#line 7 "parserPromela.yacc" /* yacc.c:338 */ +#include "simgrid/config.h" +#if !HAVE_UNISTD_H +#define YY_NO_UNISTD_H /* hello Windows */ +#endif #include "automaton_lexer.yy.c" #include @@ -79,13 +86,16 @@ void yyerror(const char *s); -#line 83 "parserPromela.tab.cacc" /* yacc.c:339 */ - +#line 90 "parserPromela.tab.cacc" /* yacc.c:338 */ # ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif # else -# define YY_NULLPTR 0 +# define YY_NULLPTR ((void*)0) # endif # endif @@ -139,18 +149,20 @@ extern int xbt_automaton_parser_debug; /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE YYSTYPE; + union YYSTYPE { -#line 10 "parserPromela.yacc" /* yacc.c:355 */ +#line 20 "parserPromela.yacc" /* yacc.c:353 */ double real; int integer; char* string; xbt_automaton_exp_label_t label; -#line 153 "parserPromela.tab.cacc" /* yacc.c:355 */ +#line 163 "parserPromela.tab.cacc" /* yacc.c:353 */ }; + +typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif @@ -162,9 +174,7 @@ int xbt_automaton_parser_parse (void); #endif /* !YY_XBT_AUTOMATON_PARSER_PARSERPROMELA_TAB_HACC_INCLUDED */ -/* Copy the second part of user declarations. */ -#line 168 "parserPromela.tab.cacc" /* yacc.c:358 */ #ifdef short # undef short @@ -185,13 +195,13 @@ typedef signed char yytype_int8; #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else -typedef unsigned short int yytype_uint16; +typedef unsigned short yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else -typedef short int yytype_int16; +typedef short yytype_int16; #endif #ifndef YYSIZE_T @@ -203,7 +213,7 @@ typedef short int yytype_int16; # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else -# define YYSIZE_T unsigned int +# define YYSIZE_T unsigned # endif #endif @@ -239,15 +249,6 @@ typedef short int yytype_int16; # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) #endif -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) @@ -255,7 +256,7 @@ typedef short int yytype_int16; # define YYUSE(E) /* empty */ #endif -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ @@ -423,7 +424,7 @@ union yyalloc #define YYMAXUTOK 277 #define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex, without out-of-bounds checking. */ @@ -463,8 +464,8 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { - 0, 47, 47, 50, 51, 51, 54, 55, 58, 59, - 60, 61, 62, 63 + 0, 57, 57, 60, 61, 61, 64, 65, 68, 69, + 70, 71, 72, 73 }; #endif @@ -644,37 +645,37 @@ do { \ } while (0) -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ +/*-----------------------------------. +| Print this symbol's value on YYO. | +`-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) { - FILE *yyo = yyoutput; - YYUSE (yyo); + FILE *yyoutput = yyo; + YYUSE (yyoutput); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); + YYPRINT (yyo, yytoknum[yytype], *yyvaluep); # endif YYUSE (yytype); } -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +/*---------------------------. +| Print this symbol on YYO. | +`---------------------------*/ static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) { - YYFPRINTF (yyoutput, "%s %s (", + YYFPRINTF (yyo, "%s %s (", yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); + yy_symbol_value_print (yyo, yytype, yyvaluep); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -708,7 +709,7 @@ do { \ static void yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) { - unsigned long int yylno = yyrline[yyrule]; + unsigned long yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", @@ -841,7 +842,7 @@ yytnamerr (char *yyres, const char *yystr) if (! yyres) return yystrlen (yystr); - return yystpcpy (yyres, yystr) - yyres; + return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); } # endif @@ -934,6 +935,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, case N: \ yyformat = S; \ break + default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); @@ -1082,12 +1084,12 @@ yyparse (void) yyssp++; yysetstate: - *yyssp = yystate; + *yyssp = (yytype_int16) yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; + YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); #ifdef yyoverflow { @@ -1105,7 +1107,6 @@ yyparse (void) &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); - yyss = yyss1; yyvs = yyvs1; } @@ -1139,7 +1140,7 @@ yyparse (void) yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; @@ -1250,55 +1251,55 @@ yyreduce: switch (yyn) { case 4: -#line 51 "parserPromela.yacc" /* yacc.c:1646 */ +#line 61 "parserPromela.yacc" /* yacc.c:1645 */ { new_state((yyvsp[-1].string), 1);} -#line 1256 "parserPromela.tab.cacc" /* yacc.c:1646 */ +#line 1257 "parserPromela.tab.cacc" /* yacc.c:1645 */ break; case 7: -#line 55 "parserPromela.yacc" /* yacc.c:1646 */ +#line 65 "parserPromela.yacc" /* yacc.c:1645 */ { new_transition((yyvsp[-1].string), (yyvsp[-4].label));} -#line 1262 "parserPromela.tab.cacc" /* yacc.c:1646 */ +#line 1263 "parserPromela.tab.cacc" /* yacc.c:1645 */ break; case 8: -#line 58 "parserPromela.yacc" /* yacc.c:1646 */ +#line 68 "parserPromela.yacc" /* yacc.c:1645 */ { (yyval.label) = (yyvsp[-1].label); } -#line 1268 "parserPromela.tab.cacc" /* yacc.c:1646 */ +#line 1269 "parserPromela.tab.cacc" /* yacc.c:1645 */ break; case 9: -#line 59 "parserPromela.yacc" /* yacc.c:1646 */ - { (yyval.label) = new_label(0, (yyvsp[-2].label), (yyvsp[0].label)); } -#line 1274 "parserPromela.tab.cacc" /* yacc.c:1646 */ +#line 69 "parserPromela.yacc" /* yacc.c:1645 */ + { (yyval.label) = xbt_automaton_exp_label_new_or((yyvsp[-2].label), (yyvsp[0].label)); } +#line 1275 "parserPromela.tab.cacc" /* yacc.c:1645 */ break; case 10: -#line 60 "parserPromela.yacc" /* yacc.c:1646 */ - { (yyval.label) = new_label(1, (yyvsp[-2].label), (yyvsp[0].label)); } -#line 1280 "parserPromela.tab.cacc" /* yacc.c:1646 */ +#line 70 "parserPromela.yacc" /* yacc.c:1645 */ + { (yyval.label) = xbt_automaton_exp_label_new_and((yyvsp[-2].label), (yyvsp[0].label)); } +#line 1281 "parserPromela.tab.cacc" /* yacc.c:1645 */ break; case 11: -#line 61 "parserPromela.yacc" /* yacc.c:1646 */ - { (yyval.label) = new_label(2, (yyvsp[0].label)); } -#line 1286 "parserPromela.tab.cacc" /* yacc.c:1646 */ +#line 71 "parserPromela.yacc" /* yacc.c:1645 */ + { (yyval.label) = xbt_automaton_exp_label_new_not((yyvsp[0].label)); } +#line 1287 "parserPromela.tab.cacc" /* yacc.c:1645 */ break; case 12: -#line 62 "parserPromela.yacc" /* yacc.c:1646 */ - { (yyval.label) = new_label(4); } -#line 1292 "parserPromela.tab.cacc" /* yacc.c:1646 */ +#line 72 "parserPromela.yacc" /* yacc.c:1645 */ + { (yyval.label) = xbt_automaton_exp_label_new_one(); } +#line 1293 "parserPromela.tab.cacc" /* yacc.c:1645 */ break; case 13: -#line 63 "parserPromela.yacc" /* yacc.c:1646 */ - { (yyval.label) = new_label(3, (yyvsp[0].string)); } -#line 1298 "parserPromela.tab.cacc" /* yacc.c:1646 */ +#line 73 "parserPromela.yacc" /* yacc.c:1645 */ + { (yyval.label) = xbt_automaton_exp_label_new_predicat((yyvsp[0].string)); } +#line 1299 "parserPromela.tab.cacc" /* yacc.c:1645 */ break; -#line 1302 "parserPromela.tab.cacc" /* yacc.c:1646 */ +#line 1303 "parserPromela.tab.cacc" /* yacc.c:1645 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -1323,14 +1324,13 @@ yyreduce: /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; + { + const int yylhs = yyr1[yyn] - YYNTOKENS; + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); + } goto yynewstate; @@ -1526,7 +1526,7 @@ yyreturn: #endif return yyresult; } -#line 66 "parserPromela.yacc" /* yacc.c:1906 */ +#line 76 "parserPromela.yacc" /* yacc.c:1903 */