buffalo
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages Concepts
bf Namespace Reference

Classes

class  DefineNonTerminal
 
class  DefineTerminal
 
struct  Dummy
 
class  Error
 
class  Grammar
 
class  GrammarDefinition
 
class  GrammarDefinitionError
 
struct  Location
 
struct  LRAction
 
struct  LRItem
 
struct  LRState
 
class  NonTerminal
 
struct  overload
 
class  Parser
 
class  ParsingError
 
class  ProductionRule
 
struct  ProductionRuleList
 
struct  ProductionRuleModifiers
 
class  SLRParser
 
class  Terminal
 
struct  Token
 
struct  ValueToken
 
class  ValueTokenAccessor
 
class  ValueTokenReference
 
class  ValueTokenStore
 

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... >
 
std::string utf32_to_string (char32_t const *utf32, std::size_t size)
 
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 963 of file buffalo.h.

◆ PR

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

Helper for defining single-element production rules.

Definition at line 680 of file buffalo.h.

◆ Symbol

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

SYMBOL

Definition at line 560 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 395 of file buffalo.h.

◆ LRActionType

LR ACTION TYPE

Enumerator
kError 
kAccept 
kShift 
kReduce 

Definition at line 1056 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 910 of file buffalo.h.

◆ operator+() [2/4]

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

Definition at line 916 of file buffalo.h.

◆ operator+() [3/4]

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

Definition at line 904 of file buffalo.h.

◆ operator+() [4/4]

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

Definition at line 898 of file buffalo.h.

◆ operator|()

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

Definition at line 922 of file buffalo.h.

◆ overload()

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

◆ utf32_to_string()

std::string bf::utf32_to_string ( char32_t const utf32,
std::size_t  size 
)
inline

Helper for turning ctll string literals into std::string.

Parameters
utf32
size
Returns

Definition at line 56 of file buffalo.h.

Variable Documentation

◆ always_false_v

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

Definition at line 28 of file buffalo.h.