|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The Production
interface is an abstraction of a
discrete 'rule' in a grammar. A Production
specifies
a valid sequence of GrammarSymbol
s that may be reduce
to a certain NonTerminal
.
Method Summary | |
Production |
add(GrammarSymbol grammarSymbol)
Concatenates the given GrammarSymbol to the end of
this Production sequence. |
IntArray |
getGrammarSymbols()
Returns an IntArray for the right hand side of
this Production . |
int |
getID()
Gets the globally allocated identifier for this Production . |
Item |
getInitialItem()
Returns the first Item in the
Production , A := *ab. |
NonTerminal |
getNonTerminal()
Returns the NonTerminal defined as the left hand
side of this Production . |
int |
length()
Returns the number of GrammarSymbols on the right
hand side. |
Method Detail |
public int getID()
Production
.public NonTerminal getNonTerminal()
NonTerminal
defined as the left hand
side of this Production
.public Item getInitialItem()
Item
in the
Production
, A := *ab.public Production add(GrammarSymbol grammarSymbol)
GrammarSymbol
to the end of
this Production
sequence. The
Production
object is returned simply to support a
convenient java.lang.StringBuffer style of coding.
public IntArray getGrammarSymbols()
IntArray
for the right hand side of
this Production
. Each member in the array is
the ID of a GrammarSymbol
.public int length()
GrammarSymbols
on the right
hand side. This has the same effect as
getGrammarSymbols().length()
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |