public abstract class TreeBuildingScriptSystem<ScopeType extends ExecutionScope,ParserType extends TreeBuildingParser<ScopeType,ReaderType>,ReaderType extends IndexReader> extends ParseSystem<ExecuterTreeElem<ScopeType,ReaderType>,TreeBuildingParser<ScopeType,ReaderType>,ReaderType> implements ScriptSystemInterface<ScopeType,ReaderType>
startParser
complexTypeMap, scriptTypes, typeMap
ANY
Constructor and Description |
---|
TreeBuildingScriptSystem() |
Modifier and Type | Method and Description |
---|---|
ExecuterTree<ScopeType,ReaderType> |
createExecuter(ReaderType source)
Parses the given source and creates an executer from it.
|
ExecuterTree<ScopeType,ReaderType> |
createExecuter(java.lang.String source)
Parses the given string and creates an executer out of it.
|
ExecuterTree<ScopeType,ReaderType> |
executerFromFile(java.io.File file)
Parses the given file and creates an executer from it.
|
ExecuterTree<ScopeType,ReaderType> |
executerTreeFromFile(java.lang.String filename) |
abstract ReaderType |
fileToScriptReader(java.io.File file)
Creates a script reader from file content.
|
ReaderType |
fileToScriptReader(java.lang.String filename)
Creates a script reader from file content.
|
abstract ScopeType |
getTopScope()
Returns the global scope of the script.
|
ScriptComplexType |
registerComplexType(java.lang.String typeName,
java.lang.String parameters)
Creates and registers a complex type.
|
abstract ReaderType |
stringToScriptReader(java.lang.String string)
Creates a script reader from string.
|
getStartParser, parse, setStartParser
cast, checkExecutionTypeExistence, clearTypes, getComplexType, getScriptType, getScriptType, getScriptTypes, getTypeCast, getTypeCount, putTypeCast, putTypeCast, putTypeCast, putTypeCast, registerComplexType, registerSynonym, registerSynonym, registerSynonym, registerType, registerType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
assignmentToString, callToString, cast, createSignature, getScriptType, putTypeCast, putTypeCast, putTypeCast, putTypeCast, registerComplexType, statementToString
public abstract ScopeType getTopScope()
ScriptSystemInterface
getTopScope
in interface ScriptSystemInterface<ScopeType extends ExecutionScope,ReaderType extends IndexReader>
public abstract ReaderType fileToScriptReader(java.io.File file)
ScriptSystemInterface
fileToScriptReader
in interface ScriptSystemInterface<ScopeType extends ExecutionScope,ReaderType extends IndexReader>
file
- the file to parse.public abstract ReaderType stringToScriptReader(java.lang.String string)
ScriptSystemInterface
stringToScriptReader
in interface ScriptSystemInterface<ScopeType extends ExecutionScope,ReaderType extends IndexReader>
string
- the string containing the source code to parse.public ReaderType fileToScriptReader(java.lang.String filename)
ScriptSystemInterface
fileToScriptReader
in interface ScriptSystemInterface<ScopeType extends ExecutionScope,ReaderType extends IndexReader>
filename
- the filename of the file to parse.public ScriptComplexType registerComplexType(java.lang.String typeName, java.lang.String parameters) throws ParameterParseException
ScriptSystemInterface
registerComplexType
in interface ScriptSystemInterface<ScopeType extends ExecutionScope,ReaderType extends IndexReader>
typeName
- the name of the complex type to create.parameters
- the names and types of the complex type given as a string. See ParameterTuple
for the
syntax.ParameterParseException
- if an error occurred while parsing the parameter string.public ExecuterTree<ScopeType,ReaderType> createExecuter(ReaderType source)
ScriptSystemInterface
createExecuter
in interface ScriptSystemInterface<ScopeType extends ExecutionScope,ReaderType extends IndexReader>
source
- the source code to parse.public ExecuterTree<ScopeType,ReaderType> createExecuter(java.lang.String source)
ScriptSystemInterface
createExecuter
in interface ScriptSystemInterface<ScopeType extends ExecutionScope,ReaderType extends IndexReader>
source
- the string containing the source code to parse.public ExecuterTree<ScopeType,ReaderType> executerFromFile(java.io.File file)
ScriptSystemInterface
executerFromFile
in interface ScriptSystemInterface<ScopeType extends ExecutionScope,ReaderType extends IndexReader>
file
- the file containing the source code to parse.public ExecuterTree<ScopeType,ReaderType> executerTreeFromFile(java.lang.String filename)