java_cup.runtime
Class Symbol

java.lang.Object
  extended byjava_cup.runtime.Symbol

public class Symbol
extends java.lang.Object

Class Symbol what the parser expects to receive from the lexer. the token is identified as follows: sym: the symbol type parse_state: the parse state. value: is the lexical value of type Object left : is the left position in the original input file right: is the right position in the original input file


Field Summary
 int left
          The data passed to parser
static long nAllocCount
           
 int parse_state
          The parse state to be recorded on the parse stack with this symbol.
 int right
          The data passed to parser
 int sym
          The symbol number of the terminal or non terminal being represented
 java.lang.Object value
           
 
Constructor Summary
Symbol(int sym_num)
          Constructor for no value or l,r
Symbol(int sym_num, int state)
          Constructor to give a start state
Symbol(int sym_num, int l, int r)
          Constructor for no value
Symbol(int id, int l, int r, java.lang.Object o)
          Constructor for l,r values
Symbol(int id, java.lang.Object o)
          Constructor for no l,r values
 
Method Summary
 java.lang.String toString()
          Printing this token out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nAllocCount

public static long nAllocCount

sym

public int sym
The symbol number of the terminal or non terminal being represented


parse_state

public int parse_state
The parse state to be recorded on the parse stack with this symbol. This field is for the convenience of the parser and shouldn't be modified except by the parser.


left

public int left
The data passed to parser


right

public int right
The data passed to parser


value

public java.lang.Object value
Constructor Detail

Symbol

public Symbol(int id,
              int l,
              int r,
              java.lang.Object o)
Constructor for l,r values


Symbol

public Symbol(int id,
              java.lang.Object o)
Constructor for no l,r values


Symbol

public Symbol(int sym_num,
              int l,
              int r)
Constructor for no value


Symbol

public Symbol(int sym_num)
Constructor for no value or l,r


Symbol

public Symbol(int sym_num,
              int state)
Constructor to give a start state

Method Detail

toString

public java.lang.String toString()
Printing this token out. (Override for pretty-print).