buffalo
Loading...
Searching...
No Matches
bf::DefineTerminal< G, regex, SemanticType > Class Template Reference

#include <buffalo.h>

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

Public Member Functions

SemanticType operator() (typename G::ValueType &value)
 
std::optional< Token< G > > Lex (std::string_view input) const override
 
constexpr DefineTerminal (Associativity assoc=bf::None, typename G::UserDataType user_data={}, typename Terminal< G >::ReasonerType reasoner=nullptr)
 
constexpr DefineTerminal (Associativity assoc, typename Terminal< G >::ReasonerType reasoner)
 
constexpr DefineTerminal (typename G::UserDataType user_data)
 
constexpr DefineTerminal (typename G::UserDataType user_data, typename Terminal< G >::ReasonerType reasoner)
 
constexpr DefineTerminal (typename Terminal< G >::ReasonerType reasoner)
 
- Public Member Functions inherited from bf::Terminal< G >
std::optional< typename G::ValueTypeReason (Token< G > const &token) const
 
 Terminal (Terminal< G > &&)=delete
 
 Terminal (Terminal< G > const &)=delete
 

Additional Inherited Members

- Public Types inherited from bf::Terminal< G >
using ReasonerType = typename G::ValueType(*)(Token< G > const &)
 
- Public Attributes inherited from bf::Terminal< G >
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 inherited from bf::Terminal< G >
 Terminal ()=default
 
- Protected Attributes inherited from bf::Terminal< G >
ReasonerType reasoner_ = nullptr
 
- Static Protected Attributes inherited from bf::Terminal< G >
static std::size_t counter = 0
 

Detailed Description

template<IGrammar G, ctll::fixed_string regex, typename SemanticType = void>
class bf::DefineTerminal< G, regex, SemanticType >

DEFINE TERMINAL

Template Parameters
G

Definition at line 247 of file buffalo.h.

Constructor & Destructor Documentation

◆ DefineTerminal() [1/5]

template<IGrammar G, ctll::fixed_string regex, typename SemanticType = void>
constexpr bf::DefineTerminal< G, regex, SemanticType >::DefineTerminal ( Associativity  assoc = bf::None,
typename G::UserDataType  user_data = {},
typename Terminal< G >::ReasonerType  reasoner = nullptr 
)
inlineconstexpr

Definition at line 286 of file buffalo.h.

◆ DefineTerminal() [2/5]

template<IGrammar G, ctll::fixed_string regex, typename SemanticType = void>
constexpr bf::DefineTerminal< G, regex, SemanticType >::DefineTerminal ( Associativity  assoc,
typename Terminal< G >::ReasonerType  reasoner 
)
inlineconstexpr

Definition at line 293 of file buffalo.h.

◆ DefineTerminal() [3/5]

template<IGrammar G, ctll::fixed_string regex, typename SemanticType = void>
constexpr bf::DefineTerminal< G, regex, SemanticType >::DefineTerminal ( typename G::UserDataType  user_data)
inlineconstexpr

Definition at line 295 of file buffalo.h.

◆ DefineTerminal() [4/5]

template<IGrammar G, ctll::fixed_string regex, typename SemanticType = void>
constexpr bf::DefineTerminal< G, regex, SemanticType >::DefineTerminal ( typename G::UserDataType  user_data,
typename Terminal< G >::ReasonerType  reasoner 
)
inlineconstexpr

Definition at line 296 of file buffalo.h.

◆ DefineTerminal() [5/5]

template<IGrammar G, ctll::fixed_string regex, typename SemanticType = void>
constexpr bf::DefineTerminal< G, regex, SemanticType >::DefineTerminal ( typename Terminal< G >::ReasonerType  reasoner)
inlineconstexpr

Definition at line 298 of file buffalo.h.

Member Function Documentation

◆ Lex()

template<IGrammar G, ctll::fixed_string regex, typename SemanticType = void>
std::optional< Token< G > > bf::DefineTerminal< G, regex, SemanticType >::Lex ( std::string_view  input) const
inlineoverridevirtual

Reimplemented from bf::Terminal< G >.

Definition at line 267 of file buffalo.h.

◆ operator()()

template<IGrammar G, ctll::fixed_string regex, typename SemanticType = void>
SemanticType bf::DefineTerminal< G, regex, SemanticType >::operator() ( typename G::ValueType value)
inline

Definition at line 250 of file buffalo.h.


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