"Kevin Grittner" <kevin.gritt...@wicourts.gov> writes: > ... > We were able to get to much cleaner code by rewriting the parser to > have a "dumb" phase to get the overall structure into an AST, and then > use a tree-walker phase to do all the lookups and type resolution > after we had the rough structure, writing another AST to walk for code > generation. Besides making the code cleaner and easier to maintain, > it helped us give better error messages pointing more accurately to > the source of the problem. I don't know if a similar approach is > feasible in flex/bison, but if it is, refactoring for an extra pass > might be worth the trouble.
That's actually what we have in the core parser. plpgsql is trying to take shortcuts, and this whole project is exactly about weaning it away from that. The bottom line is I tried to tackle the sub-projects in the wrong order... regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers