new files from jflex 1.4.3
[fedora-idea.git] / tools / lexer / jflex-1.4 / src / java_cup / runtime / DefaultSymbolFactory.java
blobd5bca58a271aa81354dda6e0fc4f49fc6b1582d5
1 package java_cup.runtime;
3 /**
4 * Default Implementation for SymbolFactory, creates
5 * plain old Symbols
7 * @version last updated 27-03-2006
8 * @author Michael Petter
9 */
11 /* *************************************************
12 class DefaultSymbolFactory
14 interface for creating new symbols
15 ***************************************************/
16 public class DefaultSymbolFactory implements SymbolFactory{
17 // Factory methods
18 /**
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
28 //@deprecated
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);