|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjwo.utils.syntaxhighlighter.Scanner
jwo.landserf.script.ScriptScanner
public class ScriptScanner
A Landscript language scanner that highlights LandScript keywords, syntax etc.
| Field Summary |
|---|
| Fields inherited from class jwo.utils.syntaxhighlighter.Scanner |
|---|
buffer, end, start, state, symbolTable |
| Fields inherited from interface jwo.utils.syntaxhighlighter.TokenTypes |
|---|
BRACKET, CHARACTER, COMMENT, END_COMMENT, END_TAG, IDENTIFIER, KEYWORD, KEYWORD2, LITERAL, MID_COMMENT, NUMBER, OPERATOR, PUNCTUATION, SEPARATOR, START_COMMENT, STRING, TAG, typeNames, UNRECOGNIZED, URL, WHITESPACE, WORD |
| Constructor Summary | |
|---|---|
ScriptScanner()
Creates a LandScript scanner that can provide syntax highlighting of LandScript. |
|
ScriptScanner(String version)
Creates a LandsScript scanner, for a given version. |
|
| Method Summary | |
|---|---|
protected Symbol |
lookup(int type,
String name)
Overrides lookup, but what about unicode escape translation? |
protected int |
read()
Overrides the read method from the Scanner class and processes LandScript syntax. |
void |
setCommands(HashSet commands)
Sets the commands to be highlighted by the scanner. |
void |
setFunctions(HashSet functions)
Sets the map algebra functions to be highlighted by the scanner. |
void |
setVariables(Set variables)
Sets the map variables to be highlighted by the scanner. |
void |
setVariableTypes(HashSet varTypes)
Sets the script variable types to be highlighted by the scanner. |
| Methods inherited from class jwo.utils.syntaxhighlighter.Scanner |
|---|
change, find, getToken, initSymbolTable, position, remove, scan, size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScriptScanner()
public ScriptScanner(String version)
version - LandScript version to scan. Currently only supports '1.0'.| Method Detail |
|---|
public void setCommands(HashSet commands)
commands - List of commands.public void setFunctions(HashSet functions)
functions - List of functions.public void setVariableTypes(HashSet varTypes)
varTypes - List of variable types.public void setVariables(Set variables)
variables - List of variables.protected int read()
read in class Scanner
protected Symbol lookup(int type,
String name)
lookup in class Scannertype - Type of symbol to look for.name - Name of symbol to look for.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||