Wednesday, March 25, 2009

SQL Parser

Database engine consists of a number of different sub components like query parser, optimizer, indexing facility and buffer manager. The first point of entry is the parser. The statements that are submitted to the database needs to be parsed and understood by the Database. When the database parses the statements, it can decipher the intended operation and can carry out appropriate actions. Javacc is a compiler compiler that can be used to create parser for a given grammar. I am looking into Javacc to create a new SQL Parser. I am planning to derive lot of grammar from Axion grammar. Initially I am planning to write SQL grammar for create, insert and delete statements. I will write more about my experiences in the following posts.


  1. Hi Karthikeyan,
    please take a look at this project: it contains JavaCC grammar for Pl/Sql packages.

  2. Sure. Thanks! I will take a look.