40 #ifndef YY_YY_LIB_VCSN_DOT_PARSE_HH_INCLUDED
41 # define YY_YY_LIB_VCSN_DOT_PARSE_HH_INCLUDED
43 #line 17 "lib/vcsn/dot/parse.yy" // lalr1.cc:372
88 #line 89 "./lib/vcsn/dot/parse.hh" // lalr1.cc:372
100 # define YYASSERT assert
105 # if (defined __GNUC__ \
106 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
107 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
108 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
110 # define YY_ATTRIBUTE(Spec)
114 #ifndef YY_ATTRIBUTE_PURE
115 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
118 #ifndef YY_ATTRIBUTE_UNUSED
119 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
122 #if !defined _Noreturn \
123 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
124 # if defined _MSC_VER && 1200 <= _MSC_VER
125 # define _Noreturn __declspec (noreturn)
127 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
132 #if ! defined lint || defined __GNUC__
133 # define YYUSE(E) ((void) (E))
138 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
140 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
141 _Pragma ("GCC diagnostic push") \
142 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
143 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
144 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
145 _Pragma ("GCC diagnostic pop")
147 # define YY_INITIAL_VALUE(Value) Value
149 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
150 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
151 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
153 #ifndef YY_INITIAL_VALUE
154 # define YY_INITIAL_VALUE(Value)
162 #line 11 "lib/vcsn/dot/parse.yy" // lalr1.cc:372
163 namespace vcsn {
namespace detail {
namespace dot {
164 #line 165 "./lib/vcsn/dot/parse.hh" // lalr1.cc:372
184 template <
typename T>
188 new (yyas_<T> ()) T (t);
196 template <
typename T>
200 return *
new (yyas_<T> ()) T;
204 template <
typename T>
208 return *
new (yyas_<T> ()) T (t);
212 template <
typename T>
220 template <
typename T>
235 template <
typename T>
239 std::swap (as<T> (), other.
as<T> ());
245 template <
typename T>
255 template <
typename T>
259 build<T> (other.
as<T> ());
263 template <
typename T>
276 template <
typename T>
281 return static_cast<T*
> (yyp);
285 template <
typename T>
290 return static_cast<const T*
> (yyp);
344 syntax_error (
const location_type& l,
const std::string& m);
387 template <
typename Base>
401 basic_symbol (
typename Base::kind_type t,
const location_type& l);
412 const semantic_type&
v,
413 const location_type& l);
451 symbol_number_type
type_get ()
const;
454 token_type
token ()
const;
509 make_EQ (
const location_type& l);
538 virtual int parse ();
557 virtual void error (
const location_type& loc,
const std::string& msg);
574 symbol_number_type yytoken)
const;
630 static std::string
yytnamerr_ (
const char *n);
650 template <
typename Base>
658 template <
typename Base>
682 symbol_number_type
type_get ()
const;
722 void yypush_ (
const char* m, state_type s, symbol_type& sym);
725 void yypop_ (
unsigned int n = 1);
751 const token_number_type
754 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
755 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
756 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
757 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
758 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
759 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
760 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
761 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
762 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
763 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
764 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
765 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
766 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
767 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
768 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
769 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
770 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
771 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
772 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
773 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
774 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
775 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
776 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
777 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
778 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
779 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
780 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
783 const unsigned int user_token_number_max_ = 272;
784 const token_number_type undef_token_ = 2;
786 if (static_cast<int>(t) <=
yyeof_)
788 else if (static_cast<unsigned int> (t) <= user_token_number_max_)
789 return translate_table[t];
796 :
std::runtime_error (m)
801 template <
typename Base>
807 template <
typename Base>
814 switch (other.type_get ())
847 template <
typename Base>
855 switch (this->type_get ())
889 template <
typename Base>
896 template <
typename Base>
903 template <
typename Base>
910 template <
typename Base>
918 template <
typename Base>
923 symbol_number_type yytype = this->type_get ();
934 value.template destroy< paths_t > ();
942 value.template destroy< states_t > ();
954 value.template destroy< string_t > ();
963 template <
typename Base>
969 switch (this->type_get ())
1040 const unsigned short int
1043 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1044 265, 266, 267, 268, 269, 270, 271, 272
1046 return static_cast<token_type
> (yytoken_number_[
type]);
1146 #line 11 "lib/vcsn/dot/parse.yy" // lalr1.cc:372
1148 #line 1149 "./lib/vcsn/dot/parse.hh" // lalr1.cc:372
1152 #line 63 "lib/vcsn/dot/parse.yy" // lalr1.cc:372
1154 #define YY_DECL_(Class) \
1155 parser::symbol_type Class lex(driver& driver_)
1156 #define YY_DECL YY_DECL_(yyFlexLexer::)
1158 #line 1159 "./lib/vcsn/dot/parse.hh" // lalr1.cc:372
1161 #endif // !YY_YY_LIB_VCSN_DOT_PARSE_HH_INCLUDED
Syntax errors thrown from user actions.
static symbol_type make_ARROW(const location_type &l)
int debug_level_type
Type for debugging levels.
static symbol_type make_NODE(const location_type &l)
void set_debug_level(debug_level_type l)
Set the current debugging level.
static token_number_type yytranslate_(token_type t)
Convert a scanner token number t to a symbol number.
void yy_print_(std::ostream &yyo, const basic_symbol< Base > &yysym) const
Display a symbol type, value and location.
char dummy2[sizeof(states_t)]
Base super_type
Alias to Base.
Type access provider for state based symbols.
variant< S > self_type
Type of *this.
static const signed char yydefgoto_[]
Termination state number.
token_type kind_type
The symbol type as needed by the constructor.
debug_level_type debug_level() const
The current debugging level.
location_type location
The location.
void copy(const self_type &other)
Copy the content of other to this.
~variant()
Destruction, allowed only if empty.
char yyraw[S]
A buffer large enough to store any of the semantic values.
int state_type
State numbers.
static const unsigned char yyr2_[]
A char[S] buffer to store and retrieve objects.
state_type state
The state.
basic_symbol< by_state > super_type
Superclass.
static symbol_type make_SEMI(const location_type &l)
void yy_destroy_(const char *yymsg, basic_symbol< Base > &yysym) const
Reclaim the memory associated to a symbol.
long double yyalign_me
Strongest alignment constraints.
static const signed char yytable_ninf_
by_state()
Default constructor.
T & build(const T &t)
Instantiate a T in here from t.
variant< sizeof(union_type)> semantic_type
Symbol semantic values.
semantic_type value
The semantic value.
"Internal" symbol: element of the stack.
basic_symbol()
Default constructor.
const T * yyas_() const
Const accessor to raw memory as T.
std::vector< std::pair< string_t, string_t >> transitions_t
static symbol_type make_DIGRAPH(const location_type &l)
stack< stack_symbol_type > stack_type
Stack type.
symbol_number_type type_get() const
The (internal) type number (corresponding to type).
std::ostream & dot(const Aut &aut, std::ostream &out, format fmt={})
Print an automaton in Graphviz's Dot format.
variant(const T &t)
Construct and fill.
virtual void yy_reduce_print_(int r)
Report on the debug stream that the rule r is going to be reduced.
variant()
Empty construction.
static symbol_type make_ID(const string_t &v, const location_type &l)
token::yytokentype token_type
(External) token type, as returned by yylex.
An auxiliary type to compute the largest semantic type.
static symbol_type make_GRAPH(const location_type &l)
static const unsigned char yyr1_[]
std::vector< string_t > states_t
stack_symbol_type & operator=(const stack_symbol_type &that)
Assignment, needed by push_back.
static bool yy_table_value_is_error_(int yyvalue)
Whether the given yytable_ value indicates a syntax error.
static symbol_type make_END(const location_type &l)
char dummy1[sizeof(paths_t)]
basic_symbol & operator=(const basic_symbol &other)
Assignment operator.
virtual std::string yysyntax_error_(state_type yystate, symbol_number_type yytoken) const
Generate an error message.
static const unsigned short int yyrline_[]
state_type kind_type
The symbol type as needed by the constructor.
virtual int parse()
Parse.
std::ostream & debug_stream() const
The current debugging stream.
union vcsn::detail::dot::variant::@1 yybuffer_
Type access provider for token (enum) based symbols.
static const signed char yypgoto_[]
T & build()
Instantiate an empty T in here.
Define the vcsn::rat::location class.
virtual void yystack_print_()
Print the state stack on the debug stream.
static const signed char yycheck_[]
static symbol_type make_LBRACE(const location_type &l)
T * yyas_()
Accessor to raw memory as T.
void move(self_type &other)
Move the content of other to this.
static const char *const yytname_[]
For a symbol, its name in clear.
static symbol_type make_RBRACE(const location_type &l)
static symbol_type make_EDGE(const location_type &l)
static bool yy_pact_value_is_default_(int yyvalue)
Whether the given yypact_ value indicates a defaulted state.
static const signed char yytable_[]
Provide a variadic mul on top of a binary mul(), and one().
state_type yy_lr_goto_state_(state_type yystate, int yysym)
Compute post-reduction state.
static const signed char yypact_ninf_
static symbol_type make_LBRACKET(const location_type &l)
static const unsigned char yystos_[]
self_type & operator=(const self_type &)
Prohibit blind copies.
by_type()
Default constructor.
std::string type(const automaton &a)
The implementation type of a.
syntax_error(const location_type &l, const std::string &m)
void swap(self_type &other)
Swap the content with other, of same type.
#define YY_ATTRIBUTE_PURE
static symbol_type make_COLON(const location_type &l)
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
vcsn::rat::location location_type
Symbol locations.
parser & operator=(const parser &)
static symbol_type make_EQ(const location_type &l)
static symbol_type make_RBRACKET(const location_type &l)
basic_symbol< by_type > symbol_type
"External" symbols: returned by the scanner.
Define the vcsn::detail::dot::stack class.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
void yypop_(unsigned int n=1)
Pop n symbols the three stacks.
void destroy()
Destroy the stored T.
transitions_t transitions
parser(driver &driver__yyarg)
Build a parser object.
State and public interface for Dot parsing.
void move(by_state &that)
Steal the symbol type from that.
static symbol_type make_SUBGRAPH(const location_type &l)
static const unsigned char yydefact_[]
stack_symbol_type()
Construct an empty symbol.
Number of nonterminal symbols.
void yypush_(const char *m, stack_symbol_type &s)
Push a new state on the stack.
void set_debug_stream(std::ostream &)
Set the current debugging stream.
static std::string yytnamerr_(const char *n)
Convert the symbol name n to a form suitable for a diagnostic.
int symbol_number_type
Internal symbol number.
char dummy3[sizeof(string_t)]
static symbol_type make_COMMA(const location_type &l)
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
T & as()
Accessor to a built T.
stack_type yystack_
The stack.
symbol_number_type type_get() const
The (internal) type number (corresponding to state).
const T & as() const
Const accessor to a built T (for printer).
token_type token() const
The token.
static const signed char yypact_[]
token_number_type type
The symbol type.
unsigned char token_number_type
Internal symbol number for tokens (subsumed by symbol_number_type).
void move(by_type &that)
Steal the symbol type from that.