Package io.deephaven.lang.generated
Class ChunkerMixin.PeekStream
java.lang.Object
io.deephaven.lang.generated.ChunkerMixin.PeekStream
- Enclosing interface:
- ChunkerMixin
A stream specialized for "peek ahead" during semantic LOOKAHEAD.
Normally, lookahead will assign tokens as it is looking ahead,
but this can be problematic, as it can mis-identify and assign a token,
causing the real match to be missed.
We instead use direct access to tokens and underlying streams,
so we can manually identify which paths to take; this can cause
our peekaheads to be called multiple times at the same place
(since we aren't assigning tokens for quick re-lookup),
but we can ameliorate that performance with
some light memoization on tokens (later).
-
Method Summary
Modifier and TypeMethodDescriptionassign()
io.deephaven.lang.generated.ChunkerMixin.PeekStream.EofChecker
eof
(char... cs) eofOr
(char... cs) exact
(char... cs) identifier
(Set<Character> allowedEndings) io.deephaven.lang.generated.ChunkerMixin.PeekStream.Checker
is
(char... cs) io.deephaven.lang.generated.ChunkerMixin.PeekStream.Checker
boolean
matches
(boolean peeking) io.deephaven.lang.generated.ChunkerMixin.PeekStream.Checker
ws()
io.deephaven.lang.generated.ChunkerMixin.PeekStream.Checker
ws
(boolean required)
-
Method Details
-
whitespace
-
ws
public io.deephaven.lang.generated.ChunkerMixin.PeekStream.Checker ws() -
ws
public io.deephaven.lang.generated.ChunkerMixin.PeekStream.Checker ws(boolean required) -
identifier
-
eofOr
-
assign
-
eof
public io.deephaven.lang.generated.ChunkerMixin.PeekStream.EofChecker eof(char... cs) -
exact
-
exact
-
is
public io.deephaven.lang.generated.ChunkerMixin.PeekStream.Checker is(char... cs) -
is
-
matches
public boolean matches(boolean peeking)
-