public abstract class Eater
extends java.lang.Object
| Constructor and Description |
|---|
Eater(StringLocated stringLocated) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addIntoTokenStack(TokenStack tokenStack,
boolean stopAtColon) |
protected void |
addUpTo(char separator,
java.lang.StringBuilder sb) |
protected void |
addUpToLastLetterOrUnderscoreOrDigit(java.lang.StringBuilder sb) |
abstract void |
analyze(TContext context,
TMemory memory) |
protected void |
checkAndEatChar(char ch) |
protected void |
checkAndEatChar(java.lang.String s) |
protected java.lang.String |
eatAllToEnd() |
protected java.lang.String |
eatAndGetFunctionName() |
java.lang.String |
eatAndGetNumber() |
protected java.lang.String |
eatAndGetOptionalQuotedString() |
java.lang.String |
eatAndGetQuotedString() |
java.lang.String |
eatAndGetSpaces() |
protected java.lang.String |
eatAndGetVarname() |
protected TFunctionImpl |
eatDeclareFunction(TContext context,
TMemory memory,
boolean unquoted,
StringLocated location,
boolean allowNoParenthesis,
TFunctionType type) |
protected TFunctionImpl |
eatDeclareProcedure(TContext context,
TMemory memory,
boolean unquoted,
StringLocated location) |
protected TFunctionImpl |
eatDeclareReturnFunctionWithOptionalReturn(TContext context,
TMemory memory,
boolean unquoted,
StringLocated location) |
TValue |
eatExpression(TContext context,
TMemory memory) |
protected TValue |
eatExpressionStopAtColon(TContext context,
TMemory memory) |
char |
eatOneChar() |
protected TokenStack |
eatTokenStack() |
int |
getCurrentPosition() |
LineLocation |
getLineLocation() |
StringLocated |
getStringLocated() |
protected boolean |
hasNextChar() |
boolean |
matchAffectation() |
protected void |
optionallyEatChar(char ch) |
char |
peekChar() |
char |
peekCharN2() |
protected boolean |
safeCheckAndEatChar(char ch) |
void |
skipSpaces() |
protected void |
skipUntilChar(char ch) |
public Eater(StringLocated stringLocated)
public final LineLocation getLineLocation()
public final StringLocated getStringLocated()
public abstract void analyze(TContext context, TMemory memory) throws EaterException
EaterExceptionpublic int getCurrentPosition()
protected final java.lang.String eatAllToEnd()
throws EaterException
EaterExceptionpublic final TValue eatExpression(TContext context, TMemory memory) throws EaterException
EaterExceptionprotected final TokenStack eatTokenStack() throws EaterException
EaterExceptionprotected final TValue eatExpressionStopAtColon(TContext context, TMemory memory) throws EaterException
EaterExceptionprotected final void addIntoTokenStack(TokenStack tokenStack, boolean stopAtColon) throws EaterException
EaterExceptionpublic final java.lang.String eatAndGetQuotedString()
throws EaterException
EaterExceptionprotected final java.lang.String eatAndGetOptionalQuotedString()
throws EaterException
EaterExceptionpublic final java.lang.String eatAndGetNumber()
throws EaterException
EaterExceptionpublic final java.lang.String eatAndGetSpaces()
throws EaterException
EaterExceptionprotected final java.lang.String eatAndGetVarname()
throws EaterException
EaterExceptionprotected final java.lang.String eatAndGetFunctionName()
throws EaterException
EaterExceptionpublic final void skipSpaces()
protected final void skipUntilChar(char ch)
public final char peekChar()
public final boolean matchAffectation()
public final char peekCharN2()
protected final boolean hasNextChar()
public final char eatOneChar()
protected final void checkAndEatChar(char ch)
throws EaterException
EaterExceptionprotected final boolean safeCheckAndEatChar(char ch)
throws EaterException
EaterExceptionprotected final void optionallyEatChar(char ch)
throws EaterException
EaterExceptionprotected final void checkAndEatChar(java.lang.String s)
throws EaterException
EaterExceptionprotected final void addUpToLastLetterOrUnderscoreOrDigit(java.lang.StringBuilder sb)
protected final void addUpTo(char separator,
java.lang.StringBuilder sb)
protected final TFunctionImpl eatDeclareFunction(TContext context, TMemory memory, boolean unquoted, StringLocated location, boolean allowNoParenthesis, TFunctionType type) throws EaterException
EaterExceptionprotected final TFunctionImpl eatDeclareReturnFunctionWithOptionalReturn(TContext context, TMemory memory, boolean unquoted, StringLocated location) throws EaterException
EaterExceptionprotected final TFunctionImpl eatDeclareProcedure(TContext context, TMemory memory, boolean unquoted, StringLocated location) throws EaterException
EaterException