Monday, June 1, 2009

Sql parser issues that i had.

For the past few weeks, I have been trying to get the sql parser working. But the main issue I had was implementing the expression parsing logic in Javacc grammar. I had trouble with defining the non-terminals and was running into a lot of left recursion issues in Javacc. I finally moved all the logic to the Java classes and the parser simply passes all the tokens to the ExpressionBuilder class that I have written. This simplies the implementation quite a bit since I am not as well versed in Javacc as Java. 
I will post the SQL Parser shortly on Blitz DB page.

4 comments:

  1. Hi Karthik,

    I am planning to write a SQL parser. I am exploring various options available. Is this complete? Or can you share the code with me to take it forward.

    Thanks,
    Subhash

    ReplyDelete
  2. hi Subhash,
    I have some basic code which only handles few of the basic cases for select, from, where. If you want, I can share the code. let me know
    -karthik

    ReplyDelete
  3. Hi Karthik,
    I'm planning to write a SQL parser with ery few basic functionalities. Can u snd me the code to my mail id??? pripsg_softy@yahoo.com

    ReplyDelete
  4. Hi Priya,
    I haven't completed the sql parser. But in the meantime, if you want something for reference you can take a look at Tigris axion for sql parser. I have based my sql parser on Axion sql parser.
    -karthik

    ReplyDelete