Package schrodinger :: Package application :: Package desmond :: Package antlr3 :: Module tokens :: Class Token
[hide private]
[frames] | no frames]

Class Token

object --+
         |
        Token
Known Subclasses:

@brief Abstract token baseclass.

Instance Methods [hide private]
 
getText(self)
@brief Get the text of the token.
 
setText(self, text)
@brief Set the text of the token.
 
getType(self)
@brief Get the type of the token.
 
setType(self, ttype)
@brief Get the type of the token.
 
getLine(self)
@brief Get the line number on which this token was matched
 
setLine(self, line)
@brief Set the line number on which this token was matched
 
getCharPositionInLine(self)
@brief Get the column of the tokens first character,
 
setCharPositionInLine(self, pos)
@brief Set the column of the tokens first character,
 
getChannel(self)
@brief Get the channel of the token
 
setChannel(self, channel)
@brief Set the channel of the token
 
getTokenIndex(self)
@brief Get the index in the input stream.
 
setTokenIndex(self, index)
@brief Set the index in the input stream.
 
getInputStream(self)
@brief From what character stream was this token created.
 
setInputStream(self, input)
@brief From what character stream was this token created.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

getText(self)

 

@brief Get the text of the token.

Using setter/getter methods is deprecated. Use o.text instead.

setText(self, text)

 

@brief Set the text of the token.

Using setter/getter methods is deprecated. Use o.text instead.

getType(self)

 

@brief Get the type of the token.

Using setter/getter methods is deprecated. Use o.type instead.

setType(self, ttype)

 

@brief Get the type of the token.

Using setter/getter methods is deprecated. Use o.type instead.

getLine(self)

 

@brief Get the line number on which this token was matched

Lines are numbered 1..n

Using setter/getter methods is deprecated. Use o.line instead.

setLine(self, line)

 

@brief Set the line number on which this token was matched

Using setter/getter methods is deprecated. Use o.line instead.

getCharPositionInLine(self)

 

@brief Get the column of the tokens first character,

Columns are numbered 0..n-1

Using setter/getter methods is deprecated. Use o.charPositionInLine instead.

setCharPositionInLine(self, pos)

 

@brief Set the column of the tokens first character,

Using setter/getter methods is deprecated. Use o.charPositionInLine instead.

getChannel(self)

 

@brief Get the channel of the token

Using setter/getter methods is deprecated. Use o.channel instead.

setChannel(self, channel)

 

@brief Set the channel of the token

Using setter/getter methods is deprecated. Use o.channel instead.

getTokenIndex(self)

 

@brief Get the index in the input stream.

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.

Using setter/getter methods is deprecated. Use o.index instead.

setTokenIndex(self, index)

 

@brief Set the index in the input stream.

Using setter/getter methods is deprecated. Use o.index instead.

getInputStream(self)

 

@brief From what character stream was this token created.

You don't have to implement but it's nice to know where a Token comes from if you have include files etc... on the input.

setInputStream(self, input)

 

@brief From what character stream was this token created.

You don't have to implement but it's nice to know where a Token comes from if you have include files etc... on the input.