I am planning to create a SQL queries parser.
It can be done just using proper tokenizing and checking for the order.
But I’m planning to do it from something I learned in my Compiler Design courses (but years ago)
I can define the grammar for the queries I want to include, but I need some help in initial guidance, what kind of parser to implement? Top-Down/Bottom-up etc. Which is easier to start with.
Tagging as homework as I’m looking for some guidance.
http://blog.tcx.be/2007/05/writing-parser-overview.html — I looked at this link which help me on how to proceed. Any other help is appreciated.
A top-down, recursive descent parser is the easiest to understand and thus the easiest to implement if you are coding it by hand.
Have you considered using a parser generator, though? I successfully used antlr in a recent project and would certainly recommend it to others. It has some good tutorials and a nice GUI tool for prototyping your grammar.