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
58 #define TRY(Loc, Stm) \
63 catch (std::exception& e) \
65 error(Loc, e.what()); \
101 #line 102 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:413
105 # if defined YYENABLE_NLS && YYENABLE_NLS
107 # include <libintl.h>
108 # define YY_(msgid) dgettext ("bison-runtime", msgid)
112 # define YY_(msgid) msgid
116 #define YYRHSLOC(Rhs, K) ((Rhs)[K].location)
121 # ifndef YYLLOC_DEFAULT
122 # define YYLLOC_DEFAULT(Current, Rhs, N) \
126 (Current).begin = YYRHSLOC (Rhs, 1).begin; \
127 (Current).end = YYRHSLOC (Rhs, N).end; \
131 (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
138 #define YYUSE(E) ((void) (E))
144 # define YYCDEBUG if (yydebug_) (*yycdebug_)
146 # define YY_SYMBOL_PRINT(Title, Symbol) \
150 *yycdebug_ << Title << ' '; \
151 yy_print_ (*yycdebug_, Symbol); \
152 *yycdebug_ << std::endl; \
156 # define YY_REDUCE_PRINT(Rule) \
159 yy_reduce_print_ (Rule); \
162 # define YY_STACK_PRINT() \
170 # define YYCDEBUG if (false) std::cerr
171 # define YY_SYMBOL_PRINT(Title, Symbol) YYUSE(Symbol)
172 # define YY_REDUCE_PRINT(Rule) static_cast<void>(0)
173 # define YY_STACK_PRINT() static_cast<void>(0)
177 #define yyerrok (yyerrstatus_ = 0)
178 #define yyclearin (yyla.clear ())
180 #define YYACCEPT goto yyacceptlab
181 #define YYABORT goto yyabortlab
182 #define YYERROR goto yyerrorlab
183 #define YYRECOVERING() (!!yyerrstatus_)
185 #line 11 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:479
186 namespace vcsn {
namespace rat {
187 #line 188 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:479
199 std::string yyr =
"";
200 char const *yyp = yystr;
207 goto do_not_strip_quotes;
211 goto do_not_strip_quotes;
220 do_not_strip_quotes: ;
232 yycdebug_ (&
std::cerr),
234 driver_ (driver__yyarg)
250 : state (empty_state)
255 : state (other.state)
282 if (state == empty_state)
297 switch (that.type_get ())
363 value.copy< std::string > (that.
value);
367 value.copy< std::vector<vcsn::dyn::expression> > (that.
value);
379 template <
typename Base>
389 template <
typename Base>
394 std::ostream& yyoutput = yyo;
401 yyo << (yytype <
yyntokens_ ?
"token" :
"nterm")
408 #line 119 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636
409 { yyo <<
'"' << yysym.
value.template as< std::string > () <<
'"'; }
410 #line 411 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636
415 #line 126 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636
416 { yyo <<
'<' << yysym.
value.template as< std::string > () <<
'>'; }
417 #line 418 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636
444 #line 128 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636
447 yyo << (yysym.
value.template as< braced_expression > ().lparen ?
" (lpar, " :
" (no lpar, ");
448 yyo << (yysym.
value.template as< braced_expression > ().rparen ?
"rpar)" :
"no rpar)");
450 #line 451 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636
455 #line 134 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636
457 const char* sep =
"[[";
458 for (
auto e: yysym.
value.template as< std::vector<vcsn::dyn::expression> > ())
465 #line 466 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636
470 #line 128 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636
473 yyo << (yysym.
value.template as< braced_expression > ().lparen ?
" (lpar, " :
" (no lpar, ");
474 yyo << (yysym.
value.template as< braced_expression > ().rparen ?
"rpar)" :
"no rpar)");
476 #line 477 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636
481 #line 144 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636
483 #line 484 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636
488 #line 121 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:636
491 for (
auto c: yysym.
value.template as< class_t > ()) yyo << c.first <<
"-" << c.second;
494 #line 495 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:636
588 int yyerrstatus_ = 0;
603 YYCDEBUG <<
"Starting parse" << std::endl;
607 #line 115 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:741
612 #line 613 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:741
646 yyla.
move (yylookahead);
658 yyn += yyla.type_get ();
677 yypush_ (
"Shifting", yyn, yyla);
727 yylhs.
value.
build< std::vector<vcsn::dyn::expression> > ();
748 #line 199 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
757 #line 758 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
761 #line 210 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
763 #line 764 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
767 #line 211 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
769 #line 770 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
773 #line 212 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
775 #line 776 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
779 #line 216 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
781 #line 782 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
785 #line 217 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
787 #line 788 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
791 #line 223 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
793 #line 794 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
797 #line 224 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
800 if (yystack_[0].value.as< std::vector<vcsn::dyn::expression> > ().size() == 1)
802 else if (yystack_[0].value.as< std::vector<vcsn::dyn::expression> > ().size() ==
driver_.
tape_ctx_.size())
807 #line 808 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
811 #line 237 "/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 240 "/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 241 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
827 yylhs.
value.
as< std::vector<vcsn::dyn::expression> > () = yystack_[3].value.as< std::vector<vcsn::dyn::expression> > ();
830 #line 831 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
834 #line 248 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
836 #line 837 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
840 #line 249 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
842 #line 843 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
846 #line 250 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
848 #line 849 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
852 #line 251 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
854 #line 855 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
858 #line 252 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
860 #line 861 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
864 #line 253 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
866 #line 867 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
870 #line 254 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
872 #line 873 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
876 #line 255 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
879 #line 880 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
883 #line 257 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
885 #line 886 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
889 #line 258 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
891 #line 892 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
895 #line 260 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
907 #line 908 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
911 #line 271 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
915 std::get<0>(yystack_[0].value.as<
irange_type > ()), std::get<1>(yystack_[0].value.as<
irange_type > ()))); }
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
922 #line 923 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
926 #line 276 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
928 #line 929 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
932 #line 277 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
934 #line 935 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
938 #line 278 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
940 #line 941 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
944 #line 279 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
946 #line 947 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
950 #line 280 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
952 #line 953 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
956 #line 281 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
958 #line 959 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
962 #line 282 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
964 #line 965 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
968 #line 286 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
970 #line 971 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
974 #line 287 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
976 #line 977 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
980 #line 291 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
982 #line 983 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
986 #line 292 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
987 { yylhs.
value.
as<
class_t > () = yystack_[1].value.as<
class_t > (); yylhs.
value.
as<
class_t > ().emplace(yystack_[0].value.as< std::string > (), yystack_[0].value.as< std::string > ()); }
988 #line 989 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
992 #line 293 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:859
993 { yylhs.
value.
as<
class_t > () = yystack_[3].value.as<
class_t > (); yylhs.
value.
as<
class_t > ().emplace(yystack_[2].value.as< std::string > (), yystack_[0].value.as< std::string > ()); }
994 #line 995 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
998 #line 999 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:859
1031 if (yyerrstatus_ == 3)
1037 if (yyla.type_get () ==
yyeof_)
1039 else if (!yyla.
empty ())
1076 yyn =
yypact_[yystack_[0].state];
1089 if (yystack_.size () == 1)
1102 error_token.
state = yyn;
1103 yypush_ (
"Shifting", error_token);
1119 yy_destroy_ (
"Cleanup: discarding lookahead", yyla);
1124 while (1 < yystack_.size ())
1134 YYCDEBUG <<
"Exception caught: cleaning lookahead and stack"
1164 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1166 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1195 int yytoken = yyla.type_get ();
1196 yyarg[yycount++] =
yytname_[yytoken];
1203 int yyxbegin = yyn < 0 ? -yyn : 0;
1205 int yychecklim =
yylast_ - yyn + 1;
1207 for (
int yyx = yyxbegin; yyx < yyxend; ++yyx)
1211 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1225 #define YYCASE_(N, S) \
1230 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1231 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1232 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1233 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1234 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1241 for (
char const* yyp = yyformat; *yyp; ++yyp)
1242 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
1260 -17, 11, 2, -17, 145, -17, -17, -17, -17, -17,
1261 22, -17, -17, -17, -17, 0, 23, 55, 145, -17,
1262 -17, -16, -12, -17, -17, 145, 145, 145, 145, -17,
1263 145, 145, 145, 145, -17, -17, -8, 108, 3, -6,
1264 -17, 32, -17, 145, 125, 125, 130, 125, -8, 79,
1265 103, 130, -17, 18, 55, -17
1271 8, 0, 3, 6, 0, 1, 4, 8, 5, 2,
1272 35, 8, 28, 27, 29, 33, 9, 10, 0, 7,
1273 35, 0, 0, 34, 11, 0, 0, 0, 0, 25,
1274 0, 0, 0, 0, 26, 24, 23, 22, 21, 0,
1275 30, 36, 32, 0, 14, 16, 18, 15, 13, 17,
1276 20, 19, 31, 0, 12, 37
1282 -17, -17, -17, 30, -17, -17, -17, -17, 20, -15,
1289 -1, 1, 9, 2, 3, 4, 16, 43, 36, 18,
1296 23, 29, 37, 40, 10, 11, 7, 12, 42, 41,
1297 6, 5, 29, 52, 34, 13, 35, 14, 15, 41,
1298 7, 37, 8, 37, 17, 34, 15, 35, 20, 37,
1299 37, 37, 37, 37, 37, 37, 37, 19, 38, 37,
1300 24, 22, 53, 55, 39, 44, 45, 46, 47, 0,
1301 48, 49, 50, 51, 0, 0, 0, 38, 25, 26,
1302 27, 0, 28, 54, 29, 0, 30, 10, 11, 31,
1303 12, 32, 0, 0, 0, 0, 33, 34, 13, 35,
1304 14, 15, 25, 26, 27, 0, 28, 0, 29, 0,
1305 30, 10, 11, 0, 12, 32, 0, 0, 0, 0,
1306 33, 34, 13, 35, 14, 15, 25, 26, 27, 0,
1307 28, 0, 29, 0, 30, 10, 11, 0, 12, 0,
1308 10, 11, 0, 12, 33, 34, 13, 35, 14, 15,
1309 27, 13, 0, 14, 29, 27, 30, 10, 11, 29,
1310 12, 30, 10, 11, 0, 12, 33, 34, 13, 35,
1311 14, 15, 34, 13, 35, 14, 15, 10, 11, 0,
1312 12, 0, 0, 0, 0, 0, 0, 0, 13, 0,
1319 15, 9, 17, 19, 12, 13, 18, 15, 20, 25,
1320 8, 0, 9, 19, 22, 23, 24, 25, 26, 25,
1321 18, 36, 20, 38, 4, 22, 26, 24, 6, 44,
1322 45, 46, 47, 48, 49, 50, 51, 7, 18, 54,
1323 17, 11, 10, 25, 20, 25, 26, 27, 28, -1,
1324 30, 31, 32, 33, -1, -1, -1, 37, 3, 4,
1325 5, -1, 7, 43, 9, -1, 11, 12, 13, 14,
1326 15, 16, -1, -1, -1, -1, 21, 22, 23, 24,
1327 25, 26, 3, 4, 5, -1, 7, -1, 9, -1,
1328 11, 12, 13, -1, 15, 16, -1, -1, -1, -1,
1329 21, 22, 23, 24, 25, 26, 3, 4, 5, -1,
1330 7, -1, 9, -1, 11, 12, 13, -1, 15, -1,
1331 12, 13, -1, 15, 21, 22, 23, 24, 25, 26,
1332 5, 23, -1, 25, 9, 5, 11, 12, 13, 9,
1333 15, 11, 12, 13, -1, 15, 21, 22, 23, 24,
1334 25, 26, 22, 23, 24, 25, 26, 12, 13, -1,
1335 15, -1, -1, -1, -1, -1, -1, -1, 23, -1,
1342 0, 31, 33, 34, 35, 0, 8, 18, 20, 32,
1343 12, 13, 15, 23, 25, 26, 36, 38, 39, 33,
1344 6, 40, 33, 39, 17, 3, 4, 5, 7, 9,
1345 11, 14, 16, 21, 22, 24, 38, 39, 38, 40,
1346 19, 25, 20, 37, 38, 38, 38, 38, 38, 38,
1347 38, 38, 19, 10, 38, 25
1353 0, 30, 31, 32, 32, 32, 33, 33, 35, 34,
1354 36, 37, 36, 38, 38, 38, 38, 38, 38, 38,
1355 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
1356 38, 38, 38, 39, 39, 40, 40, 40
1362 0, 2, 2, 0, 1, 1, 1, 3, 0, 2,
1363 1, 0, 4, 3, 3, 3, 3, 3, 3, 3,
1364 3, 2, 2, 2, 2, 2, 2, 1, 1, 1,
1365 3, 4, 3, 1, 2, 0, 2, 4
1375 "\"end\"",
"error",
"$undefined",
"\"&\"",
"\"&:\"",
"\"{\\\\}\"",
1376 "\"^\"",
"\":\"",
"\",\"",
"\"{c}\"",
"\"-\"",
"\".\"",
"\"[\"",
"\"(\"",
1377 "\"<+\"",
"\"\\\\e\"",
"\"%\"",
"\"|\"",
"\"+\"",
"\"]\"",
"\")\"",
1378 "\"{/}\"",
"\"{T}\"",
"\"\\\\z\"",
"\"*\"",
"\"letter\"",
"\"weight\"",
1379 "CONCAT",
"RWEIGHT",
"LWEIGHT",
"$accept",
"input",
"terminator.opt",
1380 "sum",
"tuple",
"$@1",
"tuple.1",
"$@2",
"exp",
"weights",
"class",
YY_NULLPTR
1384 const unsigned short int
1387 0, 198, 198, 210, 211, 212, 216, 217, 223, 223,
1388 236, 240, 240, 248, 249, 250, 251, 252, 253, 254,
1389 255, 257, 258, 259, 271, 275, 276, 277, 278, 279,
1390 280, 281, 282, 286, 287, 291, 292, 293
1410 unsigned int yylno =
yyrline_[yyrule];
1411 int yynrhs =
yyr2_[yyrule];
1413 *
yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
1414 <<
" (line " << yylno <<
"):" << std::endl;
1416 for (
int yyi = 0; yyi < yynrhs; yyi++)
1423 #line 11 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:1167
1425 #line 1426 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.cc" // lalr1.cc:1167
1426 #line 296 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // lalr1.cc:1168
1443 driver_.error(l, m);
void set_debug_stream(std::ostream &)
Set the current debugging stream.
static const unsigned char yydefact_[]
expression expression_one(const context &c, rat::identities ids)
The expression for \e.
static const short int yypact_[]
static std::string yytnamerr_(const char *n)
Convert the symbol name n to a form suitable for a diagnostic.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
void clear()
Destroy contents, and record that is empty.
void move(self_type &other)
Move the content of other to this.
An expression that "remembers" whether it was in parentheses.
void tape_push()
Push a new tape number on the stack.
stack_symbol_type()
Construct an empty symbol.
location_type location
The location.
void yy_destroy_(const char *yymsg, basic_symbol< Base > &yysym) const
Reclaim the memory associated to a symbol.
std::shared_ptr< const detail::context_base > context
A dyn::context.
std::vector< dyn::context > tape_ctx_
The context for each tape. If single-tape, [0] is ctx_.
dyn::weight make_weight(const location &loc, const std::string &s)
From a string, generate a weight.
Container::value_type back(const Container &container)
The last member of this Container.
static const unsigned char yytable_[]
static const unsigned char yyr1_[]
virtual int parse()
Parse.
Define the vcsn::rat::parser class.
dyn::expression exp
The expression parsed so far.
int debug_level_type
Type for debugging levels.
bool lparen
Whether there was a left-paren.
virtual void yy_reduce_print_(int r)
Report on the debug stream that the rule r is going to be reduced.
expression expression_zero(const context &c, rat::identities ids)
The expression for \z.
std::ostream & print(const automaton &aut, std::ostream &out, const std::string &format="default")
Print automaton a on o using format format.
void pop(unsigned int n=1)
void clear()
Record that this symbol is empty.
static const unsigned char yystos_[]
static bool yy_pact_value_is_default_(int yyvalue)
Whether the given yypact_ value indicates a defaulted state.
S::size_type size() const
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
std::set< std::pair< std::string, std::string >> class_t
A set of label ranges.
automaton left_mult(const weight &w, const automaton &aut)
The left-multiplication of an automaton with w as weight.
state_type yy_lr_goto_state_(state_type yystate, int yysym)
Compute post-reduction state.
static const char *const yytname_[]
For a symbol, its name in clear.
std::vector< stack_symbol_type >::const_reverse_iterator const_iterator
State and public interface for rational expression parsing.
T & build()
Instantiate an empty T in here.
location location_
The inital location.
void set_debug_level(debug_level_type l)
Set the current debugging level.
virtual void yystack_print_()
Print the state stack on the debug stream.
std::vector< unsigned > tapes_
The stack of tape numbers.
const_iterator begin() const
void context(const dyn::context &ctx)
Set the expressionset to use from this context.
const_iterator end() const
static dyn::context ctx(const driver &d)
Get the context of the driver.
std::ostream & debug_stream() const
The current debugging stream.
std::shared_ptr< const detail::weight_base > weight
The abstract, non-parameterized, root for all rational expression node types.
static const unsigned char yyr2_[]
void move(by_state &that)
Steal the symbol type from that.
Termination state number.
std::tuple< int, int > irange_type
An integer range, for quantifiers/exponents.
Type access provider for state based symbols.
static identities ids(const driver &d)
Get the identities of the driver.
expression rdiv(const expression &lhs, const expression &rhs)
Right-division of two expressions (lhs \ rhs).
symbol_number_type type_get() const
The (internal) type number (corresponding to state).
by_state()
Default constructor.
#define YY_SYMBOL_PRINT(Title, Symbol)
semantic_type value
The semantic value.
location(const position &b, const position &e)
Construct a location from b to e.
stack_symbol_type & operator=(const stack_symbol_type &that)
Assignment, needed by push_back.
dyn::expression make_atom(const location &loc, const std::string &s)
From a string, generate an expression.
virtual std::string yysyntax_error_(state_type yystate, const symbol_type &yyla) const
Generate an error message.
automaton multiply(const automaton &lhs, const automaton &rhs)
Multiply (concatenate) two standard automata.
static const signed char yypgoto_[]
dyn::expression make_expression(const location &loc, const class_t &c, bool accept)
From a label class, generate an expression.
void tape_pop()
Pop the tape stack.
stack_type yystack_
The stack.
An expressionset can implement several different sets of identities on expressions.
std::unique_ptr< yyFlexLexer > scanner_
The scanner.
void yypop_(unsigned int n=1)
Pop n symbols the three stacks.
rat::identities identities() const
Get the identities.
expression concatenate(const expression &lhs, const expression &rhs)
Concatenate two expressions.
static const signed char yytable_ninf_
"Internal" symbol: element of the stack.
state_type state
The state.
bool rparen
Whether there was a right-paren.
bool empty() const
Whether empty.
static const signed char yypact_ninf_
std::shared_ptr< detail::expression_base > expression
static parser::symbol_type yylex(driver &d)
Use our local scanner object.
void push(T &t)
Steal the contents of t.
void tape_inc(const location &l)
Increment the top most tape.
#define YYLLOC_DEFAULT(Current, Rhs, N)
T & as()
Accessor to a built T.
int state_type
State numbers.
void yy_print_(std::ostream &yyo, const basic_symbol< Base > &yysym) const
Display a symbol type, value and location.
Present a slice of the top of a stack.
automaton right_mult(const automaton &aut, const weight &w)
The right-mult automaton with w as weight.
void yypush_(const char *m, stack_symbol_type &s)
Push a new state on the stack.
#define YY_REDUCE_PRINT(Rule)
debug_level_type debug_level() const
The current debugging level.
int symbol_number_type
Symbol type: an internal symbol number.
Syntax errors thrown from user actions.
parser(driver &driver__yyarg)
Build a parser object.
static bool yy_table_value_is_error_(int yyvalue)
Whether the given yytable_ value indicates a syntax error.
dyn::expression result_
The parsed expression.
static dyn::expression prefer(const dyn::expression &e, const dyn::expression &f)
Generate an expression for "e <+ f = e % f + f".
static const unsigned short int yyrline_[]
static const signed char yycheck_[]
expression tuple(const expression &lhs, const expression &rhs)
Build a two-tape expression from two expressions.
static const signed char yydefgoto_[]