public class AJELexer
extends java.lang.Object
| Constructor and Description |
|---|
AJELexer(java.lang.String str) |
| Modifier and Type | Method and Description |
|---|---|
void |
advance()
Get the next character and increase the position variable.
|
boolean |
consume(char prompt)
Consume and return true if the next meaningful character is the prompt.
|
boolean |
consume(char prompt,
boolean strict) |
boolean |
consume(java.lang.String prompt)
Return true if the next characters in prompt.length() range is equal to prompt.
|
char |
currentChar() |
java.lang.String |
currentInfo() |
java.lang.String |
getStr() |
boolean |
nextIs(char prompt)
consume(prompt) without consuming the character.
|
boolean |
nextIs(java.lang.String prompt) |
java.lang.String |
nextNumber() |
java.lang.String |
nextString() |
int |
pos() |
void |
reset()
Resets the position of the compiling unit.
|
void |
setPos(int pos) |
void |
skipWhitespace()
Skip whitespaces.
|
public java.lang.String getStr()
public void advance()
public boolean consume(char prompt)
public boolean consume(char prompt,
boolean strict)
prompt - Character prompt.strict - If should skip whitespaces.public boolean consume(java.lang.String prompt)
public boolean nextIs(java.lang.String prompt)
public void reset()
public void skipWhitespace()
public boolean nextIs(char prompt)
public int pos()
public void setPos(int pos)
public char currentChar()
public java.lang.String currentInfo()
public java.lang.String nextString()
public java.lang.String nextNumber()