class Pegmatite::Pattern::Not
Overview
Pattern::Not is used for negative-lookahead.
Parsing will fail if the child pattern parsing succeeds.
Otherwise, the pattern succeeds, consuming zero bytes.
Composing two Pattern::Not instances inside one another is a valid strategy
for positive lookahead. (TODO: test for this example)
Defined in:
pegmatite/pattern/not.cr
Constructors
Instance Method Summary
Instance methods inherited from class Pegmatite::Pattern
_match(source, offset, state) : MatchResult
_match,
match(source, offset, state) : MatchResult
match
>>(other)
>>,
^(other)
^,
|(other)
|,
~
~,
dynamic_pop(label)
dynamic_pop,
dynamic_push(label)
dynamic_push,
maybe
maybe,
named(label, tokenize = true)
named,
repeat(min = 0, max = nil)
repeat,
repeat_exactly(times)
repeat_exactly,
then_eof
then_eof
Constructor Detail
Instance Method Detail