1 package com.sun.java_cup.internal.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); 42 left = -1; 43 right = -1; 44 value = o; 45 } 46 47 50 51 public Symbol(int sym_num, int l, int r) { 52 sym = sym_num; 53 left = l; 54 right = r; 55 value = null; 56 } 57 58 61 62 public Symbol(int sym_num) { 63 this(sym_num, -1); 64 left = -1; 65 right = -1; 66 value = null; 67 } 68 69 72 public Symbol(int sym_num, int state) 73 { 74 sym = sym_num; 75 parse_state = state; 76 } 77 78 79 80 81 public int sym; 82 83 84 85 89 public int parse_state; 90 92 boolean used_by_parser = false; 93 94 97 98 public int left, right; 99 public Object value; 100 101 104 public String toString() { return "#"+sym; } 105 } 106 107 108 109 110 111 112 | Popular Tags |