org.multijava.util.compiler
Class CToken
java.lang.Object
antlr.Token
org.multijava.util.compiler.CToken
- All Implemented Interfaces:
- Cloneable
- public final class CToken
- extends antlr.Token
| Fields inherited from class antlr.Token |
badToken, EOF_TYPE, INVALID_TYPE, MIN_USER_TYPE, NULL_TREE_LOOKAHEAD, SKIP |
|
Constructor Summary |
CToken(int type,
String text)
Constructs a token |
CToken(int type,
String text,
int flags)
Constructs a token |
| Methods inherited from class antlr.Token |
getColumn, getFilename, getLine, getType, setColumn, setFilename, setLine, setType, toString |
currentToken
private static final CToken.LookupToken currentToken
table
private static final Hashtable table
text
private String text
flags
private int flags
- A bitmask indicating the flags that are true for this token.
CToken
public CToken(int type,
String text)
- Constructs a token
CToken
public CToken(int type,
String text,
int flags)
- Constructs a token
getText
public String getText()
- Overrides:
getText in class antlr.Token
setText
public void setText(String text)
- Overrides:
setText in class antlr.Token
makeTokenReference
public TokenReference makeTokenReference()
hasFlag
public boolean hasFlag(int flag)
- Returns true if the flag represented by the bitmask
flag is true for this token.
requires (\exists int p; p >= 0; ((int) Math.pow(2, p)) == flag);
requires_redundantly (* only one bit is set in flag *);
lookupToken
public static CToken lookupToken(int type,
char[] data,
int start,
int length)
mjc is Copyright (C) 2000-2004 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. mjc is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.