jay.yydebug

Interface yyDebug

public interface yyDebug

debugging interface for parsers generated by jay. For details consult the skeleton files. The interface expects that the scanner can be queried more then once for a value corresponding to a token.
Method Summary
voidaccept(Object value)
parse is successful.
voiddiscard(int state, int token, String name, Object value)
discarding token during error recovery.
voiderror(String message)
syntax error.
voidlex(int state, int token, String name, Object value)
just called the scanner.
voidpop(int state)
discarding a state during error recovery.
voidpush(int state, Object value)
just pushed the state/value stack.
voidreduce(int from, int to, int rule, String text, int len)
rule completed, calling action.
voidreject()
error recovery failed, about to throw yyException.
voidshift(int from, int to, int errorFlag)
moving to a new state because of input or error.
voidshift(int from, int to)
moving to a new state following an action.

Method Detail

accept

public void accept(Object value)
parse is successful.

Parameters: value to be returned by yyparse().

discard

public void discard(int state, int token, String name, Object value)
discarding token during error recovery.

Parameters: state current state. token discarded. name of token in grammar. value will be obtained from scanner.

error

public void error(String message)
syntax error.

lex

public void lex(int state, int token, String name, Object value)
just called the scanner.

Parameters: state current state. token just obtained from scanner. name of token in grammar. value will be obtained from scanner.

pop

public void pop(int state)
discarding a state during error recovery.

Parameters: state discarded.

push

public void push(int state, Object value)
just pushed the state/value stack.

Parameters: state current state. value current value.

reduce

public void reduce(int from, int to, int rule, String text, int len)
rule completed, calling action.

Parameters: from current state. to state to be uncovered. rule number of completed right-hand side. text text of rule. len number of symbols in rule.

reject

public void reject()
error recovery failed, about to throw yyException.

shift

public void shift(int from, int to, int errorFlag)
moving to a new state because of input or error.

Parameters: from current state. to next state. errorFlag value in next state.

shift

public void shift(int from, int to)
moving to a new state following an action.

Parameters: from current state. to next state.