public static final class Lexer.Builder extends Object
Lexer, where entries can be
added incrementally, and which takes care of collecting
problem reports along the wayaddEntry(Lexer.Entry)| Modifier and Type | Field and Description |
|---|---|
Reporter |
reporter
Problems reported when building this lexer
|
| Constructor and Description |
|---|
Builder(List<Option> options,
List<Located<String>> imports,
Extent header,
Map<Located<String>,Regular> regulars,
Extent footer)
Returns a new builder with the given options, imports,
header, auxiliary regular expressions and footer
|
| Modifier and Type | Method and Description |
|---|---|
Lexer.Builder |
addEntries(Lexer.Entry... entries) |
Lexer.Builder |
addEntry(Lexer.Entry entry) |
Lexer |
build() |
public final Reporter reporter
public Builder(List<Option> options, List<Located<String>> imports, Extent header, Map<Located<String>,Regular> regulars, Extent footer)
options - imports - header - regulars - footer - public Lexer.Builder addEntry(Lexer.Entry entry)
entry - public Lexer.Builder addEntries(Lexer.Entry... entries)
entries - public Lexer build()
Lexer.IllFormedException - if the described lexer
is not well-formed