*** empty log message ***

original commit: 61c7b1c61b0ec9db2f840cb04f1a6e1281c21a86
tokens
Scott Owens 22 years ago
parent 877997cb5f
commit c3b300f30a

@ -17,7 +17,7 @@
;; Thus 0 <= dot-pos <= (vector-length rhs). ;; Thus 0 <= dot-pos <= (vector-length rhs).
(define-struct item (prod dot-pos) (make-inspector)) (define-struct item (prod dot-pos) (make-inspector))
;; gram-sym = (or/f term? non-term?) ;; gram-sym = (union term? non-term?)
;; Each term has a unique index 0 <= index < number of terms ;; Each term has a unique index 0 <= index < number of terms
;; Each non-term has a unique index 0 <= index < number of non-terms ;; Each non-term has a unique index 0 <= index < number of non-terms
(define-struct term (sym index prec) (make-inspector)) (define-struct term (sym index prec) (make-inspector))
@ -27,12 +27,12 @@
(define-struct prec (num assoc) (make-inspector)) (define-struct prec (num assoc) (make-inspector))
(provide/contract (provide/contract
(make-item (prod? (or/f false? natural-number?) . -> . item?)) (make-item (prod? (union false? natural-number?) . -> . item?))
(make-term (symbol? (or/f false? natural-number?) (or/f prec? false?) . -> . term?)) (make-term (symbol? (union false? natural-number?) (union prec? false?) . -> . term?))
(make-non-term (symbol? (or/f false? natural-number?) . -> . non-term?)) (make-non-term (symbol? (union false? natural-number?) . -> . non-term?))
(make-prec (natural-number? (symbols 'left 'right 'nonassoc) . -> . prec?)) (make-prec (natural-number? (symbols 'left 'right 'nonassoc) . -> . prec?))
(make-prod (non-term? (vectorof (or/f non-term? term?)) (make-prod (non-term? (vectorof (union non-term? term?))
(or/f false? natural-number?) (or/f false? prec?) syntax? . -> . prod?))) (union false? natural-number?) (union false? prec?) syntax? . -> . prod?)))
(provide (provide

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

@ -9,7 +9,7 @@
(provide/contract (provide/contract
(build-parser ((string? any? any? syntax? (listof syntax?) (listof syntax?) (build-parser ((string? any? any? syntax? (listof syntax?) (listof syntax?)
(or/f syntax? false?) syntax? syntax?) . ->* . (any? any? any? any?)))) (union syntax? false?) syntax? syntax?) . ->* . (any? any? any? any?))))
(define (strip so) (define (strip so)
(syntax-local-introduce (syntax-local-introduce

Loading…
Cancel
Save