![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <lalr.h>
Public Types | |
| typedef Node< Read > | ReadsGraph |
| typedef ReadsGraph::iterator | ReadNode |
| typedef Node< Include > | IncludesGraph |
| typedef IncludesGraph::iterator | IncludeNode |
Public Member Functions | |
| Automaton (Grammar *g) | |
| std::pair< StatePointer, bool > | internState (const State &state) |
| void | build () |
| void | buildNullables () |
| void | buildLookbackSets () |
| void | buildDirectReads () |
| void | buildReadsDigraph () |
| void | buildReads () |
| void | visitReadNode (ReadNode node) |
| void | buildIncludesAndFollows () |
| void | buildIncludesDigraph () |
| void | visitIncludeNode (IncludeNode node) |
| void | buildLookaheads () |
| void | buildDefaultReduceActions () |
| void | closure (StatePointer state) |
| int | id (RulePointer rule) |
| int | id (StatePointer state) |
| int | id (Name name) |
| void | dump (QTextStream &out, IncludeNode incl) |
| void | dump (QTextStream &out, ReadNode rd) |
| void | dump (QTextStream &out, const Lookback &lp) |
Public Attributes | |
| Grammar * | _M_grammar |
| StateList | states |
| StatePointer | start |
| NameSet | nullables |
| QMultiMap< ItemPointer, Lookback > | lookbacks |
| QMap< ItemPointer, NameSet > | lookaheads |
| typedef Node<Include> Automaton::IncludesGraph |
| typedef Node<Read> Automaton::ReadsGraph |
| Automaton::Automaton | ( | Grammar * | g | ) |
| void Automaton::build | ( | ) |
Definition at line 257 of file lalr.cpp.
References State::State(), _M_grammar, buildDefaultReduceActions(), buildIncludesAndFollows(), buildLookaheads(), buildLookbackSets(), buildNullables(), buildReads(), closure(), Grammar::goal, internState(), Item::rule, and start.
Referenced by main().
| void Automaton::buildDefaultReduceActions | ( | ) |
| void Automaton::buildDirectReads | ( | ) |
Definition at line 445 of file lalr.cpp.
References _M_grammar, Grammar::isNonTerminal(), Grammar::isTerminal(), and states.
Referenced by buildReads().
| void Automaton::buildIncludesAndFollows | ( | ) |
Definition at line 565 of file lalr.cpp.
References buildIncludesDigraph(), states, and visitIncludeNode().
Referenced by build().
| void Automaton::buildIncludesDigraph | ( | ) |
Definition at line 586 of file lalr.cpp.
References NotNullable::NotNullable(), _M_grammar, Grammar::isNonTerminal(), and states.
Referenced by buildIncludesAndFollows().
| void Automaton::buildLookaheads | ( | ) |
Definition at line 693 of file lalr.cpp.
References Lookback::state, and states.
Referenced by build().
| void Automaton::buildLookbackSets | ( | ) |
Definition at line 391 of file lalr.cpp.
References _M_grammar, Grammar::isNonTerminal(), and states.
Referenced by build().
| void Automaton::buildNullables | ( | ) |
Definition at line 277 of file lalr.cpp.
References NotNullable::NotNullable(), _M_grammar, nullables, and Grammar::rules.
Referenced by build().
| void Automaton::buildReads | ( | ) |
Definition at line 509 of file lalr.cpp.
References buildDirectReads(), buildReadsDigraph(), and visitReadNode().
Referenced by build().
| void Automaton::buildReadsDigraph | ( | ) |
Definition at line 474 of file lalr.cpp.
References _M_grammar, Grammar::isNonTerminal(), nullables, and states.
Referenced by buildReads().
| void Automaton::closure | ( | StatePointer | state | ) |
Definition at line 327 of file lalr.cpp.
References _M_grammar, closure(), Grammar::isNonTerminal(), and Item::rule.
Referenced by build(), and closure().
| void Automaton::dump | ( | QTextStream & | out, |
| const Lookback & | lp ) |
| void Automaton::dump | ( | QTextStream & | out, |
| IncludeNode | incl ) |
| void Automaton::dump | ( | QTextStream & | out, |
| ReadNode | rd ) |
| int Automaton::id | ( | Name | name | ) |
Definition at line 247 of file lalr.cpp.
References _M_grammar.
| int Automaton::id | ( | RulePointer | rule | ) |
Definition at line 242 of file lalr.cpp.
References _M_grammar, and Grammar::rules.
Referenced by CppGenerator::operator()(), and DotGraph::operator()().
| int Automaton::id | ( | StatePointer | state | ) |
| std::pair< StatePointer, bool > Automaton::internState | ( | const State & | state | ) |
| void Automaton::visitIncludeNode | ( | IncludeNode | node | ) |
Definition at line 647 of file lalr.cpp.
References visitIncludeNode().
Referenced by buildIncludesAndFollows(), and visitIncludeNode().
Definition at line 528 of file lalr.cpp.
References visitReadNode().
Referenced by buildReads(), and visitReadNode().
| Grammar* Automaton::_M_grammar |
Definition at line 351 of file lalr.h.
Referenced by Automaton(), build(), buildDirectReads(), buildIncludesDigraph(), buildLookbackSets(), buildNullables(), buildReadsDigraph(), closure(), id(), id(), DotGraph::operator()(), ParseTable::operator()(), and _Bucket::toState().
| QMap<ItemPointer, NameSet> Automaton::lookaheads |
| QMultiMap<ItemPointer, Lookback> Automaton::lookbacks |
| NameSet Automaton::nullables |
Definition at line 354 of file lalr.h.
Referenced by buildNullables(), buildReadsDigraph(), and NotNullable::operator()().
| StatePointer Automaton::start |
Definition at line 353 of file lalr.h.
Referenced by Automaton(), and build().
| StateList Automaton::states |
Definition at line 352 of file lalr.h.
Referenced by Automaton(), buildDefaultReduceActions(), buildDirectReads(), buildIncludesAndFollows(), buildIncludesDigraph(), buildLookaheads(), buildLookbackSets(), buildReadsDigraph(), id(), internState(), CppGenerator::operator()(), DotGraph::operator()(), and ParseTable::operator()().