|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java_cup.runtime.lr_parser polyglot.parse.BaseParser
public abstract class BaseParser
Field Summary | |
---|---|
ErrorQueue |
eq
|
Lexer |
lexer
|
NodeFactory |
nf
|
protected Position |
position
|
protected Position |
prev_pos
|
TypeSystem |
ts
|
Fields inherited from class java_cup.runtime.lr_parser |
---|
_done_parsing, _error_sync_size, action_tab, cur_token, lookahead, lookahead_pos, production_tab, reduce_tab, stack, tos |
Constructor Summary | |
---|---|
BaseParser(Lexer l,
TypeSystem t,
NodeFactory n,
ErrorQueue q)
|
Method Summary | |
---|---|
TypeNode |
array(TypeNode n,
int dims)
Return a TypeNode representing a dims -dimensional
array of n . |
void |
die()
Report a fatal error then abort parsing. |
void |
die(Position pos)
Report a fatal error then abort parsing. |
void |
die(java.lang.String msg,
Position pos)
Report a fatal error then abort parsing. |
protected QualifierNode |
exprToQualifier(Expr e)
Helper for exprToType. |
TypeNode |
exprToType(Expr e)
Convert e into a type, yielding a TypeNode . |
java_cup.runtime.Symbol |
nextSymbol()
The standard scanning routine for use in the CUP "scan with" declaration. |
Position |
pos(java.util.List l)
Return the source position of the first element in the list to the last element in the list. |
Position |
pos(Node n)
Return the source position of the Node. |
Position |
pos(java.lang.Object first,
java.lang.Object last)
|
Position |
pos(java.lang.Object first,
java.lang.Object last,
java.lang.Object noEndDefault)
|
Position |
pos(Token t)
Return the position of the Token. |
Position |
pos(Type n)
Return the source position of the Type. |
Position |
pos(VarDeclarator n)
Return the source position of the declaration. |
protected Position |
posForObject(java.lang.Object o)
|
Position |
position()
|
protected QualifierNode |
prefixToQualifier(Prefix p)
Helper for exprToType. |
void |
report_fatal_error(java.lang.String message,
java.lang.Object info)
Override the default CUP routine. |
protected QualifierNode |
typeToQualifier(TypeNode t)
Helper for exprToType. |
Methods inherited from class java_cup.runtime.lr_parser |
---|
action_table, advance_lookahead, cur_err_token, debug_message, debug_parse, debug_reduce, debug_shift, debug_stack, do_action, done_parsing, dump_stack, EOF_sym, error_recovery, error_sym, error_sync_size, find_recovery_config, get_action, get_reduce, getScanner, init_actions, parse_lookahead, parse, production_table, read_lookahead, reduce_table, report_error, restart_lookahead, scan, setScanner, shift_under_error, start_production, start_state, syntax_error, try_parse_ahead, unpackFromStrings, unrecovered_syntax_error, user_init |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Lexer lexer
public final ErrorQueue eq
public final TypeSystem ts
public final NodeFactory nf
protected Position prev_pos
protected Position position
Constructor Detail |
---|
public BaseParser(Lexer l, TypeSystem t, NodeFactory n, ErrorQueue q)
Method Detail |
---|
public java_cup.runtime.Symbol nextSymbol() throws java.io.IOException
java.io.IOException
public Position position()
public void report_fatal_error(java.lang.String message, java.lang.Object info) throws java.lang.Exception
report_fatal_error
in class java_cup.runtime.lr_parser
message
- an error message.info
- an extra object reserved for use by specialized subclasses.
java.lang.Exception
public void die(java.lang.String msg, Position pos) throws java.lang.Exception
java.lang.Exception
public void die(Position pos) throws java.lang.Exception
java.lang.Exception
public void die() throws java.lang.Exception
java.lang.Exception
protected Position posForObject(java.lang.Object o)
public Position pos(java.lang.Object first, java.lang.Object last)
public Position pos(java.lang.Object first, java.lang.Object last, java.lang.Object noEndDefault)
public Position pos(Token t)
public Position pos(Type n)
public Position pos(java.util.List l)
public Position pos(VarDeclarator n)
public Position pos(Node n)
public TypeNode array(TypeNode n, int dims) throws java.lang.Exception
dims
-dimensional
array of n
.
java.lang.Exception
protected QualifierNode prefixToQualifier(Prefix p) throws java.lang.Exception
java.lang.Exception
protected QualifierNode typeToQualifier(TypeNode t) throws java.lang.Exception
java.lang.Exception
protected QualifierNode exprToQualifier(Expr e) throws java.lang.Exception
java.lang.Exception
public TypeNode exprToType(Expr e) throws java.lang.Exception
e
into a type, yielding a TypeNode
.
This is used by the cast_expression production.
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |