sleep.parser
public class ParserConfig extends Object
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.
See Also: Environment
Method Summary | |
---|---|
static void | addKeyword(String keyword) registers "keyword" as a keyword with the parser. |
static File | findJarFile(String name) Search the sleep classpath for the specified file. |
static String | getSleepClasspath() Query the Sleep classpath. |
static void | installEscapeConstant(char escape, String value) Installs an escape constant into the sleep parser. |
static void | setSleepClasspath(String path) Set the Sleep classpath. |