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

#include <buffalo.h>

Inheritance diagram for bf::Terminal< G >:
bf::DebugSymbol bf::DefineTerminal< G, regex, SemanticType >

Public Types

using ReasonerType = typename G::ValueType(*)(Token< G > const &)
 

Public Member Functions

std::optional< typename G::ValueTypeReason (Token< G > const &token) const
 
virtual std::optional< Token< G > > Lex (std::string_view input) const
 
 Terminal (Terminal< G > &&)=delete
 
 Terminal (Terminal< G > const &)=delete
 

Public Attributes

std::size_t precedence = Terminal::counter++
 
Associativity associativity = Associativity::None
 
G::UserDataType user_data
 
- Public Attributes inherited from bf::DebugSymbol
char constdebug_name = "Generic Symbol"
 

Protected Member Functions

 Terminal ()=default
 

Protected Attributes

ReasonerType reasoner_ = nullptr
 

Static Protected Attributes

static std::size_t counter = 0
 

Friends

class Grammar< G >
 

Detailed Description

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

TERMINAL

Definition at line 204 of file buffalo.h.

Member Typedef Documentation

◆ ReasonerType

template<IGrammar G>
using bf::Terminal< G >::ReasonerType = typename G::ValueType(*)(Token<G> const&)

Definition at line 209 of file buffalo.h.

Constructor & Destructor Documentation

◆ Terminal() [1/3]

template<IGrammar G>
bf::Terminal< G >::Terminal ( )
protecteddefault

◆ Terminal() [2/3]

template<IGrammar G>
bf::Terminal< G >::Terminal ( Terminal< G > &&  )
delete

◆ Terminal() [3/3]

template<IGrammar G>
bf::Terminal< G >::Terminal ( Terminal< G > const )
delete

Member Function Documentation

◆ Lex()

template<IGrammar G>
virtual std::optional< Token< G > > bf::Terminal< G >::Lex ( std::string_view  input) const
inlinevirtual

Reimplemented in bf::DefineTerminal< G, regex, SemanticType >.

Definition at line 233 of file buffalo.h.

◆ Reason()

template<IGrammar G>
std::optional< typename G::ValueType > bf::Terminal< G >::Reason ( Token< G > const token) const
inline

Definition at line 223 of file buffalo.h.

Friends And Related Symbol Documentation

◆ Grammar< G >

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

Definition at line 187 of file buffalo.h.

Member Data Documentation

◆ associativity

template<IGrammar G>
Associativity bf::Terminal< G >::associativity = Associativity::None

Definition at line 220 of file buffalo.h.

◆ counter

template<IGrammar G>
std::size_t bf::Terminal< G >::counter = 0
inlinestaticprotected

Definition at line 212 of file buffalo.h.

◆ precedence

template<IGrammar G>
std::size_t bf::Terminal< G >::precedence = Terminal::counter++

Definition at line 219 of file buffalo.h.

◆ reasoner_

template<IGrammar G>
ReasonerType bf::Terminal< G >::reasoner_ = nullptr
protected

Definition at line 214 of file buffalo.h.

◆ user_data

template<IGrammar G>
G::UserDataType bf::Terminal< G >::user_data

Definition at line 221 of file buffalo.h.


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