Class ScriptCompiler

java.lang.Object
org.jmol.script.ScriptCompiler

public class ScriptCompiler extends Object
  • Field Details

    • vwr

      protected Viewer vwr
    • htUserFunctions

      protected Map<String,Boolean> htUserFunctions
    • script

      protected String script
    • isStateScript

      protected boolean isStateScript
    • lineCurrent

      protected short lineCurrent
    • iCommand

      protected int iCommand
    • ichCurrentCommand

      protected int ichCurrentCommand
    • ichComment

      protected int ichComment
    • ichEnd

      protected int ichEnd
    • ichToken

      protected int ichToken
    • theToken

      protected T theToken
    • lastFlowCommand

      protected T lastFlowCommand
    • tokenCommand

      protected T tokenCommand
    • lastToken

      protected T lastToken
    • tokenAndEquals

      protected T tokenAndEquals
    • theTok

      protected int theTok
    • nTokens

      protected int nTokens
    • tokCommand

      protected int tokCommand
    • ptNewSetModifier

      protected int ptNewSetModifier
    • isNewSet

      protected boolean isNewSet
    • haveMacro

      protected boolean haveMacro
    • logMessages

      protected boolean logMessages
    • atokenInfix

      protected T[] atokenInfix
    • itokenInfix

      protected int itokenInfix
    • isSetBrace

      protected boolean isSetBrace
    • isMathExpressionCommand

      protected boolean isMathExpressionCommand
    • isSetOrDefine

      protected boolean isSetOrDefine
    • isEmbeddedExpression

      protected boolean isEmbeddedExpression
    • isCommaAsOrAllowed

      protected boolean isCommaAsOrAllowed
    • errorMessage

      protected String errorMessage
    • errorMessageUntranslated

      protected String errorMessageUntranslated
    • errorLine

      protected String errorLine
    • errorType

      protected String errorType
    • ERROR_badArgumentCount

      protected static final int ERROR_badArgumentCount
      See Also:
    • ERROR_badContext

      protected static final int ERROR_badContext
      See Also:
    • ERROR_commandExpected

      protected static final int ERROR_commandExpected
      See Also:
    • ERROR_endOfCommandUnexpected

      protected static final int ERROR_endOfCommandUnexpected
      See Also:
    • ERROR_invalidExpressionToken

      protected static final int ERROR_invalidExpressionToken
      See Also:
    • ERROR_missingEnd

      protected static final int ERROR_missingEnd
      See Also:
    • ERROR_tokenExpected

      protected static final int ERROR_tokenExpected
      See Also:
    • ERROR_tokenUnexpected

      protected static final int ERROR_tokenUnexpected
      See Also:
    • ERROR_unrecognizedParameter

      protected static final int ERROR_unrecognizedParameter
      See Also:
    • ERROR_unrecognizedToken

      protected static final int ERROR_unrecognizedToken
      See Also:
  • Constructor Details

    • ScriptCompiler

      public ScriptCompiler(Viewer vwr)
      Parameters:
      vwr -
  • Method Details

    • tokAt

      protected int tokAt(int i)
    • unescapeString

      public static String unescapeString(String script, int ich, int nChar)
    • compileExpressions

      protected boolean compileExpressions()
    • compileExpression

      protected boolean compileExpression()
    • isUserFunction

      protected boolean isUserFunction(String name)
    • tokenAttr

      protected static boolean tokenAttr(T token, int tok)
    • commandExpected

      protected boolean commandExpected()
    • error

      protected boolean error(int error)
    • errorStr

      protected boolean errorStr(int error, String value)
    • errorIntStr2

      protected boolean errorIntStr2(int iError, String value, String more)
    • errorStr2

      protected boolean errorStr2(String errorMessage, String strUntranslated)