Which one is better for writing a SQL parser?
jerf: Can you just snag one of those parsers? It depends on just how "sub" your "subset" is, but for something like this, there's nothing like a snatch-and-grab if you can get away with it. (I don't recall SQLite's licence, but PostgreSQL's is very unlikely to be a problem for you.)Even if it gives you something a bit too elaborate, it can be easier to filter your way back down to what you are looking for than to rewrite something up from the bottom. (One easy strategy is to just scream "SYNTAX ERROR!" when you see something that the grammar knows, but you don't understand. Since you'll be attaching your own object model/structs to the parser anyhow, this is virtually trivial.)