diff --git a/parser-tools/private-lex/deriv.rkt b/parser-tools/private-lex/deriv.rkt index 69fb846..151c75e 100644 --- a/parser-tools/private-lex/deriv.rkt +++ b/parser-tools/private-lex/deriv.rkt @@ -218,7 +218,7 @@ ;; (list-of (cons int (list-of (cons char-set int))))) ;; Each transitions is a state and a list of chars with the state to transition to. ;; The finals and transitions are sorted by state number, and duplicate free. -(struct dfa (num-states start-state final-states/actions transitions) #:inspector (make-inspector)) +(struct dfa (num-states start-state final-states/actions transitions) #:transparent) (define loc:get-integer is:get-integer) diff --git a/parser-tools/private-lex/re.rkt b/parser-tools/private-lex/re.rkt index 3221e4d..f8c7111 100644 --- a/parser-tools/private-lex/re.rkt +++ b/parser-tools/private-lex/re.rkt @@ -25,15 +25,15 @@ ;; ;; Every re must have an index field globally different from all ;; other re index fields. -(struct re (nullable? index) #:inspector (make-inspector)) -(struct epsilonR re () #:inspector (make-inspector)) -(struct zeroR re () #:inspector (make-inspector)) -(struct char-setR re (chars) #:inspector (make-inspector)) -(struct concatR re (re1 re2) #:inspector (make-inspector)) -(struct repeatR re (low high re) #:inspector (make-inspector)) -(struct orR re (res) #:inspector (make-inspector)) -(struct andR re (res) #:inspector (make-inspector)) -(struct negR re (re) #:inspector (make-inspector)) +(struct re (nullable? index) #:transparent) +(struct epsilonR re () #:transparent) +(struct zeroR re () #:transparent) +(struct char-setR re (chars) #:transparent) +(struct concatR re (re1 re2) #:transparent) +(struct repeatR re (low high re) #:transparent) +(struct orR re (res) #:transparent) +(struct andR re (res) #:transparent) +(struct negR re (re) #:transparent) ;; e : re ;; The unique epsilon re diff --git a/parser-tools/private-lex/token.rkt b/parser-tools/private-lex/token.rkt index 62ea457..571f073 100644 --- a/parser-tools/private-lex/token.rkt +++ b/parser-tools/private-lex/token.rkt @@ -15,7 +15,7 @@ ;; A token is either ;; - symbol ;; - (token symbol any) -(struct token (name value) #:inspector (make-inspector)) +(struct token (name value) #:transparent) ;; token-name*: token -> symbol (define (token-name* t) diff --git a/parser-tools/private-yacc/grammar.rkt b/parser-tools/private-yacc/grammar.rkt index 8364f2c..41ed445 100644 --- a/parser-tools/private-yacc/grammar.rkt +++ b/parser-tools/private-yacc/grammar.rkt @@ -7,21 +7,21 @@ racket/contract) ;; Each production has a unique index 0 <= index <= number of productions -(struct prod (lhs rhs index prec action) #:inspector (make-inspector) #:mutable) +(struct prod (lhs rhs index prec action) #:mutable) ;; The dot-pos field is the index of the element in the rhs ;; of prod that the dot immediately precedes. ;; Thus 0 <= dot-pos <= (vector-length rhs). -(struct item (prod dot-pos) #:inspector (make-inspector)) +(struct item (prod dot-pos) #:transparent) ;; 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 -(struct term (sym index prec) #:inspector (make-inspector) #:mutable) -(struct non-term (sym index) #:inspector (make-inspector) #:mutable) +(struct term (sym index prec) #:mutable) +(struct non-term (sym index) #:mutable) ;; a precedence declaration. -(struct prec (num assoc) #:inspector (make-inspector)) +(struct prec (num assoc) #:transparent) (provide/contract [item (prod? (or/c #f natural-number/c) . -> . item?)] diff --git a/parser-tools/private-yacc/lr0.rkt b/parser-tools/private-yacc/lr0.rkt index 80b7011..6a25256 100644 --- a/parser-tools/private-yacc/lr0.rkt +++ b/parser-tools/private-yacc/lr0.rkt @@ -14,8 +14,8 @@ ;; be used to compare kernels ;; Each kernel is assigned a unique index, 0 <= index < number of states ;; trans-key = (trans-key kernel gram-sym) -(struct kernel (items index) #:inspector (make-inspector)) -(struct trans-key (st gs) #:inspector (make-inspector)) +(struct kernel (items index) #:transparent) +(struct trans-key (st gs) #:transparent) (define (trans-key