EBNF: foo2 [=[ Bar = "a":a-1 "a":a-2 => [[ a-1 a-2 2array ]] ]=]
"aa" foo2
] unit-test
+
+{ "abc" } [
+ EBNF: parse-til-right-bracket [=[
+ foo = [^\]]+
+ ]=]
+ "abc]" parse-til-right-bracket >string
+] unit-test
+
+! Doesn't match anything, don't run it.
+{ } [
+ EBNF: parse-empty-range [=[
+ foo = []+
+ ]=]
+] unit-test
\ No newline at end of file
! Match the syntax for declaring character ranges
[
[ "[" syntax , "[" token ensure-not , ] seq* hide ,
- [ CHAR: ] = not ] satisfy repeat1 ,
+ [
+ "\\]" token [ second ] action ,
+ [ CHAR: ] = not ] satisfy ,
+ ] choice* repeat0 ,
"]" syntax ,
] seq* [ first >string unescape-string <ebnf-range> ] action ;