From f8c3f3764604354e298d7803a4fea255fb100164 Mon Sep 17 00:00:00 2001 From: "Jesse A. Tov" Date: Thu, 25 Jul 2019 19:39:03 -0500 Subject: [PATCH] Fixes bug demonstrated by previous commit. Now (repetition 1 1 e) is a charset if e is a charset, but other number of repetitions are not. --- br-parser-tools-lib/br-parser-tools/private-lex/stx.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/br-parser-tools-lib/br-parser-tools/private-lex/stx.rkt b/br-parser-tools-lib/br-parser-tools/private-lex/stx.rkt index 16ee1d5..326ecb3 100644 --- a/br-parser-tools-lib/br-parser-tools/private-lex/stx.rkt +++ b/br-parser-tools-lib/br-parser-tools/private-lex/stx.rkt @@ -134,7 +134,7 @@ [(list? s-re) (case (car s-re) [(union intersection) (andmap char-set? (cdr s-re))] [(char-range char-complement) #t] - [(repetition) (and (= (cadr s-re) (caddr s-re)) (char-set? (cadddr s-re)))] + [(repetition) (and (= 1 (cadr s-re) (caddr s-re)) (char-set? (cadddr s-re)))] [(concatenation) (and (= 2 (length s-re)) (char-set? (cadr s-re)))] (else #f))] [else #f]))