public abstract class TokenizingUnit
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected char |
current |
protected java.lang.String |
line |
protected int |
pos |
| Constructor and Description |
|---|
TokenizingUnit() |
| Modifier and Type | Method and Description |
|---|---|
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 |
currentInfo() |
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
protected void setLine(java.lang.String line)
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)
protected java.lang.String currentInfo()
Copyright © 2016. All Rights Reserved.