Hi Luca and Emrul! I am familiar with all three of them: JavaCC, ANTLR (back when it was only PCCTS) and SableCC. I have written a backend for SableCC that generates Python code, that is the one I am more familiar with as I know the internals. JavaCC generates LL(1) parsers, SableCC generates LALR(1) parsers, similar to Yacc, and ANTLR generates LL(K) parsers. I work mostly with SableCC, because I work a lot with Python, and use the backend implemented by me. However, I would suggest going with the newer version of ANTLR and starting, perhaps, with the grammar for Sqlite found here https://github.com/antlr/grammars-v4. SableCC was working on a newer version, supposed to be version 4 that would allow several backends, but the project does not seem to have much activity based on that version. I am still using a modified version of SableCC 3 that has a language to generate the backends. I implemented the Python backend and was interested in implementing the backend for SableCC 4, but I don't really see much activity there. Now, as for ANTLR there seems to be a lot of progress, as we keep seeing versions coming out. Terrence Parr is continuously working on it and there's a lot of support for other languages as well.
Emrul, is your project available in any repository you could share? I would be interested in seeing the code, and if I find some time I could probably give you a hand. Regards, Fidel H Viegas On Sat, Aug 9, 2014 at 4:52 PM, Luca Garulli <l.garu...@gmail.com> wrote: > Hi Emrul, > Thanks for your feedback. I'll forward it to the guy ;-) > > Lvc@ > > > On 9 August 2014 17:25, Emrul Islam <em...@emrul.com> wrote: > >> Luca, >> >> I did some research on this exact choice for OrientDB and can summarise >> as follows: >> 1. JavaCC seems to be quite established and there's a rather complete SQL >> parser written for it (originating from IBM and Informix, passing to Akiban >> and now part of FoundationDB) https://github.com/FoundationDB/sql-parser >> - it could be a solid starting point >> 2. JavaCC seems to lack documentation so for people unfamiliar with >> writing parsers it could be very difficult >> 3. ANTLR is very modern, has many nice features and there's a >> comprehensive book from the author that explains many aspects of writing >> parsers. >> 4. An ANTLR parser was started for OrientDB already so was also a good >> starting point. >> >> In my attempt I used ANTLR (and Jonathan Sorel's starting point) but just >> was not able to complete the task. >> >> Ultimately, I'm a pragmatist and have concluded that actually the >> underlying parser library doesn't matter. I couldn't find any technical >> pro or con other than my opinion that ANTLR seems a bit cleaner and easier >> to understand. >> >> So, if you hire a parser expert then probably using the >> IBM/Informix/Akiban/FoundationDB parser code as a starting point will get >> the job done faster. If you hire someone less familiar with parsers then >> ANTLR will probably be easier and will likely be something the Open Source >> community can manage better, >> >> Just my thoughts, I hope they help in your evaluation. >> >> Best, >> >> Emrul >> >> >> On Friday, August 8, 2014 9:39:27 AM UTC+1, Lvc@ wrote: >> >>> Hi Emrul, >>> The total rewriting of SQL parser has been scheduled for 2.1. We're >>> taking the decision about JavaCC or ANTLR. Pros and Cons of both. >>> >>> Anybody has an opinion on both? >>> >>> Lvc@ >>> >>> >>> >>> On 8 August 2014 01:34, Emrul Islam <em...@emrul.com> wrote: >>> >>>> Hi Fidel, >>>> >>>> I had done some work to write a GORM plugin for OrientDB that would >>>> allow Grails to directly persist domain objects into OrientDB. However, I >>>> had to pause the effort while I waited for a better query API (instead of >>>> constructing an SQL string I wanted to programmatically express a query). >>>> I shifted my attention to the ANTLR Parser effort but ran out of time. >>>> >>>> So I have two choices: either finish the ANTLR parser for OrientDB and >>>> then finish the Grails plugin or work on constructing an SQL string for >>>> queries. I haven't really thought about it in the past few months because >>>> I was working on other things. >>>> >>>> You can still directly call OrientDB just as you can any Java library >>>> from Grails, I tested this approach and it worked fine but it means >>>> managing your own serialization between OrientDB records and grails domain >>>> classes. >>>> >>>> Good luck in your efforts! >>>> >>>> On Monday, August 4, 2014 5:22:40 PM UTC+1, Fidel Viegas wrote: >>>>> >>>>> Hello, everyone! >>>>> >>>>> I have been playing around with orientdb and i would like to put >>>>> together a small application using grails and was wondering if anyone has >>>>> worked with grails and orientdb that would like to share his experience. >>>>> Is >>>>> there any driver for grails ou there? How could one integrate the java >>>>> driver? >>>>> >>>>> I look forward to hearing from those that have some advice with >>>>> regards to this combo. >>>>> >>>>> Thanks in advance! >>>>> >>>>> Best Regards, >>>>> >>>>> Fidel H Viegas >>>>> >>>> -- >>>> >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "OrientDB" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to orient-databa...@googlegroups.com. >>>> >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "OrientDB" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to orient-database+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > > --- > You received this message because you are subscribed to the Google Groups > "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to orient-database+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.