ParserGrammarProperties

Extended grammar properties for LR parser generation.

Constructors

this
this(Grammar grammar)

Constructor for ParserGramarProperties. @param grammar The grammar of which to present the properties.

Members

Functions

rightDerivationLeadersOf
auto rightDerivationLeadersOf(Nonterminal nont)

Yields an iterator that iterates the nonterminals which may appear as the leading symbol in a right-derivation from the given nonterminal <code>symbol</code>.

Inherited Members

From GrammarProperties

isNullable
bool isNullable(Symbol symbol)

Returns whether the symbol is nullable or not.

isProductive
bool isProductive(Symbol symbol)

Returns whether the symbol is productive or not.

isReachable
bool isReachable(Symbol symbol)

Returns whether the symbol can be reached from the grammar's start symbol by applying derivation rules.

isStrongNullable
bool isStrongNullable(Symbol symbol)

Returns true if the given symbol is strong nullable. A symbol is strong nullable if and only if it derives only the empty word.

isFirstProductiveAlternative
bool isFirstProductiveAlternative(Alternative alternative)

Return whether the given Alternative is the first (or "simplest") in its Rule structure which has been proven to be productive.

firstProductiveAlternativeFor
Alternative firstProductiveAlternativeFor(Rule rule)

Return the first (or "simplest") Alternative in the given Rule structure which has been proven to be productive.

isReduced
bool isReduced()

Returns whether the grammar is reduced.

grammar
Grammar grammar()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta