Freddy Mallet schrieb: > Hi all, > > I'd like to create my own Open Source library to calculate metrics on > java and pl/sql source code. Those metrics could be lines of code, > cyclomatic complexity, maintainability index (SEI), etc. I've studied > javacc and antlr, then read the definitive ANTLR Reference. > > At that point, I guess I've enough material to begin writing this > library but ... there is a recurring question I can't evacuate from my > brain. > > Here is my issue : on the shelf, there is already two reference grammars > available to parse java and pl/sql. Of course, those two reference > grammars will evolve in time to follow java and pl/sql evolutions. > > Tomorrow, beginning to touch those two grammars to build my own AST or > to add my own actions on rules is equivalent to create a new branch on a > source code. After few months, the differences between the grammars will > be so important that I couldn't synchronize them. So after a while, I > couldn't capitalize on ANTLR community work. > > That's exactly what happens currently to JavaNCSS library. The library > used javacc and all work has been done from a Java 1.1 grammar which has > now great difficulty to evolve. > > So, is there an abstraction mechanism which allow us to use on the shelf > grammars without modifying them directly ? > > Thanks for your help, > > Freddy
AFAIK, there is a whitepaper on a tool named gdiff, which would be a specialized diff for grammars. It would ignore actions and focus only on the grammar structure. But I don't know how far the implementation has been realized. Johannes > > > -- > Freddy Mallet, > Sonar , Embrace Quality > http://sonar.codehaus.org > > > ------------------------------------------------------------------------ > > > List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest > Unsubscribe: > http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address > List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org:8080/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 -~----------~----~----~----~------~----~------~--~---
