Package org.camunda.bpm.impl.juel
Class Scanner
java.lang.Object
org.camunda.bpm.impl.juel.Scanner
Handcrafted scanner.
- Author:
- Christoph Beck
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classScan exception typestatic enumSymbol typestatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Scanner.Tokenfixed(Scanner.Symbol symbol) getInput()intgetToken()protected booleanisDigit(char c) protected booleanisEval()protected Scanner.Tokennext()Scan next token.protected Scanner.TokennextEval()token inside an eval expressionprotected Scanner.Tokennumber tokenprotected Scanner.Tokenstring tokenprotected Scanner.TokennextText()text tokenprotected Scanner.Tokenprotected Scanner.Tokentoken(Scanner.Symbol symbol, String value, int length)
-
Field Details
-
builder
-
-
Constructor Details
-
Scanner
Constructor.- Parameters:
input- expression string
-
-
Method Details
-
getInput
-
getToken
- Returns:
- current token
-
getPosition
public int getPosition()- Returns:
- current input position
-
isDigit
protected boolean isDigit(char c) - Returns:
trueiff the specified character is a digit
-
keyword
- Parameters:
s- name- Returns:
- token for the given keyword or
null
-
fixed
- Parameters:
symbol-- Returns:
- token for the given symbol
-
token
-
isEval
protected boolean isEval() -
nextText
text token- Throws:
Scanner.ScanException
-
nextString
string token- Throws:
Scanner.ScanException
-
nextNumber
number token- Throws:
Scanner.ScanException
-
nextEval
token inside an eval expression- Throws:
Scanner.ScanException
-
nextToken
- Throws:
Scanner.ScanException
-
next
Scan next token. After calling this method,getToken()andgetPosition()can be used to retreive the token's image and input position.- Returns:
- scanned token
- Throws:
Scanner.ScanException
-