parsers.symbtab
Class JavaToken

java.lang.Object
  |
  +--antlr.Token
        |
        +--antlr.CommonToken
              |
              +--parsers.symbtab.JavaToken

public class JavaToken
extends antlr.CommonToken

A simple token that is used to relay information from the scanner to the parser. We've extended it to save information about the file from which the token was created, and the number of parameters (telling if the symbol looked like a method invocation or some other symbol reference.)


Field Summary
private  java.io.File file
          A reference to the File that was scanned to create this symbol
private  int paramCount
          A count of the parameters used to call a method.
 
Fields inherited from class antlr.CommonToken
line, text
 
Fields inherited from class antlr.Token
badToken, EOF_TYPE, INVALID_TYPE, MIN_USER_TYPE, NULL_TREE_LOOKAHEAD, SKIP, type
 
Constructor Summary
JavaToken()
           
 
Method Summary
 java.io.File getFile()
          get the File that contained the text scanned for this token
 int getParamCount()
          get the number of parameters for this token (if it represents a method invocation
 void setFile(java.io.File file)
          Sets the file property of this token
 void setParamCount(int count)
          Sets the parameter count property of this token
 
Methods inherited from class antlr.CommonToken
getLine, getText, setLine, setText, toString
 
Methods inherited from class antlr.Token
getColumn, getType, setColumn, setType
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

paramCount

private int paramCount
A count of the parameters used to call a method. -1 means the symbol is not a method invocation

file

private java.io.File file
A reference to the File that was scanned to create this symbol
Constructor Detail

JavaToken

public JavaToken()
Method Detail

getFile

public java.io.File getFile()
get the File that contained the text scanned for this token

getParamCount

public int getParamCount()
get the number of parameters for this token (if it represents a method invocation

setFile

public void setFile(java.io.File file)
Sets the file property of this token

setParamCount

public void setParamCount(int count)
Sets the parameter count property of this token