|
ESC/Java2 © 2003,2004,2005,2006 David Cok and Joseph Kiniry © 2005,2006 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavafe.parser.ParseUtil
Base class for Java parser; provides some basic parsing utilities.
ASTNode,
ParseType,
Parse| Field Summary | |
private static ASTDecoration |
elementUniverseDecoration
|
static int[] |
modifierKeywords
Keyword at index i in this array corresponds to bit i in modifier bitset. |
ModifierPragmaVec |
modifierPragmas
As a side effect, parseModifiers mutates this
value. |
protected StackVector |
seqModifierPragma
|
int[] |
universeArray
|
private static ASTDecoration |
universeDecoration
|
int |
universeLevel
|
boolean |
useUniverses
|
| Constructor Summary | |
ParseUtil()
|
|
| Method Summary | |
static java.lang.String |
arrayToString(java.lang.Object[] a,
java.lang.String sep)
|
static void |
error(int loc,
java.lang.String m)
|
void |
expect(Lex l,
int expected)
Takes an expected token from the input stream, calls fail on error. |
static void |
fail(int loc,
java.lang.String m)
Raises a RuntimeException with the argument string including a textual representation of the given source location. |
static int |
getElementUniverse(ASTNode i)
|
int |
getJavaModifier(Lex l,
int modifiers)
Checks if the next token is a Java modifier. |
static int |
getUniverse(ASTNode i)
|
boolean |
isJavaModifier(int ttype)
|
(package private) int |
operatorTokenToTag(int token)
Converts operator tokens to corresponding AST tag. |
ModifierPragmaVec |
parseModifierPragmas(Lex l)
Parse a list of modifier pragmas. |
int |
parseModifiers(Lex l)
Parse a list of modifiers. |
ModifierPragmaVec |
parseMoreModifierPragmas(Lex l,
ModifierPragmaVec orig)
Parse a list of modifier pragmas and adds them to an existing ModifierPragmaVec. |
void |
parseUniverses(Lex l)
|
static ASTNode |
setElementUniverse(ASTNode i,
int u)
|
static ASTNode |
setUniverse(ASTNode i,
int u)
|
static ASTNode |
setUniverse(ASTNode i,
int[] a,
Type t,
int loc)
|
static ASTNode |
setUniverse(GenericVarDecl i,
int[] a)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int universeLevel
public boolean useUniverses
public int[] universeArray
protected final StackVector seqModifierPragma
public static final int[] modifierKeywords
public ModifierPragmaVec modifierPragmas
parseModifiers mutates this
value.
private static ASTDecoration universeDecoration
private static ASTDecoration elementUniverseDecoration
| Constructor Detail |
public ParseUtil()
| Method Detail |
public static void fail(int loc,
java.lang.String m)
public static void error(int loc,
java.lang.String m)
public void expect(Lex l,
int expected)
int operatorTokenToTag(int token)
public ModifierPragmaVec parseModifierPragmas(Lex l)
null if
l does not point to a modifier pragma. Otherwise,
reads l until there are no more modifier pragmas and
returns the resulting list.
public ModifierPragmaVec parseMoreModifierPragmas(Lex l,
ModifierPragmaVec orig)
ModifierPragmaVec. If the existing
ModifierPragmaVec was null, then it
either returns null (if l does not point
to a modifier pragma), or returns a new
ModifierPragmaVec.
public int parseModifiers(Lex l)
In addition to parsing Java modifiers, also handles modifier
pragmas (anything with a ttype of TagConstants.MODIFIERPRAGMA).
If no modifier pragmas are seen, sets
Modifiers
public int getJavaModifier(Lex l,
int modifiers)
public boolean isJavaModifier(int ttype)
public static java.lang.String arrayToString(java.lang.Object[] a,
java.lang.String sep)
public void parseUniverses(Lex l)
public static ASTNode setUniverse(ASTNode i,
int u)
public static ASTNode setUniverse(ASTNode i,
int[] a,
Type t,
int loc)
public static ASTNode setUniverse(GenericVarDecl i,
int[] a)
public static int getUniverse(ASTNode i)
public static ASTNode setElementUniverse(ASTNode i,
int u)
public static int getElementUniverse(ASTNode i)
|
ESC/Java2 © 2003,2004,2005,2006 David Cok and Joseph Kiniry © 2005,2006 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||