Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vcsn::rat::driver Class Reference

State and public interface for rational expression parsing. More...

#include <driver.hh>

Collaboration diagram for vcsn::rat::driver:

Public Member Functions

 driver (const dyn::ratexpset &rs)
 
 ~driver ()
 
void ratexpset (const dyn::ratexpset &rs)
 Set the ratexpset to use. More...
 
void context (const std::string &ctx)
 Set the ratexpset to use from its context name. More...
 
dyn::ratexp parse (std::istream &is, const location &l=location{})
 Parse this stream. More...
 
void error (const location &l, const std::string &m)
 Report an error m at l. More...
 
void invalid (const location &l, const std::string &s)
 The string s is invalid at l. More...
 

Public Attributes

std::string errors
 The error messages. More...
 
std::unique_ptr< yyFlexLexerscanner_
 The scanner. More...
 

Private Attributes

location location_
 The inital location. More...
 
dyn::ratexpset ratexpset_
 
vcsn::rat::exp_t result_
 

Friends

class parser
 

Detailed Description

State and public interface for rational expression parsing.

Definition at line 19 of file driver.hh.

Constructor & Destructor Documentation

vcsn::rat::driver::driver ( const dyn::ratexpset rs)

Definition at line 15 of file driver.cc.

References ratexpset().

Here is the call graph for this function:

vcsn::rat::driver::~driver ( )

Definition at line 21 of file driver.cc.

Member Function Documentation

void vcsn::rat::driver::context ( const std::string &  ctx)

Set the ratexpset to use from its context name.

Definition at line 29 of file driver.cc.

References vcsn::dyn::make_context(), vcsn::dyn::make_ratexpset(), ratexpset(), and vcsn::rat::trivial.

Here is the call graph for this function:

void vcsn::rat::driver::error ( const location l,
const std::string &  m 
)

Report an error m at l.

Definition at line 36 of file driver.cc.

References errors.

Referenced by invalid().

void vcsn::rat::driver::invalid ( const location l,
const std::string &  s 
)

The string s is invalid at l.

Definition at line 46 of file driver.cc.

References error().

Here is the call graph for this function:

auto vcsn::rat::driver::parse ( std::istream &  is,
const location l = location{} 
)

Parse this stream.

Definition at line 67 of file driver.cc.

References vcsn::detail::debug_level(), vcsn::rat::debug_level_(), is, vcsn::rat::parser::parse(), and vcsn::rat::parser::set_debug_level().

Referenced by vcsn::rat::read().

Here is the call graph for this function:

void vcsn::rat::driver::ratexpset ( const dyn::ratexpset rs)

Set the ratexpset to use.

Definition at line 24 of file driver.cc.

References ratexpset_.

Referenced by context(), and driver().

Friends And Related Function Documentation

friend class parser
friend

Definition at line 47 of file driver.hh.

Member Data Documentation

std::string vcsn::rat::driver::errors

The error messages.

Definition at line 38 of file driver.hh.

Referenced by error(), and vcsn::rat::read().

location vcsn::rat::driver::location_
private

The inital location.

Definition at line 44 of file driver.hh.

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

dyn::ratexpset vcsn::rat::driver::ratexpset_
private

Definition at line 45 of file driver.hh.

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

vcsn::rat::exp_t vcsn::rat::driver::result_
private

Definition at line 46 of file driver.hh.

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

std::unique_ptr<yyFlexLexer> vcsn::rat::driver::scanner_

The scanner.

Definition at line 40 of file driver.hh.

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


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