public static final class Lexer.Entry.Builder extends Object
Constructor and Description |
---|
Builder(boolean visibility,
Located<String> name,
Extent returnType,
@Nullable Extent args)
Constructs a fresh builder with longest-match rule
and an empty set of clauses
|
Modifier and Type | Method and Description |
---|---|
Lexer.Entry.Builder |
add(Located<Regular> regular,
Extent loc)
Adds the clause formed by the given regular expression
and semantic action
|
Lexer.Entry.Builder |
add(Regular regular,
String inlined)
Adds the clause formed by the given regular expression
and inlined semantic action
|
Lexer.Entry |
build() |
Lexer.Entry.Builder |
setShortest()
Use the shortest-match rule for this entry
|
public Lexer.Entry.Builder setShortest()
public Lexer.Entry.Builder add(Located<Regular> regular, Extent loc)
regular
- loc
- public Lexer.Entry.Builder add(Regular regular, String inlined)
regular
- inlined
- public Lexer.Entry build()