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 Constructor Description Eater(StringLocated stringLocated)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddIntoTokenStack(TokenStack tokenStack, boolean stopAtColon)protected voidaddUpTo(char separator, java.lang.StringBuilder sb)protected voidaddUpToLastLetterOrUnderscoreOrDigit(java.lang.StringBuilder sb)abstract voidanalyze(TContext context, TMemory memory)protected voidcheckAndEatChar(char ch)protected voidcheckAndEatChar(java.lang.String s)protected java.lang.StringeatAllToEnd()protected java.lang.StringeatAndGetFunctionName()java.lang.StringeatAndGetNumber()protected java.lang.StringeatAndGetOptionalQuotedString()java.lang.StringeatAndGetQuotedString()java.lang.StringeatAndGetSpaces()protected java.lang.StringeatAndGetVarname()protected TFunctionImpleatDeclareFunction(TContext context, TMemory memory, boolean unquoted, StringLocated location, boolean allowNoParenthesis, TFunctionType type)protected TFunctionImpleatDeclareProcedure(TContext context, TMemory memory, boolean unquoted, StringLocated location)protected TFunctionImpleatDeclareReturnFunctionWithOptionalReturn(TContext context, TMemory memory, boolean unquoted, StringLocated location)TValueeatExpression(TContext context, TMemory memory)protected TValueeatExpressionStopAtColon(TContext context, TMemory memory)chareatOneChar()protected TokenStackeatTokenStack()intgetCurrentPosition()LineLocationgetLineLocation()StringLocatedgetStringLocated()protected booleanhasNextChar()booleanmatchAffectation()protected voidoptionallyEatChar(char ch)charpeekChar()charpeekCharN2()protected booleansafeCheckAndEatChar(char ch)voidskipSpaces()protected voidskipUntilChar(char ch)
-
-
-
Constructor Detail
-
Eater
public Eater(StringLocated stringLocated)
-
-
Method Detail
-
getLineLocation
public final LineLocation getLineLocation()
-
getStringLocated
public final StringLocated getStringLocated()
-
analyze
public abstract void analyze(TContext context, TMemory memory) throws EaterException
- Throws:
EaterException
-
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
- Throws:
EaterException
-
eatTokenStack
protected final TokenStack eatTokenStack() throws EaterException
- Throws:
EaterException
-
eatExpressionStopAtColon
protected final TValue eatExpressionStopAtColon(TContext context, TMemory memory) throws EaterException
- Throws:
EaterException
-
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, StringLocated location, boolean allowNoParenthesis, TFunctionType type) throws EaterException
- Throws:
EaterException
-
eatDeclareReturnFunctionWithOptionalReturn
protected final TFunctionImpl eatDeclareReturnFunctionWithOptionalReturn(TContext context, TMemory memory, boolean unquoted, StringLocated location) throws EaterException
- Throws:
EaterException
-
eatDeclareProcedure
protected final TFunctionImpl eatDeclareProcedure(TContext context, TMemory memory, boolean unquoted, StringLocated location) throws EaterException
- Throws:
EaterException
-
-