1 package java_cup
.runtime
;
4 * Default Implementation for SymbolFactory, creates
7 * @version last updated 27-03-2006
8 * @author Michael Petter
11 /* *************************************************
12 class DefaultSymbolFactory
14 interface for creating new symbols
15 ***************************************************/
16 public class DefaultSymbolFactory
implements SymbolFactory
{
19 * DefaultSymbolFactory for CUP.
20 * Users are strongly encoraged to use ComplexSymbolFactory instead, since
21 * it offers more detailed information about Symbols in source code.
22 * Yet since migrating has always been a critical process, You have the
23 * chance of still using the oldstyle Symbols.
25 * @deprecated as of CUP v11a
26 * replaced by the new java_cup.runtime.ComplexSymbolFactory
29 public DefaultSymbolFactory(){
31 public Symbol
newSymbol(String name
,int id
, Symbol left
, Symbol right
, Object value
){
32 return new Symbol(id
,left
,right
,value
);
34 public Symbol
newSymbol(String name
, int id
, Symbol left
, Symbol right
){
35 return new Symbol(id
,left
,right
);
37 public Symbol
newSymbol(String name
, int id
, int left
, int right
, Object value
){
38 return new Symbol(id
,left
,right
,value
);
40 public Symbol
newSymbol(String name
, int id
, int left
, int right
){
41 return new Symbol(id
,left
,right
);
43 public Symbol
startSymbol(String name
, int id
, int state
){
44 return new Symbol(id
,state
);
46 public Symbol
newSymbol(String name
, int id
){
47 return new Symbol(id
);
49 public Symbol
newSymbol(String name
, int id
, Object value
){
50 return new Symbol(id
,value
);