com.octagroup.foregej.antlr
Class BaseToken
java.lang.Object
|
+--antlr.Token
|
+--antlr.CommonToken
|
+--antlr.CommonHiddenStreamToken
|
+--com.octagroup.foregej.antlr.BaseToken
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- JavaDocToken, JavaToken
- public class BaseToken
- extends antlr.CommonHiddenStreamToken
The base representation of a token in the FOREGEJ system.
Fields inherited from class antlr.CommonHiddenStreamToken |
hiddenAfter, hiddenBefore |
Fields inherited from class antlr.CommonToken |
col, line, text |
Fields inherited from class antlr.Token |
badToken, EOF_TYPE, INVALID_TYPE, MIN_USER_TYPE, NULL_TREE_LOOKAHEAD, SKIP |
Method Summary |
BaseAST |
getCreatedAst()
Returns the created ast. |
boolean |
isAfter(BaseToken token)
Returns true if this token is after the supplied token. |
boolean |
isAstCreated()
Signals if an ast has been created for this token. |
boolean |
isBefore(BaseToken token)
Returns true if this token is after the supplied token. |
void |
setCreatedAst(BaseAST ast)
Signals that an ast has been created. |
void |
setHiddenAfter(antlr.CommonHiddenStreamToken hiddenAfter)
Sets the token hidden after this one |
void |
setHiddenBefore(antlr.CommonHiddenStreamToken hiddenBefore)
Sets the token hidden before this one |
Methods inherited from class antlr.CommonHiddenStreamToken |
getHiddenAfter, getHiddenBefore |
Methods inherited from class antlr.CommonToken |
getColumn, getLine, getText, setColumn, setLine, setText, toString |
Methods inherited from class antlr.Token |
getFilename, getType, setFilename, setType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BaseToken
public BaseToken()
setHiddenBefore
public void setHiddenBefore(antlr.CommonHiddenStreamToken hiddenBefore)
- Sets the token hidden before this one
- Overrides:
setHiddenBefore
in class antlr.CommonHiddenStreamToken
- Parameters:
hiddenBefore
-
setHiddenAfter
public void setHiddenAfter(antlr.CommonHiddenStreamToken hiddenAfter)
- Sets the token hidden after this one
- Overrides:
setHiddenAfter
in class antlr.CommonHiddenStreamToken
- Parameters:
hiddenAfter
-
setCreatedAst
public void setCreatedAst(BaseAST ast)
- Signals that an ast has been created.
- Parameters:
ast
-
isAstCreated
public boolean isAstCreated()
- Signals if an ast has been created for this token. This flag is
updated when the
- Returns:
-
getCreatedAst
public BaseAST getCreatedAst()
- Returns the created ast.
- Returns:
-
isAfter
public boolean isAfter(BaseToken token)
- Returns true if this token is after the supplied token.
- Parameters:
token
- - Returns:
-
isBefore
public boolean isBefore(BaseToken token)
- Returns true if this token is after the supplied token.
- Parameters:
token
- - Returns:
-
Copyright © 2003 El Icognito des Noboby. All Rights Reserved.