Package net.sourceforge.plantuml.tim
Class Eater
- java.lang.Object
-
- net.sourceforge.plantuml.tim.Eater
-
- Direct Known Subclasses:
EaterAffectation
,EaterAffectationDefine
,EaterAssert
,EaterDeclareProcedure
,EaterDeclareReturnFunction
,EaterDumpMemory
,EaterElseIf
,EaterForeach
,EaterFunctionCall
,EaterIf
,EaterIfdef
,EaterIfndef
,EaterImport
,EaterInclude
,EaterIncludeDef
,EaterIncludesub
,EaterLegacyDefine
,EaterLegacyDefineLong
,EaterLog
,EaterReturn
,EaterStartsub
,EaterTheme
,EaterUndef
,EaterWhile
,StringEater
public abstract class Eater extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Eater(java.lang.String s, LineLocation lineLocation)
Eater(StringLocated sl)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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, LineLocation location, boolean allowNoParenthesis, TFunctionType type)
protected TFunctionImpl
eatDeclareProcedure(TContext context, TMemory memory, boolean unquoted, LineLocation location)
protected TFunctionImpl
eatDeclareReturnFunctionWithOptionalReturn(TContext context, TMemory memory, boolean unquoted, LineLocation location)
TValue
eatExpression(TContext context, TMemory memory)
protected TValue
eatExpressionStopAtColon(TContext context, TMemory memory)
char
eatOneChar()
protected TokenStack
eatTokenStack()
int
getCurrentPosition()
LineLocation
getLineLocation()
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)
-
-
-
Constructor Detail
-
Eater
public Eater(StringLocated sl)
-
Eater
protected Eater(java.lang.String s, LineLocation lineLocation)
-
-
Method Detail
-
getLineLocation
public final LineLocation getLineLocation()
-
analyze
public abstract void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated
- Throws:
EaterException
EaterExceptionLocated
-
getCurrentPosition
public int getCurrentPosition()
-
eatAllToEnd
protected final java.lang.String eatAllToEnd() throws EaterException
- Throws:
EaterException
-
eatExpression
public final TValue eatExpression(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated
- Throws:
EaterException
EaterExceptionLocated
-
eatTokenStack
protected final TokenStack eatTokenStack() throws EaterException
- Throws:
EaterException
-
eatExpressionStopAtColon
protected final TValue eatExpressionStopAtColon(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated
- Throws:
EaterException
EaterExceptionLocated
-
addIntoTokenStack
protected final void addIntoTokenStack(TokenStack tokenStack, boolean stopAtColon) throws EaterException
- Throws:
EaterException
-
eatAndGetQuotedString
public final java.lang.String eatAndGetQuotedString() throws EaterException
- Throws:
EaterException
-
eatAndGetOptionalQuotedString
protected final java.lang.String eatAndGetOptionalQuotedString() throws EaterException
- Throws:
EaterException
-
eatAndGetNumber
public final java.lang.String eatAndGetNumber() throws EaterException
- Throws:
EaterException
-
eatAndGetSpaces
public final java.lang.String eatAndGetSpaces() throws EaterException
- Throws:
EaterException
-
eatAndGetVarname
protected final java.lang.String eatAndGetVarname() throws EaterException
- Throws:
EaterException
-
eatAndGetFunctionName
protected final java.lang.String eatAndGetFunctionName() throws EaterException
- Throws:
EaterException
-
skipSpaces
public final void skipSpaces()
-
skipUntilChar
protected final void skipUntilChar(char ch)
-
peekChar
public final char peekChar()
-
matchAffectation
public final boolean matchAffectation()
-
peekCharN2
public final char peekCharN2()
-
hasNextChar
protected final boolean hasNextChar()
-
eatOneChar
public final char eatOneChar()
-
checkAndEatChar
protected final void checkAndEatChar(char ch) throws EaterException
- Throws:
EaterException
-
safeCheckAndEatChar
protected final boolean safeCheckAndEatChar(char ch) throws EaterException
- Throws:
EaterException
-
optionallyEatChar
protected final void optionallyEatChar(char ch) throws EaterException
- Throws:
EaterException
-
checkAndEatChar
protected final void checkAndEatChar(java.lang.String s) throws EaterException
- Throws:
EaterException
-
addUpToLastLetterOrUnderscoreOrDigit
protected final void addUpToLastLetterOrUnderscoreOrDigit(java.lang.StringBuilder sb)
-
addUpTo
protected final void addUpTo(char separator, java.lang.StringBuilder sb)
-
eatDeclareFunction
protected final TFunctionImpl eatDeclareFunction(TContext context, TMemory memory, boolean unquoted, LineLocation location, boolean allowNoParenthesis, TFunctionType type) throws EaterException, EaterExceptionLocated
- Throws:
EaterException
EaterExceptionLocated
-
eatDeclareReturnFunctionWithOptionalReturn
protected final TFunctionImpl eatDeclareReturnFunctionWithOptionalReturn(TContext context, TMemory memory, boolean unquoted, LineLocation location) throws EaterException, EaterExceptionLocated
- Throws:
EaterException
EaterExceptionLocated
-
eatDeclareProcedure
protected final TFunctionImpl eatDeclareProcedure(TContext context, TMemory memory, boolean unquoted, LineLocation location) throws EaterException, EaterExceptionLocated
- Throws:
EaterException
EaterExceptionLocated
-
-