KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ro > infoiasi > donald > compiler > parser > runtime > StackSymbol


1 package ro.infoiasi.donald.compiler.parser.runtime;
2
3 public class StackSymbol {
4     public int sym;
5     public int parseState;
6     public int line, column;
7     public Object JavaDoc value;
8     
9     public StackSymbol(int sym, int line, int column, Object JavaDoc value) {
10         this.sym = sym;
11         this.line = line;
12         this.column = column;
13         this.value = value;
14     }
15
16     public StackSymbol(int sym, int parseState) {
17         this.sym = sym;
18         this.parseState = parseState;
19     }
20
21     public StackSymbol(int sym, Object JavaDoc value) {
22         this(sym, -1, -1, value);
23     }
24
25     public StackSymbol(int sym, int line, int column) {
26         this(sym, line, column, null);
27     }
28
29     public StackSymbol(int sym) {
30         this(sym, -1, -1, null);
31     }
32
33     public String JavaDoc toString() {
34         return "#"+sym;
35     }
36 }
37
Popular Tags