Packageorg.antlr.runtime
Classpublic class CommonToken
ImplementsToken



Public Properties
 PropertyDefined by
  channel : int
CommonToken
  charPositionInLine : int
CommonToken
  inputStream : CharStream
CommonToken
  line : int
CommonToken
  startIndex : int
CommonToken
  stopIndex : int
CommonToken
  text : String
CommonToken
  tokenIndex : int
CommonToken
  type : int
CommonToken
Protected Properties
 PropertyDefined by
  _channel : int = 0
CommonToken
  _charPositionInLine : int = -1
CommonToken
  _index : int = -1
What token number is this from 0..n-1 tokens; < 0 implies invalid index
CommonToken
  _input : CharStream
CommonToken
  _line : int
CommonToken
  _start : int
The char position into the input buffer where this token starts
CommonToken
  _stop : int
The char position into the input buffer where this token stops
CommonToken
  _text : String
We need to be able to change the text once in a while.
CommonToken
  _type : int
CommonToken
Public Methods
 MethodDefined by
  
CommonToken(type:int, text:String = null)
CommonToken
  
[static]
CommonToken
  
createFromStream(input:CharStream, type:int, channel:int, start:int, stop:int):CommonToken
[static]
CommonToken
  
toString():String
CommonToken
Property detail
_channelproperty
protected var _channel:int = 0
channelproperty 
channel:int  [read-write]Implementation
    public function get channel():int
    public function set channel(value:int):void
_charPositionInLineproperty 
protected var _charPositionInLine:int = -1
charPositionInLineproperty 
charPositionInLine:int  [read-write]Implementation
    public function get charPositionInLine():int
    public function set charPositionInLine(value:int):void
_indexproperty 
protected var _index:int = -1

What token number is this from 0..n-1 tokens; < 0 implies invalid index

_inputproperty 
protected var _input:CharStream
inputStreamproperty 
inputStream:CharStream  [read-write]Implementation
    public function get inputStream():CharStream
    public function set inputStream(value:CharStream):void
_lineproperty 
protected var _line:int
lineproperty 
line:int  [read-write]Implementation
    public function get line():int
    public function set line(value:int):void
_startproperty 
protected var _start:int

The char position into the input buffer where this token starts

startIndexproperty 
startIndex:int  [read-write]Implementation
    public function get startIndex():int
    public function set startIndex(value:int):void
_stopproperty 
protected var _stop:int

The char position into the input buffer where this token stops

stopIndexproperty 
stopIndex:int  [read-write]Implementation
    public function get stopIndex():int
    public function set stopIndex(value:int):void
_textproperty 
protected var _text:String

We need to be able to change the text once in a while. If this is non-null, then getText should return this. Note that start/stop are not affected by changing this.

textproperty 
text:String  [read-write]Implementation
    public function get text():String
    public function set text(value:String):void
tokenIndexproperty 
tokenIndex:int  [read-write]Implementation
    public function get tokenIndex():int
    public function set tokenIndex(value:int):void
_typeproperty 
protected var _type:int
typeproperty 
type:int  [read-write]Implementation
    public function get type():int
    public function set type(value:int):void
Constructor detail
CommonToken()constructor
public function CommonToken(type:int, text:String = null)Parameters
type:int
 
text:String (default = null)
Method detail
cloneToken()method
public static function cloneToken(oldToken:Token):CommonTokenParameters
oldToken:Token

Returns
CommonToken
createFromStream()method 
public static function createFromStream(input:CharStream, type:int, channel:int, start:int, stop:int):CommonTokenParameters
input:CharStream
 
type:int
 
channel:int
 
start:int
 
stop:int

Returns
CommonToken
toString()method 
public function toString():String

Returns
String