top | up | prev | next

LinkerVisitor Class

Definition at line 14 of LinkerVisitor.hpp

Constructors

LinkerVisitor()

Member Functions

void Visit(ActionParser& parser) override
void Visit(AlternativeParser& parser) override
void Visit(DifferenceParser& parser) override
void Visit(Domain& domain) override
void Visit(ExpectationParser& parser) override
void Visit(GrammarParser& parser) override
void Visit(GroupingParser& parser) override
void Visit(KleeneParser& parser) override
void Visit(ListParser& parser) override
void Visit(NonterminalParser& parser) override
void Visit(OptionalParser& parser) override
void Visit(ParserFile& parserFile) override
void Visit(PositiveParser& parser) override
void Visit(RuleParser& parser) override
void Visit(SequenceParser& parser) override

Enumerations

enum class Stage

Member Variables

GrammarParser* currentParser
RuleParser* currentRule
Domain* domain
Stage stage

Constructor Details

LinkerVisitor Constructor

sng2html::sng2html::LinkerVisitor::LinkerVisitor()

Definition at line 16 of LinkerVisitor.cpp :
 16 : domain(nullptr)currentParser(nullptr)currentRule(nullptr)stage(Stage::addParsers)
 17 {
 18 }


Declaration at line 18 of LinkerVisitor.hpp


Member Function Details

Visit Member Function

void sng2html::sng2html::LinkerVisitor::Visit(ActionParser & parser) override

Definition at line 68 of LinkerVisitor.cpp :
 69 {
 70     parser.Child()->Accept(*this);
 71 }


Declaration at line 28 of LinkerVisitor.hpp

Base class overridden functions: sng2html::sng2html::Visitor::Visit

Calls: sng2html::sng2html::Parser::Accept , sng2html::sng2html::UnaryParser::Child


Visit Member Function

void sng2html::sng2html::LinkerVisitor::Visit(AlternativeParser & parser) override

Definition at line 51 of LinkerVisitor.cpp :
 52 {
 53     parser.Left()->Accept(*this);
 54     parser.Right()->Accept(*this);
 55 }


Declaration at line 25 of LinkerVisitor.hpp

Base class overridden functions: sng2html::sng2html::Visitor::Visit

Calls: sng2html::sng2html::BinaryParser::Left , sng2html::sng2html::BinaryParser::Right , sng2html::sng2html::Parser::Accept


Visit Member Function

void sng2html::sng2html::LinkerVisitor::Visit(DifferenceParser & parser) override

Definition at line 57 of LinkerVisitor.cpp :
 58 {
 59     parser.Left()->Accept(*this);
 60     parser.Right()->Accept(*this);
 61 }


Declaration at line 26 of LinkerVisitor.hpp

Base class overridden functions: sng2html::sng2html::Visitor::Visit

Calls: sng2html::sng2html::BinaryParser::Left , sng2html::sng2html::BinaryParser::Right , sng2html::sng2html::Parser::Accept


Visit Member Function

void sng2html::sng2html::LinkerVisitor::Visit(Domain & domain) override

Definition at line 133 of LinkerVisitor.cpp
Declaration at line 33 of LinkerVisitor.hpp

Base class overridden functions: sng2html::sng2html::Visitor::Visit

Calls: sng2html::sng2html::Domain::ParserFiles


Visit Member Function

void sng2html::sng2html::LinkerVisitor::Visit(ExpectationParser & parser) override

Definition at line 35 of LinkerVisitor.cpp :
 36 {
 37     parser.Child()->Accept(*this);
 38 }


Declaration at line 22 of LinkerVisitor.hpp

Base class overridden functions: sng2html::sng2html::Visitor::Visit

Calls: sng2html::sng2html::Parser::Accept , sng2html::sng2html::UnaryParser::Child


Visit Member Function

void sng2html::sng2html::LinkerVisitor::Visit(GrammarParser & parser) override

Definition at line 91 of LinkerVisitor.cpp
Declaration at line 31 of LinkerVisitor.hpp

Base class overridden functions: sng2html::sng2html::Visitor::Visit

Calls: sng2html::sng2html::Domain::AddParser , sng2html::sng2html::Domain::GetParser , sng2html::sng2html::GrammarParser::GetRule , sng2html::sng2html::GrammarParser::MapRule , sng2html::sng2html::GrammarParser::RuleInfos , sng2html::sng2html::GrammarParser::Rules , sng2html::sng2html::GrammarParser::Usings , sng2html::sng2html::Parser::Name , sng2html::sng2html::RuleParser::SetInfo


Visit Member Function

void sng2html::sng2html::LinkerVisitor::Visit(GroupingParser & parser) override

Definition at line 40 of LinkerVisitor.cpp :
 41 {
 42     parser.Child()->Accept(*this);
 43 }


Declaration at line 23 of LinkerVisitor.hpp

Base class overridden functions: sng2html::sng2html::Visitor::Visit

Calls: sng2html::sng2html::Parser::Accept , sng2html::sng2html::UnaryParser::Child


Visit Member Function

void sng2html::sng2html::LinkerVisitor::Visit(KleeneParser & parser) override

Definition at line 25 of LinkerVisitor.cpp :
 26 {
 27     parser.Child()->Accept(*this);
 28 }


Declaration at line 20 of LinkerVisitor.hpp

Base class overridden functions: sng2html::sng2html::Visitor::Visit

Calls: sng2html::sng2html::Parser::Accept , sng2html::sng2html::UnaryParser::Child


Visit Member Function

void sng2html::sng2html::LinkerVisitor::Visit(ListParser & parser) override

Definition at line 63 of LinkerVisitor.cpp :
 64 {
 65     parser.Child()->Accept(*this);
 66 }


Declaration at line 27 of LinkerVisitor.hpp

Base class overridden functions: sng2html::sng2html::Visitor::Visit

Calls: sng2html::sng2html::Parser::Accept , sng2html::sng2html::UnaryParser::Child


Visit Member Function

void sng2html::sng2html::LinkerVisitor::Visit(NonterminalParser & parser) override

Definition at line 73 of LinkerVisitor.cpp :
 74 {
 75     currentRule->AddNonterminal(&parser);
 76     RuleParser* rule = currentParser->GetRule(parser.RuleName());
 77     parser.SetRule(rule);
 78     if (rule->Parameters().size() != parser.Arguments().size())
 79     {
 80         throw std::runtime_error("Rule '" + ToUtf8(rule->Name()) + "' takes " + std::to_string(rule->Parameters().size()) + " parameters (" + 
 81             std::to_string(parser.Arguments().size()) + " arguments supplied). Detected in parser '" + ToUtf8(currentParser->Name()) + "' rule '" + ToUtf8(currentRule->Name()) + "'.");
 82     }
 83 }


Declaration at line 29 of LinkerVisitor.hpp

Base class overridden functions: sng2html::sng2html::Visitor::Visit

Calls: sng2html::sng2html::GrammarParser::GetRule , sng2html::sng2html::NonterminalParser::Arguments , sng2html::sng2html::NonterminalParser::RuleName , sng2html::sng2html::NonterminalParser::SetRule , sng2html::sng2html::Parser::Name , sng2html::sng2html::RuleParser::AddNonterminal , sng2html::sng2html::RuleParser::Parameters


Visit Member Function

void sng2html::sng2html::LinkerVisitor::Visit(OptionalParser & parser) override

Definition at line 20 of LinkerVisitor.cpp :
 21 {
 22     parser.Child()->Accept(*this);
 23 }


Declaration at line 19 of LinkerVisitor.hpp

Base class overridden functions: sng2html::sng2html::Visitor::Visit

Calls: sng2html::sng2html::Parser::Accept , sng2html::sng2html::UnaryParser::Child


Visit Member Function

void sng2html::sng2html::LinkerVisitor::Visit(ParserFile & parserFile) override

Definition at line 125 of LinkerVisitor.cpp :
126 {
127     for (const auto& parser : parserFile.Parsers())
128     {
129         parser->Accept(*this);
130     }
131 }


Declaration at line 32 of LinkerVisitor.hpp

Base class overridden functions: sng2html::sng2html::Visitor::Visit

Calls: sng2html::sng2html::ParserFile::Parsers


Visit Member Function

void sng2html::sng2html::LinkerVisitor::Visit(PositiveParser & parser) override

Definition at line 30 of LinkerVisitor.cpp :
 31 {
 32     parser.Child()->Accept(*this);
 33 }


Declaration at line 21 of LinkerVisitor.hpp

Base class overridden functions: sng2html::sng2html::Visitor::Visit

Calls: sng2html::sng2html::Parser::Accept , sng2html::sng2html::UnaryParser::Child


Visit Member Function

void sng2html::sng2html::LinkerVisitor::Visit(RuleParser & parser) override

Definition at line 85 of LinkerVisitor.cpp :
 86 {
 87     currentRule = &parser;
 88     parser.Definition()->Accept(*this);
 89 }


Declaration at line 30 of LinkerVisitor.hpp

Base class overridden functions: sng2html::sng2html::Visitor::Visit

Calls: sng2html::sng2html::Parser::Accept , sng2html::sng2html::RuleParser::Definition


Visit Member Function

void sng2html::sng2html::LinkerVisitor::Visit(SequenceParser & parser) override

Definition at line 45 of LinkerVisitor.cpp :
 46 {
 47     parser.Left()->Accept(*this);
 48     parser.Right()->Accept(*this);
 49 }


Declaration at line 24 of LinkerVisitor.hpp

Base class overridden functions: sng2html::sng2html::Visitor::Visit

Calls: sng2html::sng2html::BinaryParser::Left , sng2html::sng2html::BinaryParser::Right , sng2html::sng2html::Parser::Accept


top | up | prev | next