public class ExpressionCompiler
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected char |
current |
protected java.lang.String |
line |
protected int |
pos |
| Constructor and Description |
|---|
ExpressionCompiler(Pool pool) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Expression> |
compileScript(java.lang.String script) |
java.util.List<Expression> |
compileScripts(java.util.List<java.lang.String> scripts) |
protected boolean |
consume(char prompt)
Consume and return true if the next meaningful character is the prompt.
|
protected boolean |
consume(char prompt,
boolean strict) |
protected boolean |
consume(java.lang.String prompt)
Return true if the next characters in prompt.length() range is equal to prompt.
|
protected java.lang.String |
dumpInfo() |
char |
getCurrentChar() |
java.lang.String |
getLine() |
int |
getPos() |
protected char |
nextChar()
Get the next character and increase the position variable.
|
protected boolean |
nextIs(char prompt)
consume(prompt) without consuming the character.
|
protected boolean |
nextIs(java.lang.String prompt) |
protected void |
resetPosition()
Resets the position of the compiling unit.
|
protected void |
setLine(java.lang.String line)
Set target compiling line.
|
protected void |
skipWS()
Skip whitespaces.
|
protected int pos
protected char current
protected java.lang.String line
public ExpressionCompiler(Pool pool)
public java.util.List<Expression> compileScript(java.lang.String script)
public java.util.List<Expression> compileScripts(java.util.List<java.lang.String> scripts)
protected char nextChar()
protected boolean consume(char prompt)
protected boolean consume(char prompt,
boolean strict)
prompt - Character prompt.strict - If should skip whitespaces.protected boolean consume(java.lang.String prompt)
protected boolean nextIs(java.lang.String prompt)
protected void resetPosition()
protected void skipWS()
protected boolean nextIs(char prompt)
public int getPos()
public java.lang.String getLine()
protected void setLine(java.lang.String line)
public char getCurrentChar()
protected java.lang.String dumpInfo()
Copyright © 2017. All Rights Reserved.