![]() |
Qt 6.x
The Qt SDK
|
#include <lalr.h>
Classes | |
struct | TokenInfo |
Public Types | |
enum | Assoc { NonAssoc , Left , Right } |
Public Member Functions | |
Grammar () | |
Name | intern (const QString &id) |
Name | intern (const char *id) |
bool | isTerminal (Name name) const |
bool | isNonTerminal (Name name) const |
void | buildRuleMap () |
void | buildExtendedGrammar () |
Public Attributes | |
QString | merged_output |
QString | table_name |
QString | decl_file_name |
QString | impl_file_name |
QString | token_prefix |
std::list< QString > | names |
Name | start |
NameSet | terminals |
NameSet | non_terminals |
QMap< Name, QString > | spells |
debug_infot | rules |
RuleMap | rule_map |
RulePointer | goal |
Name | tk_end |
Name | accept_symbol |
NameSet | declared_lhs |
int | expected_shift_reduce |
int | expected_reduce_reduce |
QMap< Name, TokenInfo > | token_info |
Assoc | current_assoc |
int | current_prec |
enum Grammar::Assoc |
Grammar::Grammar | ( | ) |
Definition at line 166 of file lalr.cpp.
References current_assoc, current_prec, expected_reduce_reduce, expected_shift_reduce, QMap< Key, T >::insert(), intern(), NonAssoc, spells, table_name, terminals, and tk_end.
void Grammar::buildExtendedGrammar | ( | ) |
Definition at line 213 of file lalr.cpp.
References accept_symbol, goal, intern(), non_terminals, rules, and tk_end.
void Grammar::buildRuleMap | ( | ) |
Definition at line 193 of file lalr.cpp.
References declared_lhs, QMap< Key, T >::end(), QMap< Key, T >::find(), QMap< Key, T >::insert(), QMultiMap< Key, T >::insert(), isTerminal(), it, qPrintable, rule, rule_map, and rules.
|
inline |
Definition at line 221 of file lalr.h.
References QString::fromUtf8(), and intern().
Referenced by intern().
Definition at line 183 of file lalr.cpp.
Referenced by Grammar(), buildExtendedGrammar(), and Recognizer::parse().
|
inline |
Definition at line 226 of file lalr.h.
References non_terminals.
Referenced by Automaton::buildDirectReads(), Automaton::buildIncludesDigraph(), Automaton::buildLookbackSets(), Automaton::buildReadsDigraph(), and Automaton::closure().
|
inline |
Definition at line 223 of file lalr.h.
References terminals.
Referenced by Automaton::buildDirectReads(), buildRuleMap(), and Recognizer::parse().
Name Grammar::accept_symbol |
Definition at line 247 of file lalr.h.
Referenced by buildExtendedGrammar().
Assoc Grammar::current_assoc |
Definition at line 264 of file lalr.h.
Referenced by Grammar(), and Recognizer::parse().
int Grammar::current_prec |
Definition at line 265 of file lalr.h.
Referenced by Grammar(), and Recognizer::parse().
QString Grammar::decl_file_name |
Definition at line 235 of file lalr.h.
Referenced by Recognizer::parse().
NameSet Grammar::declared_lhs |
Definition at line 248 of file lalr.h.
Referenced by buildRuleMap(), and Recognizer::parse().
int Grammar::expected_reduce_reduce |
Definition at line 250 of file lalr.h.
Referenced by Grammar(), and Recognizer::parse().
int Grammar::expected_shift_reduce |
Definition at line 249 of file lalr.h.
Referenced by Grammar(), and Recognizer::parse().
RulePointer Grammar::goal |
Definition at line 245 of file lalr.h.
Referenced by Automaton::build(), and buildExtendedGrammar().
QString Grammar::impl_file_name |
Definition at line 236 of file lalr.h.
Referenced by Recognizer::parse().
QString Grammar::merged_output |
Definition at line 233 of file lalr.h.
Referenced by Recognizer::parse().
std::list<QString> Grammar::names |
Definition at line 238 of file lalr.h.
Referenced by Recognizer::expand(), Automaton::id(), and Recognizer::parse().
NameSet Grammar::non_terminals |
Definition at line 241 of file lalr.h.
Referenced by buildExtendedGrammar(), isNonTerminal(), and Recognizer::parse().
RuleMap Grammar::rule_map |
Definition at line 244 of file lalr.h.
Referenced by Automaton::buildIncludesDigraph(), Automaton::buildLookbackSets(), buildRuleMap(), and Automaton::closure().
debug_infot Grammar::rules |
Definition at line 243 of file lalr.h.
Referenced by buildExtendedGrammar(), Automaton::buildNullables(), buildRuleMap(), Recognizer::expand(), Automaton::id(), and Recognizer::parse().
Definition at line 242 of file lalr.h.
Referenced by Grammar(), and Recognizer::parse().
Name Grammar::start |
Definition at line 239 of file lalr.h.
Referenced by Recognizer::expand(), and Recognizer::parse().
QString Grammar::table_name |
Definition at line 234 of file lalr.h.
Referenced by Grammar(), Recognizer::expand(), and Recognizer::parse().
NameSet Grammar::terminals |
Definition at line 240 of file lalr.h.
Referenced by Grammar(), isTerminal(), and Recognizer::parse().
Name Grammar::tk_end |
Definition at line 246 of file lalr.h.
Referenced by Grammar(), and buildExtendedGrammar().
Definition at line 263 of file lalr.h.
Referenced by Recognizer::parse().
QString Grammar::token_prefix |
Definition at line 237 of file lalr.h.
Referenced by Recognizer::parse().