info.bliki.wiki.template.expr
Class Scanner

java.lang.Object
  extended by info.bliki.wiki.template.expr.Scanner
Direct Known Subclasses:
Parser

public class Scanner
extends java.lang.Object


Field Summary
protected  char fCurrentChar
          Current input character
protected  int fCurrentColumnStartPosition
          Column counter for syntax errors
protected  int fCurrentPosition
          The position of the current character in the input string
protected  IParserFactory fFactory
           
protected  java.lang.String fInputString
          Current parser input string
protected  java.lang.String fOperatorString
          The last determined operator string
protected  java.util.List fOperList
          protected List fOperList;
protected  int fToken
          Current input token
protected  int numFormat
           
protected  int rowCount
          Row counter for syntax errors.
static int TT_CONSTANT
          Token type: constant found in input string
static int TT_DIGIT
          Token type: digit 0,1,2,3,4,5,6,7,8,9
static int TT_EOF
          Token type: End-of_File
static int TT_FLOATING_POINT
          Token type: floating point number
static int TT_OPERATOR
          Token type: operator found in input string
static int TT_PRECEDENCE_CLOSE
          Token type: closing bracket ')' for sub-formulas with higher precedence
static int TT_PRECEDENCE_OPEN
          Token type: opening bracket '(' for sub-formulas with higher precedence
 
Constructor Summary
Scanner()
          Initialize Scanner without a math-expression
 
Method Summary
protected  java.lang.String getIdentifier()
           
protected  void getNextToken()
          Get the next token from the input string
protected  java.lang.Object[] getNumberString()
           
protected  java.util.List getOperator()
           
protected  java.lang.StringBuffer getStringBuffer()
           
protected  void initialize(java.lang.String s)
           
protected  void throwSyntaxError(java.lang.String error)
           
protected  void throwSyntaxError(java.lang.String error, int errorLength)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fInputString

protected java.lang.String fInputString
Current parser input string


fCurrentChar

protected char fCurrentChar
Current input character


fCurrentPosition

protected int fCurrentPosition
The position of the current character in the input string


fToken

protected int fToken
Current input token


fOperatorString

protected java.lang.String fOperatorString
The last determined operator string


fOperList

protected java.util.List fOperList
protected List fOperList;


rowCount

protected int rowCount
Row counter for syntax errors.


fCurrentColumnStartPosition

protected int fCurrentColumnStartPosition
Column counter for syntax errors


TT_EOF

public static final int TT_EOF
Token type: End-of_File

See Also:
Constant Field Values

TT_FLOATING_POINT

public static final int TT_FLOATING_POINT
Token type: floating point number

See Also:
Constant Field Values

TT_PRECEDENCE_OPEN

public static final int TT_PRECEDENCE_OPEN
Token type: opening bracket '(' for sub-formulas with higher precedence

See Also:
Constant Field Values

TT_PRECEDENCE_CLOSE

public static final int TT_PRECEDENCE_CLOSE
Token type: closing bracket ')' for sub-formulas with higher precedence

See Also:
Constant Field Values

TT_CONSTANT

public static final int TT_CONSTANT
Token type: constant found in input string

See Also:
Constant Field Values

TT_OPERATOR

public static final int TT_OPERATOR
Token type: operator found in input string

See Also:
Constant Field Values

TT_DIGIT

public static final int TT_DIGIT
Token type: digit 0,1,2,3,4,5,6,7,8,9

See Also:
Constant Field Values

numFormat

protected int numFormat

fFactory

protected IParserFactory fFactory
Constructor Detail

Scanner

public Scanner()
Initialize Scanner without a math-expression

Method Detail

initialize

protected void initialize(java.lang.String s)
                   throws SyntaxError
Throws:
SyntaxError

getOperator

protected java.util.List getOperator()

getNextToken

protected void getNextToken()
                     throws SyntaxError
Get the next token from the input string

Throws:
SyntaxError

throwSyntaxError

protected void throwSyntaxError(java.lang.String error)
                         throws SyntaxError
Throws:
SyntaxError

throwSyntaxError

protected void throwSyntaxError(java.lang.String error,
                                int errorLength)
                         throws SyntaxError
Throws:
SyntaxError

getIdentifier

protected java.lang.String getIdentifier()

getNumberString

protected java.lang.Object[] getNumberString()

getStringBuffer

protected java.lang.StringBuffer getStringBuffer()
                                          throws SyntaxError
Throws:
SyntaxError


Copyright © 2012 Java Wikipedia API (Bliki engine). All Rights Reserved.