|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jltools.parse.Util
Utility routines for use by the parser. Although some routines are static, the intended use is to instantiate this class on a ParserWrapper and use the resulting object in the parser.
Field Summary | |
protected NodeFactory |
nf
|
protected ParserWrapper |
parser
|
protected TypeSystem |
ts
|
Constructor Summary | |
Util(ParserWrapper parser)
Construct a utility object for use by parser . |
Method Summary | |
TypeNode |
array(TypeNode n,
int dims)
Return a TypeNode representing a dims -dimensional
array of n . |
protected QualifierNode |
exprToQualifier(Expr e)
Helper for exprToType. |
TypeNode |
exprToType(Expr e)
Convert e into a type, yielding a TypeNode . |
static Position |
pos(java.util.List l)
Return the source position of the first element in the list. |
static Position |
pos(Node n)
Return the source position of the Node. |
static Position |
pos(Token t)
Return the position of the Token. |
static Position |
pos(Type n)
Return the source position of the Type. |
static Position |
pos(VarDeclarator n)
Return the source position of the declaration. |
protected QualifierNode |
prefixToQualifier(Prefix p)
Helper for exprToType. |
protected QualifierNode |
typeToQualifier(TypeNode t)
Helper for exprToType. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ParserWrapper parser
protected NodeFactory nf
protected TypeSystem ts
Constructor Detail |
public Util(ParserWrapper parser)
parser
.Method Detail |
public static Position pos(Token t)
public static Position pos(Type n)
public static Position pos(java.util.List l)
public static Position pos(VarDeclarator n)
public static Position pos(Node n)
public TypeNode array(TypeNode n, int dims) throws java.lang.Exception
dims
-dimensional
array of n
.protected QualifierNode prefixToQualifier(Prefix p) throws java.lang.Exception
protected QualifierNode typeToQualifier(TypeNode t) throws java.lang.Exception
protected QualifierNode exprToQualifier(Expr e) throws 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |