buffalo
|
#include <buffalo.h>
Public Member Functions | |
bool | HasNonTerminal (NonTerminal< G > &non_terminal) const |
bool | NonTerminalHasFollow (NonTerminal< G > &non_terminal, Terminal< G > &terminal) const |
bool | NonTerminalHasFirst (NonTerminal< G > &non_terminal, Terminal< G > &terminal) const |
void | GenerateFirstSet () |
void | GenerateFollowSet () |
void | RegisterSymbols (NonTerminal< G > *nonterminal) |
Grammar (NonTerminal< G > &start) | |
Grammar ()=delete | |
Public Attributes | |
NonTerminal< G > & | root |
Protected Attributes | |
std::unique_ptr< Terminal< G > > | EOS |
std::set< NonTerminal< G > * > | nonterminals_ |
std::set< Terminal< G > * > | terminals_ |
std::map< NonTerminal< G > *, std::set< Terminal< G > * > > | first_ |
std::map< NonTerminal< G > *, std::set< Terminal< G > * > > | follow_ |
std::vector< std::pair< NonTerminal< G > *, ProductionRule< G > > > | production_rules_ |
List of all production rules along with their respective NonTerminal. | |
Friends | |
class | Parser< G > |
class | SLRParser< G > |
|
inline |
|
delete |
|
inline |
Simple, but somewhat inefficient algorithm for generating FIRST sets. The FIRST set is the set of all Terminals that a NonTerminal can begin with.
|
inline |
Simple, but somewhat inefficient algorithm for generating FOLLOW sets. The FOLLOW set is the set of all Terminals that can follow a NonTerminal.
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
List of all production rules along with their respective NonTerminal.
NonTerminal<G>& bf::Grammar< G >::root |
|
protected |