faudes::Grammar Class Reference
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Member Functions | |
| Grammar () | |
| Constructor. | |
| Grammar (const Nonterminal &startSymbol) | |
| Constructor. | |
| bool | SetStartSymbol (const Nonterminal &s) |
| set the grammar's start symbol and add it to the set of nonterminals | |
| bool | InsTerminal (const Terminal &t) |
| add Terminal | |
| void | InsTerminals (const std::set< Terminal > &t) |
| add Terminals | |
| bool | InsNonterminal (const Nonterminal &nt) |
| add Nonterminal | |
| void | InsNonterminals (const std::set< Nonterminal > &nt) |
| add Nonterminals | |
| bool | InsGrammarProduction (const GrammarProduction &gp) |
| Add a grammar production to the grammar. | |
| void | InsGrammarProductions (const std::set< GrammarProduction > &gp) |
| Add grammar productions to the grammar. | |
| const std::set< Terminal > & | Terminals () const |
| Getter for mTerminals. | |
| const std::set< Nonterminal > & | Nonterminals () const |
| Getter for mNonterminals. | |
| const Nonterminal & | StartSymbol () const |
| Getter for mStartSymbol. | |
| const std::set < GrammarProduction > & | GrammarProductions () const |
| Getter for mGrammarProductions. | |
| std::set< Terminal > ::const_iterator | TerminalsBegin () const |
| Iterator to the beginning of terminals. | |
| std::set< Terminal > ::const_iterator | TerminalsEnd () const |
| Iterator to the end of terminals. | |
| std::set< Nonterminal > ::const_iterator | NonterminalsBegin () const |
| Iterator to the beginning of nonterminals. | |
| std::set< Nonterminal > ::const_iterator | NonterminalsEnd () const |
| Iterator to the end of nonterminals. | |
| std::set< GrammarProduction > ::const_iterator | GrammarProductionsBegin () const |
| Iterator to the beginning of grammar productions. | |
| std::set< GrammarProduction > ::const_iterator | GrammarProductionsEnd () const |
| Iterator to the end of grammar productions. | |
| std::string | StrTerminals () const |
| To String function for Terminals. | |
| std::string | StrNonterminals () const |
| To String function for Nonterminals. | |
| std::string | StrStartSymbol () const |
| To String function for start symbol. | |
| std::string | StrGrammarProductions () const |
| To String function for Grammar Productions. | |
| std::string | Str () const |
| To String function. | |
Public Attributes | |
| std::set< Terminal > | mTerminals |
| the Terminals | |
| std::set< Nonterminal > | mNonterminals |
| the Nonterminals | |
| Nonterminal | mStartSymbol |
| the Start Symbol | |
| std::set< GrammarProduction > | mGrammarProductions |
| the Productions | |
Overview
Contents
Definition at line 362 of file pd_grammar.h.
| faudes::Grammar::Grammar | ( | ) | [inline] |
Constructor.
Definition at line 378 of file pd_grammar.h.
| faudes::Grammar::Grammar | ( | const Nonterminal & | startSymbol | ) | [inline] |
Constructor.
Definition at line 383 of file pd_grammar.h.
| const std::set<GrammarProduction>& faudes::Grammar::GrammarProductions | ( | ) | const [inline] |
Getter for mGrammarProductions.
Definition at line 485 of file pd_grammar.h.
| std::set< GrammarProduction >::const_iterator faudes::Grammar::GrammarProductionsBegin | ( | ) | const |
Iterator to the beginning of grammar productions.
Definition at line 315 of file pd_grammar.cpp.
| std::set< GrammarProduction >::const_iterator faudes::Grammar::GrammarProductionsEnd | ( | ) | const |
Iterator to the end of grammar productions.
Definition at line 319 of file pd_grammar.cpp.
| bool faudes::Grammar::InsGrammarProduction | ( | const GrammarProduction & | gp | ) |
Add a grammar production to the grammar.
All grammar symbols used must exist in the grammar.
| gp | grammar production to add |
Definition at line 256 of file pd_grammar.cpp.
| void faudes::Grammar::InsGrammarProductions | ( | const std::set< GrammarProduction > & | gp | ) |
Add grammar productions to the grammar.
All grammar symbols used must exist in the grammar.
| gp | grammar productions to add |
Definition at line 292 of file pd_grammar.cpp.
| bool faudes::Grammar::InsNonterminal | ( | const Nonterminal & | nt | ) |
add Nonterminal
| nt | nonterminal to add |
Definition at line 248 of file pd_grammar.cpp.
| void faudes::Grammar::InsNonterminals | ( | const std::set< Nonterminal > & | nt | ) |
| bool faudes::Grammar::InsTerminal | ( | const Terminal & | t | ) |
add Terminal
| t | terminal to add |
Definition at line 240 of file pd_grammar.cpp.
| void faudes::Grammar::InsTerminals | ( | const std::set< Terminal > & | t | ) |
| const std::set<Nonterminal>& faudes::Grammar::Nonterminals | ( | ) | const [inline] |
| std::set< Nonterminal >::const_iterator faudes::Grammar::NonterminalsBegin | ( | ) | const |
Iterator to the beginning of nonterminals.
Definition at line 307 of file pd_grammar.cpp.
| std::set< Nonterminal >::const_iterator faudes::Grammar::NonterminalsEnd | ( | ) | const |
Iterator to the end of nonterminals.
Definition at line 311 of file pd_grammar.cpp.
| bool faudes::Grammar::SetStartSymbol | ( | const Nonterminal & | s | ) |
set the grammar's start symbol and add it to the set of nonterminals
| s | start symbol to set |
Definition at line 235 of file pd_grammar.cpp.
| const Nonterminal& faudes::Grammar::StartSymbol | ( | ) | const [inline] |
| std::string faudes::Grammar::Str | ( | void | ) | const |
To String function.
Definition at line 359 of file pd_grammar.cpp.
| std::string faudes::Grammar::StrGrammarProductions | ( | ) | const |
To String function for Grammar Productions.
Definition at line 349 of file pd_grammar.cpp.
| std::string faudes::Grammar::StrNonterminals | ( | ) | const |
To String function for Nonterminals.
Definition at line 334 of file pd_grammar.cpp.
| std::string faudes::Grammar::StrStartSymbol | ( | ) | const |
To String function for start symbol.
Definition at line 345 of file pd_grammar.cpp.
| std::string faudes::Grammar::StrTerminals | ( | ) | const |
To String function for Terminals.
Definition at line 323 of file pd_grammar.cpp.
| const std::set<Terminal>& faudes::Grammar::Terminals | ( | ) | const [inline] |
| std::set< Terminal >::const_iterator faudes::Grammar::TerminalsBegin | ( | ) | const |
Iterator to the beginning of terminals.
Definition at line 299 of file pd_grammar.cpp.
| std::set< Terminal >::const_iterator faudes::Grammar::TerminalsEnd | ( | ) | const |
the Productions
Definition at line 373 of file pd_grammar.h.
| std::set<Nonterminal> faudes::Grammar::mNonterminals |
the Nonterminals
Definition at line 369 of file pd_grammar.h.
the Start Symbol
Definition at line 371 of file pd_grammar.h.
| std::set<Terminal> faudes::Grammar::mTerminals |
the Terminals
Definition at line 367 of file pd_grammar.h.
libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen