public class DataModelAst extends AnnotatedAst implements DataModelTokenTypes
Currently, line and column number and filename information is not used.
DataModelTokenTypes,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
private static java.util.Map<java.lang.Integer,java.lang.String> |
TOKEN_NAMES
Map of token types to token names
|
private static java.util.Map<java.lang.String,java.lang.Integer> |
TOKEN_TYPES
Map of token names to token types
|
BOOL_FALSE, BOOL_TRUE, CLASS, COMPOSITE, CONSTR_COL, DATA_MODEL, DATE_LITERAL, DATETIME_LITERAL, DATETIME_TZ_LITERAL, DEC_LITERAL, FOREIGN, GENERATOR, INDEX, INDEX_COL, INITIAL, MANY_TO_ONE, NULL_LITERAL, NUM_LITERAL, ONE_TO_MANY, ONE_TO_ONE, PRIMARY, PROPERTY, RELATION_COL, SEQUENCE, STRING, TABLE, TRIGGER, UNIQUE, UNKNOWNRUNTIME_ANNOTATION_COUNT, RUNTIME_CLASS, RUNTIME_CONSTRUCTOR, RUNTIME_METHOD, RUNTIME_VALUE| Constructor and Description |
|---|
DataModelAst()
Default constructor.
|
DataModelAst(antlr.Token token)
Constructor which accepts and wrappers token.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getSymbolicTokenType()
Returns the symbolic representation of this AST's token type.
|
java.lang.String |
lookupTokenName(int type)
Translates an integer value of a token type into the associated
human readable text representation.
|
int |
lookupTokenType(java.lang.String tokenName)
Translates a text representation of a token type into the
actual integer value.
|
protected AnnotatedAst |
newInstance()
Create a new instance of this AST implementation.
|
static java.lang.Object |
resolveConstant(java.lang.String tokenName)
Resolve the given token name to a numeric token type.
|
absolutePath, absolutePath, addChild, ancestor, ancestor, ancestor, annotationCount, annotationKeys, annotationSize, brainwash, brainwash, clearAnnotations, clearIds, compareWith, compareWith, descendant, descendant, descendant, descendant, descendant, downPath, downPath, downPath, downPath, downPath, downPath, dumpSimpleTree, dumpTree, dumpTree, duplicate, duplicate, duplicateFresh, duplicateFresh, fixupParent, fixups, fixups, getAncestor, getAncestor, getAncestor, getAncestor, getAnnotation, getAnnotation, getAnnotationList, getChildAt, getColumn, getDepth, getDescriptiveTokenText, getFilename, getId, getImmediateChild, getImmediateChild, getImmediateChildren, getIndexPos, getLastImmediateChild, getLeftAdjacent, getLeftmost, getLeftmostShadow, getLeftShadow, getLeftShadowNode, getLine, getLocal, getNumChildren, getNumImmediateChildren, getNumImmediateChildren, getNumLeftSiblings, getNumRightSiblings, getParent, getPath, getPrevSibling, getRightAdjacent, getRightmost, getRightmostShadow, getRightShadow, getRightShadowNode, getRuntimeAnnotation, getShadowNodeList, graft, graftAt, graftCopyTo, graftCopyTo, initialize, initialize, intern, isAncestorOf, isAnnotation, isArtificial, isHidden, isLeaf, isRoot, isRuntimeAnnotation, iterator, iterator, iterator, matchAnnotation, move, nearestEnclosing, putAnnotation, putAnnotation, putAnnotation, putAnnotation, putAnnotation, putAnnotation, putAnnotation, putAnnotation, putAnnotation, putAnnotationObject, relativePath, relativePath, relativePath, relativePath, relativePath, relativePath, remove, removeAnnotation, removeAnnotation, removeChildren, setColumn, setFirstChild, setHidden, setId, setLine, setLocal, setNextSibling, setParent, setRuntimeAnnotation, sibling, toString, toStringVerbose, upPath, upPath, upPath, upPath, upPath, upPathdecode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, getNumberOfChildren, getTokenNames, setVerboseStringConversion, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpenclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetImmediateChildprivate static final java.util.Map<java.lang.Integer,java.lang.String> TOKEN_NAMES
private static final java.util.Map<java.lang.String,java.lang.Integer> TOKEN_TYPES
public DataModelAst()
public DataModelAst(antlr.Token token)
token - Token upon which this node is based.public static java.lang.Object resolveConstant(java.lang.String tokenName)
tokenName - String constant representing token name.null if name could not
be resolved.public int lookupTokenType(java.lang.String tokenName)
lookupTokenType in interface AastlookupTokenType in class AnnotatedAsttokenName - The text representation of the token type.public java.lang.String lookupTokenName(int type)
lookupTokenName in interface AastlookupTokenName in class AnnotatedAsttype - The integer token type.null if
no match was found.public java.lang.String getSymbolicTokenType()
getSymbolicTokenType in interface AastgetSymbolicTokenType in class AnnotatedAstprotected AnnotatedAst newInstance()
newInstance in class AnnotatedAstDataModelAst instance.