Closed siraben closed 2 years ago
The following program
Crypt x; init { Crypt x; }
produces the parse tree
(program (one_decl (var_list (ivar (vardcl (uname))))) (init (body (step (stmnt (Stmnt (full_expr (expr (varref (cmpnd (pfld)))))))) (step (stmnt (Stmnt (full_expr (expr (varref (cmpnd (pfld)))))))))))
Whereas we expect something like
(program (one_decl (var_list (ivar (vardcl (uname))))) (init (body (step (one_decl (var_list (ivar (vardcl (uname)))))))))
Removing $.full_expr from the Stmnt rule results in the correct parse, but Promela allows arbitrary expressions in lieu of statements, so the vardcl rule should fire first.
$.full_expr
Stmnt
vardcl
The following program
produces the parse tree
Whereas we expect something like