From d92e06231ad7d09bbed6292fb65e67a0161ad559 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sun, 15 Jul 2018 14:14:17 -0700 Subject: [PATCH] fix grammar bug --- .../regexcellent-demo/grammar.rkt | 6 ++--- .../regexcellent-demo/main.rkt | 22 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/beautiful-racket-demo/regexcellent-demo/grammar.rkt b/beautiful-racket-demo/regexcellent-demo/grammar.rkt index 9dc3109..bfe2b62 100644 --- a/beautiful-racket-demo/regexcellent-demo/grammar.rkt +++ b/beautiful-racket-demo/regexcellent-demo/grammar.rkt @@ -7,10 +7,10 @@ lookbehind : /"(" /"?" /"<" /"=" pat /")" lookahead : /"(" /"?" /"=" pat /")" choice : pat (/"|" pat)+ repeat : repeatable [("*" | "+") ["?"] | "?"] -@repeatable : group | any | start | end | literals | chars +@repeatable : group | any | start | end | literal | chars group : /"(" pat /")" any : /"." start : /"^" end : /"$" -literals : LITERAL+ -chars : /"[" LITERAL* /"]" \ No newline at end of file +literal : LITERAL +chars : /"[" literal* /"]" \ No newline at end of file diff --git a/beautiful-racket-demo/regexcellent-demo/main.rkt b/beautiful-racket-demo/regexcellent-demo/main.rkt index c3767b0..da6d095 100644 --- a/beautiful-racket-demo/regexcellent-demo/main.rkt +++ b/beautiful-racket-demo/regexcellent-demo/main.rkt @@ -5,23 +5,22 @@ (module+ reader (provide read-syntax)) -(define-lex-abbrev regex-chars (char-set "()*+?.^$|