|
|
@ -168,7 +168,9 @@
|
|
|
|
[(list all min range? max) (let* ([min (if min (string->number min) 0)]
|
|
|
|
[(list all min range? max) (let* ([min (if min (string->number min) 0)]
|
|
|
|
[max (cond
|
|
|
|
[max (cond
|
|
|
|
[(and range? max) (string->number max)]
|
|
|
|
[(and range? max) (string->number max)]
|
|
|
|
[(and (not range?) (not max)) min] ; {3} -> {3,3}
|
|
|
|
[(and (not range?) (not max)) (if (zero? min)
|
|
|
|
|
|
|
|
#f ; {} -> {0,}
|
|
|
|
|
|
|
|
min))] ; {3} -> {3,3}
|
|
|
|
[else #f])])
|
|
|
|
[else #f])])
|
|
|
|
(cons min max))]))]
|
|
|
|
(cons min max))]))]
|
|
|
|
[else (raise-argument-error 'grammar-parse "unknown repetition operator" $2)]))
|
|
|
|
[else (raise-argument-error 'grammar-parse "unknown repetition operator" $2)]))
|
|
|
|