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
ConstructorsModifierConstructorDescriptionprotectedEater(String s, LineLocation lineLocation) Eater(StringLocated sl) -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddIntoTokenStack(TokenStack tokenStack, boolean stopAtColon) protected final voidaddUpTo(char separator, StringBuilder sb) protected final voidabstract voidprotected final voidcheckAndEatChar(char ch) protected final voidprotected final Stringprotected final Stringfinal Stringprotected final Stringfinal Stringfinal Stringprotected final Stringprotected final TFunctionImpleatDeclareFunction(TContext context, TMemory memory, boolean unquoted, LineLocation location, boolean allowNoParenthesis, TFunctionType type) protected final TFunctionImpleatDeclareProcedure(TContext context, TMemory memory, boolean unquoted, LineLocation location) protected final TFunctionImpleatDeclareReturnFunctionWithOptionalReturn(TContext context, TMemory memory, boolean unquoted, LineLocation location) final TValueeatExpression(TContext context, TMemory memory) protected final TValueeatExpressionStopAtColon(TContext context, TMemory memory) final charprotected final TokenStackintfinal LineLocationprotected final booleanfinal booleanprotected final voidoptionallyEatChar(char ch) final charpeekChar()final charprotected final booleansafeCheckAndEatChar(char ch) final voidprotected final voidskipUntilChar(char ch)
-
Constructor Details
-
Eater
-
Eater
-
-
Method Details
-
getLineLocation
-
analyze
public abstract void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated - Throws:
EaterExceptionEaterExceptionLocated
-
getCurrentPosition
public int getCurrentPosition() -
eatAllToEnd
- Throws:
EaterException
-
eatExpression
public final TValue eatExpression(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated - Throws:
EaterExceptionEaterExceptionLocated
-
eatTokenStack
- Throws:
EaterException
-
eatExpressionStopAtColon
protected final TValue eatExpressionStopAtColon(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated - Throws:
EaterExceptionEaterExceptionLocated
-
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:
EaterExceptionEaterExceptionLocated
-
eatDeclareReturnFunctionWithOptionalReturn
protected final TFunctionImpl eatDeclareReturnFunctionWithOptionalReturn(TContext context, TMemory memory, boolean unquoted, LineLocation location) throws EaterException, EaterExceptionLocated - Throws:
EaterExceptionEaterExceptionLocated
-
eatDeclareProcedure
protected final TFunctionImpl eatDeclareProcedure(TContext context, TMemory memory, boolean unquoted, LineLocation location) throws EaterException, EaterExceptionLocated - Throws:
EaterExceptionEaterExceptionLocated
-