GrammarProperties

Undocumented in source.

Constructors

this
this(Grammar grammar)
Undocumented in source.

Members

Functions

firstProductiveAlternativeFor
Alternative firstProductiveAlternativeFor(Rule rule)

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

grammar
Grammar grammar()
Undocumented in source. Be warned that the author may not have intended to support it.
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.

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.

isReduced
bool isReduced()

Returns whether the grammar is reduced.

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.

Meta