Vcsn  2.8
Be Rational
vcsn::rat::parser Class Reference

A Bison parser. More...

#include <parse.hh>

Collaboration diagram for vcsn::rat::parser:

Classes

struct  basic_symbol
 A complete symbol. More...
 
struct  by_state
 Type access provider for state based symbols. More...
 
struct  by_type
 Type access provider for token (enum) based symbols. More...
 
struct  stack_symbol_type
 "Internal" symbol: element of the stack. More...
 
struct  syntax_error
 Syntax errors thrown from user actions. More...
 
struct  token
 Tokens. More...
 
union  union_type
 An auxiliary type to compute the largest semantic type. More...
 

Public Types

enum  { empty_symbol = -2 }
 The symbol type number to denote an empty symbol. More...
 
typedef variant< sizeof(union_type)> semantic_type
 Symbol semantic values. More...
 
typedef location location_type
 Symbol locations. More...
 
typedef token::yytokentype token_type
 (External) token type, as returned by yylex. More...
 
typedef int symbol_number_type
 Symbol type: an internal symbol number. More...
 
typedef unsigned char token_number_type
 Internal symbol number for tokens (subsumed by symbol_number_type). More...
 
typedef basic_symbol< by_typesymbol_type
 "External" symbols: returned by the scanner. More...
 
typedef int debug_level_type
 Type for debugging levels. More...
 

Public Member Functions

 parser (driver &driver__yyarg)
 Build a parser object. More...
 
virtual ~parser ()
 
virtual int parse ()
 Parse. More...
 
std::ostream & debug_stream () const
 The current debugging stream. More...
 
void set_debug_stream (std::ostream &)
 Set the current debugging stream. More...
 
debug_level_type debug_level () const
 The current debugging level. More...
 
void set_debug_level (debug_level_type l)
 Set the current debugging level. More...
 
virtual void error (const location_type &loc, const std::string &msg)
 Report a syntax error. More...
 
void error (const syntax_error &err)
 Report a syntax error. More...
 

Static Public Member Functions

static symbol_type make_END (const location_type &l)
 
static symbol_type make_AMPERSAND (const location_type &l)
 
static symbol_type make_AMPERSAND_COLON (const location_type &l)
 
static symbol_type make_AT (const location_type &l)
 
static symbol_type make_BACKSLASH (const location_type &l)
 
static symbol_type make_BANG (const location_type &l)
 
static symbol_type make_CARET (const location_type &l)
 
static symbol_type make_COLON (const location_type &l)
 
static symbol_type make_COMMA (const location_type &l)
 
static symbol_type make_COMPLEMENT (const location_type &l)
 
static symbol_type make_DASH (const location_type &l)
 
static symbol_type make_DOT (const location_type &l)
 
static symbol_type make_LBRACKET (const location_type &l)
 
static symbol_type make_LT_PLUS (const location_type &l)
 
static symbol_type make_ONE (const location_type &l)
 
static symbol_type make_PERCENT (const location_type &l)
 
static symbol_type make_PIPE (const location_type &l)
 
static symbol_type make_PLUS (const location_type &l)
 
static symbol_type make_RBRACKET (const location_type &l)
 
static symbol_type make_RPAREN (const location_type &l)
 
static symbol_type make_SLASH (const location_type &l)
 
static symbol_type make_TRANSPOSITION (const location_type &l)
 
static symbol_type make_TRANSPOSE (const location_type &l)
 
static symbol_type make_ZERO (const location_type &l)
 
static symbol_type make_STAR (const irange_type &v, const location_type &l)
 
static symbol_type make_LETTER (const std::string &v, const location_type &l)
 
static symbol_type make_WEIGHT (const std::string &v, const location_type &l)
 
static symbol_type make_LPAREN (const symbol &v, const location_type &l)
 
static symbol_type make_CONCAT (const location_type &l)
 
static symbol_type make_RWEIGHT (const location_type &l)
 
static symbol_type make_LWEIGHT (const location_type &l)
 

Private Types

enum  {
  yyeof_ = 0, yylast_ = 227, yynnts_ = 11, yyfinal_ = 5,
  yyterror_ = 1, yyerrcode_ = 256, yyntokens_ = 33
}
 Constants. More...
 
typedef int state_type
 State numbers. More...
 
typedef stack< stack_symbol_typestack_type
 Stack type. More...
 

Private Member Functions

 parser (const parser &)
 This class is not copyable. More...
 
parseroperator= (const parser &)
 
virtual std::string yysyntax_error_ (state_type yystate, const symbol_type &yyla) const
 Generate an error message. More...
 
state_type yy_lr_goto_state_ (state_type yystate, int yysym)
 Compute post-reduction state. More...
 
virtual void yy_reduce_print_ (int r)
 Report on the debug stream that the rule r is going to be reduced. More...
 
virtual void yystack_print_ ()
 Print the state stack on the debug stream. More...
 
template<typename Base >
void yy_print_ (std::ostream &yyo, const basic_symbol< Base > &yysym) const
 Display a symbol type, value and location. More...
 
template<typename Base >
void yy_destroy_ (const char *yymsg, basic_symbol< Base > &yysym) const
 Reclaim the memory associated to a symbol. More...
 
void yypush_ (const char *m, stack_symbol_type &s)
 Push a new state on the stack. More...
 
void yypush_ (const char *m, state_type s, symbol_type &sym)
 Push a new look ahead token on the state on the stack. More...
 
void yypop_ (unsigned int n=1)
 Pop n symbols the three stacks. More...
 

Static Private Member Functions

static bool yy_pact_value_is_default_ (int yyvalue)
 Whether the given yypact_ value indicates a defaulted state. More...
 
static bool yy_table_value_is_error_ (int yyvalue)
 Whether the given yytable_ value indicates a syntax error. More...
 
static token_number_type yytranslate_ (token_type t)
 Convert a scanner token number t to a symbol number. More...
 
static std::string yytnamerr_ (const char *n)
 Convert the symbol name n to a form suitable for a diagnostic. More...
 

Private Attributes

int yydebug_
 
std::ostream * yycdebug_
 
stack_type yystack_
 The stack. More...
 
driverdriver_
 

Static Private Attributes

static const signed char yypact_ninf_ = -17
 
static const signed char yytable_ninf_ = -1
 
static const short int yypact_ []
 
static const unsigned char yydefact_ []
 
static const signed char yypgoto_ []
 
static const signed char yydefgoto_ []
 
static const unsigned char yytable_ []
 
static const signed char yycheck_ []
 
static const unsigned char yystos_ []
 
static const unsigned char yyr1_ []
 
static const unsigned char yyr2_ []
 
static const char *const yytname_ []
 For a symbol, its name in clear. More...
 
static const unsigned short int yyrline_ []
 

Detailed Description

A Bison parser.

Definition at line 299 of file parse.hh.

Member Typedef Documentation

◆ debug_level_type

Type for debugging levels.

Definition at line 641 of file parse.hh.

◆ location_type

Symbol locations.

Definition at line 338 of file parse.hh.

◆ semantic_type

Symbol semantic values.

Definition at line 333 of file parse.hh.

◆ stack_type

Stack type.

Definition at line 803 of file parse.hh.

◆ state_type

typedef int vcsn::rat::parser::state_type
private

State numbers.

Definition at line 662 of file parse.hh.

◆ symbol_number_type

Symbol type: an internal symbol number.

Definition at line 390 of file parse.hh.

◆ symbol_type

"External" symbols: returned by the scanner.

Definition at line 498 of file parse.hh.

◆ token_number_type

Internal symbol number for tokens (subsumed by symbol_number_type).

Definition at line 396 of file parse.hh.

◆ token_type

(External) token type, as returned by yylex.

Definition at line 387 of file parse.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

The symbol type number to denote an empty symbol.

Enumerator
empty_symbol 

Definition at line 393 of file parse.hh.

◆ anonymous enum

anonymous enum
private

Constants.

Enumerator
yyeof_ 
yylast_ 

Last index in yytable_.

yynnts_ 

Number of nonterminal symbols.

yyfinal_ 

Termination state number.

yyterror_ 
yyerrcode_ 
yyntokens_ 

Number of tokens.

Definition at line 827 of file parse.hh.

Constructor & Destructor Documentation

◆ parser() [1/2]

vcsn::rat::parser::parser ( driver driver__yyarg)

Build a parser object.

Definition at line 232 of file parse.cc.

◆ ~parser()

vcsn::rat::parser::~parser ( )
virtual

Definition at line 241 of file parse.cc.

◆ parser() [2/2]

vcsn::rat::parser::parser ( const parser )
private

This class is not copyable.

Member Function Documentation

◆ debug_level()

parser::debug_level_type vcsn::rat::parser::debug_level ( ) const

The current debugging level.

Definition at line 563 of file parse.cc.

References yydebug_.

◆ debug_stream()

std::ostream & vcsn::rat::parser::debug_stream ( ) const

The current debugging stream.

Definition at line 550 of file parse.cc.

References yycdebug_.

◆ error() [1/2]

void vcsn::rat::parser::error ( const location_type loc,
const std::string &  msg 
)
virtual

Report a syntax error.

Parameters
locwhere the syntax error is found.
msga description of the syntax error.

Definition at line 1519 of file parse.cc.

References driver_, and vcsn::rat::driver::error().

Referenced by error(), and parse().

Here is the call graph for this function:

◆ error() [2/2]

void vcsn::rat::parser::error ( const syntax_error err)

Report a syntax error.

Definition at line 1212 of file parse.cc.

References error(), and vcsn::rat::parser::syntax_error::location.

Here is the call graph for this function:

◆ make_AMPERSAND()

parser::symbol_type vcsn::rat::parser::make_AMPERSAND ( const location_type l)
inlinestatic

Definition at line 1243 of file parse.hh.

References vcsn::rat::parser::token::AMPERSAND.

◆ make_AMPERSAND_COLON()

parser::symbol_type vcsn::rat::parser::make_AMPERSAND_COLON ( const location_type l)
inlinestatic

Definition at line 1249 of file parse.hh.

References vcsn::rat::parser::token::AMPERSAND_COLON.

◆ make_AT()

parser::symbol_type vcsn::rat::parser::make_AT ( const location_type l)
inlinestatic

Definition at line 1255 of file parse.hh.

References vcsn::rat::parser::token::AT.

◆ make_BACKSLASH()

parser::symbol_type vcsn::rat::parser::make_BACKSLASH ( const location_type l)
inlinestatic

Definition at line 1261 of file parse.hh.

References vcsn::rat::parser::token::BACKSLASH.

◆ make_BANG()

parser::symbol_type vcsn::rat::parser::make_BANG ( const location_type l)
inlinestatic

Definition at line 1267 of file parse.hh.

References vcsn::rat::parser::token::BANG.

◆ make_CARET()

parser::symbol_type vcsn::rat::parser::make_CARET ( const location_type l)
inlinestatic

Definition at line 1273 of file parse.hh.

References vcsn::rat::parser::token::CARET.

◆ make_COLON()

parser::symbol_type vcsn::rat::parser::make_COLON ( const location_type l)
inlinestatic

Definition at line 1279 of file parse.hh.

References vcsn::rat::parser::token::COLON.

◆ make_COMMA()

parser::symbol_type vcsn::rat::parser::make_COMMA ( const location_type l)
inlinestatic

Definition at line 1285 of file parse.hh.

References vcsn::rat::parser::token::COMMA.

◆ make_COMPLEMENT()

parser::symbol_type vcsn::rat::parser::make_COMPLEMENT ( const location_type l)
inlinestatic

Definition at line 1291 of file parse.hh.

References vcsn::rat::parser::token::COMPLEMENT.

◆ make_CONCAT()

parser::symbol_type vcsn::rat::parser::make_CONCAT ( const location_type l)
inlinestatic

Definition at line 1405 of file parse.hh.

References vcsn::rat::parser::token::CONCAT.

◆ make_DASH()

parser::symbol_type vcsn::rat::parser::make_DASH ( const location_type l)
inlinestatic

Definition at line 1297 of file parse.hh.

References vcsn::rat::parser::token::DASH.

◆ make_DOT()

parser::symbol_type vcsn::rat::parser::make_DOT ( const location_type l)
inlinestatic

Definition at line 1303 of file parse.hh.

References vcsn::rat::parser::token::DOT.

◆ make_END()

parser::symbol_type vcsn::rat::parser::make_END ( const location_type l)
inlinestatic

Definition at line 1237 of file parse.hh.

References vcsn::rat::parser::token::END.

◆ make_LBRACKET()

parser::symbol_type vcsn::rat::parser::make_LBRACKET ( const location_type l)
inlinestatic

Definition at line 1309 of file parse.hh.

References vcsn::rat::parser::token::LBRACKET.

◆ make_LETTER()

parser::symbol_type vcsn::rat::parser::make_LETTER ( const std::string &  v,
const location_type l 
)
inlinestatic

Definition at line 1387 of file parse.hh.

References vcsn::rat::parser::token::LETTER.

◆ make_LPAREN()

parser::symbol_type vcsn::rat::parser::make_LPAREN ( const symbol v,
const location_type l 
)
inlinestatic

Definition at line 1399 of file parse.hh.

References vcsn::rat::parser::token::LPAREN.

◆ make_LT_PLUS()

parser::symbol_type vcsn::rat::parser::make_LT_PLUS ( const location_type l)
inlinestatic

Definition at line 1315 of file parse.hh.

References vcsn::rat::parser::token::LT_PLUS.

◆ make_LWEIGHT()

parser::symbol_type vcsn::rat::parser::make_LWEIGHT ( const location_type l)
inlinestatic

Definition at line 1417 of file parse.hh.

References vcsn::rat::parser::token::LWEIGHT.

◆ make_ONE()

parser::symbol_type vcsn::rat::parser::make_ONE ( const location_type l)
inlinestatic

Definition at line 1321 of file parse.hh.

References vcsn::rat::parser::token::ONE.

◆ make_PERCENT()

parser::symbol_type vcsn::rat::parser::make_PERCENT ( const location_type l)
inlinestatic

Definition at line 1327 of file parse.hh.

References vcsn::rat::parser::token::PERCENT.

◆ make_PIPE()

parser::symbol_type vcsn::rat::parser::make_PIPE ( const location_type l)
inlinestatic

Definition at line 1333 of file parse.hh.

References vcsn::rat::parser::token::PIPE.

◆ make_PLUS()

parser::symbol_type vcsn::rat::parser::make_PLUS ( const location_type l)
inlinestatic

Definition at line 1339 of file parse.hh.

References vcsn::rat::parser::token::PLUS.

◆ make_RBRACKET()

parser::symbol_type vcsn::rat::parser::make_RBRACKET ( const location_type l)
inlinestatic

Definition at line 1345 of file parse.hh.

References vcsn::rat::parser::token::RBRACKET.

◆ make_RPAREN()

parser::symbol_type vcsn::rat::parser::make_RPAREN ( const location_type l)
inlinestatic

Definition at line 1351 of file parse.hh.

References vcsn::rat::parser::token::RPAREN.

◆ make_RWEIGHT()

parser::symbol_type vcsn::rat::parser::make_RWEIGHT ( const location_type l)
inlinestatic

Definition at line 1411 of file parse.hh.

References vcsn::rat::parser::token::RWEIGHT.

◆ make_SLASH()

parser::symbol_type vcsn::rat::parser::make_SLASH ( const location_type l)
inlinestatic

Definition at line 1357 of file parse.hh.

References vcsn::rat::parser::token::SLASH.

◆ make_STAR()

parser::symbol_type vcsn::rat::parser::make_STAR ( const irange_type v,
const location_type l 
)
inlinestatic

Definition at line 1381 of file parse.hh.

References vcsn::rat::parser::token::STAR.

◆ make_TRANSPOSE()

parser::symbol_type vcsn::rat::parser::make_TRANSPOSE ( const location_type l)
inlinestatic

Definition at line 1369 of file parse.hh.

References vcsn::rat::parser::token::TRANSPOSE.

◆ make_TRANSPOSITION()

parser::symbol_type vcsn::rat::parser::make_TRANSPOSITION ( const location_type l)
inlinestatic

Definition at line 1363 of file parse.hh.

References vcsn::rat::parser::token::TRANSPOSITION.

◆ make_WEIGHT()

parser::symbol_type vcsn::rat::parser::make_WEIGHT ( const std::string &  v,
const location_type l 
)
inlinestatic

Definition at line 1393 of file parse.hh.

References vcsn::rat::parser::token::WEIGHT.

◆ make_ZERO()

parser::symbol_type vcsn::rat::parser::make_ZERO ( const location_type l)
inlinestatic

Definition at line 1375 of file parse.hh.

References vcsn::rat::parser::token::ZERO.

◆ operator=()

parser& vcsn::rat::parser::operator= ( const parser )
private

◆ parse()

int vcsn::rat::parser::parse ( )
virtual

Parse.

Returns
0 iff parsing succeeded.

Length of the RHS of the rule being reduced.

The lookahead symbol.

The locations where the error started and ended.

The return value of parse ().

Definition at line 598 of file parse.cc.

References vcsn::rat::add, vcsn::dyn::value_impl< Tag >::as(), vcsn::detail::dot::variant< S >::as(), vcsn::detail::back(), vcsn::detail::dot::variant< S >::build(), vcsn::rat::stack< T, S >::clear(), vcsn::rat::parser::basic_symbol< Base >::clear(), vcsn::rat::complement, vcsn::rat::compose, vcsn::dyn::concatenate(), vcsn::rat::conjunction, vcsn::dyn::detail::context_of(), vcsn::rat::copy(), vcsn::rat::ctx(), vcsn::rat::driver::ctx_, vcsn::rat::driver::debug_level(), driver_, vcsn::rat::parser::basic_symbol< Base >::empty(), error(), vcsn::rat::braced_expression::exp, vcsn::dyn::expression_one(), vcsn::dyn::expression_zero(), vcsn::rat::ids(), vcsn::rat::driver::ids_, vcsn::rat::infiltrate, vcsn::rat::ldivide, vcsn::rat::location::location(), vcsn::rat::parser::basic_symbol< Base >::location, vcsn::rat::driver::location_, vcsn::rat::braced_expression::lparen, vcsn::rat::lweight, vcsn::rat::driver::make_atom(), vcsn::rat::driver::make_expression(), vcsn::rat::driver::make_weight(), vcsn::rat::parser::basic_symbol< Base >::move(), vcsn::dyn::multiply(), vcsn::rat::name, vcsn::rat::prefer(), vcsn::dyn::rdivide(), vcsn::rat::driver::result_, vcsn::rat::braced_expression::rparen, vcsn::rat::rweight, vcsn::rat::driver::scanner_, vcsn::rat::shuffle, vcsn::rat::stack< T, S >::size(), vcsn::rat::parser::by_state::state, vcsn::rat::driver::tape_ctx_, vcsn::rat::driver::tape_inc(), vcsn::rat::driver::tape_pop(), vcsn::rat::driver::tape_push(), vcsn::rat::to_string(), vcsn::dyn::transpose(), vcsn::rat::transposition, TRY, vcsn::dyn::tuple(), vcsn::rat::parser::basic_symbol< by_state >::value, vcsn::rat::parser::basic_symbol< Base >::value, yy_destroy_(), yy_lr_goto_state_(), YY_NULLPTR, yy_pact_value_is_default_(), YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, yy_table_value_is_error_(), YYABORT, YYACCEPT, YYCDEBUG, yycheck_, yydefact_, yyeof_, YYERROR, yyfinal_, yylast_, vcsn::rat::yylex(), YYLLOC_DEFAULT, yypact_, yypop_(), yypush_(), yyr1_, yyr2_, yystack_, yysyntax_error_(), yytable_, and yyterror_.

Here is the call graph for this function:

◆ set_debug_level()

void vcsn::rat::parser::set_debug_level ( debug_level_type  l)

Set the current debugging level.

Definition at line 569 of file parse.cc.

References yydebug_.

◆ set_debug_stream()

void vcsn::rat::parser::set_debug_stream ( std::ostream &  o)

Set the current debugging stream.

Definition at line 556 of file parse.cc.

References yycdebug_.

◆ yy_destroy_()

template<typename Base >
void vcsn::rat::parser::yy_destroy_ ( const char yymsg,
basic_symbol< Base > &  yysym 
) const
inlineprivate

Reclaim the memory associated to a symbol.

Parameters
yymsgWhy this token is reclaimed. If null, print nothing.
yysymThe symbol.

Definition at line 394 of file parse.cc.

References YY_SYMBOL_PRINT.

Referenced by parse().

◆ yy_lr_goto_state_()

parser::state_type vcsn::rat::parser::yy_lr_goto_state_ ( state_type  yystate,
int  yysym 
)
inlineprivate

Compute post-reduction state.

Parameters
yystatethe current state
yysymthe nonterminal to push on the stack

Definition at line 576 of file parse.cc.

References yycheck_, yydefgoto_, yylast_, yyntokens_, yypgoto_, and yytable_.

Referenced by parse().

◆ yy_pact_value_is_default_()

bool vcsn::rat::parser::yy_pact_value_is_default_ ( int  yyvalue)
inlinestaticprivate

Whether the given yypact_ value indicates a defaulted state.

Parameters
yyvaluethe value to check

Definition at line 586 of file parse.cc.

References yypact_ninf_.

Referenced by parse(), and yysyntax_error_().

◆ yy_print_()

template<typename Base >
void vcsn::rat::parser::yy_print_ ( std::ostream &  yyo,
const basic_symbol< Base > &  yysym 
) const
private

Display a symbol type, value and location.

Parameters
yyoThe output stream.
yysymThe symbol.

Definition at line 403 of file parse.cc.

References vcsn::rat::parser::basic_symbol< Base >::empty(), vcsn::rat::parser::basic_symbol< Base >::location, vcsn::dyn::print(), vcsn::rat::parser::basic_symbol< Base >::value, yyntokens_, yytname_, and YYUSE.

Here is the call graph for this function:

◆ yy_reduce_print_()

void vcsn::rat::parser::yy_reduce_print_ ( int  r)
privatevirtual

Report on the debug stream that the rule r is going to be reduced.

Definition at line 1486 of file parse.cc.

References YY_SYMBOL_PRINT, yycdebug_, yyr2_, yyrline_, and yystack_.

◆ yy_table_value_is_error_()

bool vcsn::rat::parser::yy_table_value_is_error_ ( int  yyvalue)
inlinestaticprivate

Whether the given yytable_ value indicates a syntax error.

Parameters
yyvaluethe value to check

Definition at line 592 of file parse.cc.

References yytable_ninf_.

Referenced by parse(), and yysyntax_error_().

◆ yypop_()

void vcsn::rat::parser::yypop_ ( unsigned int  n = 1)
inlineprivate

Pop n symbols the three stacks.

Definition at line 543 of file parse.cc.

References vcsn::rat::stack< T, S >::pop(), and yystack_.

Referenced by parse().

Here is the call graph for this function:

◆ yypush_() [1/2]

void vcsn::rat::parser::yypush_ ( const char m,
stack_symbol_type s 
)
inlineprivate

Push a new state on the stack.

Parameters
ma debug message to display if null, no trace is output.
sthe symbol
Warning
the contents of s.value is stolen.

Definition at line 534 of file parse.cc.

References vcsn::rat::stack< T, S >::push(), YY_SYMBOL_PRINT, and yystack_.

Referenced by parse(), and yypush_().

Here is the call graph for this function:

◆ yypush_() [2/2]

void vcsn::rat::parser::yypush_ ( const char m,
state_type  s,
symbol_type sym 
)
inlineprivate

Push a new look ahead token on the state on the stack.

Parameters
ma debug message to display if null, no trace is output.
sthe state
symthe symbol (for its value and location).
Warning
the contents of s.value is stolen.

Definition at line 526 of file parse.cc.

References yypush_().

Here is the call graph for this function:

◆ yystack_print_()

void vcsn::rat::parser::yystack_print_ ( )
privatevirtual

Print the state stack on the debug stream.

Definition at line 1473 of file parse.cc.

References vcsn::rat::stack< T, S >::begin(), vcsn::rat::stack< T, S >::end(), yycdebug_, and yystack_.

Here is the call graph for this function:

◆ yysyntax_error_()

std::string vcsn::rat::parser::yysyntax_error_ ( state_type  yystate,
const symbol_type yyla 
) const
privatevirtual

Generate an error message.

Parameters
yystatethe state where the error occurred.
yylathe lookahead token.

Definition at line 1219 of file parse.cc.

References vcsn::rat::parser::basic_symbol< Base >::empty(), YY_, YY_NULLPTR, yy_pact_value_is_default_(), yy_table_value_is_error_(), YYCASE_, yycheck_, yydefact_, yydefgoto_, yylast_, yyntokens_, yypact_, yypact_ninf_, yypgoto_, yyr1_, yyr2_, yyrline_, yystos_, yytable_, yytable_ninf_, yyterror_, yytname_, and yytnamerr_().

Referenced by parse().

Here is the call graph for this function:

◆ yytnamerr_()

std::string vcsn::rat::parser::yytnamerr_ ( const char n)
staticprivate

Convert the symbol name n to a form suitable for a diagnostic.

Definition at line 199 of file parse.cc.

Referenced by yysyntax_error_().

◆ yytranslate_()

parser::token_number_type vcsn::rat::parser::yytranslate_ ( token_type  t)
inlinestaticprivate

Convert a scanner token number t to a symbol number.

Definition at line 846 of file parse.hh.

Member Data Documentation

◆ driver_

driver& vcsn::rat::parser::driver_
private

Definition at line 840 of file parse.hh.

Referenced by error(), and parse().

◆ yycdebug_

std::ostream* vcsn::rat::parser::yycdebug_
private

Definition at line 739 of file parse.hh.

Referenced by debug_stream(), set_debug_stream(), yy_reduce_print_(), and yystack_print_().

◆ yycheck_

const signed char vcsn::rat::parser::yycheck_
staticprivate
Initial value:
=
{
4, 14, 0, 16, 20, 5, 20, 8, 12, 5,
10, 27, 25, 27, 27, 17, 29, 21, 20, 19,
20, 21, 24, 19, 18, 21, 30, 31, 32, 33,
5, 35, 36, 37, 38, 6, 28, 8, 12, 43,
42, 27, 44, 25, -1, 49, -1, 18, 50, 51,
52, 53, 54, 55, 56, 57, 3, 4, 60, 6,
7, -1, 9, -1, 11, -1, 13, 14, 15, 16,
17, -1, -1, -1, -1, 22, 23, 24, 25, 26,
27, 28, 29, 3, 4, -1, 6, 7, -1, 9,
-1, 11, -1, 13, 14, -1, 16, 17, -1, -1,
-1, -1, 22, 23, 24, 25, 26, 27, 28, 29,
3, 4, 11, 6, 7, -1, 9, -1, 11, -1,
13, 14, -1, 16, 23, 24, -1, 26, -1, 22,
23, 24, 25, 26, 27, 28, 29, 6, 7, -1,
-1, -1, 11, -1, 13, 14, -1, 16, -1, -1,
-1, -1, -1, 22, 23, 24, 25, 26, 27, 28,
29, 6, 7, -1, -1, -1, 11, 7, 13, 14,
-1, 16, -1, -1, 14, -1, 16, -1, 23, 24,
25, 26, 27, 28, 29, 25, -1, 27, 28, 29,
11, -1, 13, 14, -1, 16, -1, -1, -1, -1,
-1, -1, 23, 24, 25, 26, 27, 28, 29, 11,
-1, -1, 14, -1, 16, -1, -1, -1, -1, -1,
-1, 23, 24, 25, 26, 27, 28, 29
}

Definition at line 710 of file parse.hh.

Referenced by parse(), yy_lr_goto_state_(), and yysyntax_error_().

◆ yydebug_

int vcsn::rat::parser::yydebug_
private

Definition at line 738 of file parse.hh.

Referenced by debug_level(), and set_debug_level().

◆ yydefact_

const unsigned char vcsn::rat::parser::yydefact_
staticprivate
Initial value:
=
{
10, 0, 3, 7, 0, 1, 10, 4, 10, 6,
5, 2, 0, 39, 32, 31, 33, 37, 10, 11,
12, 0, 9, 8, 28, 39, 0, 38, 0, 13,
0, 0, 0, 0, 27, 0, 0, 0, 0, 29,
30, 26, 25, 24, 23, 0, 34, 40, 36, 0,
16, 18, 20, 17, 15, 19, 22, 21, 35, 0,
14, 41
}

Definition at line 697 of file parse.hh.

Referenced by parse(), and yysyntax_error_().

◆ yydefgoto_

const signed char vcsn::rat::parser::yydefgoto_
staticprivate
Initial value:
=
{
-1, 1, 11, 2, 3, 4, 19, 49, 42, 21,
26
}

Definition at line 703 of file parse.hh.

Referenced by yy_lr_goto_state_(), and yysyntax_error_().

◆ yypact_

const short int vcsn::rat::parser::yypact_
staticprivate
Initial value:
=
{
-17, 2, 0, -17, 160, -17, -17, -17, -17, -17,
-17, -17, 160, -1, -17, -17, -17, 8, -17, 6,
53, 160, -17, 25, 179, -17, -16, -17, 4, -17,
160, 160, 160, 160, -17, 160, 160, 160, 160, -17,
-17, -17, 198, -13, 101, -14, -17, 26, -17, 160,
131, 131, 155, 131, 198, 80, 107, 155, -17, 14,
53, -17
}

Definition at line 692 of file parse.hh.

Referenced by parse(), and yysyntax_error_().

◆ yypact_ninf_

const signed char vcsn::rat::parser::yypact_ninf_ = -17
staticprivate

Definition at line 683 of file parse.hh.

Referenced by yy_pact_value_is_default_(), and yysyntax_error_().

◆ yypgoto_

const signed char vcsn::rat::parser::yypgoto_
staticprivate
Initial value:
=
{
-17, -17, -17, 29, -17, -17, -17, -17, -4, -2,
18
}

Definition at line 700 of file parse.hh.

Referenced by yy_lr_goto_state_(), and yysyntax_error_().

◆ yyr1_

const unsigned char vcsn::rat::parser::yyr1_
staticprivate
Initial value:
=
{
0, 33, 34, 35, 35, 35, 35, 36, 36, 36,
38, 37, 39, 40, 39, 41, 41, 41, 41, 41,
41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
41, 41, 41, 41, 41, 41, 41, 42, 42, 43,
43, 43
}

Definition at line 717 of file parse.hh.

Referenced by parse(), and yysyntax_error_().

◆ yyr2_

const unsigned char vcsn::rat::parser::yyr2_
staticprivate
Initial value:
=
{
0, 2, 2, 0, 1, 1, 1, 1, 3, 3,
0, 2, 1, 0, 4, 3, 3, 3, 3, 3,
3, 3, 3, 2, 2, 2, 2, 2, 2, 2,
2, 1, 1, 1, 3, 4, 3, 1, 2, 0,
2, 4
}

Definition at line 720 of file parse.hh.

Referenced by parse(), yy_reduce_print_(), and yysyntax_error_().

◆ yyrline_

const unsigned short int vcsn::rat::parser::yyrline_
staticprivate
Initial value:
=
{
0, 207, 207, 224, 225, 226, 227, 231, 232, 233,
239, 239, 256, 260, 260, 268, 269, 270, 271, 272,
273, 274, 275, 277, 278, 279, 291, 295, 296, 297,
298, 299, 300, 301, 302, 303, 304, 314, 315, 319,
320, 321
}

Definition at line 731 of file parse.hh.

Referenced by yy_reduce_print_(), and yysyntax_error_().

◆ yystack_

stack_type vcsn::rat::parser::yystack_
private

The stack.

Definition at line 806 of file parse.hh.

Referenced by parse(), yy_reduce_print_(), yypop_(), yypush_(), and yystack_print_().

◆ yystos_

const unsigned char vcsn::rat::parser::yystos_
staticprivate
Initial value:
=
{
0, 34, 36, 37, 38, 0, 5, 10, 19, 20,
21, 35, 7, 14, 16, 25, 27, 28, 29, 39,
41, 42, 36, 36, 41, 8, 43, 42, 36, 18,
3, 4, 6, 9, 11, 13, 15, 17, 22, 23,
24, 26, 41, 42, 41, 43, 20, 27, 21, 40,
41, 41, 41, 41, 41, 41, 41, 41, 20, 12,
41, 27
}

Definition at line 714 of file parse.hh.

Referenced by vcsn::rat::parser::by_state::type_get(), and yysyntax_error_().

◆ yytable_

const unsigned char vcsn::rat::parser::yytable_
staticprivate
Initial value:
=
{
20, 13, 5, 14, 46, 6, 58, 25, 24, 6,
7, 47, 15, 47, 16, 27, 18, 44, 43, 8,
9, 10, 43, 8, 29, 48, 50, 51, 52, 53,
6, 54, 55, 56, 57, 22, 17, 23, 59, 44,
43, 61, 43, 45, 0, 60, 0, 28, 43, 43,
43, 43, 43, 43, 43, 43, 30, 31, 43, 32,
12, 0, 33, 0, 34, 0, 35, 13, 36, 14,
37, 0, 0, 0, 0, 38, 39, 40, 15, 41,
16, 17, 18, 30, 31, 0, 32, 12, 0, 33,
0, 34, 0, 35, 13, 0, 14, 37, 0, 0,
0, 0, 38, 39, 40, 15, 41, 16, 17, 18,
30, 31, 34, 32, 12, 0, 33, 0, 34, 0,
35, 13, 0, 14, 39, 40, 0, 41, 0, 38,
39, 40, 15, 41, 16, 17, 18, 32, 12, 0,
0, 0, 34, 0, 35, 13, 0, 14, 0, 0,
0, 0, 0, 38, 39, 40, 15, 41, 16, 17,
18, 32, 12, 0, 0, 0, 34, 12, 35, 13,
0, 14, 0, 0, 13, 0, 14, 0, 39, 40,
15, 41, 16, 17, 18, 15, 0, 16, 17, 18,
34, 0, 35, 13, 0, 14, 0, 0, 0, 0,
0, 0, 39, 40, 15, 41, 16, 17, 18, 34,
0, 0, 13, 0, 14, 0, 0, 0, 0, 0,
0, 39, 40, 15, 41, 16, 17, 18
}

Definition at line 708 of file parse.hh.

Referenced by parse(), yy_lr_goto_state_(), and yysyntax_error_().

◆ yytable_ninf_

const signed char vcsn::rat::parser::yytable_ninf_ = -1
staticprivate

Definition at line 684 of file parse.hh.

Referenced by yy_table_value_is_error_(), and yysyntax_error_().

◆ yytname_

const char *const vcsn::rat::parser::yytname_
staticprivate
Initial value:
=
{
"\"end\"", "error", "$undefined", "\"&\"", "\"&:\"", "\"@\"",
"\"{\\\\}\"", "\"!\"", "\"^\"", "\":\"", "\",\"", "\"{c}\"", "\"-\"",
"\".\"", "\"[\"", "\"<+\"", "\"\\\\e\"", "\"%\"", "\"|\"", "\"+\"",
"\"]\"", "\")\"", "\"{/}\"", "\"{T}\"", "\"{t}\"", "\"\\\\z\"", "\"*\"",
"\"letter\"", "\"weight\"", "\"(\"", "CONCAT", "RWEIGHT", "LWEIGHT",
"$accept", "input", "terminator.opt", "add", "tuple", "$@1", "tuple.1",
"$@2", "exp", "weights", "class", 0
}

For a symbol, its name in clear.

Definition at line 728 of file parse.hh.

Referenced by yy_print_(), and yysyntax_error_().


The documentation for this class was generated from the following files: