cleoni.adv
Class DimxParser
java.lang.Object
cleoni.adv.DimxParser
- Direct Known Subclasses:
- ActionsRunner, SkinLoader, SmallBasicLoader, WorldLoader
public class DimxParser
- extends java.lang.Object
Text parser. This is capable of evaluating expressions and functions. Does not deal with SmallBasic script. Main method is "evalExpression"
|
Constructor Summary |
DimxParser(World aWorld,
Varspace aVarspace,
int aStackLevel,
int aStartLine)
|
DimxParser(World aWorld,
Varspace aVarspace,
int aStackLevel,
int aStartLine,
java.lang.String anOwner,
AdvObject anAgent,
java.lang.String aTarget)
|
DimxParser(World aWorld,
Varspace aVarspace,
int aStackLevel,
java.lang.String anOwner)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
verbose
public boolean verbose
world
public World world
varspace
public Varspace varspace
logger
protected Logger logger
buf
public java.lang.String buf
startToken
public int startToken
startLine
public int startLine
currLine
public int currLine
stackLevel
protected int stackLevel
owner
public java.lang.String owner
agent
public AdvObject agent
target
public java.lang.String target
EOF
public static final java.lang.String EOF
- See Also:
- Constant Field Values
CR
public static final java.lang.String CR
- See Also:
- Constant Field Values
CONSUME
protected static final boolean CONSUME
- See Also:
- Constant Field Values
PRESERVE
protected static final boolean PRESERVE
- See Also:
- Constant Field Values
setCr
protected static final java.lang.String[] setCr
setTabSpace
protected static final java.lang.String[] setTabSpace
setFunctClosers
public static final java.lang.String[] setFunctClosers
setCrTabSpace
public static final java.lang.String[] setCrTabSpace
setQuotes
public static final java.lang.String[] setQuotes
setOperators
protected static final java.lang.String[] setOperators
setPunctuation
protected static final java.lang.String[] setPunctuation
tokenTerminators
protected static final java.lang.String[] tokenTerminators
setFunctions
protected static final java.lang.String[] setFunctions
setFunctArgs
protected static final int[] setFunctArgs
DimxParser
public DimxParser(World aWorld,
Varspace aVarspace,
int aStackLevel,
int aStartLine)
DimxParser
public DimxParser(World aWorld,
Varspace aVarspace,
int aStackLevel,
int aStartLine,
java.lang.String anOwner,
AdvObject anAgent,
java.lang.String aTarget)
DimxParser
public DimxParser(World aWorld,
Varspace aVarspace,
int aStackLevel,
java.lang.String anOwner)
eat
public void eat()
throws DimxException
- Throws:
DimxException
eat_extended
public void eat_extended()
throws DimxException
- Throws:
DimxException
evalExpression
public Token evalExpression(Token t,
int prevPriority)
throws DimxException
- Throws:
DimxException
evalExpression
public Token evalExpression(Token t,
int prevPriority,
boolean getReference,
java.lang.String stopper)
throws DimxException
- Throws:
DimxException
feed
public void feed(java.lang.String str)
getLine
protected java.lang.String getLine()
throws DimxException
- Throws:
DimxException
identifyFunProc
public java.util.Vector identifyFunProc(java.lang.String s,
java.lang.String[] setNames,
int[] setNoArgs)
identifyLine
public java.lang.String identifyLine()
lookupElement
public Token lookupElement(java.lang.String[] leadingIgnored)
throws DimxException
- Throws:
DimxException
lookupToken
public Token lookupToken()
throws DimxException
- Returns:
-
- Throws:
DimxException
lookupTokenCRsens
public Token lookupTokenCRsens()
throws DimxException
- Looks up for the next token, CR is not passed over.
- Returns:
-
- Throws:
DimxException
nextElement
public Token nextElement(java.lang.String[] leadingIgnored)
throws DimxException
- Throws:
DimxException
nextToken
public Token nextToken()
throws DimxException
- Throws:
DimxException
parseCR
public Token parseCR()
throws DimxException
- Throws:
DimxException
parseCREOF
public Token parseCREOF()
throws DimxException
- Throws:
DimxException
parseToken
public Token parseToken(java.lang.String aToken)
throws DimxException
- Throws:
DimxException
readToCR
public java.lang.String readToCR()
throws DimxException
- Throws:
DimxException
reset
public void reset()
resolve
public Token resolve(java.lang.String s,
boolean getReference)
throws DimxException
- Throws:
DimxException
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
parseList
public Dict parseList(int how_many_expected,
java.lang.String[] setClosers)
throws DimxException
- Throws:
DimxException