java_cup

Class CUP$parser$actions

class CUP$parser$actions extends Object

Cup generated class to encapsulate user supplied action code.
Field Summary
protected non_terminallhs_nt
left hand side non terminal of the current production
protected Stringmultipart_name
string to build up multiple part names
protected intMAX_RHS
max size of right hand side we will support
protected Hashtablenon_terms
table of just non terminals -- contains non_terminals indexed by name
protected production_part[]rhs_parts
array for accumulating right hand side parts
protected intrhs_pos
where we are currently in building a right hand side
protected non_terminalstart_nt
declared start non_terminal
protected Hashtablesymbols
table of declared symbols -- contains production parts indexed by name
Method Summary
protected production_partadd_lab(production_part part, String lab)
helper routine to clone a new production part adding a given label
protected voidadd_precedence(String term)
add relevant data to terminals
protected voidadd_rhs_part(production_part part)
add a new right hand side part
protected voidappend_multipart(String name)
append a new name segment to the accumulated multipart name
SymbolCUP$parser$do_action(int CUP$parser$act_num, lr_parser CUP$parser$parser, Stack CUP$parser$stack, int CUP$parser$top)
Method with the actual generated action code.
protected voidnew_rhs()
start a new right hand side
protected voidupdate_precedence(int p)
update the precedences we are declaring

Field Detail

lhs_nt

protected non_terminal lhs_nt
left hand side non terminal of the current production

multipart_name

protected String multipart_name
string to build up multiple part names

MAX_RHS

protected final int MAX_RHS
max size of right hand side we will support

non_terms

protected Hashtable non_terms
table of just non terminals -- contains non_terminals indexed by name

rhs_parts

protected production_part[] rhs_parts
array for accumulating right hand side parts

rhs_pos

protected int rhs_pos
where we are currently in building a right hand side

start_nt

protected non_terminal start_nt
declared start non_terminal

symbols

protected Hashtable symbols
table of declared symbols -- contains production parts indexed by name

Method Detail

add_lab

protected production_part add_lab(production_part part, String lab)
helper routine to clone a new production part adding a given label

add_precedence

protected void add_precedence(String term)
add relevant data to terminals

add_rhs_part

protected void add_rhs_part(production_part part)
add a new right hand side part

append_multipart

protected void append_multipart(String name)
append a new name segment to the accumulated multipart name

CUP$parser$do_action

public final Symbol CUP$parser$do_action(int CUP$parser$act_num, lr_parser CUP$parser$parser, Stack CUP$parser$stack, int CUP$parser$top)
Method with the actual generated action code.

new_rhs

protected void new_rhs()
start a new right hand side

update_precedence

protected void update_precedence(int p)
update the precedences we are declaring