top | up | prev | next

RuleParser Class

Definition at line 268 of Parser.hpp

Constructors

RuleParser(const std::u32string& name_)

Member Functions

void Accept(Visitor& visitor) override
void AddNonterminal(NonterminalParser* nonterminal)
void AddParamOrVariable(Parameter* paramOrVariable)
Parser* Definition()
GrammarParser* GetGrammar() const
bool HasReturn() const
const std::u32string& Info() const
const std::vector<NonterminalParser*>& Nonterminals() const
const std::vector<std::unique_ptr<Parameter>>& Parameters() const
soulng::cppcode::TypeId* ReturnType() const
void SetDefinition(Parser* definition_)
void SetHasReturn()
void SetInfo(const std::u32string& info_)
void SetReturnType(soulng::cppcode::TypeId* returnType_)
const std::vector<std::unique_ptr<Variable>>& Variables() const

Member Variables

std::unique_ptr<Parser> definition
bool hasReturn
std::u32string info
std::vector<NonterminalParser*> nonterminals
std::vector<std::unique_ptr<Parameter>> parameters
std::unique_ptr<soulng::cppcode::TypeId> returnType
std::vector<std::unique_ptr<Variable>> variables

Constructor Details

RuleParser Constructor

sng2html::sng2html::RuleParser::RuleParser(const std::u32string& name_)

Definition at line 346 of Parser.cpp :
346 : Parser(name_)hasReturn(false)
347 {
348 }


Declaration at line 271 of Parser.hpp


Member Function Details

Accept Member Function

void sng2html::sng2html::RuleParser::Accept(Visitor & visitor) override

Definition at line 391 of Parser.cpp :
392 {
393     visitor.Visit(*this);
394 }


Declaration at line 273 of Parser.hpp

Base class overridden functions: sng2html::sng2html::Parser::Accept

Calls: sng2html::sng2html::Visitor::Visit


AddNonterminal Member Function

void sng2html::sng2html::RuleParser::AddNonterminal(NonterminalParser * nonterminal)

Definition at line 396 of Parser.cpp :
397 {
398     nonterminals.push_back(nonterminal);
399 }


Declaration at line 281 of Parser.hpp

Called by: sng2html::sng2html::LinkerVisitor::Visit


AddParamOrVariable Member Function

void sng2html::sng2html::RuleParser::AddParamOrVariable(Parameter * paramOrVariable)

Definition at line 374 of Parser.cpp :
375 {
376     if (paramOrVariable->variable)
377     {
378         variables.push_back(std::unique_ptr<Variable>(static_cast<Variable*>(paramOrVariable)));
379     }
380     else
381     {
382         parameters.push_back(std::unique_ptr<Parameter>(paramOrVariable));
383     }
384 }


Declaration at line 276 of Parser.hpp

Called by: ParserFileParser::ParametersAndVariables


Definition Member Function

Parser * sng2html::sng2html::RuleParser::Definition()

Definition at line 275 of Parser.hpp :
275 { return definition.get(); }

Called by: sng2html::sng2html::GrammarHtmlGeneratorVisitor::Visit , sng2html::sng2html::LinkerVisitor::Visit


GetGrammar Member Function

GrammarParser * sng2html::sng2html::RuleParser::GetGrammar() const

Definition at line 350 of Parser.cpp
Declaration at line 272 of Parser.hpp

Calls: sng2html::sng2html::Parser::IsGrammar , sng2html::sng2html::Parser::Parent

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


HasReturn Member Function

bool sng2html::sng2html::RuleParser::HasReturn() const

Definition at line 286 of Parser.hpp :
286 { return hasReturn; }


Info Member Function

const std::u32string& sng2html::sng2html::RuleParser::Info() const

Definition at line 283 of Parser.hpp :
283 { return info; }


Nonterminals Member Function

const std::vector<NonterminalParser *>& sng2html::sng2html::RuleParser::Nonterminals() const

Definition at line 282 of Parser.hpp :
282 { return nonterminals; }


Parameters Member Function

const std::vector<std::unique_ptr<Parameter >>& sng2html::sng2html::RuleParser::Parameters() const

Definition at line 277 of Parser.hpp :
277 { return parameters; }

Called by: sng2html::sng2html::LinkerVisitor::Visit


ReturnType Member Function

soulng::cppcode::TypeId* sng2html::sng2html::RuleParser::ReturnType() const

Definition at line 280 of Parser.hpp :
280 { return returnType.get(); }


SetDefinition Member Function

void sng2html::sng2html::RuleParser::SetDefinition(Parser * definition_)

Definition at line 369 of Parser.cpp :
370 {
371     definition.reset(definition_);
372 }


Declaration at line 274 of Parser.hpp


SetHasReturn Member Function

void sng2html::sng2html::RuleParser::SetHasReturn()

Definition at line 285 of Parser.hpp :
285 { hasReturn = true; }


SetInfo Member Function

void sng2html::sng2html::RuleParser::SetInfo(const std::u32string& info_)

Definition at line 401 of Parser.cpp :
402 {
403     info = info_;
404 }


Declaration at line 284 of Parser.hpp

Called by: sng2html::sng2html::LinkerVisitor::Visit


SetReturnType Member Function

void sng2html::sng2html::RuleParser::SetReturnType(soulng::cppcode::TypeId* returnType_)

Definition at line 386 of Parser.cpp :
387 {
388     returnType.reset(returnType_);
389 }


Declaration at line 279 of Parser.hpp


Variables Member Function

const std::vector<std::unique_ptr<Variable >>& sng2html::sng2html::RuleParser::Variables() const

Definition at line 278 of Parser.hpp :
278 { return variables; }


top | up | prev | next