faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > Class Template Reference
[Pushdown PlugIn]

Generator for parsing with goto tables. More...

#include <pd_gotogenerator.h>

List of all members.

Public Member Functions

 TgotoGenerator (void)
 Constructor.
 TgotoGenerator (const TgotoGenerator &rOtherGen)
 Copy constructor.
 TgotoGenerator (const vGenerator &rOtherGen)
 Copy constructor (no attributes).
virtual TgotoGeneratoroperator= (const TgotoGenerator &rOtherGen)
 Assignment operator (uses copy) Note: you must reimplement this operator in derived classes in order to handle internal pointers correctly.
virtual TgotoGeneratoroperator= (const vGenerator &rOtherGen)
 Assignment operator (uses copy).
 TgotoGenerator (const std::string &rFileName)
 Construct from file.
TgotoGeneratorNew (void) const
 Construct on heap.
TgotoGeneratorCopy (void) const
 Construct copy on heap.
virtual const TypeCast (const Type *pOther) const
 Type test.
TgotoGenerator NewGotoGen (void) const
 Construct on stack.
bool SetTransition (Idx x1, const GrammarSymbolPtr &symbol, Idx x2)
 Add a transition to generator by indices.
GrammarSymbolPtr Symbol (const Transition &rTrans) const
 Getter for the symbol of a transitions.
bool SetTransition (const Transition &rTrans, const GrammarSymbolPtr &symbol)
 Add a transition to generator.
void ConfigSet (Idx index, const std::set< Lr1Configuration > &configs)
 Setter for the configuration set of a state.
std::set< Lr1Configuration >
const & 
ConfigSet (Idx index) const
 Getter for the configuration set of a state.
Idx StateIndex (const std::set< Lr1Configuration > &configs) const
 Get first state with the specified configuration set as attribute.
virtual bool Valid (void)
 Check if generator is valid.

Detailed Description

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
class faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >

Generator for parsing with goto tables.

Definition at line 104 of file pd_gotogenerator.h.


Constructor & Destructor Documentation

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TgotoGenerator ( void   ) 

Constructor.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TgotoGenerator ( const TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > &  rOtherGen  ) 

Copy constructor.

Parameters:
rOtherGen 
template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TgotoGenerator ( const vGenerator rOtherGen  ) 

Copy constructor (no attributes).

Parameters:
rOtherGen 
template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TgotoGenerator ( const std::string &  rFileName  ) 

Construct from file.

Parameters:
rFileName Name of file
Exceptions:
Exception 
  • file format errors (id 1, 50, 51, 52)

Member Function Documentation

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
virtual const Type* faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Cast ( const Type pOther  )  const [inline, virtual]

Type test.

Uses C++ dynamic cast to test whether the specified object casts to a TgotoGenerator.

Returns:
TgotoGenerator reference if dynamic cast succeeds, else NULL

Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 181 of file pd_gotogenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
std::set<Lr1Configuration> const& faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ConfigSet ( Idx  index  )  const

Getter for the configuration set of a state.

Parameters:
index the index of the state
Returns:
the configuration set of the state
template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ConfigSet ( Idx  index,
const std::set< Lr1Configuration > &  configs 
)

Setter for the configuration set of a state.

Parameters:
index the index of the state
configs the configuration set
template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
TgotoGenerator* faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Copy ( void   )  const [virtual]

Construct copy on heap.

Constructs a TgotoGenerator on heap.

Returns:
new Generator

Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
TgotoGenerator* faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::New ( void   )  const [virtual]

Construct on heap.

Constructs a TgotoGenerator on heap.

Returns:
new Generator

Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
TgotoGenerator faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::NewGotoGen ( void   )  const

Construct on stack.

Constructs a TgotoGenerator on stack.

Returns:
new Generator
template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
virtual TgotoGenerator& faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::operator= ( const vGenerator rOtherGen  )  [inline, virtual]

Assignment operator (uses copy).

Parameters:
rOtherGen Other generator

Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 142 of file pd_gotogenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
virtual TgotoGenerator& faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::operator= ( const TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > &  rOtherGen  )  [inline, virtual]

Assignment operator (uses copy) Note: you must reimplement this operator in derived classes in order to handle internal pointers correctly.

Parameters:
rOtherGen Other generator

Definition at line 134 of file pd_gotogenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( const Transition rTrans,
const GrammarSymbolPtr symbol 
)

Add a transition to generator.

Parameters:
rTrans the transition
symbol grammar symbol used for the transitions
Returns:
True, if the transition was new in the generator
Exceptions:
Exception 
  • state or event not in generator (id 95)
template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( Idx  x1,
const GrammarSymbolPtr symbol,
Idx  x2 
)

Add a transition to generator by indices.

States must already exist!

Parameters:
x1 Predecessor state index
symbol grammar symbol used for the transition
x2 Successor state index
Returns:
True, if the transition was new the generator
Exceptions:
Exception 
  • state or event not in generator (id 95)
template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StateIndex ( const std::set< Lr1Configuration > &  configs  )  const

Get first state with the specified configuration set as attribute.

Parameters:
configs the configuration set
Returns:
state index if the state was found, else 0
template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
GrammarSymbolPtr faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Symbol ( const Transition rTrans  )  const

Getter for the symbol of a transitions.

Parameters:
rTrans the transition
Returns:
the symbol
template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
virtual bool faudes::TgotoGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Valid ( void   )  [virtual]

Check if generator is valid.

Returns:
Success

Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.


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

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