make sure redex-match? does the duplicate non-terminals check
closes PR 14290
This commit is contained in:
parent
403a8b42e9
commit
cd4de75193
|
@ -621,8 +621,7 @@ See match-a-pattern.rkt for more details
|
|||
|
||||
;; match-pattern? : compiled-pattern exp -> boolean
|
||||
(define (match-pattern? compiled-pattern exp)
|
||||
(let ([results ((compiled-pattern-cp compiled-pattern) exp #f)])
|
||||
(and results #t)))
|
||||
(and (match-pattern compiled-pattern exp) #t))
|
||||
|
||||
;; match-pattern : compiled-pattern exp -> (union #f (listof bindings))
|
||||
(define (match-pattern compiled-pattern exp)
|
||||
|
|
|
@ -280,6 +280,9 @@
|
|||
(test (map match-bindings (redex-match grammar (a ..._1) (term (a a a))))
|
||||
'(()))
|
||||
|
||||
;; make sure redex-match? does the equality check
|
||||
(test (redex-match? empty-language (any_0 any_0) (term (1 2))) #f)
|
||||
|
||||
(define-syntax (test-match stx)
|
||||
(syntax-case stx ()
|
||||
[(_ actual (((var val) ...) ...))
|
||||
|
|
Loading…
Reference in New Issue
Block a user