|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsleep.parser.ParserConfig
This class offers access to modify some settings within the sleep parser.
In sleep a character prefixed by a \ backslash within a "double quoted" string is said to be escaped. Typically an escaped character is just skipped over during processing. It is possible in sleep to add meaning to different characters by installing an escape. For example to add the escape \r to mean the new line character one would do the following:
ParserConfig.installEscapeConstant('m', "MONKEY");
Once the above code is executed the value "blah\m" inside of sleep would be equivalent in java to "blahMONKEY".
The sleep parser requires that all environment "keywords" be registered before any scripts are parsed. Bridges that should register their keywords are Environment, PredicateEnvironment, FilterEnvironment, Operator, and Predicate.
Environment
,
PredicateEnvironment
Constructor Summary | |
ParserConfig()
|
Method Summary | |
static void |
addKeyword(String keyword)
registers "keyword" as a keyword with the parser. |
static void |
installEscapeConstant(char escape,
String value)
Installs an escape constant into the sleep parser. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ParserConfig()
Method Detail |
public static void installEscapeConstant(char escape, String value)
public static void addKeyword(String keyword)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |