aplp.Token Class Reference

List of all members.

Public Member Functions

 Token (int length, byte id)
String toString ()

Public Attributes

int length
byte id
Token next

Static Public Attributes

static final byte NULL = 0
static final byte COMMENT1 = 1
static final byte COMMENT2 = 2
static final byte LITERAL1 = 3
static final byte LITERAL2 = 4
static final byte LABEL = 5
static final byte KEYWORD1 = 6
static final byte KEYWORD2 = 7
static final byte KEYWORD3 = 8
static final byte OPERATOR = 9
static final byte INVALID = 10
static final byte ID_COUNT = 11
static final byte INTERNAL_FIRST = 100
static final byte INTERNAL_LAST = 126
static final byte END = 127

Constructor & Destructor Documentation

aplp.Token.Token int  length,
byte  id
 

Creates a new token.

Parameters:
length The length of the token
id The id of the token


Member Function Documentation

String aplp.Token.toString  ) 
 

Returns a string representation of this token.


Member Data Documentation

final byte aplp.Token.COMMENT1 = 1 [static]
 

Comment 1 token id. This can be used to mark a comment.

final byte aplp.Token.COMMENT2 = 2 [static]
 

Comment 2 token id. This can be used to mark a comment.

final byte aplp.Token.END = 127 [static]
 

The token type, that along with a length of 0 marks the end of the token list.

byte aplp.Token.id
 

The id of this token.

final byte aplp.Token.ID_COUNT = 11 [static]
 

The total number of defined token ids.

final byte aplp.Token.INTERNAL_FIRST = 100 [static]
 

The first id that can be used for internal state in a token marker.

final byte aplp.Token.INTERNAL_LAST = 126 [static]
 

The last id that can be used for internal state in a token marker.

final byte aplp.Token.INVALID = 10 [static]
 

Invalid token id. This can be used to mark invalid or incomplete tokens, so the user can easily spot syntax errors.

final byte aplp.Token.KEYWORD1 = 6 [static]
 

Keyword 1 token id. This can be used to mark a keyword. This should be used for general language constructs.

final byte aplp.Token.KEYWORD2 = 7 [static]
 

Keyword 2 token id. This can be used to mark a keyword. This should be used for preprocessor commands, or variables.

final byte aplp.Token.KEYWORD3 = 8 [static]
 

Keyword 3 token id. This can be used to mark a keyword. This should be used for data types.

final byte aplp.Token.LABEL = 5 [static]
 

Label token id. This can be used to mark labels (eg, C mode uses this to mark ...: sequences)

int aplp.Token.length
 

The length of this token.

final byte aplp.Token.LITERAL1 = 3 [static]
 

Literal 1 token id. This can be used to mark a string literal (eg, C mode uses this to mark "..." literals)

final byte aplp.Token.LITERAL2 = 4 [static]
 

Literal 2 token id. This can be used to mark an object literal (eg, Java mode uses this to mark true, false, etc)

Token aplp.Token.next
 

The next token in the linked list.

final byte aplp.Token.NULL = 0 [static]
 

Normal text token id. This should be used to mark normal text.

final byte aplp.Token.OPERATOR = 9 [static]
 

Operator token id. This can be used to mark an operator. (eg, SQL mode marks +, -, etc with this token type)


The documentation for this class was generated from the following file:
Generated on Mon Dec 12 15:07:19 2005 for 3APL by  doxygen 1.4.5