|
|
@ -24,7 +24,9 @@
|
|
|
|
[_ regular-pattern?])]
|
|
|
|
[_ regular-pattern?])]
|
|
|
|
[optional-pattern (->* (regular-pattern?) (#:greedy? boolean?) regular-pattern?)]
|
|
|
|
[optional-pattern (->* (regular-pattern?) (#:greedy? boolean?) regular-pattern?)]
|
|
|
|
[lookahead-pattern (-> regular-pattern? regular-pattern?)]
|
|
|
|
[lookahead-pattern (-> regular-pattern? regular-pattern?)]
|
|
|
|
[regular-pattern-compile (-> regular-pattern? compiled-regex?)]))
|
|
|
|
[regular-pattern-compile (-> regular-pattern? compiled-regex?)]
|
|
|
|
|
|
|
|
[regular-pattern-match-string
|
|
|
|
|
|
|
|
(-> regular-pattern? string? (or/c regular-match? regular-match-failure?))]))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(require racket/match
|
|
|
|
(require racket/match
|
|
|
@ -34,7 +36,8 @@
|
|
|
|
rebellion/collection/vector
|
|
|
|
rebellion/collection/vector
|
|
|
|
rebellion/collection/vector/builder
|
|
|
|
rebellion/collection/vector/builder
|
|
|
|
rebellion/streaming/transducer
|
|
|
|
rebellion/streaming/transducer
|
|
|
|
yaragg/lexer/private/regex-vm)
|
|
|
|
yaragg/lexer/private/regex-vm
|
|
|
|
|
|
|
|
yaragg/lexer/private/regular-match)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(module+ test
|
|
|
|
(module+ test
|
|
|
@ -197,6 +200,10 @@
|
|
|
|
(compiled-regex-with-labels (build-vector instructions) labels))
|
|
|
|
(compiled-regex-with-labels (build-vector instructions) labels))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define (regular-pattern-match-string pattern str)
|
|
|
|
|
|
|
|
(compiled-regex-match-string (regular-pattern-compile pattern) str))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(module+ test
|
|
|
|
(module+ test
|
|
|
|
(test-case (name-string regular-pattern-compile)
|
|
|
|
(test-case (name-string regular-pattern-compile)
|
|
|
|
|
|
|
|
|
|
|
|