Modifier and Type | Field and Description |
---|---|
Map<String,Set<String>> |
first
For each non-terminal X, the set of terminals
that can begin strings derived from X
|
Map<String,Set<String>> |
follow
For each non-terminal X, the set of terminals
which can follow X immediately in derived strings
|
Set<String> |
nullable
The set of nullable non-terminals, i.e. from
which the empty string can be derived
|
Modifier and Type | Method and Description |
---|---|
Set<String> |
first(Production prod) |
Set<String> |
first(String nterm) |
Set<String> |
follow(String nterm) |
boolean |
nullable(Production prod) |
boolean |
nullable(String nterm) |
String |
toString() |
public final Set<String> nullable
public final Map<String,Set<String>> first
public boolean nullable(String nterm)
nterm
- nterm
is nullablepublic boolean nullable(Production prod)
prod
- prod
is nullablepublic Set<String> first(String nterm)
nterm
- nterm
IllegalArgumentException
- if nterm
is not a known non-terminalpublic Set<String> first(Production prod)
prod
- prod
public Set<String> follow(String nterm)
nterm
- nterm
in derived stringsIllegalArgumentException
- if nterm
is not a known non-terminal