I thought most of these errors could be handled with the error construct in Bison?  I suppose most errors tend to get written as "Unexpected TOKEN, expected OTHER_TOKEN."<p>If you're willing to complicate your grammar a bit you can add productions for a lot of the erroneous situations which could arrise with nice error messages, such as:<p>for_init := ...
          | var error          { error("var not allowed in for initializer."); }<p>My syntax is a bit off, but can't all syntax errors be expressed with the CFG and be given errors as semantic actions?