|
Public Member Functions |
| grammar (const string &) |
| Create a grammar loading it from a file.
|
int | get_specificity (const string &) const |
int | get_priority (const string &) const |
string | get_start_symbol () const |
| obtain the start symbol of the grammar
|
bool | is_hidden (const string &) const |
| Check whether a symbol must disappear of final tree.
|
bool | is_flat (const string &) const |
| Check whether a symbol must be flattened when recursive.
|
bool | is_notop (const string &) const |
| Check whether a symbol can not be used as a tree root.
|
bool | is_onlytop (const string &) const |
| Check whether a symbol is hidden unless when at tree root.
|
bool | is_terminal (const string &) const |
| Check whether a symbol is terminal or not.
|
list< rule > | get_rules_right (const string &) const |
| Get all rules with a right part beggining with the given category.
|
list< rule > | get_rules_right_wildcard (const string &) const |
| Get all rules with a right part beggining with a wilcarded category.
|
bool | in_filemap (const string &, const string &) const |
| search given string in filemap, and check whether it maps to the second
|
Static Public Attributes |
static unsigned int | NOGOV |
static unsigned int | DEFGOV |
Private Member Functions |
void | new_rule (const string &, const list< string > &, bool, const int rgov) |
| Create and store a new rule, indexed by 1st category in its right part.
|
Private Attributes |
set< string > | nonterminal |
| Non-terminal symbols in the grammar.
|
multimap< string, rule > | wild |
| rules starting with a wildcarded token, indexed by first char in category.
|
multimap< string, string > | filemap |
| map to store files appearing in grammar rules
|
map< string, int > | prior |
| symbol priorities to build the tree
|
set< string > | hidden |
| Non-terminal symbols that must not be seen in the tree.
|
set< string > | flat |
| Non-terminal symbols that must be flattened in final tree when recursive.
|
set< string > | notop |
| Non-terminal symbols that must not be considered tree roots.
|
set< string > | onlytop |
| Non-terminal symbols that are visible only when are at tree root.
|
string | start |
| start symbol
|