source: other-projects/rsyntax-textarea/devel-packages/jflex-1.4.3/src/java_cup/runtime/DefaultSymbolFactory.java@ 25584

Last change on this file since 25584 was 25584, checked in by davidb, 12 years ago

Initial cut an a text edit area for GLI that supports color syntax highlighting

File size: 1.7 KB
Line 
1package java_cup.runtime;
2
3/**
4 * Default Implementation for SymbolFactory, creates
5 * plain old Symbols
6 *
7 * @version last updated 27-03-2006
8 * @author Michael Petter
9 */
10
11/* *************************************************
12 class DefaultSymbolFactory
13
14 interface for creating new symbols
15 ***************************************************/
16public 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.
24 *
25 * @deprecated as of CUP v11a
26 * replaced by the new java_cup.runtime.ComplexSymbolFactory
27 */
28 //@deprecated
29 public DefaultSymbolFactory(){
30 }
31 public Symbol newSymbol(String name ,int id, Symbol left, Symbol right, Object value){
32 return new Symbol(id,left,right,value);
33 }
34 public Symbol newSymbol(String name, int id, Symbol left, Symbol right){
35 return new Symbol(id,left,right);
36 }
37 public Symbol newSymbol(String name, int id, int left, int right, Object value){
38 return new Symbol(id,left,right,value);
39 }
40 public Symbol newSymbol(String name, int id, int left, int right){
41 return new Symbol(id,left,right);
42 }
43 public Symbol startSymbol(String name, int id, int state){
44 return new Symbol(id,state);
45 }
46 public Symbol newSymbol(String name, int id){
47 return new Symbol(id);
48 }
49 public Symbol newSymbol(String name, int id, Object value){
50 return new Symbol(id,value);
51 }
52}
Note: See TracBrowser for help on using the repository browser.