faudes::Lr1Parser Class Reference
[Pushdown PlugIn]

Lr1Parser. More...

#include <pd_parser.h>

List of all members.

Public Member Functions

 Lr1Parser ()
 default constructor
Idx StartState () const
 Getter for mStartState.
Idx FinalState () const
 Getter for mFinalState.
std::set< Idx > const & Nonterminals () const
 Getter for mNonterminals.
std::set< Terminal > const & Terminals () const
 Getter for mTerminals.
std::set< Lr1ParserAction > const & Actions () const
 Getter for mActions.
Terminal AugSymbol () const
 Getter for mAugSymbol.
bool SetStartState (Idx start)
 set the parser's start state and add it to the set of nonterminals
bool SetFinalState (Idx final)
 set the parser's final state and add it to the set of nonterminals
bool InsNonterminal (Idx nt)
 Add a new nonterminal to the parser.
void SetAugSymbol (Terminal t)
 TODO description.
bool InsTerminal (const Terminal &t)
 Add a new terminal to the parser.
bool InsAction (const Lr1ParserAction &action)
 Add a new Lr1ParserAction to the parser.
std::string StrNonterminals () const
 To String function for all nonterminals.
std::string StrTerminals () const
 To String function for all terminals.
std::string StrActions (std::string separator) const
 To String function for actions.
std::string Str () const
 To String function.

Public Attributes

Idx mStartState
Idx mFinalState
std::set< IdxmNonterminals
std::set< TerminalmTerminals
std::set< Lr1ParserActionmActions
Terminal mAugSymbol

Detailed Description

Lr1Parser.

Overview

Overview

Contents

Contents

Definition at line 337 of file pd_parser.h.


Constructor & Destructor Documentation

faudes::Lr1Parser::Lr1Parser (  )  [inline]

default constructor

Definition at line 350 of file pd_parser.h.


Member Function Documentation

std::set<Lr1ParserAction> const& faudes::Lr1Parser::Actions (  )  const [inline]

Getter for mActions.

Returns:
mActions

Definition at line 390 of file pd_parser.h.

Terminal faudes::Lr1Parser::AugSymbol (  )  const [inline]

Getter for mAugSymbol.

Returns:
mAugSymbol

Definition at line 398 of file pd_parser.h.

Idx faudes::Lr1Parser::FinalState (  )  const [inline]

Getter for mFinalState.

Returns:
mFinalState

Definition at line 366 of file pd_parser.h.

bool faudes::Lr1Parser::InsAction ( const Lr1ParserAction action  ) 

Add a new Lr1ParserAction to the parser.

Parameters:
action the action to add
Returns:
true if the action did not exist and was successfully added, else false

Definition at line 245 of file pd_parser.cpp.

bool faudes::Lr1Parser::InsNonterminal ( Idx  nt  ) 

Add a new nonterminal to the parser.

Parameters:
nt the nonterminal to add
Returns:
true if the nonterminal did not exist and was successfully added, else false

Definition at line 237 of file pd_parser.cpp.

bool faudes::Lr1Parser::InsTerminal ( const Terminal t  ) 

Add a new terminal to the parser.

Parameters:
t the terminal to add
Returns:
true if the terminal did not exist and was successfully added, else false

Definition at line 241 of file pd_parser.cpp.

std::set<Idx> const& faudes::Lr1Parser::Nonterminals (  )  const [inline]

Getter for mNonterminals.

Returns:
mNonterminals

Definition at line 374 of file pd_parser.h.

void faudes::Lr1Parser::SetAugSymbol ( Terminal  t  ) 

TODO description.

Parameters:
t aug symbol

Definition at line 249 of file pd_parser.cpp.

bool faudes::Lr1Parser::SetFinalState ( Idx  final  ) 

set the parser's final state and add it to the set of nonterminals

Parameters:
final final state to set
Returns:
true, if nonterminal did not exist in parser, else false

Definition at line 232 of file pd_parser.cpp.

bool faudes::Lr1Parser::SetStartState ( Idx  start  ) 

set the parser's start state and add it to the set of nonterminals

Parameters:
start start state to set
Returns:
true, if nonterminal did not exist in parser, else false

Definition at line 227 of file pd_parser.cpp.

Idx faudes::Lr1Parser::StartState (  )  const [inline]

Getter for mStartState.

Returns:
mStartState

Definition at line 358 of file pd_parser.h.

std::string faudes::Lr1Parser::Str ( void   )  const

To String function.

Definition at line 290 of file pd_parser.cpp.

std::string faudes::Lr1Parser::StrActions ( std::string  separator  )  const

To String function for actions.

Definition at line 278 of file pd_parser.cpp.

std::string faudes::Lr1Parser::StrNonterminals (  )  const

To String function for all nonterminals.

Definition at line 254 of file pd_parser.cpp.

std::string faudes::Lr1Parser::StrTerminals (  )  const

To String function for all terminals.

Definition at line 266 of file pd_parser.cpp.

std::set<Terminal> const& faudes::Lr1Parser::Terminals (  )  const [inline]

Getter for mTerminals.

Returns:
mTerminals

Definition at line 382 of file pd_parser.h.


Member Data Documentation

Definition at line 344 of file pd_parser.h.

Definition at line 341 of file pd_parser.h.

Definition at line 342 of file pd_parser.h.

Definition at line 340 of file pd_parser.h.

Definition at line 343 of file pd_parser.h.


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

libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen