40 #ifndef YY_YY_USERS_AKIM_SRC_LRDE_VAUCANSON2_LIB_VCSN_RAT_PARSE_HH_INCLUDED
41 # define YY_YY_USERS_AKIM_SRC_LRDE_VAUCANSON2_LIB_VCSN_RAT_PARSE_HH_INCLUDED
43 #line 16 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:372
76 #line 77 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.hh" // lalr1.cc:372
88 # define YYASSERT assert
93 # if (defined __GNUC__ \
94 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
95 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
96 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
98 # define YY_ATTRIBUTE(Spec)
102 #ifndef YY_ATTRIBUTE_PURE
103 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
106 #ifndef YY_ATTRIBUTE_UNUSED
107 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
110 #if !defined _Noreturn \
111 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
112 # if defined _MSC_VER && 1200 <= _MSC_VER
113 # define _Noreturn __declspec (noreturn)
115 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
120 #if ! defined lint || defined __GNUC__
121 # define YYUSE(E) ((void) (E))
126 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
128 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
129 _Pragma ("GCC diagnostic push") \
130 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
131 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
132 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
133 _Pragma ("GCC diagnostic pop")
135 # define YY_INITIAL_VALUE(Value) Value
137 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
138 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
139 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
141 #ifndef YY_INITIAL_VALUE
142 # define YY_INITIAL_VALUE(Value)
150 #line 11 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:372
151 namespace vcsn {
namespace rat {
152 #line 153 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.hh" // lalr1.cc:372
172 template <
typename T>
176 new (yyas_<T> ()) T (t);
184 template <
typename T>
188 return *
new (yyas_<T> ()) T;
192 template <
typename T>
196 return *
new (yyas_<T> ()) T (t);
200 template <
typename T>
208 template <
typename T>
223 template <
typename T>
227 std::swap (as<T> (), other.
as<T> ());
233 template <
typename T>
243 template <
typename T>
247 build<T> (other.
as<T> ());
251 template <
typename T>
264 template <
typename T>
269 return static_cast<T*
> (yyp);
273 template <
typename T>
278 return static_cast<const T*
> (yyp);
308 char dummy3[
sizeof(std::set<std::pair<std::string,std::string>>)];
379 template <
typename Base>
399 basic_symbol (
typename Base::kind_type t,
const std::set<std::pair<std::string, std::string>> v,
const location_type& l);
572 virtual int parse ();
664 static std::string
yytnamerr_ (
const char *n);
684 template <
typename Base>
692 template <
typename Base>
759 void yypop_ (
unsigned int n = 1);
788 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
789 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
790 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
791 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
792 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
793 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
794 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
795 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
796 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
797 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
798 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
799 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
800 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
801 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
802 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
803 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
804 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
805 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
806 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
807 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
808 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
809 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
810 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
811 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
812 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
813 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
814 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
815 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
818 const unsigned int user_token_number_max_ = 282;
821 if (static_cast<int>(t) <=
yyeof_)
823 else if (static_cast<unsigned int> (t) <= user_token_number_max_)
824 return translate_table[t];
831 : std::runtime_error (m)
836 template <
typename Base>
842 template <
typename Base>
849 switch (other.type_get ())
862 value.
copy< std::set<std::pair<std::string,std::string>> > (other.
value);
877 template <
typename Base>
885 switch (this->type_get ())
898 value.
copy< std::set<std::pair<std::string,std::string>> > (v);
914 template <
typename Base>
921 template <
typename Base>
928 template <
typename Base>
935 template <
typename Base>
942 template <
typename Base>
950 template <
typename Base>
970 value.template destroy< braced_ratexp > ();
974 value.template destroy< irange_type > ();
978 value.template destroy< std::set<std::pair<std::string,std::string>> > ();
983 value.template destroy< std::string > ();
992 template <
typename Base>
998 switch (this->type_get ())
1011 value.move< std::set<std::pair<std::string,std::string>> > (s.
value);
1016 value.move< std::string > (s.
value);
1064 const unsigned short int
1067 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1068 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1069 275, 276, 277, 278, 279, 280, 281, 282
1071 return static_cast<token_type> (yytoken_number_[type]);
1231 #line 11 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:372
1233 #line 1234 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.hh" // lalr1.cc:372
1237 #line 50 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.yy" // lalr1.cc:372
1239 #define YY_DECL_(Class) \
1240 parser::symbol_type Class lex(driver& driver_)
1241 #define YY_DECL YY_DECL_(yyFlexLexer::)
1243 #line 1244 "/Users/akim/src/lrde/vaucanson2/lib/vcsn/rat/parse.hh" // lalr1.cc:372
1246 #endif // !YY_YY_USERS_AKIM_SRC_LRDE_VAUCANSON2_LIB_VCSN_RAT_PARSE_HH_INCLUDED
token_number_type type
The symbol type.
static symbol_type make_RBRACKET(const location_type &l)
stack< stack_symbol_type > stack_type
Stack type.
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.
char dummy4[sizeof(std::string)]
static symbol_type make_LETTER(const std::string &v, const location_type &l)
static symbol_type make_ZERO(const location_type &l)
Syntax errors thrown from user actions.
static symbol_type make_WEIGHT(const std::string &v, const location_type &l)
long double yyalign_me
Strongest alignment constraints.
void copy(const self_type &other)
Copy the content of other to this.
"Internal" symbol: element of the stack.
static const unsigned char yyr2_[]
bool rparen
Whether there was a right-paren.
location_type location
The location.
char dummy1[sizeof(braced_ratexp)]
A char[S] buffer to store and retrieve objects.
by_state()
Default constructor.
static const signed char yytable_ninf_
token_type kind_type
The symbol type as needed by the constructor.
Termination state number.
token_type token() const
The token.
location location_type
Symbol locations.
variant< S > self_type
Type of *this.
An auxiliary type to compute the largest semantic type.
state_type state
The state.
static const signed char yypact_ninf_
static symbol_type make_COMMA(const location_type &l)
Type access provider for state based symbols.
char dummy2[sizeof(irange_type)]
int state_type
State numbers.
void yy_print_(std::ostream &yyo, const basic_symbol< Base > &yysym) const
Display a symbol type, value and location.
static symbol_type make_PERCENT(const location_type &l)
variant(const T &t)
Construct and fill.
void destroy()
Destroy the stored T.
braced_ratexp & operator=(exp_t e)
static const signed char yypgoto_[]
basic_symbol & operator=(const basic_symbol &other)
Assignment operator.
static symbol_type make_CONCAT(const location_type &l)
variant< sizeof(union_type)> semantic_type
Symbol semantic values.
stack_type yystack_
The stack.
T & build(const T &t)
Instantiate a T in here from t.
void move(self_type &other)
Move the content of other to this.
static bool yy_table_value_is_error_(int yyvalue)
Whether the given yytable_ value indicates a syntax error.
char yyraw[S]
A buffer large enough to store any of the semantic values.
A char[S] buffer to store and retrieve objects.
void yypop_(unsigned int n=1)
Pop n symbols the three stacks.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
char dummy3[sizeof(std::set< std::pair< std::string, std::string >>)]
stack_symbol_type & operator=(const stack_symbol_type &that)
Assignment, needed by push_back.
static const signed char yycheck_[]
bool lparen
Whether there was a left-paren.
static const signed char yydefgoto_[]
parser & operator=(const parser &)
static symbol_type make_LBRACKET(const location_type &l)
The abstract, non-parameterized, root for all rational expression node types.
syntax_error(const location_type &l, const std::string &m)
static symbol_type make_LWEIGHT(const location_type &l)
State and public interface for rational expression parsing.
void swap(self_type &other)
Swap the content with other, of same type.
static symbol_type make_LT_PLUS(const location_type &l)
Number of nonterminal symbols.
static const short int yypact_[]
static std::string yytnamerr_(const char *n)
Convert the symbol name n to a form suitable for a diagnostic.
static symbol_type make_AMPERSAND(const location_type &l)
void yypush_(const char *m, stack_symbol_type &s)
Push a new state on the stack.
T & build()
Instantiate an empty T in here.
basic_symbol< by_state > super_type
Superclass.
debug_level_type debug_level() const
The current debugging level.
static symbol_type make_SLASH(const location_type &l)
by_type()
Default constructor.
int symbol_number_type
Internal symbol number.
semantic_type value
The semantic value.
parser(driver &driver__yyarg)
Build a parser object.
T & as()
Accessor to a built T.
static symbol_type make_RWEIGHT(const location_type &l)
~variant()
Destruction, allowed only if empty.
static const unsigned char yyr1_[]
virtual int parse()
Parse.
static symbol_type make_RPAREN(const location_type &l)
virtual void yy_reduce_print_(int r)
Report on the debug stream that the rule r is going to be reduced.
static symbol_type make_BACKSLASH(const location_type &l)
Base super_type
Alias to Base.
void set_debug_stream(std::ostream &)
Set the current debugging stream.
static const unsigned char yydefact_[]
stack_symbol_type()
Construct an empty symbol.
Define the vcsn::rat::location class.
unsigned char token_number_type
Internal symbol number for tokens (subsumed by symbol_number_type).
symbol_number_type type_get() const
The (internal) type number (corresponding to type).
Type access provider for token (enum) based symbols.
static const unsigned char yystos_[]
Define the vcsn::rat::stack class.
static symbol_type make_CARET(const location_type &l)
static symbol_type make_DOT(const location_type &l)
variant()
Empty construction.
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
static symbol_type make_ONE(const location_type &l)
basic_symbol< by_type > symbol_type
"External" symbols: returned by the scanner.
void move(by_state &that)
Steal the symbol type from that.
static symbol_type make_STAR(const irange_type &v, const location_type &l)
static token_number_type yytranslate_(token_type t)
Convert a scanner token number t to a symbol number.
Provide a variadic mul on top of a binary mul(), and one().
std::shared_ptr< const exp > exp_t
static const unsigned char yyrline_[]
static symbol_type make_DASH(const location_type &l)
#define YY_ATTRIBUTE_PURE
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.
static symbol_type make_END(const location_type &l)
static symbol_type make_TRANSPOSITION(const location_type &l)
static symbol_type make_COLON(const location_type &l)
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.
union vcsn::rat::variant::@5 yybuffer_
const T & as() const
Const accessor to a built T (for printer).
static symbol_type make_LPAREN(const location_type &l)
basic_symbol()
Default constructor.
self_type & operator=(const self_type &)
Prohibit blind copies.
std::tuple< int, int > irange_type
void move(by_type &that)
Steal the symbol type from that.
const T * yyas_() const
Const accessor to raw memory as T.
T * yyas_()
Accessor to raw memory as T.
std::ostream & debug_stream() const
The current debugging stream.
static bool yy_pact_value_is_default_(int yyvalue)
Whether the given yypact_ value indicates a defaulted state.
state_type kind_type
The symbol type as needed by the constructor.
token::yytokentype token_type
(External) token type, as returned by yylex.
void destroy()
Destroy the stored T.
static symbol_type make_PLUS(const location_type &l)
static symbol_type make_COMPLEMENT(const location_type &l)