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
int symbol_number_type
Internal symbol number.
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
std::ostream & debug_stream() const
The current debugging stream.
Define the vcsn::detail::dot::stack class.
symbol_number_type type_get() const
The (internal) type number (corresponding to state).
static const signed char yypact_[]
unsigned char token_number_type
Internal symbol number for tokens (subsumed by symbol_number_type).
void copy(const self_type &other)
Copy the content of other to this.
~variant()
Destruction, allowed only if empty.
void set_debug_level(debug_level_type l)
Set the current debugging level.
static symbol_type make_NODE(const location_type &l)
void yy_print_(std::ostream &yyo, const basic_symbol< Base > &yysym) const
Display a symbol type, value and location.
An auxiliary type to compute the largest semantic type.
static const signed char yypact_ninf_
void yypush_(const char *m, stack_symbol_type &s)
Push a new state on the stack.
basic_symbol()
Default constructor.
state_type state
The state.
void set_debug_stream(std::ostream &)
Set the current debugging stream.
basic_symbol< by_state > super_type
Superclass.
by_state()
Default constructor.
T & build()
Instantiate an empty T in here.
static bool yy_table_value_is_error_(int yyvalue)
Whether the given yytable_ value indicates a syntax error.
Termination state number.
syntax_error(const location_type &l, const std::string &m)
T & as()
Accessor to a built T.
static const unsigned short int yyrline_[]
static symbol_type make_RBRACKET(const location_type &l)
std::vector< std::pair< string_t, string_t >> transitions_t
stack< stack_symbol_type > stack_type
Stack type.
const T & as() const
Const accessor to a built T (for printer).
static const signed char yypgoto_[]
parser & operator=(const parser &)
static symbol_type make_DIGRAPH(const location_type &l)
basic_symbol< by_type > symbol_type
"External" symbols: returned by the scanner.
virtual void yystack_print_()
Print the state stack on the debug stream.
token::yytokentype token_type
(External) token type, as returned by yylex.
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
self_type & operator=(const self_type &)
Prohibit blind copies.
variant< S > self_type
Type of *this.
basic_symbol & operator=(const basic_symbol &other)
Assignment operator.
static std::string yytnamerr_(const char *n)
Convert the symbol name n to a form suitable for a diagnostic.
parser(driver &driver__yyarg)
Build a parser object.
T * yyas_()
Accessor to raw memory as T.
void yy_destroy_(const char *yymsg, basic_symbol< Base > &yysym) const
Reclaim the memory associated to a symbol.
Type access provider for token (enum) based symbols.
char yyraw[S]
A buffer large enough to store any of the semantic values.
Syntax errors thrown from user actions.
state_type yy_lr_goto_state_(state_type yystate, int yysym)
Compute post-reduction state.
static symbol_type make_LBRACKET(const location_type &l)
Provide a variadic mul on top of a binary mul(), and one().
by_type()
Default constructor.
token_type kind_type
The symbol type as needed by the constructor.
std::string type(const automaton &a)
The implementation type of a.
variant(const T &t)
Construct and fill.
static symbol_type make_COLON(const location_type &l)
vcsn::rat::location location_type
Symbol locations.
void swap(self_type &other)
Swap the content with other, of same type.
const T * yyas_() const
Const accessor to raw memory as T.
std::ostream & dot(const Aut &aut, std::ostream &out=std::cout, format fmt={}, bool mathjax=false)
Print an automaton in Graphviz's Dot format.
static symbol_type make_SEMI(const location_type &l)
static const char *const yytname_[]
For a symbol, its name in clear.
static const signed char yytable_[]
Base super_type
Alias to Base.
long double yyalign_me
Strongest alignment constraints.
variant< sizeof(union_type)> semantic_type
Symbol semantic values.
static const unsigned char yyr1_[]
state_type kind_type
The symbol type as needed by the constructor.
static symbol_type make_END(const location_type &l)
virtual int parse()
Parse.
virtual std::string yysyntax_error_(state_type yystate, symbol_number_type yytoken) const
Generate an error message.
static symbol_type make_COMMA(const location_type &l)
void move(basic_symbol &s)
Destructive move, s is emptied into this.
location_type location
The location.
debug_level_type debug_level() const
The current debugging level.
char dummy2[sizeof(states_t)]
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_ID(const string_t &v, const location_type &l)
token_number_type type
The symbol type.
static const signed char yycheck_[]
char dummy1[sizeof(paths_t)]
void move(by_type &that)
Steal the symbol type from that.
transitions_t transitions
T & build(const T &t)
Instantiate a T in here from t.
static symbol_type make_LBRACE(const location_type &l)
void yypop_(unsigned int n=1)
Pop n symbols the three stacks.
static symbol_type make_EDGE(const location_type &l)
std::vector< string_t > states_t
static const unsigned char yyr2_[]
static bool yy_pact_value_is_default_(int yyvalue)
Whether the given yypact_ value indicates a defaulted state.
Define the vcsn::rat::location class.
static symbol_type make_RBRACE(const location_type &l)
void move(self_type &other)
Move the content of other to this.
stack_symbol_type()
Construct an empty symbol.
token_type token() const
The token.
stack_symbol_type & operator=(const stack_symbol_type &that)
Assignment, needed by push_back.
int state_type
State numbers.
A char[S] buffer to store and retrieve objects.
void move(by_state &that)
Steal the symbol type from that.
union vcsn::detail::dot::variant::@1 yybuffer_
State and public interface for Dot parsing.
static const unsigned char yydefact_[]
Number of nonterminal symbols.
static const signed char yytable_ninf_
stack_type yystack_
The stack.
static const signed char yydefgoto_[]
semantic_type value
The semantic value.
static symbol_type make_EQ(const location_type &l)
#define YY_ATTRIBUTE_PURE
char dummy3[sizeof(string_t)]
static symbol_type make_ARROW(const location_type &l)
int debug_level_type
Type for debugging levels.
symbol_number_type type_get() const
The (internal) type number (corresponding to type).
variant()
Empty construction.
static symbol_type make_GRAPH(const location_type &l)
static token_number_type yytranslate_(token_type t)
Convert a scanner token number t to a symbol number.
static symbol_type make_SUBGRAPH(const location_type &l)
Type access provider for state based symbols.
void destroy()
Destroy the stored T.
"Internal" symbol: element of the stack.
static const unsigned char yystos_[]