top | up | prev | next

Grammar Class

Definition at line 32 of Grammar.hpp

Constructors

Grammar(const std::u32string& name_, const std::u32string& title_, const std::string& htmlFilePath_, GrammarParser* parser_)
Grammar(const std::u32string& name_, const std::u32string& title_, const std::string& htmlFilePath_, LexerFile* lexerFile_)

Member Functions

void AddRule(Rule* rule)
Kind GetKind() const
const std::u32string& HtmlFileName() const
const std::string& HtmlFilePath() const
const std::u32string& Name() const
GrammarParser* Parser() const
const std::vector<std::unique_ptr<Rule>>& Rules() const
const std::u32string& Title() const

Enumerations

enum class Kind

Member Variables

std::string htmfFilePath
std::u32string htmlFileName
std::string htmlFilePath
Kind kind
LexerFile* lexerFile
std::u32string name
GrammarParser* parser
std::vector<std::unique_ptr<Rule>> rules
std::u32string title

Constructor Details

Grammar Constructor

sng2html::sng2html::Grammar::Grammar(const std::u32string& name_, const std::u32string& title_, const std::string& htmlFilePath_, GrammarParser * parser_)

Definition at line 23 of Grammar.cpp :
23 :
24 kind(Kind::parser)name(name_)title(title_)htmlFilePath(htmlFilePath_)parser(parser_)lexerFile(nullptr)htmlFileName(name + U".html")
25 {
26 }


Declaration at line 40 of Grammar.hpp


Grammar Constructor

sng2html::sng2html::Grammar::Grammar(const std::u32string& name_, const std::u32string& title_, const std::string& htmlFilePath_, LexerFile * lexerFile_)

Definition at line 18 of Grammar.cpp :
18 :
19 kind(Kind::lexical)name(name_)title(title_)htmlFilePath(htmlFilePath_)lexerFile(lexerFile_)parser(nullptr)htmlFileName(name + U".html")
20 {
21 }


Declaration at line 39 of Grammar.hpp


Member Function Details

AddRule Member Function

void sng2html::sng2html::Grammar::AddRule(Rule * rule)

Definition at line 28 of Grammar.cpp :
29 {
30     rules.push_back(std::unique_ptr<Rule>(rule));
31 }


Declaration at line 47 of Grammar.hpp

Called by: sng2html::sng2html::Project::GenerateHtml


GetKind Member Function

Kind sng2html::sng2html::Grammar::GetKind() const

Definition at line 41 of Grammar.hpp :
41 { return kind; }


HtmlFileName Member Function

const std::u32string& sng2html::sng2html::Grammar::HtmlFileName() const

Definition at line 46 of Grammar.hpp :
46 { return htmlFileName; }

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


HtmlFilePath Member Function

const std::string& sng2html::sng2html::Grammar::HtmlFilePath() const

Definition at line 44 of Grammar.hpp :
44 { return htmlFilePath; }

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


Name Member Function

const std::u32string& sng2html::sng2html::Grammar::Name() const

Definition at line 42 of Grammar.hpp :
42 { return name; }


Parser Member Function

GrammarParser * sng2html::sng2html::Grammar::Parser() const

Definition at line 45 of Grammar.hpp :
45 { return parser; }


Rules Member Function

const std::vector<std::unique_ptr<Rule >>& sng2html::sng2html::Grammar::Rules() const

Definition at line 48 of Grammar.hpp :
48 { return rules; }

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


Title Member Function

const std::u32string& sng2html::sng2html::Grammar::Title() const

Definition at line 43 of Grammar.hpp :
43 { return title; }

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


top | up | prev | next