public static final class Grammars.PredictionTable.Builder extends Object
Constructor and Description |
---|
Builder(Grammar grammar)
Creates a fresh builder for a partition table based
on the given
grammar |
Modifier and Type | Method and Description |
---|---|
Grammars.PredictionTable.Builder |
add(String nterm,
String term,
Production prod)
Extends the partition table in this builder by associating
the production
prod to the given combination of
non-terminal and terminal. |
Grammars.PredictionTable |
build() |
public Builder(Grammar grammar)
grammar
grammar
- public Grammars.PredictionTable.Builder add(String nterm, String term, Production prod)
prod
to the given combination of
non-terminal and terminal. If the production is already
associated to these tokens, this does nothing. If it is
not the first production recorded for this combination,
it adds it nonetheless and this will result in a prediction
table with conflicts.nterm
- term
- prod
- public Grammars.PredictionTable build()