bux API Reference 1.9.0
Static library of whatever are seen required in general purpose but not directly supported from Modern C++. Or whatever reusable originated from my side projects.
Loading...
Searching...
No Matches
bux::LR1::C_Parser Class Reference

#include <LR1.h>

Inheritance diagram for bux::LR1::C_Parser:

Public Member Functions

 C_Parser (const I_ParserPolicy &policy)
 
bool accepted () const
 
auto & getFinalLex ()
 
void onError (const C_SourcePos &pos, std::string_view message)
 
void reservePostShift (std::function< void()> calledOnce, unsigned shifts)
 
void add (T_LexID token, unsigned line, unsigned col, I_LexAttr *unownedAttr) override
 
std::string_view setSource (std::string_view src) override
 
- Public Member Functions inherited from bux::I_Parser
virtual ~I_Parser ()=default
 

Public Attributes

const I_ParserPolicym_Policy
 

Detailed Description

Definition at line 70 of file LR1.h.

Constructor & Destructor Documentation

◆ C_Parser()

bux::LR1::C_Parser::C_Parser ( const I_ParserPolicy & policy)

Definition at line 46 of file LR1.cpp.

Member Function Documentation

◆ accepted()

bool bux::LR1::C_Parser::accepted ( ) const
inline

Definition at line 81 of file LR1.h.

◆ add()

void bux::LR1::C_Parser::add ( T_LexID token,
unsigned line,
unsigned col,
I_LexAttr * unownedAttr )
overridevirtual

Implements bux::I_Parser.

Definition at line 54 of file LR1.cpp.

References add(), bux::C_LexInfoT< T, C_Ptr >::m_attr, bux::C_SourcePos::m_Col, bux::C_SourcePos::m_Line, bux::C_LexInfoT< T, C_Ptr >::m_pos, and bux::C_SourcePos::m_Source.

Referenced by add().

Here is the caller graph for this function:

◆ getFinalLex()

auto & bux::LR1::C_Parser::getFinalLex ( )
inline

Definition at line 82 of file LR1.h.

References bux::C_StackBase< T >::top().

◆ onError()

void bux::LR1::C_Parser::onError ( const C_SourcePos & pos,
std::string_view message )

Definition at line 183 of file LR1.cpp.

References m_Policy, and bux::LR1::I_ParserPolicy::onError().

◆ reservePostShift()

void bux::LR1::C_Parser::reservePostShift ( std::function< void()> calledOnce,
unsigned shifts )

Definition at line 280 of file LR1.cpp.

◆ setSource()

std::string_view bux::LR1::C_Parser::setSource ( std::string_view src)
overridevirtual

Implements bux::I_Parser.

Definition at line 286 of file LR1.cpp.

Member Data Documentation

◆ m_Policy

const I_ParserPolicy& bux::LR1::C_Parser::m_Policy

Definition at line 75 of file LR1.h.

Referenced by onError().


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