public class HygieneReport
extends java.lang.Object
A grammar is considered "unhygienic" if it contains any of the following features: unreachable (i.e., unused) nonterminals, unproductive nonterminals, or unproductive rules.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
logcategory |
Modifier and Type | Method and Description |
---|---|
boolean |
ambiguityChecked()
Did the dk.brics.grammar.ambiguity analyzer run successfully?
|
void |
checkAmbiguity() |
void |
checkGrammar() |
java.lang.String |
getAmbiguityReport()
Get the dk.brics.grammar.ambiguity analyzer report.
|
ParserGrammar |
getCompiledGrammar()
Get the grammar associated with this report.
|
java.util.Set<NonterminalSymbol> |
getUndefinedSymbols()
Get the unreachable symbols.
|
java.util.Set<Rule> |
getUnproductiveRules()
Get the unproductive rules.
|
java.util.Set<NonterminalSymbol> |
getUnproductiveSymbols()
Get the unproductive symbols.
|
java.util.Set<NonterminalSymbol> |
getUnreachableSymbols()
Get the unreachable symbols.
|
boolean |
isClean()
Is this grammar "clean"?
|
boolean |
provablyUnambiguous()
Did the dk.brics.grammar.ambiguity analyzer report the grammar unambigous?
|
boolean |
reliablyUnambiguous()
Did the dk.brics.grammar.ambiguity analyzer run reliably?
|
public static final java.lang.String logcategory
public void checkGrammar()
public void checkAmbiguity()
public boolean isClean()
public ParserGrammar getCompiledGrammar()
Note that if the grammar was open when the report was created, it may have changed since this report was created.
public java.util.Set<Rule> getUnproductiveRules()
public java.util.Set<NonterminalSymbol> getUnproductiveSymbols()
public java.util.Set<NonterminalSymbol> getUnreachableSymbols()
public java.util.Set<NonterminalSymbol> getUndefinedSymbols()
public boolean ambiguityChecked()
public boolean provablyUnambiguous()
public boolean reliablyUnambiguous()
public java.lang.String getAmbiguityReport()