buffalo
Loading...
Searching...
No Matches
bf Namespace Reference

Classes

struct  DebugSymbol
 
class  DefineNonTerminal
 
class  DefineTerminal
 
struct  Dummy
 
struct  Error
 
class  Grammar
 
class  GrammarDefinition
 
struct  GrammarDefinitionError
 
struct  Location
 
struct  LRAction
 
struct  LRItem
 
struct  LRState
 
class  NonTerminal
 
struct  overload
 
class  Parser
 
struct  ParsingError
 
class  ProductionRule
 
struct  ProductionRuleList
 
class  SLRParser
 
class  Terminal
 
struct  Token
 

Concepts

concept  IGrammar
 

Typedefs

template<IGrammar G>
using Symbol = std::variant< Terminal< G > *, NonTerminal< G > * >
 
template<IGrammar G>
using PR = ProductionRule< G >
 
using lrstate_id_t = std::size_t
 

Enumerations

enum  Associativity { None , Left , Right }
 
enum class  LRActionType { kError , kAccept , kShift , kReduce }
 

Functions

template<class... Ts>
 overload (Ts...) -> overload< Ts... >
 
template<IGrammar G>
ProductionRule< Goperator+ (Terminal< G > &lhs, Terminal< G > &rhs)
 
template<IGrammar G>
ProductionRule< Goperator+ (Terminal< G > &lhs, NonTerminal< G > &rhs)
 
template<IGrammar G>
ProductionRule< Goperator+ (NonTerminal< G > &lhs, NonTerminal< G > &rhs)
 
template<IGrammar G>
ProductionRule< Goperator+ (NonTerminal< G > &lhs, Terminal< G > &rhs)
 
template<IGrammar G>
ProductionRuleList< Goperator| (ProductionRule< G > const &lhs, ProductionRule< G > const &rhs)
 

Variables

template<class... >
constexpr bool always_false_v = false
 

Typedef Documentation

◆ lrstate_id_t

Definition at line 703 of file buffalo.h.

◆ PR

template<IGrammar G>
using bf::PR = typedef ProductionRule<G>

Definition at line 438 of file buffalo.h.

◆ Symbol

template<IGrammar G>
using bf::Symbol = typedef std::variant<Terminal<G>*, NonTerminal<G>*>

SYMBOL

Definition at line 360 of file buffalo.h.

Enumeration Type Documentation

◆ Associativity

Used by the parser to resolve shift-reduce conflicts when terminals have the same precedence.

Enumerator
None 
Left 
Right 

Definition at line 193 of file buffalo.h.

◆ LRActionType

LR ACTION TYPE

Enumerator
kError 
kAccept 
kShift 
kReduce 

Definition at line 788 of file buffalo.h.

Function Documentation

◆ operator+() [1/4]

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

Definition at line 651 of file buffalo.h.

◆ operator+() [2/4]

template<IGrammar G>
ProductionRule< G > bf::operator+ ( NonTerminal< G > &  lhs,
Terminal< G > &  rhs 
)

Definition at line 657 of file buffalo.h.

◆ operator+() [3/4]

template<IGrammar G>
ProductionRule< G > bf::operator+ ( Terminal< G > &  lhs,
NonTerminal< G > &  rhs 
)

Definition at line 645 of file buffalo.h.

◆ operator+() [4/4]

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

Definition at line 639 of file buffalo.h.

◆ operator|()

template<IGrammar G>
ProductionRuleList< G > bf::operator| ( ProductionRule< G > const lhs,
ProductionRule< G > const rhs 
)

Definition at line 663 of file buffalo.h.

◆ overload()

template<class... Ts>
bf::overload ( Ts...  ) -> overload< Ts... >

Variable Documentation

◆ always_false_v

template<class... >
constexpr bool bf::always_false_v = false
constexpr

Definition at line 27 of file buffalo.h.