top | up | prev | next

Lexer Class

Definition at line 187 of LexerFile.hpp

Constructors

Lexer(const std::u32string& api_, const std::u32string& name_)

Member Functions

void AddAction(Action* action)
void AddStatement(LexerStatement* stmt)
void AddToLexerFile(LexerFile& lexerFile) override
void AddVariable(LexerVariable* variable)
LexerStatement* GetStatement(const std::u32string& tokenId) const
void Parse(LexerContext& lexerContext)

Member Variables

Actions actions
std::u32string api
std::unordered_map<std::u32string, LexerStatement*> lexerStatementMap
std::vector<std::unique_ptr<LexerStatement>> statements
std::vector<std::unique_ptr<LexerVariable>> variables

Constructor Details

Lexer Constructor

sng2html::sng2html::Lexer::Lexer(const std::u32string& api_, const std::u32string& name_)

Definition at line 187 of LexerFile.cpp :
187 : Declaration(name_)api(api_)
188 {
189 }


Declaration at line 190 of LexerFile.hpp


Member Function Details

AddAction Member Function

void sng2html::sng2html::Lexer::AddAction(Action * action)

Definition at line 216 of LexerFile.cpp :
217 {
218     actions.Add(action);
219 }


Declaration at line 194 of LexerFile.hpp

Calls: sng2html::sng2html::Actions::Add

Called by: LexerFileParser::Actions


AddStatement Member Function

void sng2html::sng2html::Lexer::AddStatement(LexerStatement * stmt)

Definition at line 191 of LexerFile.cpp :
192 {
193     stmt->SetIndex(statements.size());
194     statements.push_back(std::unique_ptr<LexerStatement>(stmt));
195     lexerStatementMap[stmt->TokenId()] = stmt;
196 }


Declaration at line 191 of LexerFile.hpp

Calls: sng2html::sng2html::LexerStatement::SetIndex , sng2html::sng2html::LexerStatement::TokenId

Called by: LexerFileParser::LexerClause


AddToLexerFile Member Function

void sng2html::sng2html::Lexer::AddToLexerFile(LexerFile & lexerFile) override

Definition at line 221 of LexerFile.cpp :
222 {
223     lexerFile.SetLexer(this);
224 }


Declaration at line 195 of LexerFile.hpp

Base class overridden functions: sng2html::sng2html::Declaration::AddToLexerFile

Calls: sng2html::sng2html::LexerFile::SetLexer


AddVariable Member Function

void sng2html::sng2html::Lexer::AddVariable(LexerVariable * variable)

Definition at line 211 of LexerFile.cpp :
212 {
213     variables.push_back(std::unique_ptr<LexerVariable>(variable));
214 }


Declaration at line 193 of LexerFile.hpp

Called by: LexerFileParser::Variables


GetStatement Member Function

LexerStatement * sng2html::sng2html::Lexer::GetStatement(const std::u32string& tokenId) const

Definition at line 198 of LexerFile.cpp
Declaration at line 192 of LexerFile.hpp

Called by: sng2html::sng2html::GrammarHtmlGeneratorVisitor::Visit


Parse Member Function

void sng2html::sng2html::Lexer::Parse(LexerContext & lexerContext)

Definition at line 226 of LexerFile.cpp :
227 {
228     for (auto& statement : statements)
229     {
230         statement->Parse(lexerContext);
231     }
232 }


Declaration at line 196 of LexerFile.hpp

Calls: sng2html::sng2html::Lexer::Parse

Called by: sng2html::sng2html::Lexer::Parse , sng2html::sng2html::LexerFile::Parse


top | up | prev | next