if then else while do
###### output: syn1
- .tmp.code:3:11: error: unhandled parse error: then
- oceani: no program found.
+ .tmp.code:3:11: Syntax error in statement: then
###### test: tokerr
program:
print foo, bar
###### output: type_err_const1
- .tmp.code:3:12: error: unhandled parse error: :
- oceani: no program found.
+ .tmp.code:3:12: Syntax error in constant: :
+ .tmp.code:4:8: Syntax error in constant: bar
## Test erroneous command line args
$0->f.type = $<3;
$0->f.init = val_init($3);
}$
+ | ERROR ${ tok_err(c, "Syntax error in struct field", &$1); }$
###### forward decls
static void structure_print_type(struct type *t, FILE *f);
| SimpleStatements ; ${ $0 = $<1; }$
SimpleStatement -> pass ${ $0 = NULL; }$
+ | ERROR ${ tok_err(c, "Syntax error in statement", &$1); }$
## SimpleStatement Grammar
###### print binode cases
| DeclareProgram
| DeclareStruct
| NEWLINE
+ | ERROR NEWLINE ${
+ tok_err(c,
+ "error: unhandled parse error", &$1);
+ }$
## top level grammar
v->val = interp_exec($5);
}
} }$
+ | ERROR NEWLINE ${ tok_err(c, "Syntax error in constant", &$1); }$
###### print const decls
{
$0->left = reorder_bilist($<3);
$0->right = $<4;
var_block_close(c, CloseSequential);
- if (c->scope_stack) abort();
+ if (c->scope_stack && !c->parse_error) abort();
}$
| ERROR ${
tok_err(c,