DynGenPar
Dynamic Generalized Parser
|
PMCFG. More...
Public Attributes | |
grammar | |
QList< Function > | functions |
list of PMCFG functions More... | |
RuleSet | rules |
set of PMCFG rules More... | |
TokenSet | tokens |
set of true tokens More... | |
Cat | startCat |
start category More... | |
RuleSet | cfRules |
optional context-free rules More... | |
function name tables (optional) | |
QHash< int, QString > | functionNames |
QHash< QString, int > | functionIndices |
void | addFunction (const QString &name, const Function &function) |
Function | lookupFunction (const QVariant &id) const |
PMCFG.
Definition at line 1047 of file dyngenpar.h.
|
inline |
Definition at line 1095 of file dyngenpar.h.
|
inline |
Definition at line 1101 of file dyngenpar.h.
RuleSet DynGenPar::Pmcfg::cfRules |
optional context-free rules
allows specifying rules for context-free categories which can be used as "token" terms in PMCFG functions, e.g. A -> "a" | "an"
Definition at line 1088 of file dyngenpar.h.
QHash<QString, int> DynGenPar::Pmcfg::functionIndices |
Definition at line 1094 of file dyngenpar.h.
QHash<int, QString> DynGenPar::Pmcfg::functionNames |
Definition at line 1093 of file dyngenpar.h.
list of PMCFG functions
This list does not store function names. They can be optionally used and are stored in functionNames and functionIndices.
Definition at line 1054 of file dyngenpar.h.
RuleSet DynGenPar::Pmcfg::rules |
set of PMCFG rules
Rules should be labeled with the index of the function in functions or its name as found in functionNames and functionIndices. The expression of the rule is interpreted as the argument list for the function. For example:
In a standard PMCFG, the argument list may contain only PMCFG nonterminals. The syntax tree then only contains the function and the syntax trees for each argument. This implementation also allows tokens and context-free nonterminals as function arguments, in which case the syntax tree will contain the parse tree for the context-free argument. In particular, in the case of a token, the data attached to the token is retained.
Definition at line 1073 of file dyngenpar.h.
Cat DynGenPar::Pmcfg::startCat |
start category
The start category must be 1-dimensional.
Definition at line 1079 of file dyngenpar.h.
TokenSet DynGenPar::Pmcfg::tokens |
set of true tokens
(must NOT contain context-free nonterminals)
Definition at line 1076 of file dyngenpar.h.