Modifier and Type | Field and Description |
---|---|
protected @NotNull java.util.function.BiFunction<Document,Reference,Tree> |
constructor
The constructor to be used to construct new trees.
|
protected @NotNull java.util.regex.Pattern |
pattern
A pattern matching the literal.
|
protected int |
zIndex
The z-index to accept.
|
Constructor and Description |
---|
PatternParser(@NotNull java.util.regex.Pattern pattern)
Construct a new literal parser that parses the sketches looking for areas that
matches the given
pattern . |
PatternParser(@NotNull java.util.regex.Pattern pattern,
@NotNull java.util.function.BiFunction<Document,Reference,Tree> constructor)
Construct a new literal parser that parses the sketches looking for areas that
matches the given
pattern . |
PatternParser(@NotNull java.util.regex.Pattern pattern,
int zIndex)
Construct a new literal parser that parses the sketches looking for areas that
matches the given
pattern . |
PatternParser(@NotNull java.util.regex.Pattern pattern,
int zIndex,
@NotNull java.util.function.BiFunction<Document,Reference,Tree> constructor)
Construct a new literal parser that parses the sketches looking for areas that
matches the given
pattern . |
Modifier and Type | Method and Description |
---|---|
@NotNull java.util.Set<Tree> |
parse(@NotNull Compilation compilation,
@NotNull Tree tree)
Parse the given
sketch with respect to the given compilation . |
@NotNull protected final @NotNull java.util.function.BiFunction<Document,Reference,Tree> constructor
@NotNull protected final @NotNull java.util.regex.Pattern pattern
protected final int zIndex
public PatternParser(@NotNull @NotNull java.util.regex.Pattern pattern)
pattern
.pattern
- the pattern matching the areas the constructed parser will be
looking for.java.lang.NullPointerException
- if the given pattern
is null.public PatternParser(@NotNull @NotNull java.util.regex.Pattern pattern, int zIndex)
pattern
.pattern
- the pattern matching the areas the constructed parser will be
looking for.zIndex
- the z-index to accept.java.lang.NullPointerException
- if the given pattern
is null.public PatternParser(@NotNull @NotNull java.util.regex.Pattern pattern, @NotNull @NotNull java.util.function.BiFunction<Document,Reference,Tree> constructor)
pattern
.pattern
- the pattern matching the areas the constructed parser will be
looking for.constructor
- the constructor.java.lang.NullPointerException
- if the given pattern
or constructor
is
null.public PatternParser(@NotNull @NotNull java.util.regex.Pattern pattern, int zIndex, @NotNull @NotNull java.util.function.BiFunction<Document,Reference,Tree> constructor)
pattern
.pattern
- the pattern matching the areas the constructed parser will be
looking for.zIndex
- the z-index to accept.constructor
- the constructor.java.lang.NullPointerException
- if the given pattern
or constructor
is
null.@NotNull public @NotNull java.util.Set<Tree> parse(@NotNull @NotNull Compilation compilation, @NotNull @NotNull Tree tree)
Parser
sketch
with respect to the given compilation
.