original commit: 1bd92c441435a2c2ae5f0a37c7d5e6559e620360
tokens
Robby Findler 20 years ago
parent 24ad776c2d
commit 5eed9288c9

@ -26,12 +26,12 @@
(define-struct prec (num assoc) (make-inspector)) (define-struct prec (num assoc) (make-inspector))
(provide/contract (provide/contract
(make-item (prod? (union false? natural-number?) . -> . item?)) (make-item (prod? (union false/c natural-number/c) . -> . item?))
(make-term (symbol? (union false? natural-number?) (union prec? false?) . -> . term?)) (make-term (symbol? (union false/c natural-number/c) (union prec? false/c) . -> . term?))
(make-non-term (symbol? (union false? natural-number?) . -> . non-term?)) (make-non-term (symbol? (union false/c natural-number/c) . -> . non-term?))
(make-prec (natural-number? (symbols 'left 'right 'nonassoc) . -> . prec?)) (make-prec (natural-number/c (symbols 'left 'right 'nonassoc) . -> . prec?))
(make-prod (non-term? (vectorof (union non-term? term?)) (make-prod (non-term? (vectorof (union non-term? term?))
(union false? natural-number?) (union false? prec?) syntax? . -> . prod?))) (union false/c natural-number/c) (union false/c prec?) syntax? . -> . prod?)))
(provide (provide

@ -13,7 +13,7 @@
(provide/contract (provide/contract
(parse-input ((listof identifier?) (listof identifier?) (listof identifier?) (parse-input ((listof identifier?) (listof identifier?) (listof identifier?)
(union false? syntax?) syntax? any? . -> . (is-a?/c grammar%))) (union false/c syntax?) syntax? any/c . -> . (is-a?/c grammar%)))
(get-term-list ((listof identifier?) . -> . (listof identifier?)))) (get-term-list ((listof identifier?) . -> . (listof identifier?))))
(define stx-for-original-property (read-syntax #f (open-input-string "original"))) (define stx-for-original-property (read-syntax #f (open-input-string "original")))

@ -8,12 +8,12 @@
(require-for-template mzscheme) (require-for-template mzscheme)
(provide/contract (provide/contract
(build-parser ((string? any? any? (listof identifier?) (listof identifier?) (build-parser ((string? any/c any/c (listof identifier?) (listof identifier?)
(listof identifier?) (union syntax? false?) syntax?) . ->* . (listof identifier?) (union syntax? false/c) syntax?) . ->* .
(any? any? any? any?)))) (any/c any/c any/c any/c))))
;; fix-check-syntax : (listof identifier?) (listof identifier?) (listof identifier?) ;; fix-check-syntax : (listof identifier?) (listof identifier?) (listof identifier?)
;; (union syntax? false?) syntax?) -> syntax? ;; (union syntax? false/c) syntax?) -> syntax?
(define (fix-check-syntax input-terms start ends assocs prods) (define (fix-check-syntax input-terms start ends assocs prods)
(let* ((term-binders (get-term-list input-terms)) (let* ((term-binders (get-term-list input-terms))
(get-term-binder (get-term-binder

Loading…
Cancel
Save