Syntax errors w/die
But with the <die> rule, we can be more helpful:
rule if_statement { if [ <expression> | <PGE::Util::die: Expression expected> ] [ then | <PGE::Util::die: "if" requires a "then"> ] [ <statement> | <PGE::Util::die: statement expected after "then"> ] }
This gives error messages like:
"if" requires a "then" at line 15, near "print 5;"