Logo Search packages:      
Sourcecode: jmol version File versions  Download package

Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Package Functions | Static Package Functions | Package Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes

org::jmol::script::ScriptCompiler Class Reference

Inheritance diagram for org::jmol::script::ScriptCompiler:
Inheritance graph
Collaboration diagram for org::jmol::script::ScriptCompiler:
Collaboration graph

List of all members.

Public Member Functions

 ScriptCompiler (Viewer viewer)
 ScriptCompiler (ScriptCompiler compiler)

Static Public Member Functions

static String getEmbeddedScript (String script)

Protected Member Functions

boolean commandExpected ()
boolean compileExpression ()
boolean compileExpressions ()
boolean error (int error, String value)
boolean error (String errorMessage, String strUntranslated)
boolean error (int iError, String value, String more)
boolean error (int error)
boolean isUserFunction (String name)
int tokAt (int i)

Static Protected Member Functions

static boolean tokenAttr (Token token, int tok)

Protected Attributes

Token[] atokenInfix
String errorLine
String errorMessage
String errorMessageUntranslated
String errorType
Map htUserFunctions
int ichCurrentCommand
int ichToken
int iCommand
boolean isCommaAsOrAllowed
boolean isEmbeddedExpression
boolean isMathExpressionCommand
boolean isNewSet
boolean isSetBrace
boolean isSetOrDefine
int itokenInfix
Token lastFlowCommand
Token lastToken
short lineCurrent
boolean logMessages = false
int nTokens
int ptNewSetModifier
String script
int theTok
Token theToken
int tokCommand
Token tokenAndEquals
Token tokenCommand
Viewer viewer

Static Protected Attributes

static final int ERROR_badArgumentCount = 0
static final int ERROR_badContext = 1
static final int ERROR_commandExpected = 2
static final int ERROR_endOfCommandUnexpected = 4
static final int ERROR_invalidExpressionToken = 9
static final int ERROR_missingEnd = 11
static final int ERROR_tokenExpected = 15
static final int ERROR_tokenUnexpected = 16
static final int ERROR_unrecognizedParameter = 18
static final int ERROR_unrecognizedToken = 19

Package Functions

ScriptContext compile (String filename, String script, boolean isPredefining, boolean isSilent, boolean debugScript, boolean isCheckOnly)
String getUnescapedStringLiteral ()
ScriptContext parseScriptForTokens (String script)

Static Package Functions

static void addContextVariable (Hashtable contextVariables, String ident)
static boolean eol (char ch, int nSkip)
static String errorString (int iError, String value, String more, boolean translated)
static boolean isBreakableContext (int tok)

Package Attributes

char chFirst
boolean haveString
int ichComment
int ichEnd
boolean isStateScript
int pushCount
String scriptExtensions
List vPush = new ArrayList()

Private Member Functions

void addContextVariable (String ident)
void addTokenToPrefix (Token token)
boolean checkFlowCommand (String ident)
boolean checkFlowEnd (int tok, String ident, int pt1)
int checkFlowEndBrace ()
boolean checkFlowStartBrace (boolean atEnd)
boolean checkNewSetCommand ()
int checkSpecialParameterSyntax ()
void checkUnquotedFileName ()
String cleanScriptComments (String script)
boolean compile0 (boolean isFull)
boolean compileCommand ()
boolean eol (char ch)
int forceFlowEnd (Token token)
boolean getData (String key)
String getPrefixToken ()
int incrementLineCount (String str)
boolean isContextVariable (String ident)
boolean isLineContinuation (int ichT, boolean checkMathop)
boolean lookingAtBraceSyntax ()
int lookingAtComment ()
boolean lookingAtEndOfLine ()
boolean lookingAtEndOfStatement ()
boolean lookingAtLeadingWhitespace ()
boolean lookingAtLoadFormat ()
boolean lookingAtMathContinuation (int ichT)
Object lookingAtMatrix ()
boolean lookingAtString (boolean allowPrime)
int nCharNewLine (int ichT)
char nextChar ()
int parseCommandParameter (String ident)
int parseKnownToken (String ident)
ScriptContext parseScript (boolean doFull)
int processTokenList (short iLine, boolean doCompile)
void replaceCommand (Token token)
void setAaTokenCompiled ()
Token setCommand (Token token)
Token setNewSetCommand (boolean isSetBrace, String ident)
Token tokenAt (int i)

Static Private Member Functions

static boolean isSpaceOrTab (char ch)

Private Attributes

Token[][] aatokenCompiled
int braceCount
int bracketCount
int cchScript
int cchToken
String comment
Hashtable contextVariables
boolean endOfLine
String filename
ScriptFlowContext flowContext
int forPoint3
boolean haveComments
int iBrace
int ichBrace
boolean iHaveQuotedString
boolean isCheckOnly
boolean isEndOfCommand
boolean isShowCommand
boolean isShowScriptOutput
boolean isSilent
boolean isUserToken
int[][] lineIndices
short[] lineNumbers
List lltoken
int lnLength = 8
List ltoken
boolean needRightParen
int nSemiSkip
int parenCount
boolean preDefining
int ptSemi
int setBraceCount
int setEqualPt
ScriptFunction thisFunction
int tokLastMath
List vBraces
List vFunctionStack

Static Private Attributes

static final int CONTINUE = 2
static final int EOL = 3
static final int ERROR = 4
static final String LOAD_TYPES = "auto;append;data;files;inline;menu;smiles;trajectory;models;" + JmolConstants.LOAD_ATOM_DATA_TYPES
static final int OK = 0
static final int OK2 = 1

BitSet lookingAtBitset ()
boolean lookingAtImpliedString (boolean allowSpace)
float lookingAtExponential ()
boolean lookingAtDecimal ()
boolean lookingAtSeqcode ()
int lookingAtInteger ()
boolean lookingAtObjectID (boolean allowWildID)
boolean lookingAtLookupToken (int ichT)
boolean charToken ()
int ERROR (int error)
int ERROR (int error, String value)
boolean handleError ()
static int ichMathTerminator (String script, int ichT, int len)
static String[] splitCommandLine (String cmd)

Detailed Description

Definition at line 45 of file ScriptCompiler.java.

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index