org.codehaus.groovy.syntax
Class Token

java.lang.Object
  |
  +--org.codehaus.groovy.syntax.Token

public class Token
extends Object

Lexical token.

Version:
$Id: Token.java,v 1.18 2003/12/10 20:07:51 jstrachan Exp $
Author:
bob mcwhirter

Field Summary
static int COLON
          Token type for ":".
static int COMMA
           
static int COMPARE_EQUAL
          Token type for ":=".
static int COMPARE_GREATER_THAN
          Token type for ">".
static int COMPARE_GREATER_THAN_EQUAL
          Token type for ">=".
static int COMPARE_IDENTICAL
          Token type for "==".
static int COMPARE_LESS_THAN
          Token type for "<".
static int COMPARE_LESS_THAN_EQUAL
          Token type for "<=".
static int COMPARE_NOT_EQUAL
          Token type for "!=".
static int COMPARE_TO
          Token type for "<=>".
static int DIVIDE
          Token type for "/".
static int DIVIDE_EQUAL
          Token type for "/=".
static int DOT
          Token type for ".".
static int DOT_DOT
          Token type for "..".
static int DOUBLE_QUOTE_STRING
          Token type for double-quoted string literal.
static int EQUAL
          Token type for "=".
static int FIND_REGEX
          Token type for "~=".
static int FLOAT_NUMBER
          Token type for floating-point number.
static int IDENTIFIER
          Token type for identifier.
static int INTEGER_NUMBER
          Token type for integral number.
static int KEYWORD_ABSTRACT
           
static int KEYWORD_AS
           
static int KEYWORD_ASSERT
           
static int KEYWORD_BREAK
           
static int KEYWORD_CASE
           
static int KEYWORD_CATCH
           
static int KEYWORD_CLASS
           
static int KEYWORD_CONST
           
static int KEYWORD_CONTINUE
           
static int KEYWORD_DEFAULT
           
static int KEYWORD_DO
           
static int KEYWORD_ELSE
           
static int KEYWORD_EXTENDS
           
static int KEYWORD_FALSE
           
static int KEYWORD_FINAL
           
static int KEYWORD_FINALLY
           
static int KEYWORD_FLOAT
           
static int KEYWORD_FOR
           
static int KEYWORD_GOTO
           
static int KEYWORD_IF
           
static int KEYWORD_IMPLEMENTS
           
static int KEYWORD_IMPORT
           
static int KEYWORD_INSTANCEOF
           
static int KEYWORD_INT
           
static int KEYWORD_INTERFACE
           
static int KEYWORD_NATIVE
           
static int KEYWORD_NEW
           
static int KEYWORD_NULL
           
static int KEYWORD_PACKAGE
           
static int KEYWORD_PRIVATE
           
static int KEYWORD_PROPERTY
           
static int KEYWORD_PROTECTED
           
static int KEYWORD_PUBLIC
           
static int KEYWORD_RETURN
           
static int KEYWORD_STATIC
           
static int KEYWORD_SUPER
           
static int KEYWORD_SWITCH
           
static int KEYWORD_SYNCHRONIZED
           
static int KEYWORD_THIS
           
static int KEYWORD_THROW
           
static int KEYWORD_THROWS
           
static int KEYWORD_TRUE
           
static int KEYWORD_TRY
           
static int KEYWORD_VOID
           
static int KEYWORD_WHILE
           
static int LEFT_CURLY_BRACE
          Token type for "{".
static int LEFT_PARENTHESIS
          Token type for "(".
static int LEFT_SQUARE_BRACKET
          Token type for "[".
static int LOGICAL_AND
          Token type for "&&".
static int LOGICAL_OR
          Token type for "||".
static int MATCH_REGEX
          Token type for "~==".
static int MINUS
          Token type for "-".
static int MINUS_EQUAL
          Token type for "-=".
static int MINUS_MINUS
          Token type for "--".
static int MOD
          Token type for "%".
static int MOD_EQUAL
          Token type for "%=".
static int MULTIPLY
          Token type for "*".
static int MULTIPLY_EQUAL
          Token type for "*=".
static int NAVIGATE
          Token type for "->".
static int NEWLINE
          Token type for "\n".
static int NOT
          Token type for "!".
static int PATTERN_REGEX
          Token type for "~"
static int PIPE
          Token type for "|".
static int PLUS
          Token type for "+".
static int PLUS_EQUAL
          Token type for "+=".
static int PLUS_PLUS
          Token type for "++".
static int QUESTION
          Token type for "?".
static int RIGHT_CURLY_BRACE
          Token type for "}".
static int RIGHT_PARENTHESIS
          Token type for ")".
static int RIGHT_SQUARE_BRACKET
          Token type for "]".
static int SEMICOLON
          Token type for ";".
static int SINGLE_QUOTE_STRING
          Token type for single-quoted string literal.
static int SYNTH_LIST
           
static int SYNTH_MAP
           
static int SYNTH_METHOD
           
static int SYNTH_PARAMETER_DECLARATION
           
static int SYNTH_POSTFIX
           
static int SYNTH_PREFIX
           
 
Constructor Summary
protected Token(int type, String text, int startLine, int startColumn)
          Construct.
 
Method Summary
static org.codehaus.groovy.syntax.Token colon(int startLine, int startColumn)
          Factory method for token for ":".
static org.codehaus.groovy.syntax.Token comma(int startLine, int startColumn)
           
static org.codehaus.groovy.syntax.Token compareEqual(int startLine, int startColumn)
          Factory method for token for ":=".
static org.codehaus.groovy.syntax.Token compareGreaterThan(int startLine, int startColumn)
          Factory method for token for ">".
static org.codehaus.groovy.syntax.Token compareGreaterThanEqual(int startLine, int startColumn)
          Factory method for token for ">=".
static org.codehaus.groovy.syntax.Token compareIdentical(int startLine, int startColumn)
          Factory method for token for "==".
static org.codehaus.groovy.syntax.Token compareLessThan(int startLine, int startColumn)
          Factory method for token for "<".
static org.codehaus.groovy.syntax.Token compareLessThanEqual(int startLine, int startColumn)
          Factory method for token for "<=".
static org.codehaus.groovy.syntax.Token compareNotEqual(int startLine, int startColumn)
          Factory method for token for "!=".
static org.codehaus.groovy.syntax.Token compareTo(int startLine, int startColumn)
          Factory method for token for "<=>".
static org.codehaus.groovy.syntax.Token divide(int startLine, int startColumn)
          Factory method for token for "/".
static org.codehaus.groovy.syntax.Token divideEqual(int startLine, int startColumn)
          Factory method for token for "/=".
static org.codehaus.groovy.syntax.Token dot(int startLine, int startColumn)
          Factory method for token for ".".
static org.codehaus.groovy.syntax.Token dotDot(int startLine, int startColumn)
           
static org.codehaus.groovy.syntax.Token doubleQuoteString(int startLine, int startColumn, String text)
          Factory method for token for double-quoted string.
static org.codehaus.groovy.syntax.Token equal(int startLine, int startColumn)
          Factory method for token for "=".
static org.codehaus.groovy.syntax.Token findRegex(int startLine, int startColumn)
          Factory method for token for "~=".
static org.codehaus.groovy.syntax.Token floatNumber(int startLine, int startColumn, String text)
           
 String getDescription()
           
 int getStartColumn()
          Retrieve the starting column within the source.
 int getStartLine()
          Retrieve the starting line within the source.
 String getText()
          Retrieve the actual token text.
static String getTokenDescription(int type)
           
 int getType()
          Retrieve the type.
static org.codehaus.groovy.syntax.Token identifier(int startLine, int startColumn, String text)
          Factory method for token for identifier.
static org.codehaus.groovy.syntax.Token integerNumber(int startLine, int startColumn, String text)
           
static org.codehaus.groovy.syntax.Token keyword(int startLine, int startColumn, String text)
           
static org.codehaus.groovy.syntax.Token leftCurlyBrace(int startLine, int startColumn)
          Factory method for token for "{".
static org.codehaus.groovy.syntax.Token leftParenthesis(int startLine, int startColumn)
          Factory method for token for "(".
static org.codehaus.groovy.syntax.Token leftSquareBracket(int startLine, int startColumn)
          Factory method for token for "[".
static org.codehaus.groovy.syntax.Token logicalAnd(int startLine, int startColumn)
          Factory method for token for "&&".
static org.codehaus.groovy.syntax.Token logicalOr(int startLine, int startColumn)
          Factory method for token for "||".
static org.codehaus.groovy.syntax.Token matchRegex(int startLine, int startColumn)
          Factory method for token for "~==".
static org.codehaus.groovy.syntax.Token minus(int startLine, int startColumn)
          Factory method for token for "-".
static org.codehaus.groovy.syntax.Token minusEqual(int startLine, int startColumn)
          Factory method for token for "-=".
static org.codehaus.groovy.syntax.Token minusMinus(int startLine, int startColumn)
          Factory method for token for "--".
static org.codehaus.groovy.syntax.Token mod(int startLine, int startColumn)
          Factory method for token for "%".
static org.codehaus.groovy.syntax.Token modEqual(int startLine, int startColumn)
          Factory method for token for "%=".
static org.codehaus.groovy.syntax.Token multiply(int startLine, int startColumn)
          Factory method for token for "*".
static org.codehaus.groovy.syntax.Token multiplyEqual(int startLine, int startColumn)
          Factory method for token for "*=".
static org.codehaus.groovy.syntax.Token navigate(int startLine, int startColumn)
          Factory method for token for "->".
static org.codehaus.groovy.syntax.Token newline(int startLine, int startColumn)
          Factory method for token for "\n".
static org.codehaus.groovy.syntax.Token newToken(int type, int startLine, int startColumn)
          Creates the token of the given id
protected static org.codehaus.groovy.syntax.Token newToken(int type, String text, int startLine, int startColumn)
          Generic factory method for a token.
static org.codehaus.groovy.syntax.Token not(int startLine, int startColumn)
          Factory method for token for "!".
static org.codehaus.groovy.syntax.Token patternRegex(int startLine, int startColumn)
          Factory method for token for double-quoted string.
static org.codehaus.groovy.syntax.Token pipe(int startLine, int startColumn)
          Factory method for token for "|".
static org.codehaus.groovy.syntax.Token plus(int startLine, int startColumn)
          Factory method for token for "+".
static org.codehaus.groovy.syntax.Token plusEqual(int startLine, int startColumn)
          Factory method for token for "+=".
static org.codehaus.groovy.syntax.Token plusPlus(int startLine, int startColumn)
          Factory method for token for "++".
static org.codehaus.groovy.syntax.Token question(int startLine, int startColumn)
          Factory method for token for "?".
static org.codehaus.groovy.syntax.Token rightCurlyBrace(int startLine, int startColumn)
          Factory method for token for "}".
static org.codehaus.groovy.syntax.Token rightParenthesis(int startLine, int startColumn)
          Factory method for token for ")".
static org.codehaus.groovy.syntax.Token rightSquareBracket(int startLine, int startColumn)
          Factory method for token for "]".
static org.codehaus.groovy.syntax.Token semicolon(int startLine, int startColumn)
          Factory method for token for ";".
static org.codehaus.groovy.syntax.Token singleQuoteString(int startLine, int startColumn, String text)
          Factory method for token for single-quoted string.
static org.codehaus.groovy.syntax.Token syntheticList()
           
static org.codehaus.groovy.syntax.Token syntheticMap()
           
static org.codehaus.groovy.syntax.Token syntheticMethod()
           
static org.codehaus.groovy.syntax.Token syntheticParameterDeclaration()
           
static org.codehaus.groovy.syntax.Token syntheticPostfix()
           
static org.codehaus.groovy.syntax.Token syntheticPrefix()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NEWLINE

public static final int NEWLINE
Token type for "\n".

See Also:
Constant Field Values

LEFT_CURLY_BRACE

public static final int LEFT_CURLY_BRACE
Token type for "{".

See Also:
Constant Field Values

RIGHT_CURLY_BRACE

public static final int RIGHT_CURLY_BRACE
Token type for "}".

See Also:
Constant Field Values

LEFT_SQUARE_BRACKET

public static final int LEFT_SQUARE_BRACKET
Token type for "[".

See Also:
Constant Field Values

RIGHT_SQUARE_BRACKET

public static final int RIGHT_SQUARE_BRACKET
Token type for "]".

See Also:
Constant Field Values

LEFT_PARENTHESIS

public static final int LEFT_PARENTHESIS
Token type for "(".

See Also:
Constant Field Values

RIGHT_PARENTHESIS

public static final int RIGHT_PARENTHESIS
Token type for ")".

See Also:
Constant Field Values

DOT

public static final int DOT
Token type for ".".

See Also:
Constant Field Values

DOT_DOT

public static final int DOT_DOT
Token type for "..".

See Also:
Constant Field Values

NOT

public static final int NOT
Token type for "!".

See Also:
Constant Field Values

COMPARE_NOT_EQUAL

public static final int COMPARE_NOT_EQUAL
Token type for "!=".

See Also:
Constant Field Values

EQUAL

public static final int EQUAL
Token type for "=".

See Also:
Constant Field Values

FIND_REGEX

public static final int FIND_REGEX
Token type for "~=".

See Also:
Constant Field Values

MATCH_REGEX

public static final int MATCH_REGEX
Token type for "~==".

See Also:
Constant Field Values

PATTERN_REGEX

public static final int PATTERN_REGEX
Token type for "~"

See Also:
Constant Field Values

COMPARE_IDENTICAL

public static final int COMPARE_IDENTICAL
Token type for "==".

See Also:
Constant Field Values

COMPARE_EQUAL

public static final int COMPARE_EQUAL
Token type for ":=".

See Also:
Constant Field Values

COMPARE_LESS_THAN

public static final int COMPARE_LESS_THAN
Token type for "<".

See Also:
Constant Field Values

COMPARE_LESS_THAN_EQUAL

public static final int COMPARE_LESS_THAN_EQUAL
Token type for "<=".

See Also:
Constant Field Values

COMPARE_GREATER_THAN

public static final int COMPARE_GREATER_THAN
Token type for ">".

See Also:
Constant Field Values

COMPARE_GREATER_THAN_EQUAL

public static final int COMPARE_GREATER_THAN_EQUAL
Token type for ">=".

See Also:
Constant Field Values

COMPARE_TO

public static final int COMPARE_TO
Token type for "<=>".

See Also:
Constant Field Values

NAVIGATE

public static final int NAVIGATE
Token type for "->".

See Also:
Constant Field Values

LOGICAL_OR

public static final int LOGICAL_OR
Token type for "||".

See Also:
Constant Field Values

LOGICAL_AND

public static final int LOGICAL_AND
Token type for "&&".

See Also:
Constant Field Values

PLUS

public static final int PLUS
Token type for "+".

See Also:
Constant Field Values

PLUS_PLUS

public static final int PLUS_PLUS
Token type for "++".

See Also:
Constant Field Values

PLUS_EQUAL

public static final int PLUS_EQUAL
Token type for "+=".

See Also:
Constant Field Values

MINUS

public static final int MINUS
Token type for "-".

See Also:
Constant Field Values

MINUS_MINUS

public static final int MINUS_MINUS
Token type for "--".

See Also:
Constant Field Values

MINUS_EQUAL

public static final int MINUS_EQUAL
Token type for "-=".

See Also:
Constant Field Values

DIVIDE

public static final int DIVIDE
Token type for "/".

See Also:
Constant Field Values

DIVIDE_EQUAL

public static final int DIVIDE_EQUAL
Token type for "/=".

See Also:
Constant Field Values

MOD

public static final int MOD
Token type for "%".

See Also:
Constant Field Values

MOD_EQUAL

public static final int MOD_EQUAL
Token type for "%=".

See Also:
Constant Field Values

MULTIPLY

public static final int MULTIPLY
Token type for "*".

See Also:
Constant Field Values

MULTIPLY_EQUAL

public static final int MULTIPLY_EQUAL
Token type for "*=".

See Also:
Constant Field Values

COMMA

public static final int COMMA
See Also:
Constant Field Values

COLON

public static final int COLON
Token type for ":".

See Also:
Constant Field Values

SEMICOLON

public static final int SEMICOLON
Token type for ";".

See Also:
Constant Field Values

QUESTION

public static final int QUESTION
Token type for "?".

See Also:
Constant Field Values

PIPE

public static final int PIPE
Token type for "|".

See Also:
Constant Field Values

DOUBLE_QUOTE_STRING

public static final int DOUBLE_QUOTE_STRING
Token type for double-quoted string literal.

See Also:
Constant Field Values

SINGLE_QUOTE_STRING

public static final int SINGLE_QUOTE_STRING
Token type for single-quoted string literal.

See Also:
Constant Field Values

IDENTIFIER

public static final int IDENTIFIER
Token type for identifier.

See Also:
Constant Field Values

INTEGER_NUMBER

public static final int INTEGER_NUMBER
Token type for integral number.

See Also:
Constant Field Values

FLOAT_NUMBER

public static final int FLOAT_NUMBER
Token type for floating-point number.

See Also:
Constant Field Values

KEYWORD_ABSTRACT

public static final int KEYWORD_ABSTRACT
See Also:
Constant Field Values

KEYWORD_AS

public static final int KEYWORD_AS
See Also:
Constant Field Values

KEYWORD_BREAK

public static final int KEYWORD_BREAK
See Also:
Constant Field Values

KEYWORD_CASE

public static final int KEYWORD_CASE
See Also:
Constant Field Values

KEYWORD_CATCH

public static final int KEYWORD_CATCH
See Also:
Constant Field Values

KEYWORD_CLASS

public static final int KEYWORD_CLASS
See Also:
Constant Field Values

KEYWORD_CONST

public static final int KEYWORD_CONST
See Also:
Constant Field Values

KEYWORD_CONTINUE

public static final int KEYWORD_CONTINUE
See Also:
Constant Field Values

KEYWORD_DEFAULT

public static final int KEYWORD_DEFAULT
See Also:
Constant Field Values

KEYWORD_DO

public static final int KEYWORD_DO
See Also:
Constant Field Values

KEYWORD_ELSE

public static final int KEYWORD_ELSE
See Also:
Constant Field Values

KEYWORD_EXTENDS

public static final int KEYWORD_EXTENDS
See Also:
Constant Field Values

KEYWORD_FINAL

public static final int KEYWORD_FINAL
See Also:
Constant Field Values

KEYWORD_FINALLY

public static final int KEYWORD_FINALLY
See Also:
Constant Field Values

KEYWORD_FOR

public static final int KEYWORD_FOR
See Also:
Constant Field Values

KEYWORD_GOTO

public static final int KEYWORD_GOTO
See Also:
Constant Field Values

KEYWORD_IF

public static final int KEYWORD_IF
See Also:
Constant Field Values

KEYWORD_IMPLEMENTS

public static final int KEYWORD_IMPLEMENTS
See Also:
Constant Field Values

KEYWORD_IMPORT

public static final int KEYWORD_IMPORT
See Also:
Constant Field Values

KEYWORD_INSTANCEOF

public static final int KEYWORD_INSTANCEOF
See Also:
Constant Field Values

KEYWORD_INTERFACE

public static final int KEYWORD_INTERFACE
See Also:
Constant Field Values

KEYWORD_NATIVE

public static final int KEYWORD_NATIVE
See Also:
Constant Field Values

KEYWORD_NEW

public static final int KEYWORD_NEW
See Also:
Constant Field Values

KEYWORD_PACKAGE

public static final int KEYWORD_PACKAGE
See Also:
Constant Field Values

KEYWORD_PRIVATE

public static final int KEYWORD_PRIVATE
See Also:
Constant Field Values

KEYWORD_PROTECTED

public static final int KEYWORD_PROTECTED
See Also:
Constant Field Values

KEYWORD_PUBLIC

public static final int KEYWORD_PUBLIC
See Also:
Constant Field Values

KEYWORD_RETURN

public static final int KEYWORD_RETURN
See Also:
Constant Field Values

KEYWORD_STATIC

public static final int KEYWORD_STATIC
See Also:
Constant Field Values

KEYWORD_SUPER

public static final int KEYWORD_SUPER
See Also:
Constant Field Values

KEYWORD_SWITCH

public static final int KEYWORD_SWITCH
See Also:
Constant Field Values

KEYWORD_SYNCHRONIZED

public static final int KEYWORD_SYNCHRONIZED
See Also:
Constant Field Values

KEYWORD_THIS

public static final int KEYWORD_THIS
See Also:
Constant Field Values

KEYWORD_THROW

public static final int KEYWORD_THROW
See Also:
Constant Field Values

KEYWORD_THROWS

public static final int KEYWORD_THROWS
See Also:
Constant Field Values

KEYWORD_TRY

public static final int KEYWORD_TRY
See Also:
Constant Field Values

KEYWORD_WHILE

public static final int KEYWORD_WHILE
See Also:
Constant Field Values

KEYWORD_PROPERTY

public static final int KEYWORD_PROPERTY
See Also:
Constant Field Values

KEYWORD_TRUE

public static final int KEYWORD_TRUE
See Also:
Constant Field Values

KEYWORD_FALSE

public static final int KEYWORD_FALSE
See Also:
Constant Field Values

KEYWORD_ASSERT

public static final int KEYWORD_ASSERT
See Also:
Constant Field Values

KEYWORD_NULL

public static final int KEYWORD_NULL
See Also:
Constant Field Values

KEYWORD_VOID

public static final int KEYWORD_VOID
See Also:
Constant Field Values

KEYWORD_INT

public static final int KEYWORD_INT
See Also:
Constant Field Values

KEYWORD_FLOAT

public static final int KEYWORD_FLOAT
See Also:
Constant Field Values

SYNTH_METHOD

public static final int SYNTH_METHOD
See Also:
Constant Field Values

SYNTH_PARAMETER_DECLARATION

public static final int SYNTH_PARAMETER_DECLARATION
See Also:
Constant Field Values

SYNTH_LIST

public static final int SYNTH_LIST
See Also:
Constant Field Values

SYNTH_MAP

public static final int SYNTH_MAP
See Also:
Constant Field Values

SYNTH_POSTFIX

public static final int SYNTH_POSTFIX
See Also:
Constant Field Values

SYNTH_PREFIX

public static final int SYNTH_PREFIX
See Also:
Constant Field Values
Constructor Detail

Token

protected Token(int type,
                String text,
                int startLine,
                int startColumn)
Construct.

Parameters:
type - Type of the token.
text - Actual text.
startLine - Starting line within source.
startColumn - Starting column within source.
Method Detail

newToken

public static org.codehaus.groovy.syntax.Token newToken(int type,
                                                        int startLine,
                                                        int startColumn)
Creates the token of the given id


getTokenDescription

public static String getTokenDescription(int type)

getType

public int getType()
Retrieve the type.

Returns:
The type.

getText

public String getText()
Retrieve the actual token text.

Returns:
The text.

getStartLine

public int getStartLine()
Retrieve the starting line within the source.

Returns:
The starting line.

getStartColumn

public int getStartColumn()
Retrieve the starting column within the source.

Returns:
The starting column.

getDescription

public String getDescription()

toString

public String toString()
Overrides:
toString in class Object

newline

public static org.codehaus.groovy.syntax.Token newline(int startLine,
                                                       int startColumn)
Factory method for token for "\n".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

leftCurlyBrace

public static org.codehaus.groovy.syntax.Token leftCurlyBrace(int startLine,
                                                              int startColumn)
Factory method for token for "{".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

rightCurlyBrace

public static org.codehaus.groovy.syntax.Token rightCurlyBrace(int startLine,
                                                               int startColumn)
Factory method for token for "}".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

leftSquareBracket

public static org.codehaus.groovy.syntax.Token leftSquareBracket(int startLine,
                                                                 int startColumn)
Factory method for token for "[".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

rightSquareBracket

public static org.codehaus.groovy.syntax.Token rightSquareBracket(int startLine,
                                                                  int startColumn)
Factory method for token for "]".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

leftParenthesis

public static org.codehaus.groovy.syntax.Token leftParenthesis(int startLine,
                                                               int startColumn)
Factory method for token for "(".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

rightParenthesis

public static org.codehaus.groovy.syntax.Token rightParenthesis(int startLine,
                                                                int startColumn)
Factory method for token for ")".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

dot

public static org.codehaus.groovy.syntax.Token dot(int startLine,
                                                   int startColumn)
Factory method for token for ".".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

dotDot

public static org.codehaus.groovy.syntax.Token dotDot(int startLine,
                                                      int startColumn)

not

public static org.codehaus.groovy.syntax.Token not(int startLine,
                                                   int startColumn)
Factory method for token for "!".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

compareNotEqual

public static org.codehaus.groovy.syntax.Token compareNotEqual(int startLine,
                                                               int startColumn)
Factory method for token for "!=".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

findRegex

public static org.codehaus.groovy.syntax.Token findRegex(int startLine,
                                                         int startColumn)
Factory method for token for "~=".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

matchRegex

public static org.codehaus.groovy.syntax.Token matchRegex(int startLine,
                                                          int startColumn)
Factory method for token for "~==".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

equal

public static org.codehaus.groovy.syntax.Token equal(int startLine,
                                                     int startColumn)
Factory method for token for "=".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

compareIdentical

public static org.codehaus.groovy.syntax.Token compareIdentical(int startLine,
                                                                int startColumn)
Factory method for token for "==".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

compareEqual

public static org.codehaus.groovy.syntax.Token compareEqual(int startLine,
                                                            int startColumn)
Factory method for token for ":=".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

compareLessThan

public static org.codehaus.groovy.syntax.Token compareLessThan(int startLine,
                                                               int startColumn)
Factory method for token for "<".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

compareLessThanEqual

public static org.codehaus.groovy.syntax.Token compareLessThanEqual(int startLine,
                                                                    int startColumn)
Factory method for token for "<=".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

compareGreaterThan

public static org.codehaus.groovy.syntax.Token compareGreaterThan(int startLine,
                                                                  int startColumn)
Factory method for token for ">".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

compareGreaterThanEqual

public static org.codehaus.groovy.syntax.Token compareGreaterThanEqual(int startLine,
                                                                       int startColumn)
Factory method for token for ">=".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

compareTo

public static org.codehaus.groovy.syntax.Token compareTo(int startLine,
                                                         int startColumn)
Factory method for token for "<=>".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

navigate

public static org.codehaus.groovy.syntax.Token navigate(int startLine,
                                                        int startColumn)
Factory method for token for "->".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

logicalOr

public static org.codehaus.groovy.syntax.Token logicalOr(int startLine,
                                                         int startColumn)
Factory method for token for "||".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

logicalAnd

public static org.codehaus.groovy.syntax.Token logicalAnd(int startLine,
                                                          int startColumn)
Factory method for token for "&&".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

plus

public static org.codehaus.groovy.syntax.Token plus(int startLine,
                                                    int startColumn)
Factory method for token for "+".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

plusPlus

public static org.codehaus.groovy.syntax.Token plusPlus(int startLine,
                                                        int startColumn)
Factory method for token for "++".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

plusEqual

public static org.codehaus.groovy.syntax.Token plusEqual(int startLine,
                                                         int startColumn)
Factory method for token for "+=".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

minus

public static org.codehaus.groovy.syntax.Token minus(int startLine,
                                                     int startColumn)
Factory method for token for "-".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

minusMinus

public static org.codehaus.groovy.syntax.Token minusMinus(int startLine,
                                                          int startColumn)
Factory method for token for "--".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

minusEqual

public static org.codehaus.groovy.syntax.Token minusEqual(int startLine,
                                                          int startColumn)
Factory method for token for "-=".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

divide

public static org.codehaus.groovy.syntax.Token divide(int startLine,
                                                      int startColumn)
Factory method for token for "/".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

divideEqual

public static org.codehaus.groovy.syntax.Token divideEqual(int startLine,
                                                           int startColumn)
Factory method for token for "/=".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

mod

public static org.codehaus.groovy.syntax.Token mod(int startLine,
                                                   int startColumn)
Factory method for token for "%".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

modEqual

public static org.codehaus.groovy.syntax.Token modEqual(int startLine,
                                                        int startColumn)
Factory method for token for "%=".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

multiply

public static org.codehaus.groovy.syntax.Token multiply(int startLine,
                                                        int startColumn)
Factory method for token for "*".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

multiplyEqual

public static org.codehaus.groovy.syntax.Token multiplyEqual(int startLine,
                                                             int startColumn)
Factory method for token for "*=".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

comma

public static org.codehaus.groovy.syntax.Token comma(int startLine,
                                                     int startColumn)

colon

public static org.codehaus.groovy.syntax.Token colon(int startLine,
                                                     int startColumn)
Factory method for token for ":".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

semicolon

public static org.codehaus.groovy.syntax.Token semicolon(int startLine,
                                                         int startColumn)
Factory method for token for ";".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

question

public static org.codehaus.groovy.syntax.Token question(int startLine,
                                                        int startColumn)
Factory method for token for "?".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

pipe

public static org.codehaus.groovy.syntax.Token pipe(int startLine,
                                                    int startColumn)
Factory method for token for "|".

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

doubleQuoteString

public static org.codehaus.groovy.syntax.Token doubleQuoteString(int startLine,
                                                                 int startColumn,
                                                                 String text)
Factory method for token for double-quoted string.

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

patternRegex

public static org.codehaus.groovy.syntax.Token patternRegex(int startLine,
                                                            int startColumn)
Factory method for token for double-quoted string.

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

singleQuoteString

public static org.codehaus.groovy.syntax.Token singleQuoteString(int startLine,
                                                                 int startColumn,
                                                                 String text)
Factory method for token for single-quoted string.

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

identifier

public static org.codehaus.groovy.syntax.Token identifier(int startLine,
                                                          int startColumn,
                                                          String text)
Factory method for token for identifier.

Parameters:
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.

keyword

public static org.codehaus.groovy.syntax.Token keyword(int startLine,
                                                       int startColumn,
                                                       String text)

integerNumber

public static org.codehaus.groovy.syntax.Token integerNumber(int startLine,
                                                             int startColumn,
                                                             String text)

floatNumber

public static org.codehaus.groovy.syntax.Token floatNumber(int startLine,
                                                           int startColumn,
                                                           String text)

syntheticMethod

public static org.codehaus.groovy.syntax.Token syntheticMethod()

syntheticParameterDeclaration

public static org.codehaus.groovy.syntax.Token syntheticParameterDeclaration()

syntheticMap

public static org.codehaus.groovy.syntax.Token syntheticMap()

syntheticList

public static org.codehaus.groovy.syntax.Token syntheticList()

syntheticPostfix

public static org.codehaus.groovy.syntax.Token syntheticPostfix()

syntheticPrefix

public static org.codehaus.groovy.syntax.Token syntheticPrefix()

newToken

protected static org.codehaus.groovy.syntax.Token newToken(int type,
                                                           String text,
                                                           int startLine,
                                                           int startColumn)
Generic factory method for a token.

Parameters:
type - The token type.
text - The token text.
startLine - Line upon which the token starts.
startColumn - Column upon which the token starts.
Returns:
The token.


Copyright © 2003 The Codehaus. All Rights Reserved.