buffalo
Loading...
Searching...
No Matches
bf::ProductionRule< G > Class Template Reference

#include <buffalo.h>

Public Member Functions

ProductionRuleoperator+ (Terminal< G > &rhs)
 
ProductionRuleoperator+ (NonTerminal< G > &rhs)
 
ProductionRuleoperator<=> (typename NonTerminal< G >::TransductorType tranductor)
 
bool operator== (ProductionRule< G > const &other) const
 
std::optional< typename G::ValueTypeTransduce (std::vector< typename G::ValueType > &args) const
 
 ProductionRule (Terminal< G > &terminal)
 
 ProductionRule (NonTerminal< G > &nonterminal)
 

Protected Attributes

NonTerminal< G >::TransductorType transductor_ = nullptr
 
std::vector< Symbol< G > > sequence_
 
std::size_t precedence = -1
 
NonTerminal< G > * non_terminal_ = nullptr
 

Friends

class Grammar< G >
 
struct LRItem< G >
 
class Parser< G >
 
class SLRParser< G >
 

Detailed Description

template<IGrammar G>
class bf::ProductionRule< G >

Definition at line 366 of file buffalo.h.

Constructor & Destructor Documentation

◆ ProductionRule() [1/2]

template<IGrammar G>
bf::ProductionRule< G >::ProductionRule ( Terminal< G > &  terminal)
inline

Definition at line 433 of file buffalo.h.

◆ ProductionRule() [2/2]

template<IGrammar G>
bf::ProductionRule< G >::ProductionRule ( NonTerminal< G > &  nonterminal)
inline

Definition at line 434 of file buffalo.h.

Member Function Documentation

◆ operator+() [1/2]

template<IGrammar G>
ProductionRule & bf::ProductionRule< G >::operator+ ( NonTerminal< G > &  rhs)
inline

Definition at line 388 of file buffalo.h.

◆ operator+() [2/2]

template<IGrammar G>
ProductionRule & bf::ProductionRule< G >::operator+ ( Terminal< G > &  rhs)
inline

Definition at line 381 of file buffalo.h.

◆ operator<=>()

template<IGrammar G>
ProductionRule & bf::ProductionRule< G >::operator<=> ( typename NonTerminal< G >::TransductorType  tranductor)
inline

Definition at line 395 of file buffalo.h.

◆ operator==()

template<IGrammar G>
bool bf::ProductionRule< G >::operator== ( ProductionRule< G > const other) const
inline

Definition at line 402 of file buffalo.h.

◆ Transduce()

template<IGrammar G>
std::optional< typename G::ValueType > bf::ProductionRule< G >::Transduce ( std::vector< typename G::ValueType > &  args) const
inline

Definition at line 423 of file buffalo.h.

Friends And Related Symbol Documentation

◆ Grammar< G >

template<IGrammar G>
friend class Grammar< G >
friend

Definition at line 353 of file buffalo.h.

◆ LRItem< G >

template<IGrammar G>
friend struct LRItem< G >
friend

Definition at line 353 of file buffalo.h.

◆ Parser< G >

template<IGrammar G>
friend class Parser< G >
friend

Definition at line 353 of file buffalo.h.

◆ SLRParser< G >

template<IGrammar G>
friend class SLRParser< G >
friend

Definition at line 353 of file buffalo.h.

Member Data Documentation

◆ non_terminal_

template<IGrammar G>
NonTerminal<G>* bf::ProductionRule< G >::non_terminal_ = nullptr
protected

Definition at line 378 of file buffalo.h.

◆ precedence

template<IGrammar G>
std::size_t bf::ProductionRule< G >::precedence = -1
protected

Definition at line 376 of file buffalo.h.

◆ sequence_

template<IGrammar G>
std::vector<Symbol<G> > bf::ProductionRule< G >::sequence_
protected

Definition at line 375 of file buffalo.h.

◆ transductor_

template<IGrammar G>
NonTerminal<G>::TransductorType bf::ProductionRule< G >::transductor_ = nullptr
protected

Definition at line 374 of file buffalo.h.


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