Dear all, I've started to work on MySQL dialect of SQL grammar as I haven't found anything like this on the net. Unfortunately, the grammer is currently incomplete as I don't have time to continue the project due some deadlines and other projects.
I'm not sure about the quality of my solution, as I'm a newbie to ANTLR and this was my first project on grammars for this framework. I've studied context-based and context-less grammars and I've used yacc but it was so many years ago... Nevertheless I still would like to share with my partial results, to make it maybe starting point for other people. DOES IT SOUND REASONABLE? DOES IT MAKE ANY SENSE FOR YOU, AS A COMMUNITY? Regards, Maciej Technical details: * The grammar was created on the base of yacc grammar provided in MySQL 5.1 source distribution (particularly 'sql_yacc.yy' file). Parts of lexer for type casting (recognizing different integer types) I've adopted into Java acion also from MySQL source distribution. * The grammar is for ANLTR v3 and contains some minor Java actions for collecting information about: comments (first parser pass on COMMENTS_CHANNEL) and identifiers of tables/columns (second pass on DEFAULT_CHANNEL). They can be easiliy removed. * More complete are parts relating to CREATE TABLE section, as it was of my main interest. 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 -~----------~----~----~----~------~----~------~--~---
