|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.inxar.syntacs.grammar.context_free.CFLR1Item
Standard LR1Item
implementation.
Method Summary | |
Item |
getCore()
Returns the Item which represents the core of this
Item . |
IntSet |
getFirstSet()
Return a IntSet of Item s over the
FIRST(beta, a); |
int |
getID()
Returns the unique allocated ID for this Item . |
Terminal |
getLookahead()
Returns the Terminal symbol which may follow this
Item . |
Production |
getProduction()
Returns the Production to which this
Item is associated. |
boolean |
hasNext()
Returns true if the dot is not after the last
symbol in the Production . |
boolean |
hasPrevious()
Returns true if the dot is not before the first
symbol in the Production . |
LR1Item |
lookahead(Terminal lookahead)
Returns an LR1Item corresponding to this core
Item with the given lookahead. |
Item |
nextItem()
Returns the Item which represents moving the dot
forward one symbol. |
GrammarSymbol |
nextSymbol()
Returns the GrammarSymbol b where [a dot b]. |
Item |
previousItem()
Returns the Item which represents moving the dot
backwards one symbol. |
GrammarSymbol |
previousSymbol()
Returns the GrammarSymbol a where [a dot b]. |
String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public int getID()
Item
Item
.getID
in interface Item
public Production getProduction()
Item
Production
to which this
Item
is associated.getProduction
in interface Item
public Terminal getLookahead()
LR1Item
Terminal
symbol which may follow this
Item
.getLookahead
in interface LR1Item
public Item getCore()
LR1Item
Item
which represents the core of this
Item
.getCore
in interface LR1Item
public boolean hasNext()
Item
true
if the dot is not after the last
symbol in the Production
.hasNext
in interface Item
public boolean hasPrevious()
Item
true
if the dot is not before the first
symbol in the Production
.hasPrevious
in interface Item
public Item nextItem()
Item
Item
which represents moving the dot
forward one symbol. If there is no such Item
(ie
the dot is already at the end), null
is returned.nextItem
in interface Item
public Item previousItem()
Item
Item
which represents moving the dot
backwards one symbol. If there is no such Item
(ie the dot is already at the beginning), null
is
returned.previousItem
in interface Item
public GrammarSymbol nextSymbol()
Item
GrammarSymbol
b where [a dot b].nextSymbol
in interface Item
public GrammarSymbol previousSymbol()
Item
GrammarSymbol
a where [a dot b].previousSymbol
in interface Item
public LR1Item lookahead(Terminal lookahead)
Item
LR1Item
corresponding to this core
Item
with the given lookahead.lookahead
in interface Item
public IntSet getFirstSet()
Item
IntSet
of Item
s over the
FIRST(beta, a);
getFirstSet
in interface Item
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |