Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
parse.cc File Reference
#include <cassert>
#include "parse.hh"
#include <vcsn/dyn/ratexpset.hh>
#include <lib/vcsn/rat/driver.hh>
#include <lib/vcsn/rat/scan.hh>
Include dependency graph for parse.cc:

Go to the source code of this file.

Namespaces

 vcsn
 
 vcsn::rat
 

Macros

#define MAKE(Kind,...)   driver_.ratexpset_->Kind(__VA_ARGS__)
 Call the factory to make a Kind. More...
 
#define TRY(Loc, Stm)
 Run Stm, and bounces exceptions into parse errors at Loc. More...
 
#define YY_NULLPTR   0
 
#define YY_(msgid)   msgid
 
#define YYRHSLOC(Rhs, K)   ((Rhs)[K].location)
 
#define YYLLOC_DEFAULT(Current, Rhs, N)
 
#define YYUSE(E)   ((void) (E))
 
#define YYCDEBUG   if (yydebug_) (*yycdebug_)
 
#define YY_SYMBOL_PRINT(Title, Symbol)
 
#define YY_REDUCE_PRINT(Rule)
 
#define YY_STACK_PRINT()
 
#define yyerrok   (yyerrstatus_ = 0)
 
#define yyclearin   (yyempty = true)
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYRECOVERING()   (!!yyerrstatus_)
 
#define YYCASE_(N, S)
 

Functions

static exp_t vcsn::rat::power (const dyn::ratexpset &rs, exp_t e, std::tuple< int, int > range)
 Generate a ratexp for "e{range.first, range.second}". More...
 
static exp_t vcsn::rat::prefer (const dyn::ratexpset &rs, exp_t e, exp_t f)
 Generate a ratexp for "e <+ f = e % f + f". More...
 
static parser::symbol_type vcsn::rat::yylex (driver &driver_)
 Use our local scanner object. More...
 
static exp_t vcsn::rat::power (const dyn::ratexpset &es, exp_t e, int min, int max)
 

Macro Definition Documentation

#define MAKE (   Kind,
  ... 
)    driver_.ratexpset_->Kind(__VA_ARGS__)

Call the factory to make a Kind.

Definition at line 38 of file parse.cc.

Referenced by vcsn::rat::parser::parse().

#define TRY (   Loc,
  Stm 
)
Value:
try \
{ \
Stm; \
} \
catch (std::exception& e) \
{ \
error(Loc, e.what()); \
}
#define YYERROR
Definition: parse.cc:184

Run Stm, and bounces exceptions into parse errors at Loc.

Definition at line 42 of file parse.cc.

Referenced by vcsn::rat::parser::parse().

#define YY_ (   msgid)    msgid

Definition at line 114 of file parse.cc.

Referenced by vcsn::rat::parser::yysyntax_error_().

#define YY_NULLPTR   0

Definition at line 64 of file parse.cc.

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

#define YY_REDUCE_PRINT (   Rule)
Value:
do { \
if (yydebug_) \
yy_reduce_print_ (Rule); \
} while (false)

Definition at line 158 of file parse.cc.

Referenced by vcsn::rat::parser::parse().

#define YY_STACK_PRINT ( )
Value:
do { \
if (yydebug_) \
yystack_print_ (); \
} while (false)

Definition at line 164 of file parse.cc.

Referenced by vcsn::rat::parser::parse().

#define YY_SYMBOL_PRINT (   Title,
  Symbol 
)
Value:
do { \
if (yydebug_) \
{ \
*yycdebug_ << Title << ' '; \
yy_print_ (*yycdebug_, Symbol); \
*yycdebug_ << std::endl; \
} \
} while (false)

Definition at line 148 of file parse.cc.

Referenced by vcsn::rat::parser::parse(), vcsn::rat::parser::yy_destroy_(), vcsn::rat::parser::yy_reduce_print_(), and vcsn::rat::parser::yypush_().

#define YYABORT   goto yyabortlab

Definition at line 183 of file parse.cc.

Referenced by vcsn::rat::parser::parse().

#define YYACCEPT   goto yyacceptlab

Definition at line 182 of file parse.cc.

Referenced by vcsn::rat::parser::parse().

#define YYCASE_ (   N,
 
)
Value:
case N: \
yyformat = S; \
break

Referenced by vcsn::rat::parser::yysyntax_error_().

#define YYCDEBUG   if (yydebug_) (*yycdebug_)

Definition at line 146 of file parse.cc.

Referenced by vcsn::rat::parser::parse().

#define yyclearin   (yyempty = true)

Definition at line 180 of file parse.cc.

#define yyerrok   (yyerrstatus_ = 0)

Definition at line 179 of file parse.cc.

#define YYERROR   goto yyerrorlab

Definition at line 184 of file parse.cc.

Referenced by vcsn::rat::parser::parse().

#define YYLLOC_DEFAULT (   Current,
  Rhs,
 
)
Value:
do \
if (N) \
{ \
(Current).begin = YYRHSLOC (Rhs, 1).begin; \
(Current).end = YYRHSLOC (Rhs, N).end; \
} \
else \
{ \
(Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
} \
while (/*CONSTCOND*/ false)
#define YYRHSLOC(Rhs, K)
Definition: parse.cc:118

Definition at line 124 of file parse.cc.

Referenced by vcsn::rat::parser::parse().

#define YYRECOVERING ( )    (!!yyerrstatus_)

Definition at line 185 of file parse.cc.

#define YYRHSLOC (   Rhs,
 
)    ((Rhs)[K].location)

Definition at line 118 of file parse.cc.

#define YYUSE (   E)    ((void) (E))

Definition at line 140 of file parse.cc.

Referenced by vcsn::rat::parser::yy_print_().