33 #line 89 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:392
38 #define MAKE(Kind, ...) \
39 driver_.ratexpset_->Kind(__VA_ARGS__)
42 #define TRY(Loc, Stm) \
47 catch (std::exception& e) \
49 error(Loc, e.what()); \
53 #line 54 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:392
58 #line 59 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:399
61 # if defined __cplusplus && 201103L <= __cplusplus
62 # define YY_NULLPTR nullptr
72 #line 73 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:407
74 #line 57 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:408
98 return driver_.
scanner_->lex(driver_);
103 #line 104 "/Users/akim/src/lrde/vaucanson2/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 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:474
188 namespace vcsn {
namespace rat {
189 #line 190 "/Users/akim/src/lrde/vaucanson2/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 ())
302 value.
move< std::set<std::pair<std::string,std::string>> > (that.
value);
336 value.copy< std::set<std::pair<std::string,std::string>> > (that.
value);
341 value.copy< std::string > (that.
value);
353 template <
typename Base>
363 template <
typename Base>
368 std::ostream& yyoutput = yyo;
371 yyo << (yytype <
yyntokens_ ?
"token" :
"nterm")
378 #line 114 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:617
379 { yyo <<
'"' << yysym.
value.template as< std::string > () <<
'"'; }
380 #line 381 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:617
385 #line 121 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:617
386 { yyo <<
'<' << yysym.
value.template as< std::string > () <<
'>'; }
387 #line 388 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:617
414 #line 123 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:617
417 yyo << (yysym.
value.template as< braced_ratexp > ().lparen ?
" (lpar, " :
" (no lpar, ");
418 yyo << (yysym.
value.template as< braced_ratexp > ().rparen ?
"rpar)" :
"no rpar)");
420 #line 421 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:617
425 #line 116 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:617
428 for (
auto c: yysym.
value.template as< std::set<std::pair<std::string,std::string>> > ()) yyo << c.first <<
"-" << c.second;
431 #line 432 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:617
528 int yyerrstatus_ = 0;
543 YYCDEBUG <<
"Starting parse" << std::endl;
547 #line 110 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:725
552 #line 553 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:725
586 yyla.
move (yylookahead);
599 yyn += yyla.type_get ();
621 yypush_ (
"Shifting", yyn, yyla);
657 yylhs.
value.
build< std::set<std::pair<std::string,std::string>> > ();
683 #line 178 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
688 #line 689 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
692 #line 182 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
698 #line 699 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
702 #line 190 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
704 #line 705 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
708 #line 191 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
710 #line 711 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
714 #line 195 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
716 #line 717 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
720 #line 196 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
722 #line 723 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
726 #line 197 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
728 #line 729 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
732 #line 198 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
734 #line 735 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
738 #line 199 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
740 #line 741 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
744 #line 200 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
746 #line 747 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
750 #line 201 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
752 #line 753 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
756 #line 202 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
759 #line 760 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
769 #line 205 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
771 #line 772 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
775 #line 207 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
790 #line 791 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
794 #line 221 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
796 #line 797 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
800 #line 222 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
802 #line 803 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
806 #line 223 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
808 #line 809 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
812 #line 224 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
814 #line 815 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
818 #line 225 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
820 #line 821 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
824 #line 226 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
826 #line 827 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
830 #line 227 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
831 { yylhs.
value.
as<
braced_ratexp > () =
MAKE(letter_class, yystack_[1].value.as< std::set<std::pair<std::string,std::string>> > (),
true); }
832 #line 833 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
836 #line 228 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
837 { yylhs.
value.
as<
braced_ratexp > () =
MAKE(letter_class, yystack_[1].value.as< std::set<std::pair<std::string,std::string>> > (),
false); }
838 #line 839 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
842 #line 229 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
844 #line 845 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
848 #line 233 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
850 #line 851 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
854 #line 234 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
856 #line 857 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
860 #line 238 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
862 #line 863 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
866 #line 239 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
867 { yylhs.
value.
as< std::set<std::pair<std::string,std::string>> > () = yystack_[1].value.as< std::set<std::pair<std::string,std::string>> > (); yylhs.
value.
as< std::set<std::pair<std::string,std::string>> > ().emplace(yystack_[0].value.as< std::string > (), yystack_[0].value.as< std::string > ()); }
868 #line 869 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
872 #line 240 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:847
873 { yylhs.
value.
as< std::set<std::pair<std::string,std::string>> > () = yystack_[3].value.as< std::set<std::pair<std::string,std::string>> > (); yylhs.
value.
as< std::set<std::pair<std::string,std::string>> > ().emplace(yystack_[2].value.as< std::string > (), yystack_[0].value.as< std::string > ()); }
874 #line 875 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
878 #line 879 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:847
907 yyempty ?
yyempty_ : yyla.type_get ()));
912 if (yyerrstatus_ == 3)
918 if (yyla.type_get () ==
yyeof_)
957 yyn =
yypact_[yystack_[0].state];
970 if (yystack_.size () == 1)
983 error_token.
state = yyn;
984 yypush_ (
"Shifting", error_token);
1000 yy_destroy_ (
"Cleanup: discarding lookahead", yyla);
1005 while (1 < yystack_.size ())
1015 YYCDEBUG <<
"Exception caught: cleaning lookahead and stack"
1046 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1048 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1077 yyarg[yycount++] =
yytname_[yytoken];
1084 int yyxbegin = yyn < 0 ? -yyn : 0;
1086 int yychecklim =
yylast_ - yyn + 1;
1088 for (
int yyx = yyxbegin; yyx < yyxend; ++yyx)
1092 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1106 #define YYCASE_(N, S) \
1111 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1112 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1113 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1114 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1115 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1121 for (
char const* yyp = yyformat; *yyp; ++yyp)
1122 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
1140 167, -2, 167, -21, -21, -21, -20, 11, 59, 167,
1141 -21, 22, 81, -21, -21, 167, 167, 167, -21, -21,
1142 167, 167, 167, 167, -21, -21, 167, -21, -21, 5,
1143 -11, 133, 25, -21, 6, -21, -3, 146, -3, 163,
1144 125, 103, 103, 146, -21, -9, -21
1150 0, 28, 0, 21, 20, 22, 26, 0, 2, 0,
1151 28, 0, 0, 27, 1, 0, 0, 0, 4, 18,
1152 0, 0, 0, 0, 5, 19, 0, 17, 3, 16,
1153 15, 14, 0, 23, 29, 25, 7, 11, 8, 6,
1154 13, 9, 10, 12, 24, 0, 30
1160 -21, -21, -21, 38, -6, 12
1166 -1, 7, 28, 29, 9, 11
1172 13, 16, 30, 10, 6, 19, 30, 20, 1, 2,
1173 3, 14, 5, 19, 46, 45, 25, 26, 4, 27,
1174 5, 6, 32, 30, 25, 30, 0, 27, 5, 6,
1175 30, 30, 30, 30, 30, 30, 30, 30, 8, 33,
1176 12, 0, 44, 0, 0, 34, 0, 31, 34, 0,
1177 0, 0, 0, 36, 37, 38, 0, 0, 39, 40,
1178 41, 42, 15, 16, 43, 17, 18, 19, 31, 20,
1179 1, 2, 3, 21, 22, 23, 0, 24, 25, 26,
1180 4, 27, 5, 6, 15, 16, 0, 17, 0, 19,
1181 0, 20, 1, 2, 3, 21, 22, 23, 0, 35,
1182 25, 26, 4, 27, 5, 6, 15, 16, 0, 17,
1183 0, 19, 0, 20, 1, 2, 3, 21, 0, 0,
1184 0, 0, 25, 26, 4, 27, 5, 6, 15, 16,
1185 0, 17, 0, 19, 0, 20, 1, 2, 3, 0,
1186 0, 19, 0, 0, 25, 26, 4, 27, 5, 6,
1187 16, 0, 25, 0, 19, 27, 20, 1, 2, 3,
1188 0, 0, 0, 0, 0, 25, 0, 4, 27, 5,
1189 6, 19, 0, 0, 1, 2, 3, 0, 1, 2,
1190 3, 0, 25, 0, 4, 27, 5, 6, 4, 0,
1197 6, 4, 8, 5, 24, 8, 12, 10, 11, 12,
1198 13, 0, 23, 8, 23, 9, 19, 20, 21, 22,
1199 23, 24, 10, 29, 19, 31, -1, 22, 23, 24,
1200 36, 37, 38, 39, 40, 41, 42, 43, 0, 17,
1201 2, -1, 17, -1, -1, 23, -1, 9, 23, -1,
1202 -1, -1, -1, 15, 16, 17, -1, -1, 20, 21,
1203 22, 23, 3, 4, 26, 6, 7, 8, 30, 10,
1204 11, 12, 13, 14, 15, 16, -1, 18, 19, 20,
1205 21, 22, 23, 24, 3, 4, -1, 6, -1, 8,
1206 -1, 10, 11, 12, 13, 14, 15, 16, -1, 18,
1207 19, 20, 21, 22, 23, 24, 3, 4, -1, 6,
1208 -1, 8, -1, 10, 11, 12, 13, 14, -1, -1,
1209 -1, -1, 19, 20, 21, 22, 23, 24, 3, 4,
1210 -1, 6, -1, 8, -1, 10, 11, 12, 13, -1,
1211 -1, 8, -1, -1, 19, 20, 21, 22, 23, 24,
1212 4, -1, 19, -1, 8, 22, 10, 11, 12, 13,
1213 -1, -1, -1, -1, -1, 19, -1, 21, 22, 23,
1214 24, 8, -1, -1, 11, 12, 13, -1, 11, 12,
1215 13, -1, 19, -1, 21, 22, 23, 24, 21, -1,
1222 0, 11, 12, 13, 21, 23, 24, 29, 31, 32,
1223 5, 33, 31, 32, 0, 3, 4, 6, 7, 8,
1224 10, 14, 15, 16, 18, 19, 20, 22, 30, 31,
1225 32, 31, 33, 17, 23, 18, 31, 31, 31, 31,
1226 31, 31, 31, 31, 17, 9, 23
1232 0, 28, 29, 29, 30, 30, 31, 31, 31, 31,
1233 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
1234 31, 31, 31, 31, 31, 31, 32, 32, 33, 33,
1241 0, 2, 1, 2, 1, 1, 3, 3, 3, 3,
1242 3, 3, 3, 3, 2, 2, 2, 2, 2, 2,
1243 1, 1, 1, 3, 4, 3, 1, 2, 0, 2,
1254 "\"end\"",
"error",
"$undefined",
"\"&\"",
"\"{\\\\}\"",
"\"^\"",
1255 "\":\"",
"\",\"",
"\"{c}\"",
"\"-\"",
"\".\"",
"\"[\"",
"\"(\"",
1256 "\"\\\\e\"",
"\"%\"",
"\"+\"",
"\"<+\"",
"\"]\"",
"\")\"",
"\"{T}\"",
1257 "\"{/}\"",
"\"\\\\z\"",
"\"*\"",
"\"letter\"",
"\"weight\"",
"CONCAT",
1258 "RWEIGHT",
"LWEIGHT",
"$accept",
"input",
"terminator",
"exp",
"weights",
1266 0, 178, 178, 182, 190, 191, 195, 196, 197, 198,
1267 199, 200, 201, 202, 204, 205, 206, 221, 222, 223,
1268 224, 225, 226, 227, 228, 229, 233, 234, 238, 239,
1289 unsigned int yylno =
yyrline_[yyrule];
1290 int yynrhs =
yyr2_[yyrule];
1292 *
yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
1293 <<
" (line " << yylno <<
"):" << std::endl;
1295 for (
int yyi = 0; yyi < yynrhs; yyi++)
1302 #line 11 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:1155
1304 #line 1305 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.cc" // lalr1.cc:1155
1305 #line 243 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:1156
1321 res = es->mul(
power(es, e, min, min), res);
1332 for (
int n = 1; n < min; ++n)
1333 res = es->mul(res, e);
1338 for (
int n = 1; n <= max - min; ++n)
1339 sum = es->add(sum,
power(es, e, n, n));
1340 res = es->mul(res, sum);
1350 return power(es, e, std::get<0>(range), std::get<1>(range));
1357 return rs->add(e, rs->conjunction(rs->complement(e), f));
1363 driver_.error(l, m);
#define YYLLOC_DEFAULT(Current, Rhs, N)
virtual std::string yysyntax_error_(state_type yystate, symbol_number_type yytoken) const
Generate an error message.
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.
virtual void yystack_print_()
Print the state stack on the debug stream.
Syntax errors thrown from user actions.
An inner node with multiple children.
void move(self_type &other)
Move the content of other to this.
static exp_t prefer(const dyn::ratexpset &rs, exp_t e, exp_t f)
Generate a ratexp for "e <+ f = e % f + f".
"Internal" symbol: element of the stack.
static const unsigned char yyr2_[]
bool rparen
Whether there was a right-paren.
location_type location
The location.
by_state()
Default constructor.
static const signed char yytable_ninf_
Termination state number.
void push(T &t)
Steal the contents of t.
#define YY_SYMBOL_PRINT(Title, Symbol)
state_type state
The state.
static const signed char yypact_ninf_
const_iterator end() const
Type access provider for state based symbols.
Define the vcsn::rat::parser class.
int state_type
State numbers.
const_iterator begin() const
void yy_print_(std::ostream &yyo, const basic_symbol< Base > &yysym) const
Display a symbol type, value and location.
#define TRY(Loc, Stm)
Run Stm, and bounces exceptions into parse errors at Loc.
static const signed char yypgoto_[]
stack_type yystack_
The stack.
#define YY_REDUCE_PRINT(Rule)
static bool yy_table_value_is_error_(int yyvalue)
Whether the given yytable_ value indicates a syntax error.
location location_
The inital location.
location(const position &b, const position &e)
Construct a location from b to e.
void yypop_(unsigned int n=1)
Pop n symbols the three stacks.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
stack_symbol_type & operator=(const stack_symbol_type &that)
Assignment, needed by push_back.
S::const_reverse_iterator const_iterator
static const signed char yycheck_[]
#define MAKE(Kind,...)
Call the factory to make a Kind.
bool lparen
Whether there was a left-paren.
static const signed char yydefgoto_[]
The abstract, non-parameterized, root for all rational expression node types.
State and public interface for rational expression parsing.
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 yypush_(const char *m, stack_symbol_type &s)
Push a new state on the stack.
Trivial identities plus series identities.
T & build()
Instantiate an empty T in here.
debug_level_type debug_level() const
The current debugging level.
int symbol_number_type
Internal symbol number.
semantic_type value
The semantic value.
parser(driver &driver__yyarg)
Build a parser object.
std::shared_ptr< const detail::ratexpset_base > ratexpset
static const unsigned char yyr1_[]
virtual int parse()
Parse.
virtual void yy_reduce_print_(int r)
Report on the debug stream that the rule r is going to be reduced.
void pop(unsigned int n=1)
void set_debug_stream(std::ostream &)
Set the current debugging stream.
static const unsigned char yydefact_[]
stack_symbol_type()
Construct an empty symbol.
std::unique_ptr< yyFlexLexer > scanner_
The scanner.
static const unsigned char yystos_[]
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
basic_symbol< by_type > symbol_type
"External" symbols: returned by the scanner.
void move(by_state &that)
Steal the symbol type from that.
std::shared_ptr< const exp > exp_t
static const unsigned char yyrline_[]
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.
exp_t exp
The expression parsed so far.
static const char *const yytname_[]
For a symbol, its name in clear.
static const unsigned char yytable_[]
int debug_level_type
Type for debugging levels.
T & as()
Accessor to a built T.
static exp_t power(const dyn::ratexpset &rs, exp_t e, std::tuple< int, int > range)
Generate a ratexp for "e{range.first, range.second}".
std::tuple< int, int > irange_type
S::size_type size() const
std::ostream & debug_stream() const
The current debugging stream.
dyn::ratexpset ratexpset_
static bool yy_pact_value_is_default_(int yyvalue)
Whether the given yypact_ value indicates a defaulted state.
static parser::symbol_type yylex(driver &driver_)
Use our local scanner object.
Present a slice of the top of a stack.