I been writing a larger project, and as part of the project i need to make standard SQL lex and syntax analyzer - parser. Since i am relatively new to this topic, and there are many experienced members on this forum, i have few questions:
1. Since SQL is common, are there already made parsers that can be downloaded - like some libraries end etc...?
2. If 1. is not the case what is the best way to make a parser. Since this is such lenghty question, i dont expect to to write it here - recommend some tutorials, etc..
Any and all advice is much appriciated.
PS. This parser will just be used for checking syntax and nothing else.
ANTLR is a great tool and they have some SQL grammars up there you can just use. ANTLRWorks is free and helps a lot in the grammar debugging process, which is slow and painful
Now, something you must know is that SQL itself isn´t THAT standard. SQL is an ANSI standard but each vendor implement its own subset of it. If you take a look in the small words, you´ll see that each vendor implements different levels of SQL, sometimes adding their own sugar and proprietary extensions. So be careful.