| Modifier and Type | Field and Description |
|---|---|
protected List<List<Object>> |
fallthroughStylePatterns |
protected int |
nPatterns |
protected Map<Character,List<Object>> |
shortcuts |
protected Pattern |
tokenizer |
| Modifier | Constructor and Description |
|---|---|
protected |
CreateSimpleLexer(List<List<Object>> shortcutStylePatterns,
List<List<Object>> fallthroughStylePatterns)
Given triples of [style, pattern, context] returns a lexing function,
The lexing function interprets the patterns to find token boundaries and
returns a decoration list of the form
[index_0, style_0, index_1, style_1, ..., index_n, style_n]
where index_n is an index into the sourceCode, and style_n is a style
constant like PR_PLAIN.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decorate(Job job)
Lexes job.sourceCode and produces an output array job.decorations of
style classes preceded by the position at which they start in
job.sourceCode in order.
|
protected Pattern tokenizer
protected int nPatterns
protected CreateSimpleLexer(List<List<Object>> shortcutStylePatterns, List<List<Object>> fallthroughStylePatterns) throws Exception
Copyright © 2015. All rights reserved.