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.


Method Summary
 IntArray getProductionItems()
          Returns the set of Item ID's which mention this NonTerminal as an IntArray.
 IntArray getReductions()
          Returns an IntArray of Productions which have this NonTerminal as the left hand side.
 
Methods inherited from interface org.inxar.syntacs.grammar.context_free.GrammarSymbol
getFirstSet, getID, getName, isNullable, isTerminal
 

Method Detail

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.