| java.lang.Object java_cup.runtime.Symbol
Symbol | public class Symbol (Code) | | Defines the Symbol class, which is used to represent all terminals
and nonterminals while parsing. The lexer should pass CUP Symbols
and CUP returns a Symbol.
version: last updated: 7/3/96 author: Frank Flannery |
Field Summary | |
public int | leftright | 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. | public int | sym | boolean | used_by_parser This allows us to catch some errors caused by scanners recycling
symbols. | public Object | value |
Constructor Summary | |
public | Symbol(int id, Symbol left, Symbol right, Object o) | public | Symbol(int id, Symbol left, Symbol right) | public | Symbol(int id, int l, int r, Object o) | public | Symbol(int id, Object o) | public | Symbol(int id, int l, int r) | public | Symbol(int sym_num) | | Symbol(int sym_num, int state) |
leftright | public int leftright(Code) | | The data passed to parser
|
parse_state | public int parse_state(Code) | | 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.
|
sym | public int sym(Code) | | The symbol number of the terminal or non terminal being represented
|
used_by_parser | boolean used_by_parser(Code) | | This allows us to catch some errors caused by scanners recycling
symbols. For the use of the parser only. [CSA, 23-Jul-1999]
|
Symbol | public Symbol(int id, int l, int r, Object o)(Code) | | Constructor for l,r values
|
Symbol | public Symbol(int id, Object o)(Code) | | Constructor for no l,r values
|
Symbol | public Symbol(int id, int l, int r)(Code) | | Constructor for no value
|
Symbol | public Symbol(int sym_num)(Code) | | Constructor for no value or l,r
|
Symbol | Symbol(int sym_num, int state)(Code) | | Constructor to give a start state
|
toString | public String toString()(Code) | | Printing this token out. (Override for pretty-print).
|
|
|