l ::= id
s ::= l "=" r => "assign"
| r
- R ::= l
+ r ::= l
| l "=" r => "assign"
| r "+" r => "plus"
| (r) "*" r => "times"
indent !::= ww
outdent !::= " " outdent " "
- | " " [~]* "\n"
+ | " " ([~]*) "\n"
any !::= [~]*
-s ::= !any "\n\n" !ww Statement !ww "\n\n" !any => smt
+s ::= !any "\n\n" !ww statement !ww "\n\n" !any => smt
ww ::= sp*
+ws !::= sp**
sp ::= " "
-block ::= "\n" !indent BlockBody
+block ::= "\n" !indent blockBody
&~ "\n" outdent [~\ ] [~]*
-BlockBody ::= Statement
- > Statement BlockBody => "sbb"
+blockBody ::= statement
+ > statement blockBody /ws => "sbb"
-Statement ::= Call
- | ^"while" Expr block
+statement ::= call
+ | ^"while" expr block /ws
-Expr ::= ident
- | Call
- | Expr ^">" Expr
+expr ::= ident
+ | call
+ | expr ^">" expr /ws
| num
-Call ::= Expr "()"
+call ::= expr "()" /ws
num ::= [0-9]++