top | up | prev | next

LexerStatement Class

Definition at line 140 of LexerFile.hpp

Constructors

LexerStatement(const std::u32string& expr_, soulng::cppcode::CompoundStatement* stmt_, int action_, int line_)

Member Functions

int Action() const
soulng::cppcode::CompoundStatement* Code() const
const std::u32string& Expr() const
int Index() const
int Line() const
void Parse(LexerContext& lexerContext)
RegExpression* RegEx() const
bool Retract() const
void SetIndex(int index_)
const std::u32string& TokenId() const

Member Variables

int action
std::u32string expr
int index
int line
std::unique_ptr<RegExpression> regEx
bool retract
std::unique_ptr<soulng::cppcode::CompoundStatement> stmt
std::u32string tokenId

Constructor Details

LexerStatement Constructor

sng2html::sng2html::LexerStatement::LexerStatement(const std::u32string& expr_, soulng::cppcode::CompoundStatement* stmt_, int action_, int line_)

Definition at line 173 of LexerFile.cpp :
173 :
174 index(-1)expr(expr_)stmt(stmt_)retract(true)action(action_)line(line_)
175 {
176     TokenIdResolverVisitor visitor;
177     stmt->Accept(visitor);
178     tokenId = visitor.TokenId();
179 }


Declaration at line 143 of LexerFile.hpp


Member Function Details

Action Member Function

int sng2html::sng2html::LexerStatement::Action() const

Definition at line 149 of LexerFile.hpp :
149 { return action; }


Code Member Function

soulng::cppcode::CompoundStatement* sng2html::sng2html::LexerStatement::Code() const

Definition at line 147 of LexerFile.hpp :
147 { return stmt.get(); }


Expr Member Function

const std::u32string& sng2html::sng2html::LexerStatement::Expr() const

Definition at line 146 of LexerFile.hpp :
146 { return expr; }


Index Member Function

int sng2html::sng2html::LexerStatement::Index() const

Definition at line 145 of LexerFile.hpp :
145 { return index; }


Line Member Function

int sng2html::sng2html::LexerStatement::Line() const

Definition at line 150 of LexerFile.hpp :
150 { return line; }


Parse Member Function

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

Definition at line 181 of LexerFile.cpp :
182 {
183     RegExLexer lexer(expr""0);
184     regEx = RegExParser::Parse(lexer&lexerContext);
185 }


Declaration at line 152 of LexerFile.hpp

Calls: RegExParser::Parse


RegEx Member Function

RegExpression * sng2html::sng2html::LexerStatement::RegEx() const

Definition at line 153 of LexerFile.hpp :
153 { return regEx.get(); }

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


Retract Member Function

bool sng2html::sng2html::LexerStatement::Retract() const

Definition at line 148 of LexerFile.hpp :
148 { return retract; }


SetIndex Member Function

void sng2html::sng2html::LexerStatement::SetIndex(int index_)

Definition at line 144 of LexerFile.hpp :
144 { index = index_; }

Called by: sng2html::sng2html::Lexer::AddStatement


TokenId Member Function

const std::u32string& sng2html::sng2html::LexerStatement::TokenId() const

Definition at line 151 of LexerFile.hpp :
151 { return tokenId; }

Called by: sng2html::sng2html::Lexer::AddStatement


top | up | prev | next