01: package ro.infoiasi.donald.compiler.parser;
02:
03: import java.util.*;
04:
05: class LALR1State extends LR1State {
06: private Set lr0kernel = new LinkedHashSet();
07:
08: public boolean addKernelItem(LR1Item item) {
09: if (super .addKernelItem(item)) {
10: lr0kernel.add(item.getLR0Item());
11: return true;
12: } else {
13: return false;
14: }
15: }
16:
17: public Collection getLR0KernelItems() {
18: return lr0kernel;
19: }
20: }
|