summaryrefslogtreecommitdiff
path: root/src/tools/check_bison_recursion.pl
AgeCommit message (Collapse)Author
2013-01-01Update copyrights for 2013Bruce Momjian
Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
2012-07-04Run newly-configured perltidy script on Perl files.Bruce Momjian
Run on HEAD and 9.2.
2012-01-01Update copyright notices for year 2012.Bruce Momjian
2011-10-27Add simple script to check for right recursion in Bison grammars.Tom Lane
We should generally use left-recursion not right-recursion to parse lists. Bison hasn't got any built-in way to check for this type of inefficiency, and I didn't find anything on the net in a quick search, so I wrote a little Perl script to do it. Add to src/tools/ so we don't have to re-invent this wheel next time we wonder if we're doing anything stupid. Currently, the only place that seems to need fixing is plpgsql's stmt_else production, so the problem doesn't appear to be common enough to warrant trying to include such a test in our standard build process. If we did want to do that, we'd need a way to ignore some false positives, such as a_expr := '-' a_expr