From 38412c1b66f17fb725113000618a5d1205818a61 Mon Sep 17 00:00:00 2001 From: Scott Owens Date: Wed, 31 Oct 2001 23:01:43 +0000 Subject: [PATCH] *** empty log message *** original commit: 44159012bf3bffe881adf99cfdb34fccc6d86084 --- collects/parser-tools/private-yacc/grammar.ss | 13 +++++++------ collects/parser-tools/private-yacc/lr0.ss | 8 ++++---- .../parser-tools/private-yacc/parser-actions.ss | 6 +++--- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/collects/parser-tools/private-yacc/grammar.ss b/collects/parser-tools/private-yacc/grammar.ss index e3e61d6..80307a4 100644 --- a/collects/parser-tools/private-yacc/grammar.ss +++ b/collects/parser-tools/private-yacc/grammar.ss @@ -41,7 +41,7 @@ ;; LR-item = (make-item production nat (int | #f)) ;; The n field contains the least integer such the item is nullable ;; after the dot if the dot is to the right of the nth position. - (define-struct item (prod dot-pos n)) + (define-struct item (prod dot-pos n) (make-inspector)) (define (export-make-item a b) (make-item a b #f)) @@ -120,8 +120,8 @@ ;; gram-sym = (make-term symbol int prec) ;; | (make-non-term symbol int) - (define-struct term (sym index prec)) - (define-struct non-term (sym index)) + (define-struct term (sym index prec) (make-inspector)) + (define-struct non-term (sym index) (make-inspector)) (define (non-term production list @@ -188,5 +189,5 @@ ;; ------------------------ Productions --------------------------- ;; production = (make-prod non-term (gram-sym vector) int prec syntax-object) - (define-struct prod (lhs rhs index prec action)) + (define-struct prod (lhs rhs index prec action) (make-inspector)) ) diff --git a/collects/parser-tools/private-yacc/lr0.ss b/collects/parser-tools/private-yacc/lr0.ss index e083a67..461a70f 100644 --- a/collects/parser-tools/private-yacc/lr0.ss +++ b/collects/parser-tools/private-yacc/lr0.ss @@ -31,9 +31,9 @@ ;; be used to compare kernels ;; LR0-automaton = (make-lr0 (trans-key kernel hash-table) (kernel vector)) ;; trans-key = (make-trans-key kernel gram-sym) - (define-struct kernel (items index)) - (define-struct trans-key (st gs)) - (define-struct lr0 (transitions states)) + (define-struct kernel (items index) (make-inspector)) + (define-struct trans-key (st gs) (make-inspector)) + (define-struct lr0 (transitions states) (make-inspector)) ;; The kernels in the automaton are represented cannonically. ;; That is (equal? a b) <=> (eq? a b) @@ -226,7 +226,7 @@ (enq! new-kernels (goto (car old-kernels))) (loop (cdr old-kernels) (cons (car old-kernels) seen-kernels))))))) - (define-struct q (f l)) + (define-struct q (f l) (make-inspector)) (define (empty-queue? q) (null? (q-f q))) (define (make-queue) diff --git a/collects/parser-tools/private-yacc/parser-actions.ss b/collects/parser-tools/private-yacc/parser-actions.ss index dbc7faa..bbf40c8 100644 --- a/collects/parser-tools/private-yacc/parser-actions.ss +++ b/collects/parser-tools/private-yacc/parser-actions.ss @@ -13,7 +13,7 @@ ;; | int ;; | #f - (define-struct shift (state)) - (define-struct reduce (prod-num lhs-num rhs-length)) - (define-struct accept ()) + (define-struct shift (state) (make-inspector)) + (define-struct reduce (prod-num lhs-num rhs-length) (make-inspector)) + (define-struct accept () (make-inspector)) )