01: package ro.infoiasi.donald.compiler.cfg;
02:
03: public interface WordIterator extends Cloneable {
04: public Object clone();
05:
06: boolean hasNext();
07:
08: boolean hasNextTerminal();
09:
10: boolean hasNextNonTerminal();
11:
12: Symbol getNext();
13:
14: Symbol next();
15:
16: Terminal nextTerminal();
17:
18: NonTerminal nextNonTerminal();
19:
20: int nextIndex();
21:
22: boolean hasPrev();
23:
24: boolean hasPrevTerminal();
25:
26: boolean hasPrevNonTerminal();
27:
28: Symbol getPrev();
29:
30: Symbol prev();
31:
32: Terminal prevTerminal();
33:
34: NonTerminal prevNonTerminal();
35:
36: int prevIndex();
37:
38: void remove();
39:
40: void set(Symbol sym);
41:
42: void addBefore(Symbol sym);
43:
44: void addAfter(Symbol sym);
45:
46: void addWordBefore(Word w);
47:
48: void addWordAfter(Word w);
49:
50: Word suffix();
51:
52: Word prefix();
53: }
|