testcase {
input "aaaaa";
+ output "top:{a q:{{a a a}} a}";
s = top:: z (q::"a"*) z
z = a:: "a"
}
input "if (x) if (y) z else q";
output "if:{ident:{{x}} else:{if:{ident:{{y}} then:{ident:{{z}}}} ident:{{q}}}}";
- s = e
+ s = Expr
Expr = if:: "if" "(" Expr ")" IfBody /ws
| ident:: [a-z]++
- IfBody = else:: Expr "else" Expr /ws
- | then:: Expr &~ ~[]* "else" Expr /ws
+ IfBody = else:: Expr "else" Expr /ws
+ | then:: Expr &~ (~[]* "else" !Expr /ws)
ws = [ ]**
}