Package | Description |
---|---|
org.stekikun.dolmen.unparam |
Modifier and Type | Method and Description |
---|---|
static Grammars.Dependencies |
Grammars.dependencies(Grammar grammar)
Computes the map of dependencies between the non-terminals
of the given grammar, i.e. associates to every non-terminal in
grammar the set of non-terminals which appear in the
right-hand side of productions for this non-terminal. |
Modifier and Type | Method and Description |
---|---|
static Grammars.NTermsInfo |
Grammars.analyseGrammar(Grammar grammar,
@Nullable Grammars.Dependencies deps_,
@Nullable Reporter reporter)
Analyze the given
grammar and compute for every non-terminal
whether it is nullable, and the associated FIRST and FOLLOW
sets. |
protected static Map<String,Set<String>> |
Grammars.first(Grammars.Dependencies deps,
Grammar grammar,
Set<String> nullable) |
protected static Map<String,Set<String>> |
Grammars.follow(Grammars.Dependencies deps,
Grammar grammar,
Set<String> nullable,
Map<String,Set<String>> first) |
protected static Set<String> |
Grammars.nullable(Grammars.Dependencies deps,
Grammar grammar)
NB: In all generality this is only a correct approximation, so
non-terminals which are not in the resulting state are not guaranteed
to always produce non-empty matches.
|