|
|
@ -152,7 +152,14 @@
|
|
|
|
(parameterize ([current-source source])
|
|
|
|
(parameterize ([current-source source])
|
|
|
|
(parse tokenizer))])))]))
|
|
|
|
(parse tokenizer))])))]))
|
|
|
|
|
|
|
|
|
|
|
|
(define parse (make-rule-parser start-id))))))]))
|
|
|
|
(define parse (make-rule-parser start-id))
|
|
|
|
|
|
|
|
(provide parse-tree)
|
|
|
|
|
|
|
|
(define (parse-tree x)
|
|
|
|
|
|
|
|
(let loop ([x (syntax->datum (parse x))])
|
|
|
|
|
|
|
|
(cond
|
|
|
|
|
|
|
|
[(list? x) (map loop x)]
|
|
|
|
|
|
|
|
[(char? x) (format "~a" x)]
|
|
|
|
|
|
|
|
[else x])))))))]))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Given a flattened rule, returns a syntax for the code that
|
|
|
|
;; Given a flattened rule, returns a syntax for the code that
|
|
|
|