1 package java_cup.runtime; 2 3 11 12 22 23 public class Symbol { 24 25 28 29 public Symbol(int id, int l, int r, Object o) { 30 this(id); 31 left = l; 32 right = r; 33 value = o; 34 } 35 36 39 40 public Symbol(int id, Object o) { 41 this(id, -1, -1, o); 42 } 43 44 47 48 public Symbol(int id, int l, int r) { 49 this(id, l, r, null); 50 } 51 52 55 56 public Symbol(int sym_num) { 57 this(sym_num, -1); 58 left = -1; 59 right = -1; 60 value = null; 61 } 62 63 66 Symbol(int sym_num, int state) 67 { 68 sym = sym_num; 69 parse_state = state; 70 } 71 72 73 74 75 public int sym; 76 77 78 79 83 public int parse_state; 84 86 boolean used_by_parser = false; 87 88 91 92 public int left, right; 93 public Object value; 94 95 98 public String toString() { return "#"+sym; } 99 } 100 101 102 103 104 105 106 | Popular Tags |