//testcase {
// input "x";
-// output "a1:{x}";
+// output "a:{x}";
//
// s = a1:: a
// a = s1:: s
output "1:{{a b} {c}}";
s = ids
- ids = "1":: id (" " ids &~ id !((~[])*))
- | "2":: id ( ids &~ id !((~[])*))
+ ids = "1":: id (" " ids &~ id ((~[])*)!)
+ | "2":: id ( ids &~ id ((~[])*)!)
| id
id = [a-z]++
}
sp = " "
any = (~[])*
-s = smt:: !ws statement !ws statement !ws
+s = smt:: ws! statement ws! statement ws!
-block = !"\n" !indent blockBody
- &~ !"\n" (" " !outdent " ") !(~[\ ]) !((~[])*)
+block = "\n"! indent! blockBody
+ &~ "\n"! (" " outdent! " ") (~[\ ])! ((~[])*)!
blockBody = statement
> sbb:: statement ws blockBody
s = s2:: q " "*
q = a3:: [a-z] [a-z] [a-z]
- &~ !(~[]) "b" !((~[])*)
+ &~ (~[])! "b" ((~[])*)!
}
testcase {
Expr = if:: "if" "(" Expr ")" IfBody /ws
| ident:: [a-z]++
IfBody = else:: Expr "else" Expr /ws
- | then:: Expr &~ ((~[])* "else" !Expr /ws)
+ | then:: Expr &~ ((~[])* "else" Expr! /ws)
ws = [ ]**
}