Fixed bug in parse-language.

svn: r14155
This commit is contained in:
Casey Klein 2009-03-17 18:21:11 +00:00
parent 2068a5dcc3
commit 289b200057
2 changed files with 9 additions and 1 deletions

View File

@ -530,6 +530,14 @@
(decisions #:nt (patterns fourth first first second first first first)
#:var (list (λ _ 'x) (λ _ 'y))))
(term (λ (x) (hole y)))))
(let ()
(define-language L
(a ((a ...) ...)))
(test (generate-term/decisions
L (cross a) 3 0
(decisions #:nt (patterns second first)
#:seq (list (λ _ 0) (λ _ 0) (λ _ 0) (λ _ 0))))
(term ((hole)))))
;; generation failures increase size and attempt
(let ()

View File

@ -620,7 +620,7 @@ To do a better job of not generating programs with free variables,
(struct-copy
compiled-lang lang
[lang (map (parse-nt 'grammar) (compiled-lang-lang lang))]
[cclang (map (parse-nt 'top-level) (compiled-lang-cclang lang))]))
[cclang (map (parse-nt 'cross) (compiled-lang-cclang lang))]))
;; unparse-pattern: parsed-pattern -> pattern
(define unparse-pattern