Antlr.Runtime.CommonToken Class Reference

Inheritance diagram for Antlr.Runtime.CommonToken:

Inheritance graph
[legend]
Collaboration diagram for Antlr.Runtime.CommonToken:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CommonToken (int type)
 CommonToken (ICharStream input, int type, int channel, int start, int stop)
 CommonToken (int type, string text)
 CommonToken (IToken oldToken)
override string ToString ()

Protected Attributes

internal int type
internal int line
internal int charPositionInLine = -1
internal int channel = Token.DEFAULT_CHANNEL
internal ICharStream input
internal string text
 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.
internal int index = -1
 What token number is this from 0..n-1 tokens; < 0 implies invalid index.
internal int start
 The char position into the input buffer where this token starts.
internal int stop
 The char position into the input buffer where this token stops.

Properties

virtual int Type [get, set]
virtual int Line [get, set]
 The line number on which this token was matched; line=1..n.
virtual int CharPositionInLine [get, set]
 The index of the first character relative to the beginning of the line 0..n-1.
virtual int Channel [get, set]
virtual int StartIndex [get, set]
virtual int StopIndex [get, set]
virtual int TokenIndex [get, set]
 An index from 0..n-1 of the token object in the input stream.
virtual ICharStream InputStream [get, set]
virtual string Text [get, set]
 The text of the token.


Detailed Description

Definition at line 41 of file CommonToken.cs.


Constructor & Destructor Documentation

Antlr.Runtime.CommonToken.CommonToken ( int  type  ) 

Definition at line 45 of file CommonToken.cs.

Antlr.Runtime.CommonToken.CommonToken ( ICharStream  input,
int  type,
int  channel,
int  start,
int  stop 
)

Definition at line 50 of file CommonToken.cs.

Antlr.Runtime.CommonToken.CommonToken ( int  type,
string  text 
)

Definition at line 59 of file CommonToken.cs.

Antlr.Runtime.CommonToken.CommonToken ( IToken  oldToken  ) 

Definition at line 66 of file CommonToken.cs.


Member Function Documentation

override string Antlr.Runtime.CommonToken.ToString (  ) 

Definition at line 159 of file CommonToken.cs.


Member Data Documentation

internal int Antlr.Runtime.CommonToken.type [protected]

Definition at line 184 of file CommonToken.cs.

internal int Antlr.Runtime.CommonToken.line [protected]

Definition at line 185 of file CommonToken.cs.

internal int Antlr.Runtime.CommonToken.charPositionInLine = -1 [protected]

Definition at line 186 of file CommonToken.cs.

Definition at line 187 of file CommonToken.cs.

Definition at line 188 of file CommonToken.cs.

internal string Antlr.Runtime.CommonToken.text [protected]

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.

Definition at line 194 of file CommonToken.cs.

internal int Antlr.Runtime.CommonToken.index = -1 [protected]

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

Definition at line 197 of file CommonToken.cs.

internal int Antlr.Runtime.CommonToken.start [protected]

The char position into the input buffer where this token starts.

Definition at line 200 of file CommonToken.cs.

internal int Antlr.Runtime.CommonToken.stop [protected]

The char position into the input buffer where this token stops.

Definition at line 203 of file CommonToken.cs.


Property Documentation

virtual int Antlr.Runtime.CommonToken.Type [get, set]

Implements Antlr.Runtime.IToken.

Definition at line 85 of file CommonToken.cs.

virtual int Antlr.Runtime.CommonToken.Line [get, set]

The line number on which this token was matched; line=1..n.

Implements Antlr.Runtime.IToken.

Definition at line 91 of file CommonToken.cs.

virtual int Antlr.Runtime.CommonToken.CharPositionInLine [get, set]

The index of the first character relative to the beginning of the line 0..n-1.

Implements Antlr.Runtime.IToken.

Definition at line 97 of file CommonToken.cs.

virtual int Antlr.Runtime.CommonToken.Channel [get, set]

Implements Antlr.Runtime.IToken.

Definition at line 103 of file CommonToken.cs.

virtual int Antlr.Runtime.CommonToken.StartIndex [get, set]

Definition at line 109 of file CommonToken.cs.

virtual int Antlr.Runtime.CommonToken.StopIndex [get, set]

Definition at line 115 of file CommonToken.cs.

virtual int Antlr.Runtime.CommonToken.TokenIndex [get, set]

An index from 0..n-1 of the token object in the input stream.

This must be valid in order to use the ANTLRWorks debugger.

Implements Antlr.Runtime.IToken.

Definition at line 121 of file CommonToken.cs.

virtual ICharStream Antlr.Runtime.CommonToken.InputStream [get, set]

Definition at line 127 of file CommonToken.cs.

virtual string Antlr.Runtime.CommonToken.Text [get, set]

The text of the token.

When setting the text, it might be a NOP such as for the CommonToken, which doesn't have string pointers, just indexes into a char buffer.

Implements Antlr.Runtime.IToken.

Definition at line 133 of file CommonToken.cs.


The documentation for this class was generated from the following file:

Generated on Wed Oct 1 14:13:24 2008 for ANTLR API by  doxygen 1.5.5