test: Add nyacc cpp match tests; two fail.
* tests/match.test ("match nyacc 0", "match nyacc 1"): New tests. ("match nyacc simple", "match nyacc tkl0"): New tests; FAIL with Mes. (report): Set failure expectation to 2 for Mes. * HACKING: Add to bugs.
This commit is contained in:
parent
3b527affa3
commit
542a8c2106
1
HACKING
1
HACKING
|
@ -73,6 +73,7 @@ syntax-case]] with R7RS ellipsis, [[http://www.nongnu.org/nyacc/][Nyacc]] and [[
|
||||||
time to start doing something useful.
|
time to start doing something useful.
|
||||||
|
|
||||||
* Bugs
|
* Bugs
|
||||||
|
** test/match.test ("nyacc-simple"): hygiene problem in match
|
||||||
** The Scheme reader is very slow.
|
** The Scheme reader is very slow.
|
||||||
** Fluids are a hack for Nyacc.
|
** Fluids are a hack for Nyacc.
|
||||||
** Prototype mes.c depends on a C compiler.
|
** Prototype mes.c depends on a C compiler.
|
||||||
|
|
|
@ -88,5 +88,30 @@ exit $?
|
||||||
(_ "no match: (1 2)"))
|
(_ "no match: (1 2)"))
|
||||||
'(1 2)))
|
'(1 2)))
|
||||||
|
|
||||||
(result 'report)
|
(pass-if-equal "match nyacc 0"
|
||||||
|
'(rest)
|
||||||
|
(match '(first rest)
|
||||||
|
((first . rest)
|
||||||
|
rest)))
|
||||||
|
|
||||||
|
(pass-if-equal "match nyacc 1"
|
||||||
|
'(#\. rest)
|
||||||
|
(match '(first #\. rest)
|
||||||
|
(('first . rest)
|
||||||
|
rest)))
|
||||||
|
|
||||||
|
(let ((tkl0-simple '((ident . type) rest)))
|
||||||
|
(pass-if-equal "match nyacc simple"
|
||||||
|
(cons (cdar tkl0-simple) (cdr tkl0-simple))
|
||||||
|
(match tkl0-simple
|
||||||
|
((('ident . val) . rest)
|
||||||
|
(cons val rest)))))
|
||||||
|
|
||||||
|
(let ((tkl0 '((ident . "type") #\. #\] (arg . "0") #\[ (ident . "g_cells"))))
|
||||||
|
(pass-if-equal "match nyacc tkl0"
|
||||||
|
(cdr tkl0)
|
||||||
|
(match tkl0
|
||||||
|
((('ident . val) . rest)
|
||||||
|
rest))))
|
||||||
|
|
||||||
|
(result 'report (if mes? 2 0))
|
||||||
|
|
Loading…
Reference in a new issue