On Mon, Jan 24, 2005 at 12:04:12PM -0500, Peter Fraser wrote: > Parsers I know, I am assuming that pf is using Bison. Productions fail > because > they are given a token that they cannot shift. Each token has a location > in a file, > the token can be printed (by modifying yyerror), or with a bit more work > > yylex can keep tract of the character number within the line of the > token.
The nice thing about claims of infeasibility is that it only takes one counter-example to prove them wrong :) If you can provide a patch to pf's parse.y that produces more useful errors instead of the generic 'syntax error', and which works with the hackery already present there (like ungetc() and all that), you win. A good test would be to go through the regress tests and check each changed output message (for errors), and verify the additional output is not misleading in a significant number of cases. Daniel
