]> gitweb.factorcode.org Git - factor.git/commitdiff
formatting: simplify plain-text ebnf rule
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 10 Jan 2022 22:03:17 +0000 (14:03 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 10 Jan 2022 22:03:17 +0000 (14:03 -0800)
basis/formatting/formatting.factor

index 4ed90e8006809550587dfdfff63d8ba8be0d3ce8..04589cfd67fdc381d8ec6ef744752bd83679a172 100644 (file)
@@ -142,7 +142,7 @@ assocs    = "[%" types ": %" types " %]" => [[ [ second ] [ fourth ] bi '[ [ _ _
 
 formats   = "%" (types|fmt-%|lists|assocs|unknown) => [[ second ]]
 
-plain-text = (!("%").)+          => [[ >string ]]
+plain-text = [^%]+               => [[ >string ]]
 
 text      = (formats|plain-text)*
 
@@ -243,7 +243,7 @@ formats_  = fmt-%|fmt-a|fmt-A|fmt-b|fmt-B|fmt-c|fmt-d|fmt-H|fmt-I|
 
 formats   = "%" (formats_)       => [[ second ]]
 
-plain-text = (!("%").)+          => [[ >string ]]
+plain-text = [^%]+               => [[ >string ]]
 
 text      = (formats|plain-text)*