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
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Eater
(String s, LineLocation lineLocation) Eater
(StringLocated sl) -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
addIntoTokenStack
(TokenStack tokenStack, boolean stopAtColon) protected final void
addUpTo
(char separator, StringBuilder sb) protected final void
abstract void
protected final void
checkAndEatChar
(char ch) protected final void
protected final String
protected final String
final String
protected final String
final String
final String
protected final String
protected final TFunctionImpl
eatDeclareFunction
(TContext context, TMemory memory, boolean unquoted, LineLocation location, boolean allowNoParenthesis, TFunctionType type) protected final TFunctionImpl
eatDeclareProcedure
(TContext context, TMemory memory, boolean unquoted, LineLocation location) protected final TFunctionImpl
eatDeclareReturnFunctionWithOptionalReturn
(TContext context, TMemory memory, boolean unquoted, LineLocation location) final TValue
eatExpression
(TContext context, TMemory memory) protected final TValue
eatExpressionStopAtColon
(TContext context, TMemory memory) final char
protected final TokenStack
int
final LineLocation
protected final boolean
final boolean
protected final void
optionallyEatChar
(char ch) final char
peekChar()
final char
protected final boolean
safeCheckAndEatChar
(char ch) final void
protected final void
skipUntilChar
(char ch)
-
Constructor Details
-
Eater
-
Eater
-
-
Method Details
-
getLineLocation
-
analyze
public abstract void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated - Throws:
EaterException
EaterExceptionLocated
-
getCurrentPosition
public int getCurrentPosition() -
eatAllToEnd
- Throws:
EaterException
-
eatExpression
public final TValue eatExpression(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated - Throws:
EaterException
EaterExceptionLocated
-
eatTokenStack
- 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
- Throws:
EaterException
-
eatAndGetOptionalQuotedString
- Throws:
EaterException
-
eatAndGetNumber
- Throws:
EaterException
-
eatAndGetSpaces
- Throws:
EaterException
-
eatAndGetVarname
- Throws:
EaterException
-
eatAndGetFunctionName
- 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
- Throws:
EaterException
-
safeCheckAndEatChar
- Throws:
EaterException
-
optionallyEatChar
- Throws:
EaterException
-
checkAndEatChar
- Throws:
EaterException
-
addUpToLastLetterOrUnderscoreOrDigit
-
addUpTo
-
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
-