org.inxar.syntacs.grammar.context_free
Interface NonTerminal
- All Superinterfaces:
- GrammarSymbol
- All Known Implementing Classes:
- CFNonTerminal
- public interface NonTerminal
- extends GrammarSymbol
The NonTerminal
interface abstracts the symbol on the
left-hand side of a Production
. More information
about what a NonTerminal
represents see Chapter 4 in
the Dragon Book.
getProductionItems
public IntArray getProductionItems()
- Returns the set of Item ID's which mention this
NonTerminal
as an IntArray
. This is
useful in the calculation of follow sets. Each member in the
array corresponds to the ID of an Item
[ a
dot b ] where a is equal to this
NonTerminal
.
getReductions
public IntArray getReductions()
- Returns an
IntArray
of Productions
which have this NonTerminal
as the left hand side.