All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.kvisco.xsl.util.ExprLexer

com.kvisco.xsl.util.ExprLexer

public class ExprLexer
A Lexical Analizer of XSL patterns and expressions

Author:
Keith Visco

Variable Index

 o ADDITION_OP
 o AT_SYMBOL
 o COMMA
 o CR
 o D_QUOTE
 o DOLLAR_SYMBOL
 o EQUALS_OP
 o FORWARD_SLASH
 o GREATER_THAN_OP
 o L_BRACKET
 o L_PAREN
 o LESS_THAN_OP
 o LF
 o MULTIPLY_OP
 o PERIOD
 o R_BRACKET
 o R_PAREN
 o S_QUOTE
 o SPACE
 o SUBTRACTION_OP
 o TAB
 o tokenSet
the delimiter set of an ExprLexer
 o VERT_BAR

Constructor Index

 o ExprLexer(String)
Creates a new ExprLexer using the given String

Method Index

 o advance(int)
Advances the index of this tokenizer ahead by the given offset
 o countTokens()
Counts the number of times nextToken can be called without returning null
 o getPosition()
 o hasMoreTokens()
Determines if there are any tokens available
 o isAdditiveOp(Token)
 o isBinaryOp(Token)
 o isDelimiter(char)
Determines if the specified char is a delimiter
 o isDigit(char)
Returns true if the char argument is a digit
 o isEqualityOp(Token)
 o isLetter(char)
Returns true if the char argument is a letter
 o isMultiplicativeOp(Token)
 o isNCNameChar(char)
Returns true if the char argument is an NCNameChar, as defined by the XML Namespaces recommendation http://www.w3c.org/TR/1999/REC-xml-names-199904114
 o isOperator(Token)
 o isQNameChar(char)
Returns true if the char argument is an QName character, as defined by the XML Namespaces recommendation http://www.w3c.org/TR/1999/REC-xml-names-199904114
 o isRelationalOp(Token)
 o isWhitespace(char)
 o lookAhead(int)
Allows looking ahead for tokens without affecting the token sequence as called by nextToken or previousToken
 o main(String[])
 o nextToken()
Retrieves the next available token
 o pushBack()
Moves the position of this Lexer back one
 o resetPosition()
Resets the position of the token pointer to the beginning
 o setPosition(int)
Sets the current position of this tokenizer.
 o toString()

Variables

 o FORWARD_SLASH
 public static final char FORWARD_SLASH
 o L_PAREN
 public static final char L_PAREN
 o R_PAREN
 public static final char R_PAREN
 o L_BRACKET
 public static final char L_BRACKET
 o R_BRACKET
 public static final char R_BRACKET
 o PERIOD
 public static final char PERIOD
 o COMMA
 public static final char COMMA
 o AT_SYMBOL
 public static final char AT_SYMBOL
 o DOLLAR_SYMBOL
 public static final char DOLLAR_SYMBOL
 o S_QUOTE
 public static final char S_QUOTE
 o D_QUOTE
 public static final char D_QUOTE
 o VERT_BAR
 public static final char VERT_BAR
 o SPACE
 public static final char SPACE
 o TAB
 public static final char TAB
 o LF
 public static final char LF
 o CR
 public static final char CR
 o EQUALS_OP
 public static final char EQUALS_OP
 o ADDITION_OP
 public static final char ADDITION_OP
 o SUBTRACTION_OP
 public static final char SUBTRACTION_OP
 o LESS_THAN_OP
 public static final char LESS_THAN_OP
 o GREATER_THAN_OP
 public static final char GREATER_THAN_OP
 o MULTIPLY_OP
 public static final char MULTIPLY_OP
 o tokenSet
 public static final Token tokenSet[]
the delimiter set of an ExprLexer

Constructors

 o ExprLexer
 public ExprLexer(String pattern)
Creates a new ExprLexer using the given String

Methods

 o advance
 public void advance(int offset)
Advances the index of this tokenizer ahead by the given offset

 o countTokens
 public int countTokens()
Counts the number of times nextToken can be called without returning null

 o getPosition
 public int getPosition()
 o hasMoreTokens
 public boolean hasMoreTokens()
Determines if there are any tokens available

Returns:
true if there are tokens available, otherwise false
 o isDelimiter
 public boolean isDelimiter(char ch)
Determines if the specified char is a delimiter

Parameters:
ch - the char to compare to the delimiters
Returns:
true if the String argument is a delimiter
 o isOperator
 public boolean isOperator(Token token)
 o isAdditiveOp
 public static boolean isAdditiveOp(Token token)
 o isBinaryOp
 public static boolean isBinaryOp(Token token)
 o isEqualityOp
 public static boolean isEqualityOp(Token token)
 o isRelationalOp
 public static boolean isRelationalOp(Token token)
 o isMultiplicativeOp
 public static boolean isMultiplicativeOp(Token token)
 o isDigit
 public static boolean isDigit(char ch)
Returns true if the char argument is a digit

Returns:
true if the char argument is a digit
 o isLetter
 public static boolean isLetter(char ch)
Returns true if the char argument is a letter

Returns:
true if the char argument is a letter
 o isNCNameChar
 public static boolean isNCNameChar(char ch)
Returns true if the char argument is an NCNameChar, as defined by the XML Namespaces recommendation http://www.w3c.org/TR/1999/REC-xml-names-199904114

Returns:
true if the char argument is an NCNameChar
 o isQNameChar
 public static boolean isQNameChar(char ch)
Returns true if the char argument is an QName character, as defined by the XML Namespaces recommendation http://www.w3c.org/TR/1999/REC-xml-names-199904114

Returns:
true if the char argument is an QName character
 o isWhitespace
 public static boolean isWhitespace(char ch)
 o lookAhead
 public Token lookAhead(int offset)
Allows looking ahead for tokens without affecting the token sequence as called by nextToken or previousToken

 o nextToken
 public Token nextToken()
Retrieves the next available token

Returns:
the next available token or null if there are none
 o pushBack
 public void pushBack()
Moves the position of this Lexer back one

 o resetPosition
 public void resetPosition()
Resets the position of the token pointer to the beginning

 o setPosition
 public void setPosition(int position)
Sets the current position of this tokenizer.

Parameters:
position - the index value to set the current position to. if position is greater than the number of tokens, the tokenizer is advanced to the end. If the given position is less than 0, the tokenizer is positioned at the beginning
 o toString
 public String toString()
 o main
 public static void main(String args[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index