36 #line 37 "./lib/vcsn/rat/parse.cc" // lalr1.cc:399
39 # if defined __cplusplus && 201103L <= __cplusplus
40 # define YY_NULLPTR nullptr
50 #line 51 "./lib/vcsn/rat/parse.cc" // lalr1.cc:407
52 #line 63 "lib/vcsn/rat/parse.yy" // lalr1.cc:408
60 #define TRY(Loc, Stm) \
65 catch (std::exception& e) \
67 error(Loc, e.what()); \
103 #line 104 "./lib/vcsn/rat/parse.cc" // lalr1.cc:408
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 (yyempty = true)
182 #define YYACCEPT goto yyacceptlab
183 #define YYABORT goto yyabortlab
184 #define YYERROR goto yyerrorlab
185 #define YYRECOVERING() (!!yyerrstatus_)
187 #line 11 "lib/vcsn/rat/parse.yy" // lalr1.cc:474
188 namespace vcsn {
namespace rat {
189 #line 190 "./lib/vcsn/rat/parse.cc" // lalr1.cc:474
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)
257 : state (other.state)
277 return state == empty ? 0 :
yystos_[state];
289 switch (that.type_get ())
355 value.copy< std::string > (that.
value);
359 value.copy< std::vector<vcsn::dyn::expression> > (that.
value);
371 template <
typename Base>
381 template <
typename Base>
384 const basic_symbol<Base>& yysym)
const
386 std::ostream& yyoutput = yyo;
389 yyo << (yytype <
yyntokens_ ?
"token" :
"nterm")
391 << yysym.location <<
": ";
396 #line 121 "lib/vcsn/rat/parse.yy" // lalr1.cc:617
397 { yyo <<
'"' << yysym.value.template as< std::string > () <<
'"'; }
398 #line 399 "./lib/vcsn/rat/parse.cc" // lalr1.cc:617
403 #line 128 "lib/vcsn/rat/parse.yy" // lalr1.cc:617
404 { yyo <<
'<' << yysym.value.template as< std::string > () <<
'>'; }
405 #line 406 "./lib/vcsn/rat/parse.cc" // lalr1.cc:617
432 #line 130 "lib/vcsn/rat/parse.yy" // lalr1.cc:617
434 dyn::print(yysym.value.template as< braced_expression > ().exp, yyo);
435 yyo << (yysym.value.template as< braced_expression > ().lparen ?
" (lpar, " :
" (no lpar, ");
436 yyo << (yysym.value.template as< braced_expression > ().rparen ?
"rpar)" :
"no rpar)");
438 #line 439 "./lib/vcsn/rat/parse.cc" // lalr1.cc:617
443 #line 136 "lib/vcsn/rat/parse.yy" // lalr1.cc:617
445 const char* sep =
"[[";
446 for (
auto e: yysym.value.template as< std::vector<vcsn::dyn::expression> > ())
453 #line 454 "./lib/vcsn/rat/parse.cc" // lalr1.cc:617
458 #line 130 "lib/vcsn/rat/parse.yy" // lalr1.cc:617
460 dyn::print(yysym.value.template as< braced_expression > ().exp, yyo);
461 yyo << (yysym.value.template as< braced_expression > ().lparen ?
" (lpar, " :
" (no lpar, ");
462 yyo << (yysym.value.template as< braced_expression > ().rparen ?
"rpar)" :
"no rpar)");
464 #line 465 "./lib/vcsn/rat/parse.cc" // lalr1.cc:617
469 #line 146 "lib/vcsn/rat/parse.yy" // lalr1.cc:617
470 {
dyn::print(yysym.value.template as< dyn::weight > (), yyo); }
471 #line 472 "./lib/vcsn/rat/parse.cc" // lalr1.cc:617
476 #line 123 "lib/vcsn/rat/parse.yy" // lalr1.cc:617
479 for (
auto c: yysym.value.template as< class_t > ()) yyo << c.first <<
"-" << c.second;
482 #line 483 "./lib/vcsn/rat/parse.cc" // lalr1.cc:617
579 int yyerrstatus_ = 0;
594 YYCDEBUG <<
"Starting parse" << std::endl;
598 #line 117 "lib/vcsn/rat/parse.yy" // lalr1.cc:725
603 #line 604 "./lib/vcsn/rat/parse.cc" // lalr1.cc:725
637 yyla.
move (yylookahead);
650 yyn += yyla.type_get ();
672 yypush_ (
"Shifting", yyn, yyla);
722 yylhs.
value.
build< std::vector<vcsn::dyn::expression> > ();
743 #line 206 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
747 if (dim_exp != dim_ctx)
759 #line 760 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
763 #line 224 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
765 #line 766 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
769 #line 225 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
771 #line 772 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
775 #line 226 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
777 #line 778 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
781 #line 230 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
783 #line 784 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
787 #line 231 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
789 #line 790 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
793 #line 232 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
795 #line 796 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
799 #line 238 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
801 #line 802 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
805 #line 239 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
808 if (yystack_[0].value.as< std::vector<vcsn::dyn::expression> > ().size() == 1)
810 else if (yystack_[0].value.as< std::vector<vcsn::dyn::expression> > ().size() ==
driver_.
tape_ctx_.size())
815 +
std::to_string(yystack_[0].value.as< std::vector<vcsn::dyn::expression> > ().size())
819 #line 820 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
823 #line 256 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
827 #line 828 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
831 #line 259 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
833 #line 834 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
837 #line 260 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
839 yylhs.
value.
as< std::vector<vcsn::dyn::expression> > () = yystack_[3].value.as< std::vector<vcsn::dyn::expression> > ();
842 #line 843 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
846 #line 267 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
848 #line 849 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
852 #line 268 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
854 #line 855 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
858 #line 269 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
860 #line 861 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
864 #line 270 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
866 #line 867 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
870 #line 271 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
872 #line 873 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
876 #line 272 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
878 #line 879 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
882 #line 273 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
884 #line 885 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
888 #line 274 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
891 #line 892 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
895 #line 276 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
897 #line 898 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
901 #line 277 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
903 #line 904 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
907 #line 279 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
919 #line 920 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
923 #line 290 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
927 std::get<0>(yystack_[0].value.as<
irange_type > ()), std::get<1>(yystack_[0].value.as<
irange_type > ()))); }
928 #line 929 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
932 #line 294 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
934 #line 935 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
938 #line 295 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
940 #line 941 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
944 #line 296 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
946 #line 947 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
950 #line 297 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
952 #line 953 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
956 #line 298 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
958 #line 959 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
962 #line 299 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
964 #line 965 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
968 #line 300 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
970 #line 971 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
974 #line 301 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
976 #line 977 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
980 #line 302 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
982 #line 983 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
986 #line 303 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
988 #line 989 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
992 #line 307 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
994 #line 995 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
998 #line 308 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
1000 #line 1001 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
1004 #line 312 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
1006 #line 1007 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
1010 #line 313 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
1011 { 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 > ()); }
1012 #line 1013 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
1016 #line 314 "lib/vcsn/rat/parse.yy" // lalr1.cc:847
1017 { 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 > ()); }
1018 #line 1019 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
1022 #line 1023 "./lib/vcsn/rat/parse.cc" // lalr1.cc:847
1051 yyempty ?
yyempty_ : yyla.type_get ()));
1056 if (yyerrstatus_ == 3)
1062 if (yyla.type_get () ==
yyeof_)
1101 yyn =
yypact_[yystack_[0].state];
1114 if (yystack_.size () == 1)
1127 error_token.
state = yyn;
1128 yypush_ (
"Shifting", error_token);
1144 yy_destroy_ (
"Cleanup: discarding lookahead", yyla);
1149 while (1 < yystack_.size ())
1159 YYCDEBUG <<
"Exception caught: cleaning lookahead and stack"
1190 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1192 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1221 yyarg[yycount++] =
yytname_[yytoken];
1228 int yyxbegin = yyn < 0 ? -yyn : 0;
1230 int yychecklim =
yylast_ - yyn + 1;
1232 for (
int yyx = yyxbegin; yyx < yyxend; ++yyx)
1236 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1250 #define YYCASE_(N, S) \
1255 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1256 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1257 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1258 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1259 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1265 for (
char const* yyp = yyformat; *yyp; ++yyp)
1266 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
1284 -26, 2, 14, -26, -6, -26, -26, -26, -26, -26,
1285 -26, -6, 4, -26, -26, -26, -26, -25, -5, 52,
1286 -6, -26, 13, 173, -26, -15, 40, -26, -26, -6,
1287 -6, -6, -6, -26, -6, -6, -6, -6, -26, -26,
1288 -26, 192, 149, 100, 43, -26, 17, -26, -6, 130,
1289 130, 154, 130, 192, 79, 106, 154, -26, 7, 52,
1296 9, 0, 3, 6, 0, 1, 9, 4, 9, 5,
1297 2, 0, 38, 9, 31, 30, 32, 36, 10, 11,
1298 0, 8, 7, 27, 38, 0, 0, 37, 12, 0,
1299 0, 0, 0, 26, 0, 0, 0, 0, 28, 29,
1300 25, 24, 23, 22, 0, 33, 39, 35, 0, 15,
1301 17, 19, 16, 14, 18, 21, 20, 34, 0, 13,
1308 -26, -26, -26, -3, -26, -26, -26, -26, -4, -2,
1315 -1, 1, 10, 2, 3, 4, 18, 48, 41, 20,
1322 19, 11, 5, 21, 17, 22, 45, 23, 12, 13,
1323 26, 14, 24, 46, 28, 27, 43, 42, 6, 6,
1324 15, 42, 16, 17, 7, 49, 50, 51, 52, 58,
1325 53, 54, 55, 56, 8, 60, 9, 0, 43, 42,
1326 44, 42, 0, 0, 59, 6, 0, 42, 42, 42,
1327 42, 42, 42, 42, 42, 29, 30, 42, 31, 11,
1328 8, 32, 47, 33, 57, 34, 12, 13, 35, 14,
1329 36, 46, 0, 0, 0, 37, 38, 39, 15, 40,
1330 16, 17, 29, 30, 0, 31, 11, 0, 32, 0,
1331 33, 0, 34, 12, 13, 0, 14, 36, 0, 0,
1332 0, 0, 37, 38, 39, 15, 40, 16, 17, 29,
1333 30, 33, 31, 11, 0, 32, 0, 33, 0, 34,
1334 12, 13, 0, 14, 38, 39, 0, 40, 0, 37,
1335 38, 39, 15, 40, 16, 17, 31, 11, 0, 0,
1336 0, 33, 0, 34, 12, 13, 0, 14, 0, 0,
1337 0, 0, 0, 37, 38, 39, 15, 40, 16, 17,
1338 31, 11, 0, 12, 13, 33, 14, 34, 12, 13,
1339 0, 14, 0, 0, 0, 15, 0, 16, 38, 39,
1340 15, 40, 16, 17, 33, 0, 34, 12, 13, 0,
1341 14, 0, 0, 0, 0, 0, 0, 38, 39, 15,
1342 40, 16, 17, 33, 0, 0, 12, 13, 0, 14,
1343 0, 0, 0, 0, 0, 0, 38, 39, 15, 40,
1350 4, 7, 0, 6, 29, 8, 21, 11, 14, 15,
1351 13, 17, 8, 28, 19, 17, 20, 19, 5, 5,
1352 26, 23, 28, 29, 10, 29, 30, 31, 32, 12,
1353 34, 35, 36, 37, 20, 28, 22, -1, 42, 41,
1354 24, 43, -1, -1, 48, 5, -1, 49, 50, 51,
1355 52, 53, 54, 55, 56, 3, 4, 59, 6, 7,
1356 20, 9, 22, 11, 21, 13, 14, 15, 16, 17,
1357 18, 28, -1, -1, -1, 23, 24, 25, 26, 27,
1358 28, 29, 3, 4, -1, 6, 7, -1, 9, -1,
1359 11, -1, 13, 14, 15, -1, 17, 18, -1, -1,
1360 -1, -1, 23, 24, 25, 26, 27, 28, 29, 3,
1361 4, 11, 6, 7, -1, 9, -1, 11, -1, 13,
1362 14, 15, -1, 17, 24, 25, -1, 27, -1, 23,
1363 24, 25, 26, 27, 28, 29, 6, 7, -1, -1,
1364 -1, 11, -1, 13, 14, 15, -1, 17, -1, -1,
1365 -1, -1, -1, 23, 24, 25, 26, 27, 28, 29,
1366 6, 7, -1, 14, 15, 11, 17, 13, 14, 15,
1367 -1, 17, -1, -1, -1, 26, -1, 28, 24, 25,
1368 26, 27, 28, 29, 11, -1, 13, 14, 15, -1,
1369 17, -1, -1, -1, -1, -1, -1, 24, 25, 26,
1370 27, 28, 29, 11, -1, -1, 14, 15, -1, 17,
1371 -1, -1, -1, -1, -1, -1, 24, 25, 26, 27,
1378 0, 34, 36, 37, 38, 0, 5, 10, 20, 22,
1379 35, 7, 14, 15, 17, 26, 28, 29, 39, 41,
1380 42, 36, 36, 41, 8, 43, 36, 42, 19, 3,
1381 4, 6, 9, 11, 13, 16, 18, 23, 24, 25,
1382 27, 41, 42, 41, 43, 21, 28, 22, 40, 41,
1383 41, 41, 41, 41, 41, 41, 41, 21, 12, 41,
1390 0, 33, 34, 35, 35, 35, 36, 36, 36, 38,
1391 37, 39, 40, 39, 41, 41, 41, 41, 41, 41,
1392 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
1393 41, 41, 41, 41, 41, 41, 42, 42, 43, 43,
1400 0, 2, 2, 0, 1, 1, 1, 3, 3, 0,
1401 2, 1, 0, 4, 3, 3, 3, 3, 3, 3,
1402 3, 3, 2, 2, 2, 2, 2, 2, 2, 2,
1403 1, 1, 1, 3, 4, 3, 1, 2, 0, 2,
1414 "\"end\"",
"error",
"$undefined",
"\"&\"",
"\"&:\"",
"\"@\"",
1415 "\"{\\\\}\"",
"\"!\"",
"\"^\"",
"\":\"",
"\",\"",
"\"{c}\"",
"\"-\"",
1416 "\".\"",
"\"[\"",
"\"(\"",
"\"<+\"",
"\"\\\\e\"",
"\"%\"",
"\"|\"",
1417 "\"+\"",
"\"]\"",
"\")\"",
"\"{/}\"",
"\"{T}\"",
"\"{t}\"",
"\"\\\\z\"",
1418 "\"*\"",
"\"letter\"",
"\"weight\"",
"CONCAT",
"RWEIGHT",
"LWEIGHT",
1419 "$accept",
"input",
"terminator.opt",
"add",
"tuple",
"$@1",
"tuple.1",
1424 const unsigned short int
1427 0, 205, 205, 224, 225, 226, 230, 231, 232, 238,
1428 238, 255, 259, 259, 267, 268, 269, 270, 271, 272,
1429 273, 274, 276, 277, 278, 290, 294, 295, 296, 297,
1430 298, 299, 300, 301, 302, 303, 307, 308, 312, 313,
1451 unsigned int yylno =
yyrline_[yyrule];
1452 int yynrhs =
yyr2_[yyrule];
1454 *
yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
1455 <<
" (line " << yylno <<
"):" << std::endl;
1457 for (
int yyi = 0; yyi < yynrhs; yyi++)
1464 #line 11 "lib/vcsn/rat/parse.yy" // lalr1.cc:1155
1466 #line 1467 "./lib/vcsn/rat/parse.cc" // lalr1.cc:1155
1467 #line 317 "lib/vcsn/rat/parse.yy" // lalr1.cc:1156
1484 driver_.error(l, m);
auto & as()
Extract wrapped typed value.
bool lparen
Whether there was a left-paren.
static const unsigned char yydefact_[]
automaton transpose(automaton &aut)
Transpose aut.
void tape_push()
Push a new tape number on the stack.
expression expression_one(const context &c, identities ids)
The expression for \\e.
std::size_t num_tapes(const context &ctx)
The number of input tapes.
context context_of(const automaton &a)
The context of this automaton.
int debug_level_type
Type for debugging levels.
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
S::size_type size() const
void yypop_(unsigned int n=1)
Pop n symbols the three stacks.
Container::value_type back(const Container &container)
The last member of this Container.
static const short int yypact_[]
automaton tuple(const automaton &lhs, const automaton &rhs)
Build a two-tape automaton from two automata.
static parser::symbol_type yylex(driver &d)
Use our local scanner object.
std::ostream & print(const automaton &aut, std::ostream &out=std::cout, const std::string &format="default")
Print automaton a on out using format format.
void yy_print_(std::ostream &yyo, const basic_symbol< Base > &yysym) const
Display a symbol type, value and location.
stack_symbol_type()
Construct an empty symbol.
Termination state number.
Syntax errors thrown from user actions.
std::tuple< int, int > irange_type
An integer range, for quantifiers/exponents.
symbol_number_type type_get() const
The (internal) type number (corresponding to state).
virtual void yy_reduce_print_(int r)
Report on the debug stream that the rule r is going to be reduced.
static const signed char yypact_ninf_
void tape_inc(const location &l)
Increment the top most tape.
virtual std::string yysyntax_error_(state_type yystate, symbol_number_type yytoken) const
Generate an error message.
#define YY_REDUCE_PRINT(Rule)
int state_type
State numbers.
int symbol_number_type
Internal symbol number.
stack_symbol_type & operator=(const stack_symbol_type &that)
Assignment, needed by push_back.
void yypush_(const char *m, stack_symbol_type &s)
Push a new state on the stack.
dyn::expression result_
The parsed expression.
location(const position &b, const position &e)
Construct a location from b to e.
location location_
The inital location.
void pop(unsigned int n=1)
dyn::weight make_weight(const location &loc, const std::string &s)
From a string, generate a weight.
static dyn::context ctx(const driver &d)
Get the context of the driver.
static const signed char yypgoto_[]
dyn::expression make_atom(const location &loc, const std::string &s)
From a string, generate an expression.
State and public interface for rational expression parsing.
static const unsigned char yystos_[]
#define YY_SYMBOL_PRINT(Title, Symbol)
expression expression_zero(const context &c, identities ids)
The expression for \\z.
expression concatenate(const expression &lhs, const expression &rhs)
Concatenate two expressions.
parser(driver &driver__yyarg)
Build a parser object.
std::unique_ptr< yyFlexLexer > scanner_
The scanner.
automaton multiply(const automaton &lhs, const automaton &rhs, const std::string &algo="auto")
Multiply (concatenate) two automata.
virtual int parse()
Parse.
static const char *const yytname_[]
For a symbol, its name in clear.
Template-less root for contexts.
void set_debug_stream(std::ostream &)
Set the current debugging stream.
rat::identities identities() const
Get the identities.
location_type location
The location.
Define the vcsn::rat::parser class.
An expression that "remembers" whether it was in parentheses.
void move(by_state &that)
Steal the symbol type from that.
std::string to_string(identities i)
Wrapper around operator<<.
T & as()
Accessor to a built T.
static const unsigned char yyr1_[]
T & build()
Instantiate an empty T in here.
dyn::context ctx_
The context used to read the expression.
static dyn::expression prefer(const dyn::expression &e, const dyn::expression &f)
Generate an expression for "e <+ f = e % f + f".
void yy_destroy_(const char *yymsg, basic_symbol< Base > &yysym) const
Reclaim the memory associated to a symbol.
state_type yy_lr_goto_state_(state_type yystate, int yysym)
Compute post-reduction state.
Type access provider for state based symbols.
"Internal" symbol: element of the stack.
static const unsigned char yytable_[]
const_iterator end() const
virtual void yystack_print_()
Print the state stack on the debug stream.
void context(const dyn::context &ctx)
Set the expressionset to use from this context.
Present a slice of the top of a stack.
static std::string yytnamerr_(const char *n)
Convert the symbol name n to a form suitable for a diagnostic.
void push(T &t)
Steal the contents of t.
static const signed char yydefgoto_[]
static const unsigned short int yyrline_[]
state_type state
The state.
static identities ids(const driver &d)
Get the identities of the driver.
dyn::expression exp
The expression parsed so far.
static bool yy_pact_value_is_default_(int yyvalue)
Whether the given yypact_ value indicates a defaulted state.
void move(self_type &other)
Move the content of other to this.
static const unsigned char yyr2_[]
const_iterator begin() const
bool rparen
Whether there was a right-paren.
static const signed char yytable_ninf_
automaton rdivide(const automaton &lhs, const automaton &rhs)
Right-division of two automata (lhs / rhs).
std::ostream & debug_stream() const
The current debugging stream.
static const signed char yycheck_[]
stack_type yystack_
The stack.
std::set< std::pair< std::string, std::string >> class_t
A set of label ranges.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
An expressionset can implement several different sets of identities on expressions.
std::vector< dyn::context > tape_ctx_
The context for each tape. If single-tape, [0] is ctx_.
dyn::expression make_expression(const location &loc, const class_t &c, bool accept)
From a label class, generate an expression.
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.
by_state()
Default constructor.
void tape_pop()
Pop the tape stack.
value_impl< detail::expression_tag > expression
S::const_reverse_iterator const_iterator
semantic_type value
The semantic value.
void set_debug_level(debug_level_type l)
Set the current debugging level.
#define YYLLOC_DEFAULT(Current, Rhs, N)
The abstract, non-parameterized, root for all rational expression node types.