The first component of a `name' pattern is not an identifier, not a

pattern.

svn: r17896
This commit is contained in:
Casey Klein 2010-01-30 17:41:39 +00:00
parent 6f17b84706
commit 425dbf5af5
2 changed files with 3 additions and 1 deletions

View File

@ -62,7 +62,7 @@
[(variable-prefix a ...) (expected-exact 'variable-prefix 1 term)]
[variable-prefix (expected-arguments 'variable-prefix term)]
[hole term]
[(name x y) #`(name #,(loop #'x) #,(loop #'y))]
[(name x y) #`(name x #,(loop #'y))]
[(name x ...) (expected-exact 'name 2 term)]
[name (expected-arguments 'name term)]
[(in-hole a b) #`(in-hole #,(loop #'a) #,(loop #'b))]

View File

@ -52,6 +52,8 @@
(test (pair? ((redex-match grammar M) '(1 1)))
#t)
(test (pair? (redex-match grammar (name not-an-nt_subscript 1) 1)) #t)
;; next 3: test naming of subscript-less non-terminals
(test (pair? (redex-match grammar (M M) (term (1 1)))) #t)