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) \ 65 catch (std::exception& e) \ 67 error(Loc, e.what()); \ 103 #line 104 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:413 107 # if defined YYENABLE_NLS && YYENABLE_NLS 109 # include <libintl.h> 110 # define YY_(msgid) dgettext ("bison-runtime", msgid) 114 # define YY_(msgid) msgid 118 #define YYRHSLOC(Rhs, K) ((Rhs)[K].location) 123 # ifndef YYLLOC_DEFAULT 124 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 128 (Current).begin = YYRHSLOC (Rhs, 1).begin; \ 129 (Current).end = YYRHSLOC (Rhs, N).end; \ 133 (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \ 140 #define YYUSE(E) ((void) (E)) 146 # define YYCDEBUG if (yydebug_) (*yycdebug_) 148 # define YY_SYMBOL_PRINT(Title, Symbol) \ 152 *yycdebug_ << Title << ' '; \ 153 yy_print_ (*yycdebug_, Symbol); \ 154 *yycdebug_ << std::endl; \ 158 # define YY_REDUCE_PRINT(Rule) \ 161 yy_reduce_print_ (Rule); \ 164 # define YY_STACK_PRINT() \ 172 # define YYCDEBUG if (false) std::cerr 173 # define YY_SYMBOL_PRINT(Title, Symbol) YYUSE(Symbol) 174 # define YY_REDUCE_PRINT(Rule) static_cast<void>(0) 175 # define YY_STACK_PRINT() static_cast<void>(0) 179 #define yyerrok (yyerrstatus_ = 0) 180 #define yyclearin (yyla.clear ()) 182 #define YYACCEPT goto yyacceptlab 183 #define YYABORT goto yyabortlab 184 #define YYERROR goto yyerrorlab 185 #define YYRECOVERING() (!!yyerrstatus_) 187 #line 11 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:479 188 namespace vcsn {
namespace rat {
189 #line 190 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:479 201 std::string yyr =
"";
202 char const *yyp = yystr;
209 goto do_not_strip_quotes;
213 goto do_not_strip_quotes;
222 do_not_strip_quotes: ;
234 yycdebug_ (&
std::cerr),
236 driver_ (driver__yyarg)
252 : state (empty_state)
299 switch (that.type_get ())
389 template <
typename Base>
399 template <
typename Base>
404 std::ostream& yyoutput = yyo;
411 yyo << (yytype <
yyntokens_ ?
"token" :
"nterm")
418 #line 121 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636 419 { yyo <<
'"' << yysym.
value.template as< std::string > () <<
'"'; }
420 #line 421 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636 425 #line 128 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636 426 { yyo <<
'<' << yysym.
value.template as< std::string > () <<
'>'; }
427 #line 428 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636 432 #line 121 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636 433 { yyo <<
'"' << yysym.
value.template as< symbol > () <<
'"'; }
434 #line 435 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636 461 #line 130 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636 464 yyo << (yysym.
value.template as< braced_expression > ().lparen ?
" (lpar, " :
" (no lpar, ");
465 yyo << (yysym.
value.template as< braced_expression > ().rparen ?
"rpar)" :
"no rpar)");
467 #line 468 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636 472 #line 136 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636 474 const char* sep =
"[[";
475 for (
auto e: yysym.
value.template as< std::vector<vcsn::dyn::expression> > ())
482 #line 483 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636 487 #line 130 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636 490 yyo << (yysym.
value.template as< braced_expression > ().lparen ?
" (lpar, " :
" (no lpar, ");
491 yyo << (yysym.
value.template as< braced_expression > ().rparen ?
"rpar)" :
"no rpar)");
493 #line 494 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636 498 #line 146 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636 500 #line 501 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636 505 #line 123 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636 508 for (
auto c: yysym.
value.template as< class_t > ()) yyo << c.first <<
"-" << c.second;
511 #line 512 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636 605 int yyerrstatus_ = 0;
620 YYCDEBUG <<
"Starting parse" << std::endl;
624 #line 117 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:741 629 #line 630 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:741 663 yyla.
move (yylookahead);
675 yyn += yyla.type_get ();
694 yypush_ (
"Shifting", yyn, yyla);
744 yylhs.
value.
build< std::vector<vcsn::dyn::expression> > ();
769 #line 206 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 773 if (dim_exp == 0 && dim_ctx == 1)
777 else if (dim_exp == dim_ctx)
791 #line 792 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 795 #line 230 "/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 231 "/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 232 "/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 233 "/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 237 "/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 238 "/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 245 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 839 #line 840 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 843 #line 246 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 846 if (yystack_[0].
value.
as< std::vector<vcsn::dyn::expression> > ().size() == 1)
853 +
std::to_string(yystack_[0].value.as< std::vector<vcsn::dyn::expression> > ().size())
857 #line 858 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 861 #line 263 "/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 266 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 871 #line 872 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 875 #line 267 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 877 yylhs.
value.
as< std::vector<vcsn::dyn::expression> > () = yystack_[3].
value.
as< std::vector<vcsn::dyn::expression> > ();
880 #line 881 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 884 #line 274 "/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 275 "/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 276 "/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 277 "/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 278 "/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 279 "/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 280 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 922 #line 923 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 926 #line 281 "/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 283 "/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 284 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 941 #line 942 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 945 #line 286 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 957 #line 958 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 961 #line 297 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 965 std::get<0>(yystack_[0].value.as<
irange_type > ()), std::get<1>(yystack_[0].value.as<
irange_type > ()))); }
966 #line 967 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 970 #line 301 "/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 302 "/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 303 "/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 304 "/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 305 "/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 306 "/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 307 "/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 308 "/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 309 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 1020 #line 1021 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 1024 #line 311 "/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 320 "/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 321 "/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 325 "/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 326 "/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 327 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859 1061 #line 1062 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 1065 #line 1066 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859 1098 if (yyerrstatus_ == 3)
1104 if (yyla.type_get () ==
yyeof_)
1106 else if (!yyla.
empty ())
1143 yyn =
yypact_[yystack_[0].state];
1156 if (yystack_.size () == 1)
1169 error_token.
state = yyn;
1170 yypush_ (
"Shifting", error_token);
1186 yy_destroy_ (
"Cleanup: discarding lookahead", yyla);
1191 while (1 < yystack_.size ())
1201 YYCDEBUG <<
"Exception caught: cleaning lookahead and stack" 1231 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1233 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1262 int yytoken = yyla.type_get ();
1263 yyarg[yycount++] =
yytname_[yytoken];
1270 int yyxbegin = yyn < 0 ? -yyn : 0;
1272 int yychecklim =
yylast_ - yyn + 1;
1274 for (
int yyx = yyxbegin; yyx < yyxend; ++yyx)
1278 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1292 #define YYCASE_(N, S) \ 1297 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1298 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1299 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1300 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1301 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1308 for (
char const* yyp = yyformat; *yyp; ++yyp)
1309 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
1327 -17, 2, 0, -17, 160, -17, -17, -17, -17, -17,
1328 -17, -17, 160, -1, -17, -17, -17, 8, -17, 6,
1329 53, 160, -17, 25, 179, -17, -16, -17, 4, -17,
1330 160, 160, 160, 160, -17, 160, 160, 160, 160, -17,
1331 -17, -17, 198, -13, 101, -14, -17, 26, -17, 160,
1332 131, 131, 155, 131, 198, 80, 107, 155, -17, 14,
1339 10, 0, 3, 7, 0, 1, 10, 4, 10, 6,
1340 5, 2, 0, 39, 32, 31, 33, 37, 10, 11,
1341 12, 0, 9, 8, 28, 39, 0, 38, 0, 13,
1342 0, 0, 0, 0, 27, 0, 0, 0, 0, 29,
1343 30, 26, 25, 24, 23, 0, 34, 40, 36, 0,
1344 16, 18, 20, 17, 15, 19, 22, 21, 35, 0,
1351 -17, -17, -17, 29, -17, -17, -17, -17, -4, -2,
1358 -1, 1, 11, 2, 3, 4, 19, 49, 42, 21,
1365 20, 13, 5, 14, 46, 6, 58, 25, 24, 6,
1366 7, 47, 15, 47, 16, 27, 18, 44, 43, 8,
1367 9, 10, 43, 8, 29, 48, 50, 51, 52, 53,
1368 6, 54, 55, 56, 57, 22, 17, 23, 59, 44,
1369 43, 61, 43, 45, 0, 60, 0, 28, 43, 43,
1370 43, 43, 43, 43, 43, 43, 30, 31, 43, 32,
1371 12, 0, 33, 0, 34, 0, 35, 13, 36, 14,
1372 37, 0, 0, 0, 0, 38, 39, 40, 15, 41,
1373 16, 17, 18, 30, 31, 0, 32, 12, 0, 33,
1374 0, 34, 0, 35, 13, 0, 14, 37, 0, 0,
1375 0, 0, 38, 39, 40, 15, 41, 16, 17, 18,
1376 30, 31, 34, 32, 12, 0, 33, 0, 34, 0,
1377 35, 13, 0, 14, 39, 40, 0, 41, 0, 38,
1378 39, 40, 15, 41, 16, 17, 18, 32, 12, 0,
1379 0, 0, 34, 0, 35, 13, 0, 14, 0, 0,
1380 0, 0, 0, 38, 39, 40, 15, 41, 16, 17,
1381 18, 32, 12, 0, 0, 0, 34, 12, 35, 13,
1382 0, 14, 0, 0, 13, 0, 14, 0, 39, 40,
1383 15, 41, 16, 17, 18, 15, 0, 16, 17, 18,
1384 34, 0, 35, 13, 0, 14, 0, 0, 0, 0,
1385 0, 0, 39, 40, 15, 41, 16, 17, 18, 34,
1386 0, 0, 13, 0, 14, 0, 0, 0, 0, 0,
1387 0, 39, 40, 15, 41, 16, 17, 18
1393 4, 14, 0, 16, 20, 5, 20, 8, 12, 5,
1394 10, 27, 25, 27, 27, 17, 29, 21, 20, 19,
1395 20, 21, 24, 19, 18, 21, 30, 31, 32, 33,
1396 5, 35, 36, 37, 38, 6, 28, 8, 12, 43,
1397 42, 27, 44, 25, -1, 49, -1, 18, 50, 51,
1398 52, 53, 54, 55, 56, 57, 3, 4, 60, 6,
1399 7, -1, 9, -1, 11, -1, 13, 14, 15, 16,
1400 17, -1, -1, -1, -1, 22, 23, 24, 25, 26,
1401 27, 28, 29, 3, 4, -1, 6, 7, -1, 9,
1402 -1, 11, -1, 13, 14, -1, 16, 17, -1, -1,
1403 -1, -1, 22, 23, 24, 25, 26, 27, 28, 29,
1404 3, 4, 11, 6, 7, -1, 9, -1, 11, -1,
1405 13, 14, -1, 16, 23, 24, -1, 26, -1, 22,
1406 23, 24, 25, 26, 27, 28, 29, 6, 7, -1,
1407 -1, -1, 11, -1, 13, 14, -1, 16, -1, -1,
1408 -1, -1, -1, 22, 23, 24, 25, 26, 27, 28,
1409 29, 6, 7, -1, -1, -1, 11, 7, 13, 14,
1410 -1, 16, -1, -1, 14, -1, 16, -1, 23, 24,
1411 25, 26, 27, 28, 29, 25, -1, 27, 28, 29,
1412 11, -1, 13, 14, -1, 16, -1, -1, -1, -1,
1413 -1, -1, 23, 24, 25, 26, 27, 28, 29, 11,
1414 -1, -1, 14, -1, 16, -1, -1, -1, -1, -1,
1415 -1, 23, 24, 25, 26, 27, 28, 29
1421 0, 34, 36, 37, 38, 0, 5, 10, 19, 20,
1422 21, 35, 7, 14, 16, 25, 27, 28, 29, 39,
1423 41, 42, 36, 36, 41, 8, 43, 42, 36, 18,
1424 3, 4, 6, 9, 11, 13, 15, 17, 22, 23,
1425 24, 26, 41, 42, 41, 43, 20, 27, 21, 40,
1426 41, 41, 41, 41, 41, 41, 41, 41, 20, 12,
1433 0, 33, 34, 35, 35, 35, 35, 36, 36, 36,
1434 38, 37, 39, 40, 39, 41, 41, 41, 41, 41,
1435 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
1436 41, 41, 41, 41, 41, 41, 41, 42, 42, 43,
1443 0, 2, 2, 0, 1, 1, 1, 1, 3, 3,
1444 0, 2, 1, 0, 4, 3, 3, 3, 3, 3,
1445 3, 3, 3, 2, 2, 2, 2, 2, 2, 2,
1446 2, 1, 1, 1, 3, 4, 3, 1, 2, 0,
1457 "\"end\"",
"error",
"$undefined",
"\"&\"",
"\"&:\"",
"\"@\"",
1458 "\"{\\\\}\"",
"\"!\"",
"\"^\"",
"\":\"",
"\",\"",
"\"{c}\"",
"\"-\"",
1459 "\".\"",
"\"[\"",
"\"<+\"",
"\"\\\\e\"",
"\"%\"",
"\"|\"",
"\"+\"",
1460 "\"]\"",
"\")\"",
"\"{/}\"",
"\"{T}\"",
"\"{t}\"",
"\"\\\\z\"",
"\"*\"",
1461 "\"letter\"",
"\"weight\"",
"\"(\"",
"CONCAT",
"RWEIGHT",
"LWEIGHT",
1462 "$accept",
"input",
"terminator.opt",
"add",
"tuple",
"$@1",
"tuple.1",
1467 const unsigned short int 1470 0, 205, 205, 230, 231, 232, 233, 237, 238, 239,
1471 245, 245, 262, 266, 266, 274, 275, 276, 277, 278,
1472 279, 280, 281, 283, 284, 285, 297, 301, 302, 303,
1473 304, 305, 306, 307, 308, 309, 310, 320, 321, 325,
1494 unsigned int yylno =
yyrline_[yyrule];
1495 int yynrhs =
yyr2_[yyrule];
1497 *
yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
1498 <<
" (line " << yylno <<
"):" << std::endl;
1500 for (
int yyi = 0; yyi < yynrhs; yyi++)
1507 #line 11 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:1167 1509 #line 1510 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:1167 1510 #line 330 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:1168 The abstract, non-parameterized, root for all rational expression node types.
dyn::weight make_weight(const location &loc, const std::string &s)
From a string, generate a weight.
void clear()
Destroy contents, and record that is empty.
location_type location
The location.
void move(self_type &other)
Move the content of other to this.
auto & as()
Extract wrapped typed value.
std::size_t num_tapes(const context &ctx)
The number of input tapes.
dyn::expression exp
The expression parsed so far.
T & build()
Instantiate an empty T in here.
static const unsigned char yytable_[]
void tape_inc(const location &l)
Increment the top most tape.
rat::identities identities() const
Get the identities.
dyn::expression make_expression(const location &loc, const class_t &c, bool accept)
From a label class, generate an expression.
expression expression_zero(const context &c, identities ids)
The expression for \\z.
S::size_type size() const
value_impl< detail::expression_tag > expression
bool empty() const
Whether empty.
int debug_level_type
Type for debugging levels.
expression expression_one(const context &c, identities ids)
The expression for \\e.
std::ostream & print(const automaton &aut, std::ostream &out=std::cout, const std::string &format="default")
Print automaton a on out using format format.
std::unique_ptr< yyFlexLexer > scanner_
The scanner.
void push(T &t)
Steal the contents of t.
void set_debug_level(debug_level_type l)
Set the current debugging level.
void yypop_(unsigned int n=1)
Pop n symbols the three stacks.
dyn::context ctx_
The context used to read the expression.
virtual int parse()
Parse.
void error(const location &l, const std::string &m)
Report an error m at l.
symbol_number_type type_get() const
The (internal) type number (corresponding to state).
automaton multiply(const automaton &lhs, const automaton &rhs, const std::string &algo="auto")
Multiply (concatenate) two automata.
static const unsigned char yyr1_[]
void tape_pop()
Pop the tape stack.
std::vector< stack_symbol_type > ::const_reverse_iterator const_iterator
context context_of(const automaton &a)
The context of this automaton.
stack_symbol_type & operator=(const stack_symbol_type &that)
Assignment, needed by push_back.
Define the vcsn::rat::parser class.
bool lparen
Whether there was a left-paren.
parser(driver &driver__yyarg)
Build a parser object.
state_type yy_lr_goto_state_(state_type yystate, int yysym)
Compute post-reduction state.
int state_type
State numbers.
stack_symbol_type()
Construct an empty symbol.
const_iterator begin() const
automaton tuple(const automaton &lhs, const automaton &rhs)
Build a two-tape automaton from two automata.
static const signed char yypgoto_[]
#define YY_SYMBOL_PRINT(Title, Symbol)
std::ostream & debug_stream() const
The current debugging stream.
static const signed char yytable_ninf_
void set_debug_stream(std::ostream &)
Set the current debugging stream.
location(const position &b, const position &e)
Construct a location from b to e.
expression concatenate(const expression &lhs, const expression &rhs)
Concatenate two expressions.
std::vector< dyn::context > tape_ctx_
The context for each tape. If single-tape, [0] is ctx_.
#define YYLLOC_DEFAULT(Current, Rhs, N)
Present a slice of the top of a stack.
static const char *const yytname_[]
For a symbol, its name in clear.
static const signed char yycheck_[]
std::set< std::pair< std::string, std::string > > class_t
A set of label ranges.
void yy_destroy_(const char *yymsg, basic_symbol< Base > &yysym) const
Reclaim the memory associated to a symbol.
stack_type yystack_
The stack.
T & as()
Accessor to a built T.
int symbol_number_type
Symbol type: an internal symbol number.
static dyn::expression prefer(const dyn::expression &e, const dyn::expression &f)
Generate an expression for "e <+ f = e % f + f".
static std::string yytnamerr_(const char *n)
Convert the symbol name n to a form suitable for a diagnostic.
static bool yy_table_value_is_error_(int yyvalue)
Whether the given yytable_ value indicates a syntax error.
debug_level_type debug_level() const
The current debugging level.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
static const unsigned char yyr2_[]
Template-less root for contexts.
An expression that "remembers" whether it was in parentheses.
void yypush_(const char *m, stack_symbol_type &s)
Push a new state on the stack.
location location_
The inital location.
virtual void yy_reduce_print_(int r)
Report on the debug stream that the rule r is going to be reduced.
std::tuple< int, int > irange_type
An integer range, for quantifiers/exponents.
void tape_push()
Push a new tape number on the stack.
static identities ids(const driver &d)
Get the identities of the driver.
state_type state
The state.
virtual void yystack_print_()
Print the state stack on the debug stream.
virtual std::string yysyntax_error_(state_type yystate, const symbol_type &yyla) const
Generate an error message.
Syntax errors thrown from user actions.
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
An expressionset can implement several different sets of identities on expressions.
void copy(const self_type &other)
Copy the content of other to this.
static const unsigned char yystos_[]
semantic_type value
The semantic value.
State and public interface for rational expression parsing.
const_iterator end() const
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
static dyn::context ctx(const driver &d)
Get the context of the driver.
"Internal" symbol: element of the stack.
void pop(unsigned int n=1)
Container::value_type back(const Container &container)
The last member of this Container.
void move(by_state &that)
Steal the symbol type from that.
static bool yy_pact_value_is_default_(int yyvalue)
Whether the given yypact_ value indicates a defaulted state.
dyn::expression result_
The parsed expression.
static const unsigned char yydefact_[]
static const short int yypact_[]
void yy_print_(std::ostream &yyo, const basic_symbol< Base > &yysym) const
Display a symbol type, value and location.
dyn::expression make_atom(const location &loc, const std::string &s)
From a string, generate an expression.
static const unsigned short int yyrline_[]
void context(const dyn::context &ctx)
Set the expressionset to use from this context.
by_state()
Default constructor.
static const signed char yypact_ninf_
Termination state number.
std::string to_string(identities i)
Wrapper around operator<<.
static const signed char yydefgoto_[]
automaton rdivide(const automaton &lhs, const automaton &rhs)
Right-division of two automata (lhs / rhs).
Type access provider for state based symbols.
automaton transpose(automaton &aut)
Transpose aut.
static parser::symbol_type yylex(driver &d)
Use our local scanner object.
void clear()
Record that this symbol is empty.
#define YY_REDUCE_PRINT(Rule)
bool rparen
Whether there was a right-paren.