testcase {
- input "if (bar!) baz!;";
- output "IfThen:{id:{x:{b x:{a r}}} id:{x:{b x:{a z}}}}";
+ input "if (bar) if (bop) baz";
+ output "";
- s = Expr ";"
+ s = Expr
Expr = IfThen
| IfThenElse
- | id:: id "!"
- id = [a-z] | x:: [a-z] id
+ | id:: [a-z]++
IfThen = IfThen::
"if" "(" Expr ")"
Expr
/ws
IfThenElse = IfThenElse::
"if" "(" Expr ")"
- NotIfThenExpr
- "else"
- Expr
+ ((thenelse:: Expr
+ "else"
+ Expr /ws)) /ws
/ws
- NotIfThenExpr = (Expr & [a-z]+)
- SpaceIfThen = (~[])*// !IfThen
ws = [\n ]**
}
\ No newline at end of file