| IfStatement ${ $0 = $<1; }$
| Statement NEWLINE ${ $0 = $<1; }$
- IfStatement -> if Expression Block OptNL ${
+ $RIGHT else
+
+ IfStatement -> if Expression Block OptNL $$else ${
$0 = calloc(1, sizeof(struct statement));
$0->expr = $<2;
$0->thenpart = $<3;
}$
- | if Expression : SimpleStatements ${
+ | if Expression : SimpleStatements $$else ${
$0 = calloc(1, sizeof(struct statement));
$0->expr = $<2;
$0->thenpart = $<4;