Ramakrishnan Venkataramani wrote: > Hello, > I am new to ANTLR. I am looking for a very simple SQL statement like > SELECT and INSERT written in ANTLR grammar. I am also looking for the > corresponding lexer, parser, and the test file (which reads the lexer, > parser files and produces output). I saw the grammar _for > PL/SQL_http://www.antlr.org/grammar/1209225566284/PLSQL3.g, it was so > good, but it was humongous. so if possible can you please send me a > simple ANTLR grammar for SELECT, INSERT. > > Thanks a lot for your kindly help
Well, I would advise you to: 1) Read the ANTLR documentation, preferably the book 2) Analyse the SQL statement syntax for the subset you want to work with 3) Specify that syntax in ANTLR 4) Add tree rewrites to get a meaningful AST 5) Write a tree parser to take action based on the AST And then you're done. Seriously, is this a coursework assignment or something? Sam List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
