GrammarBuilder

Undocumented in source.

Members

Functions

add
void add(Alternative alternative)
Undocumented in source. Be warned that the author may not have intended to support it.
buildGeneratedNonterminal
GeneratedNonterminal buildGeneratedNonterminal()

TODO: ?

buildNonterminal
Nonterminal buildNonterminal(string representation)
Undocumented in source. Be warned that the author may not have intended to support it.
buildTerminal
Terminal buildTerminal(string representation)
Undocumented in source. Be warned that the author may not have intended to support it.
getGrammar
Grammar getGrammar(Nonterminal startSymbol)

Returns the collected grammar rules with the given nonterminal as start symbol. Returns null if the grammar is not well defined.

grammarIsWellDefined
bool grammarIsWellDefined()

Returns true if and only if for all nonterminals N on the right hand side exists at least one alternative where the nonterminal N is on the left hand side.

markErrors
void markErrors()

Marks all positions for which the grammar is not well defined. If the grammar is well defined no positions are marked.

Meta