36 #line 37 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:404 39 # if defined __cplusplus && 201103L <= __cplusplus 40 # define YY_NULLPTR nullptr 50 #line 51 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:412 52 #line 63 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:413 60 #define TRY(Loc, Stm) \ 66 catch (std::exception& e) \ 68 error(Loc, e.what()); \ 105 #line 106 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:413 109 # if defined YYENABLE_NLS && YYENABLE_NLS 111 # include <libintl.h> 112 # define YY_(msgid) dgettext ("bison-runtime", msgid) 116 # define YY_(msgid) msgid 120 #define YYRHSLOC(Rhs, K) ((Rhs)[K].location) 125 # ifndef YYLLOC_DEFAULT 126 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 130 (Current).begin = YYRHSLOC (Rhs, 1).begin; \ 131 (Current).end = YYRHSLOC (Rhs, N).end; \ 135 (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \ 142 #define YYUSE(E) ((void) (E)) 148 # define YYCDEBUG if (yydebug_) (*yycdebug_) 150 # define YY_SYMBOL_PRINT(Title, Symbol) \ 154 *yycdebug_ << Title << ' '; \ 155 yy_print_ (*yycdebug_, Symbol); \ 156 *yycdebug_ << std::endl; \ 160 # define YY_REDUCE_PRINT(Rule) \ 163 yy_reduce_print_ (Rule); \ 166 # define YY_STACK_PRINT() \ 174 # define YYCDEBUG if (false) std::cerr 175 # define YY_SYMBOL_PRINT(Title, Symbol) YYUSE(Symbol) 176 # define YY_REDUCE_PRINT(Rule) static_cast<void>(0) 177 # define YY_STACK_PRINT() static_cast<void>(0) 181 #define yyerrok (yyerrstatus_ = 0) 182 #define yyclearin (yyla.clear ()) 184 #define YYACCEPT goto yyacceptlab 185 #define YYABORT goto yyabortlab 186 #define YYERROR goto yyerrorlab 187 #define YYRECOVERING() (!!yyerrstatus_) 189 #line 11 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:479 190 namespace vcsn {
namespace rat {
191 #line 192 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:479 203 std::string yyr =
"";
204 char const *yyp = yystr;
211 goto do_not_strip_quotes;
215 goto do_not_strip_quotes;
224 do_not_strip_quotes: ;
236 yycdebug_ (&
std::cerr),
238 driver_ (driver__yyarg)
254 : state (empty_state)
301 switch (that.type_get ())
391 template <
typename Base>
401 template <
typename Base>
406 std::ostream& yyoutput = yyo;
413 yyo << (yytype <
yyntokens_ ?
"token" :
"nterm")
420 #line 123 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636 421 { yyo <<
'"' << yysym.
value.template as< std::string > () <<
'"'; }
422 #line 423 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636 427 #line 130 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636 428 { yyo <<
'<' << yysym.
value.template as< std::string > () <<
'>'; }
429 #line 430 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636 434 #line 123 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636 435 { yyo <<
'"' << yysym.
value.template as< symbol > () <<
'"'; }
436 #line 437 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636 463 #line 132 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636 466 yyo << (yysym.
value.template as< braced_expression > ().lparen ?
" (lpar, " :
" (no lpar, ");
467 yyo << (yysym.
value.template as< braced_expression > ().rparen ?
"rpar)" :
"no rpar)");
469 #line 470 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636 474 #line 138 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636 476 const char* sep =
"[[";
477 for (
auto e: yysym.
value.template as< std::vector<vcsn::dyn::expression> > ())
484 #line 485 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636 489 #line 132 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636 492 yyo << (yysym.
value.template as< braced_expression > ().lparen ?
" (lpar, " :
" (no lpar, ");
493 yyo << (yysym.
value.template as< braced_expression > ().rparen ?
"rpar)" :
"no rpar)");
495 #line 496 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636 500 #line 148 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636 502 #line 503 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636 507 #line 125 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636 510 for (
auto c: yysym.
value.template as< class_t > ()) yyo << c.first <<
"-" << c.second;
513 #line 514 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636 607 int yyerrstatus_ = 0;
622 YYCDEBUG <<
"Starting parse" << std::endl;
626 #line 119 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:741 631 #line 632 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:741 665 yyla.
move (yylookahead);
677 yyn += yyla.type_get ();
696 yypush_ (
"Shifting", yyn, yyla);
746 yylhs.
value.
build< std::vector<vcsn::dyn::expression> > ();
771 #line 208 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 779 <<
"converted the expression\n" 785 #line 786 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 789 #line 224 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 791 #line 792 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 795 #line 225 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 797 #line 798 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 801 #line 226 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 803 #line 804 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 807 #line 227 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 809 #line 810 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 813 #line 231 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 815 #line 816 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 819 #line 232 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 821 #line 822 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 825 #line 233 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 827 #line 828 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 831 #line 239 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 833 #line 834 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 837 #line 240 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 840 if (yystack_[0].
value.
as< std::vector<vcsn::dyn::expression> > ().size() == 1)
847 +
std::to_string(yystack_[0].value.as< std::vector<vcsn::dyn::expression> > ().size())
851 #line 852 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 855 #line 257 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 859 #line 860 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 863 #line 260 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 865 #line 866 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 869 #line 261 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 871 yylhs.
value.
as< std::vector<vcsn::dyn::expression> > () = yystack_[3].
value.
as< std::vector<vcsn::dyn::expression> > ();
874 #line 875 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 878 #line 268 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 880 #line 881 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 884 #line 269 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 886 #line 887 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 890 #line 270 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 892 #line 893 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 896 #line 271 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 898 #line 899 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 902 #line 272 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 904 #line 905 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 908 #line 273 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 910 #line 911 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 914 #line 274 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 916 #line 917 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 920 #line 275 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 923 #line 924 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 927 #line 277 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 929 #line 930 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 933 #line 278 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 935 #line 936 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 939 #line 280 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 951 #line 952 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 955 #line 291 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 959 std::get<0>(yystack_[0].value.as<
irange_type > ()), std::get<1>(yystack_[0].value.as<
irange_type > ()))); }
960 #line 961 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 964 #line 295 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 966 #line 967 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 970 #line 296 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 972 #line 973 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 976 #line 297 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 978 #line 979 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 982 #line 298 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 984 #line 985 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 988 #line 299 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 990 #line 991 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 994 #line 300 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 996 #line 997 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 1000 #line 301 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 1002 #line 1003 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 1006 #line 302 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 1008 #line 1009 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 1012 #line 303 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 1014 #line 1015 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 1018 #line 305 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 1025 #line 1026 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 1029 #line 314 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 1031 #line 1032 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 1035 #line 315 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 1037 #line 1038 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 1041 #line 319 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 1043 #line 1044 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 1047 #line 320 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 1049 #line 1050 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 1053 #line 321 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 1055 #line 1056 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 1059 #line 1060 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 1092 if (yyerrstatus_ == 3)
1098 if (yyla.type_get () ==
yyeof_)
1100 else if (!yyla.
empty ())
1137 yyn =
yypact_[yystack_[0].state];
1150 if (yystack_.size () == 1)
1163 error_token.
state = yyn;
1164 yypush_ (
"Shifting", error_token);
1180 yy_destroy_ (
"Cleanup: discarding lookahead", yyla);
1185 while (1 < yystack_.size ())
1195 YYCDEBUG <<
"Exception caught: cleaning lookahead and stack" 1225 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1227 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1256 int yytoken = yyla.type_get ();
1257 yyarg[yycount++] =
yytname_[yytoken];
1264 int yyxbegin = yyn < 0 ? -yyn : 0;
1266 int yychecklim =
yylast_ - yyn + 1;
1268 for (
int yyx = yyxbegin; yyx < yyxend; ++yyx)
1272 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1286 #define YYCASE_(N, S) \ 1291 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1292 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1293 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1294 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1295 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1302 for (
char const* yyp = yyformat; *yyp; ++yyp)
1303 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
1321 -17, 2, 0, -17, 160, -17, -17, -17, -17, -17,
1322 -17, -17, 160, -1, -17, -17, -17, 8, -17, 6,
1323 53, 160, -17, 25, 179, -17, -16, -17, 4, -17,
1324 160, 160, 160, 160, -17, 160, 160, 160, 160, -17,
1325 -17, -17, 198, -13, 101, -14, -17, 26, -17, 160,
1326 131, 131, 155, 131, 198, 80, 107, 155, -17, 14,
1333 10, 0, 3, 7, 0, 1, 10, 4, 10, 6,
1334 5, 2, 0, 39, 32, 31, 33, 37, 10, 11,
1335 12, 0, 9, 8, 28, 39, 0, 38, 0, 13,
1336 0, 0, 0, 0, 27, 0, 0, 0, 0, 29,
1337 30, 26, 25, 24, 23, 0, 34, 40, 36, 0,
1338 16, 18, 20, 17, 15, 19, 22, 21, 35, 0,
1345 -17, -17, -17, 29, -17, -17, -17, -17, -4, -2,
1352 -1, 1, 11, 2, 3, 4, 19, 49, 42, 21,
1359 20, 13, 5, 14, 46, 6, 58, 25, 24, 6,
1360 7, 47, 15, 47, 16, 27, 18, 44, 43, 8,
1361 9, 10, 43, 8, 29, 48, 50, 51, 52, 53,
1362 6, 54, 55, 56, 57, 22, 17, 23, 59, 44,
1363 43, 61, 43, 45, 0, 60, 0, 28, 43, 43,
1364 43, 43, 43, 43, 43, 43, 30, 31, 43, 32,
1365 12, 0, 33, 0, 34, 0, 35, 13, 36, 14,
1366 37, 0, 0, 0, 0, 38, 39, 40, 15, 41,
1367 16, 17, 18, 30, 31, 0, 32, 12, 0, 33,
1368 0, 34, 0, 35, 13, 0, 14, 37, 0, 0,
1369 0, 0, 38, 39, 40, 15, 41, 16, 17, 18,
1370 30, 31, 34, 32, 12, 0, 33, 0, 34, 0,
1371 35, 13, 0, 14, 39, 40, 0, 41, 0, 38,
1372 39, 40, 15, 41, 16, 17, 18, 32, 12, 0,
1373 0, 0, 34, 0, 35, 13, 0, 14, 0, 0,
1374 0, 0, 0, 38, 39, 40, 15, 41, 16, 17,
1375 18, 32, 12, 0, 0, 0, 34, 12, 35, 13,
1376 0, 14, 0, 0, 13, 0, 14, 0, 39, 40,
1377 15, 41, 16, 17, 18, 15, 0, 16, 17, 18,
1378 34, 0, 35, 13, 0, 14, 0, 0, 0, 0,
1379 0, 0, 39, 40, 15, 41, 16, 17, 18, 34,
1380 0, 0, 13, 0, 14, 0, 0, 0, 0, 0,
1381 0, 39, 40, 15, 41, 16, 17, 18
1387 4, 14, 0, 16, 20, 5, 20, 8, 12, 5,
1388 10, 27, 25, 27, 27, 17, 29, 21, 20, 19,
1389 20, 21, 24, 19, 18, 21, 30, 31, 32, 33,
1390 5, 35, 36, 37, 38, 6, 28, 8, 12, 43,
1391 42, 27, 44, 25, -1, 49, -1, 18, 50, 51,
1392 52, 53, 54, 55, 56, 57, 3, 4, 60, 6,
1393 7, -1, 9, -1, 11, -1, 13, 14, 15, 16,
1394 17, -1, -1, -1, -1, 22, 23, 24, 25, 26,
1395 27, 28, 29, 3, 4, -1, 6, 7, -1, 9,
1396 -1, 11, -1, 13, 14, -1, 16, 17, -1, -1,
1397 -1, -1, 22, 23, 24, 25, 26, 27, 28, 29,
1398 3, 4, 11, 6, 7, -1, 9, -1, 11, -1,
1399 13, 14, -1, 16, 23, 24, -1, 26, -1, 22,
1400 23, 24, 25, 26, 27, 28, 29, 6, 7, -1,
1401 -1, -1, 11, -1, 13, 14, -1, 16, -1, -1,
1402 -1, -1, -1, 22, 23, 24, 25, 26, 27, 28,
1403 29, 6, 7, -1, -1, -1, 11, 7, 13, 14,
1404 -1, 16, -1, -1, 14, -1, 16, -1, 23, 24,
1405 25, 26, 27, 28, 29, 25, -1, 27, 28, 29,
1406 11, -1, 13, 14, -1, 16, -1, -1, -1, -1,
1407 -1, -1, 23, 24, 25, 26, 27, 28, 29, 11,
1408 -1, -1, 14, -1, 16, -1, -1, -1, -1, -1,
1409 -1, 23, 24, 25, 26, 27, 28, 29
1415 0, 34, 36, 37, 38, 0, 5, 10, 19, 20,
1416 21, 35, 7, 14, 16, 25, 27, 28, 29, 39,
1417 41, 42, 36, 36, 41, 8, 43, 42, 36, 18,
1418 3, 4, 6, 9, 11, 13, 15, 17, 22, 23,
1419 24, 26, 41, 42, 41, 43, 20, 27, 21, 40,
1420 41, 41, 41, 41, 41, 41, 41, 41, 20, 12,
1427 0, 33, 34, 35, 35, 35, 35, 36, 36, 36,
1428 38, 37, 39, 40, 39, 41, 41, 41, 41, 41,
1429 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
1430 41, 41, 41, 41, 41, 41, 41, 42, 42, 43,
1437 0, 2, 2, 0, 1, 1, 1, 1, 3, 3,
1438 0, 2, 1, 0, 4, 3, 3, 3, 3, 3,
1439 3, 3, 3, 2, 2, 2, 2, 2, 2, 2,
1440 2, 1, 1, 1, 3, 4, 3, 1, 2, 0,
1451 "\"end\"",
"error",
"$undefined",
"\"&\"",
"\"&:\"",
"\"@\"",
1452 "\"{\\\\}\"",
"\"!\"",
"\"^\"",
"\":\"",
"\",\"",
"\"{c}\"",
"\"-\"",
1453 "\".\"",
"\"[\"",
"\"<+\"",
"\"\\\\e\"",
"\"%\"",
"\"|\"",
"\"+\"",
1454 "\"]\"",
"\")\"",
"\"{/}\"",
"\"{T}\"",
"\"{t}\"",
"\"\\\\z\"",
"\"*\"",
1455 "\"letter\"",
"\"weight\"",
"\"(\"",
"CONCAT",
"RWEIGHT",
"LWEIGHT",
1456 "$accept",
"input",
"terminator.opt",
"add",
"tuple",
"$@1",
"tuple.1",
1461 const unsigned short int 1464 0, 207, 207, 224, 225, 226, 227, 231, 232, 233,
1465 239, 239, 256, 260, 260, 268, 269, 270, 271, 272,
1466 273, 274, 275, 277, 278, 279, 291, 295, 296, 297,
1467 298, 299, 300, 301, 302, 303, 304, 314, 315, 319,
1488 unsigned int yylno =
yyrline_[yyrule];
1489 int yynrhs =
yyr2_[yyrule];
1491 *
yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
1492 <<
" (line " << yylno <<
"):" << std::endl;
1494 for (
int yyi = 0; yyi < yynrhs; yyi++)
1501 #line 11 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:1167 1503 #line 1504 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:1167 1504 #line 324 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:1168 S::size_type size() const
void copy(const self_type &other)
Copy the content of other to this.
const_iterator end() const
expression expression_one(const context &c, identities ids)
The expression for \\e.
std::vector< dyn::context > tape_ctx_
The context for each tape. If single-tape, [0] is ctx_.
void move(self_type &other)
Move the content of other to this.
automaton tuple(const automaton &lhs, const automaton &rhs)
Build a two-tape automaton from two automata.
void yy_destroy_(const char *yymsg, basic_symbol< Base > &yysym) const
Reclaim the memory associated to a symbol.
T & as()
Accessor to a built T.
location_type location
The location.
stack_symbol_type & operator=(const stack_symbol_type &that)
Assignment, needed by push_back.
void push(T &t)
Steal the contents of t.
Present a slice of the top of a stack.
static const unsigned char yyr2_[]
dyn::expression exp
The expression parsed so far.
Type access provider for state based symbols.
void pop(unsigned int n=1)
state_type state
The state.
void context(const dyn::context &ctx)
Set the expressionset to use from this context.
void tape_inc(const location &l)
Increment the top most tape.
static parser::symbol_type yylex(driver &d)
Use our local scanner object.
#define YY_REDUCE_PRINT(Rule)
Termination state number.
The abstract, non-parameterized, root for all rational expression node types.
int state_type
State numbers.
void error(const location &l, const std::string &m)
Report an error m at l.
semantic_type value
The semantic value.
dyn::expression result_
The parsed expression.
void tape_pop()
Pop the tape stack.
auto & as()
Extract wrapped typed value.
static const short int yypact_[]
location location_
The inital location.
static const signed char yydefgoto_[]
static const signed char yypgoto_[]
dyn::context ctx_
The context used to read the expression.
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
dyn::weight make_weight(const location &loc, const std::string &s)
From a string, generate a weight.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
T & build()
Instantiate an empty T in here.
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
virtual void yystack_print_()
Print the state stack on the debug stream.
symbol_number_type type_get() const
The (internal) type number (corresponding to state).
void set_debug_level(debug_level_type l)
Set the current debugging level.
Container::value_type back(const Container &container)
The last member of this Container.
#define YY_SYMBOL_PRINT(Title, Symbol)
An expressionset can implement several different sets of identities on expressions.
void yy_print_(std::ostream &yyo, const basic_symbol< Base > &yysym) const
Display a symbol type, value and location.
static const unsigned char yytable_[]
static const unsigned char yyr1_[]
State and public interface for rational expression parsing.
automaton rdivide(const automaton &lhs, const automaton &rhs)
Right-division of two automata (lhs / rhs).
std::ostream & debug_stream() const
The current debugging stream.
virtual std::string yysyntax_error_(state_type yystate, const symbol_type &yyla) const
Generate an error message.
virtual int parse()
Parse.
void yypop_(unsigned int n=1)
Pop n symbols the three stacks.
static const unsigned char yystos_[]
dyn::expression make_atom(const location &loc, const std::string &s)
From a string, generate an expression.
Template-less root for contexts.
expression concatenate(const expression &lhs, const expression &rhs)
Concatenate two expressions.
virtual void yy_reduce_print_(int r)
Report on the debug stream that the rule r is going to be reduced.
void tape_push()
Push a new tape number on the stack.
"Internal" symbol: element of the stack.
static const unsigned char yydefact_[]
void yypush_(const char *m, stack_symbol_type &s)
Push a new state on the stack.
static bool yy_pact_value_is_default_(int yyvalue)
Whether the given yypact_ value indicates a defaulted state.
void set_debug_stream(std::ostream &)
Set the current debugging stream.
void clear()
Record that this symbol is empty.
std::vector< stack_symbol_type > ::const_reverse_iterator const_iterator
static dyn::expression prefer(const dyn::expression &e, const dyn::expression &f)
Generate an expression for "e <+ f = e % f + f".
static bool yy_table_value_is_error_(int yyvalue)
Whether the given yytable_ value indicates a syntax error.
automaton transpose(automaton &aut)
Transpose aut.
static std::string yytnamerr_(const char *n)
Convert the symbol name n to a form suitable for a diagnostic.
state_type yy_lr_goto_state_(state_type yystate, int yysym)
Compute post-reduction state.
context context_of(const automaton &aut)
Bridge.
std::string to_string(identities i)
Wrapper around operator<<.
static const signed char yypact_ninf_
stack_symbol_type()
Construct an empty symbol.
void move(by_state &that)
Steal the symbol type from that.
automaton multiply(const automaton &lhs, const automaton &rhs, const std::string &algo="auto")
Multiply (concatenate) two automata.
by_state()
Default constructor.
static const signed char yycheck_[]
static const char *const yytname_[]
For a symbol, its name in clear.
static dyn::context ctx(const driver &d)
Get the context of the driver.
#define YYLLOC_DEFAULT(Current, Rhs, N)
static int debug_level()
The nesting limit for parser traces, as specified per $YYDEBUG.
static const unsigned short int yyrline_[]
rat::identities identities() const
Get the identities.
std::unique_ptr< yyFlexLexer > scanner_
The scanner.
value_impl< detail::expression_tag > expression
bool lparen
Whether there was a left-paren.
bool rparen
Whether there was a right-paren.
bool empty() const
Whether empty.
const_iterator begin() const
Define the vcsn::rat::parser class.
location(const position &b, const position &e)
Construct a location from b to e.
void clear()
Destroy contents, and record that is empty.
static identities ids(const driver &d)
Get the identities of the driver.
An expression that "remembers" whether it was in parentheses.
int symbol_number_type
Symbol type: an internal symbol number.
std::ostream & print(const automaton &aut, std::ostream &out=std::cout, const std::string &format="default")
Print automaton a on out using format format.
int debug_level_type
Type for debugging levels.
parser(driver &driver__yyarg)
Build a parser object.
rat::identities ids_
The identities to apply.
static const signed char yytable_ninf_
std::enable_if_t< std::is_same< InExpSet, OutExpSet >{}, typename OutExpSet::value_t > copy(const InExpSet &in_rs, const OutExpSet &out_rs, const typename InExpSet::value_t &v)
Copy/convert a rational expression.
Syntax errors thrown from user actions.
debug_level_type debug_level() const
The current debugging level.
stack_type yystack_
The stack.
std::set< std::pair< std::string, std::string > > class_t
A set of label ranges.
expression expression_zero(const context &c, identities ids)
The expression for \\z.
std::tuple< int, int > irange_type
An integer range, for quantifiers/exponents.
dyn::expression make_expression(const location &loc, const class_t &c, bool accept)
From a label class, generate an expression.