abstract class ScriptCompilationTokenParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Token[] |
atokenInfix |
protected static int |
ERROR_badArgumentCount |
protected static int |
ERROR_badContext |
protected static int |
ERROR_commandExpected |
private static int |
ERROR_coordinateExpected |
protected static int |
ERROR_endOfCommandUnexpected |
private static int |
ERROR_endOfExpressionExpected |
private static int |
ERROR_identifierOrResidueSpecificationExpected |
private static int |
ERROR_invalidAtomSpecification |
private static int |
ERROR_invalidChainSpecification |
protected static int |
ERROR_invalidExpressionToken |
private static int |
ERROR_invalidModelSpecification |
protected static int |
ERROR_missingEnd |
private static int |
ERROR_numberExpected |
private static int |
ERROR_numberOrVariableNameExpected |
private static int |
ERROR_residueSpecificationExpected |
protected static int |
ERROR_tokenExpected |
protected static int |
ERROR_tokenUnexpected |
private static int |
ERROR_unrecognizedExpressionToken |
protected static int |
ERROR_unrecognizedParameter |
protected static int |
ERROR_unrecognizedToken |
protected java.lang.String |
errorLine |
protected java.lang.String |
errorMessage |
protected java.lang.String |
errorMessageUntranslated |
protected java.lang.String |
errorType |
(package private) boolean |
haveString |
protected java.util.Map<java.lang.String,java.lang.Boolean> |
htUserFunctions |
protected int |
ichComment |
protected int |
ichCurrentCommand |
protected int |
ichEnd |
protected int |
ichToken |
protected int |
iCommand |
protected boolean |
isCommaAsOrAllowed |
protected boolean |
isEmbeddedExpression |
protected boolean |
isMathExpressionCommand |
protected boolean |
isNewSet |
protected boolean |
isSetBrace |
protected boolean |
isSetOrDefine |
protected boolean |
isStateScript |
protected int |
itokenInfix |
protected Token |
lastFlowCommand |
protected Token |
lastToken |
protected short |
lineCurrent |
protected boolean |
logMessages |
private java.util.List<Token> |
ltokenPostfix |
protected int |
nTokens |
protected int |
ptNewSetModifier |
private boolean |
residueSpecCodeGenerated |
protected java.lang.String |
script |
protected int |
theTok |
protected Token |
theToken |
private java.lang.Object |
theValue |
protected int |
tokCommand |
protected Token |
tokenAndEquals |
protected Token |
tokenCommand |
protected Viewer |
viewer |
Constructor and Description |
---|
ScriptCompilationTokenParser() |
Modifier and Type | Method and Description |
---|---|
private boolean |
addNextToken() |
private boolean |
addNextTokenIf(int tok) |
private boolean |
addSubstituteTokenIf(int tok,
Token token) |
private boolean |
addTokenToPostfix(int tok,
int intValue,
java.lang.Object value) |
private boolean |
addTokenToPostfix(int tok,
java.lang.Object value) |
private boolean |
addTokenToPostfix(Token token) |
private boolean |
checkForCoordinate(boolean isImplicitExpression) |
private boolean |
checkForItemSelector(boolean allowNumeric) |
private boolean |
clauseAlternateSpec() |
private boolean |
clauseAnd() |
private boolean |
clauseAtomSpec() |
private boolean |
clauseCell() |
private boolean |
clauseChainSpec(int tok) |
private boolean |
clauseComparator(boolean isOptional) |
private boolean |
clauseConnected() |
private boolean |
clauseDefine(boolean haveToken,
boolean forceString) |
private boolean |
clauseItemSelector() |
private boolean |
clauseModelSpec() |
private boolean |
clauseNot() |
private boolean |
clauseOr(boolean allowComma) |
private boolean |
clausePrimitive() |
private boolean |
clauseResidueSpec() |
private boolean |
clauseResNameSpec() |
private boolean |
clauseSequenceSpec() |
private boolean |
clauseSubstructure() |
private boolean |
clauseWithin(boolean isWithin) |
protected boolean |
commandExpected() |
protected boolean |
compileExpression() |
protected boolean |
compileExpressions() |
protected boolean |
error(int error) |
protected boolean |
error(int error,
java.lang.String value) |
protected boolean |
error(int iError,
java.lang.String value,
java.lang.String more) |
protected boolean |
error(java.lang.String errorMessage,
java.lang.String strUntranslated) |
(package private) static java.lang.String |
errorString(int iError,
java.lang.String value,
java.lang.String more,
boolean translated) |
private int |
fixModelSpec(Token token) |
private float |
floatValue() |
private boolean |
generateResidueSpecCode(Token token) |
private boolean |
getNumericalToken() |
private Token |
getSequenceCode(boolean isSecond) |
private Token |
getToken()
gets the next token and sets global theToken and theValue
|
private int |
intPeek() |
private boolean |
isError() |
private boolean |
isExpressionNext() |
private boolean |
isSpecTerminator(int tok) |
private boolean |
isToken(int tok) |
protected boolean |
isUserFunction(java.lang.String name) |
private boolean |
moreTokens() |
private boolean |
returnToken() |
protected int |
tokAt(int i) |
protected static boolean |
tokenAttr(Token token,
int tok) |
private Token |
tokenNext()
increments the pointer; does NOT set theToken or theValue
|
private boolean |
tokenNext(int tok) |
private int |
tokPeek() |
private boolean |
tokPeek(int tok) |
private java.lang.Object |
valuePeek() |
protected Viewer viewer
protected java.lang.String script
protected boolean isStateScript
protected short lineCurrent
protected int iCommand
protected int ichCurrentCommand
protected int ichComment
protected int ichEnd
protected int ichToken
protected Token theToken
protected Token lastFlowCommand
protected Token tokenCommand
protected Token lastToken
protected Token tokenAndEquals
protected int theTok
protected int nTokens
protected int tokCommand
protected int ptNewSetModifier
protected boolean isNewSet
protected boolean logMessages
protected Token[] atokenInfix
protected int itokenInfix
protected boolean isSetBrace
protected boolean isMathExpressionCommand
protected boolean isSetOrDefine
private java.util.List<Token> ltokenPostfix
protected boolean isEmbeddedExpression
protected boolean isCommaAsOrAllowed
private java.lang.Object theValue
protected java.util.Map<java.lang.String,java.lang.Boolean> htUserFunctions
boolean haveString
private boolean residueSpecCodeGenerated
protected java.lang.String errorMessage
protected java.lang.String errorMessageUntranslated
protected java.lang.String errorLine
protected java.lang.String errorType
protected static final int ERROR_badArgumentCount
protected static final int ERROR_badContext
protected static final int ERROR_commandExpected
protected static final int ERROR_endOfCommandUnexpected
protected static final int ERROR_invalidExpressionToken
protected static final int ERROR_missingEnd
protected static final int ERROR_tokenExpected
protected static final int ERROR_tokenUnexpected
protected static final int ERROR_unrecognizedParameter
protected static final int ERROR_unrecognizedToken
private static final int ERROR_coordinateExpected
private static final int ERROR_endOfExpressionExpected
private static final int ERROR_identifierOrResidueSpecificationExpected
private static final int ERROR_invalidAtomSpecification
private static final int ERROR_invalidChainSpecification
private static final int ERROR_invalidModelSpecification
private static final int ERROR_numberExpected
private static final int ERROR_numberOrVariableNameExpected
private static final int ERROR_residueSpecificationExpected
private static final int ERROR_unrecognizedExpressionToken
protected boolean compileExpressions()
protected boolean compileExpression()
protected boolean isUserFunction(java.lang.String name)
private boolean isExpressionNext()
protected static boolean tokenAttr(Token token, int tok)
private boolean moreTokens()
protected int tokAt(int i)
private int tokPeek()
private boolean tokPeek(int tok)
private int intPeek()
private java.lang.Object valuePeek()
private Token tokenNext()
private boolean tokenNext(int tok)
private boolean returnToken()
private Token getToken()
private boolean isToken(int tok)
private boolean getNumericalToken()
private float floatValue()
private boolean addTokenToPostfix(int tok, java.lang.Object value)
private boolean addTokenToPostfix(int tok, int intValue, java.lang.Object value)
private boolean addTokenToPostfix(Token token)
private boolean addNextToken()
private boolean addNextTokenIf(int tok)
private boolean addSubstituteTokenIf(int tok, Token token)
private boolean clauseOr(boolean allowComma)
private boolean clauseAnd()
private boolean clauseNot()
private boolean clausePrimitive()
private boolean checkForCoordinate(boolean isImplicitExpression)
private boolean checkForItemSelector(boolean allowNumeric)
private boolean clauseWithin(boolean isWithin)
private boolean clauseConnected()
private boolean clauseSubstructure()
private boolean clauseItemSelector()
private boolean clauseComparator(boolean isOptional)
private boolean clauseCell()
private boolean clauseDefine(boolean haveToken, boolean forceString)
private boolean generateResidueSpecCode(Token token)
private boolean clauseResidueSpec()
private boolean clauseResNameSpec()
private boolean clauseSequenceSpec()
private Token getSequenceCode(boolean isSecond)
private boolean clauseChainSpec(int tok)
private boolean isSpecTerminator(int tok)
private boolean clauseAlternateSpec()
private boolean clauseModelSpec()
private int fixModelSpec(Token token)
private boolean clauseAtomSpec()
static java.lang.String errorString(int iError, java.lang.String value, java.lang.String more, boolean translated)
protected boolean commandExpected()
protected boolean error(int error)
protected boolean error(int error, java.lang.String value)
protected boolean error(int iError, java.lang.String value, java.lang.String more)
private boolean isError()
protected boolean error(java.lang.String errorMessage, java.lang.String strUntranslated)