01: package java_cup.runtime;
02:
03: /**
04: * Creates the Symbols interface, which CUP uses as default
05: *
06: * @version last updated 27-03-2006
07: * @author Michael Petter
08: */
09:
10: /* *************************************************
11: Interface SymbolFactory
12:
13: interface for creating new symbols
14: You can also use this interface for your own callback hooks
15: Declare Your own factory methods for creation of Objects in Your scanner!
16: ***************************************************/
17: public interface SymbolFactory {
18: // Factory methods
19: /**
20: * Construction with left/right propagation switched on
21: */
22: public Symbol newSymbol(String name, int id, Symbol left,
23: Symbol right, Object value);
24:
25: public Symbol newSymbol(String name, int id, Symbol left,
26: Symbol right);
27:
28: /**
29: * Construction with left/right propagation switched off
30: */
31: public Symbol newSymbol(String name, int id, Object value);
32:
33: public Symbol newSymbol(String name, int id);
34:
35: /**
36: * Construction of start symbol
37: */
38: public Symbol startSymbol(String name, int id, int state);
39: }
|