locked_user sundialsvc4 has asked for the wisdom of the Perl Monks concerning the following question:
I have to deal with a file containing possibly thousands of SQL statements. Right now, I’m using a right-recursive rule:
DDL_stmtlist: DDL_statement(?) /;/ <commit> DDL_stmtlist
I admit that I wrote one parser this way, and I have stuck to it (for better or worse) without seriously re-visiting the question of if there might be a cleaner, better way. I’m sure there is . . .
Urgh... my fading memory. Of course I know about (s /;/), and I seem to remember that there was a perfectly-good reason why I could not use it... Maybe this post makes zero sense at all, which is what I get for posting at the end of a day.
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Better way than tail-recursion in Parse::RecDescent?
by JavaFan (Canon) on Oct 30, 2010 at 00:08 UTC | |
by locked_user sundialsvc4 (Abbot) on Oct 30, 2010 at 01:40 UTC | |
by ikegami (Patriarch) on Oct 30, 2010 at 19:03 UTC | |
by markhh (Novice) on Dec 02, 2010 at 23:36 UTC |