public class Item extends Object implements Comparable<Item>
| Modifier and Type | Field and Description |
|---|---|
int |
core
production with remaining. remaining = prodLength - dot
|
PrefixSet |
lookahead
do NOT inline this object into Item because the lookahead is shared when shifting
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Item obj) |
static Item |
create(Grammar grammar,
int production,
PrefixSet lookahead) |
Item |
createShifted() |
boolean |
equals(Object obj) |
void |
expanded(Grammar grammar,
Map<Integer,PrefixSet> firsts,
List<Item> result,
int k) |
int |
getProduction() |
int |
getRemaining()
grammar.getProdLength() for end
|
int |
getShift(Grammar grammar) |
int |
hashCode() |
boolean |
isReduce() |
String |
toString(Grammar grammar,
boolean suppressLookahead) |
public final int core
public final PrefixSet lookahead
public int getProduction()
public int getRemaining()
public int getShift(Grammar grammar)
public boolean isReduce()
public Item createShifted()
public void expanded(Grammar grammar, Map<Integer,PrefixSet> firsts, List<Item> result, int k)
public int compareTo(Item obj)
compareTo in interface Comparable<Item>Copyright © 1998–2017 1&1. All rights reserved.