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
Modifier and TypeClassDescriptionstatic class
static class
Scan exception typestatic enum
Symbol typestatic class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Scanner.Token
fixed
(Scanner.Symbol symbol) getInput()
int
getToken()
protected boolean
isDigit
(char c) protected boolean
isEval()
protected Scanner.Token
next()
Scan next token.protected Scanner.Token
nextEval()
token inside an eval expressionprotected Scanner.Token
number tokenprotected Scanner.Token
string tokenprotected Scanner.Token
nextText()
text tokenprotected Scanner.Token
protected Scanner.Token
token
(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:
true
iff 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
-