From c3b300f30aa9a789b00f3d48a0e07b0beeb40eee Mon Sep 17 00:00:00 2001 From: Scott Owens Date: Tue, 19 Aug 2003 22:52:47 +0000 Subject: [PATCH] *** empty log message *** original commit: 61c7b1c61b0ec9db2f840cb04f1a6e1281c21a86 --- collects/parser-tools/private-yacc/grammar.ss | 12 ++++++------ .../parser-tools/private-yacc/input-file-parser.ss | 2 +- collects/parser-tools/private-yacc/parser-builder.ss | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/collects/parser-tools/private-yacc/grammar.ss b/collects/parser-tools/private-yacc/grammar.ss index 780027f..9e7db7d 100644 --- a/collects/parser-tools/private-yacc/grammar.ss +++ b/collects/parser-tools/private-yacc/grammar.ss @@ -17,7 +17,7 @@ ;; Thus 0 <= dot-pos <= (vector-length rhs). (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 non-term has a unique index 0 <= index < number of non-terms (define-struct term (sym index prec) (make-inspector)) @@ -27,12 +27,12 @@ (define-struct prec (num assoc) (make-inspector)) (provide/contract - (make-item (prod? (or/f false? natural-number?) . -> . item?)) - (make-term (symbol? (or/f false? natural-number?) (or/f prec? false?) . -> . term?)) - (make-non-term (symbol? (or/f false? natural-number?) . -> . non-term?)) + (make-item (prod? (union false? natural-number?) . -> . item?)) + (make-term (symbol? (union false? natural-number?) (union prec? false?) . -> . term?)) + (make-non-term (symbol? (union false? natural-number?) . -> . non-term?)) (make-prec (natural-number? (symbols 'left 'right 'nonassoc) . -> . prec?)) - (make-prod (non-term? (vectorof (or/f non-term? term?)) - (or/f false? natural-number?) (or/f false? prec?) syntax? . -> . prod?))) + (make-prod (non-term? (vectorof (union non-term? term?)) + (union false? natural-number?) (union false? prec?) syntax? . -> . prod?))) (provide diff --git a/collects/parser-tools/private-yacc/input-file-parser.ss b/collects/parser-tools/private-yacc/input-file-parser.ss index 02fa108..2ab790d 100644 --- a/collects/parser-tools/private-yacc/input-file-parser.ss +++ b/collects/parser-tools/private-yacc/input-file-parser.ss @@ -12,7 +12,7 @@ (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?)))) (define stx-for-original-property (read-syntax #f (open-input-string "original"))) diff --git a/collects/parser-tools/private-yacc/parser-builder.ss b/collects/parser-tools/private-yacc/parser-builder.ss index 4e6e5d5..f4e07ed 100644 --- a/collects/parser-tools/private-yacc/parser-builder.ss +++ b/collects/parser-tools/private-yacc/parser-builder.ss @@ -9,7 +9,7 @@ (provide/contract (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) (syntax-local-introduce