ANTLR Testing is a unit testing library for ANTLR grammars using JUnit and a fluid interface. I use it on a couple of my own projects, and I have students using it as well.
I released version 0.8 today. You can get it here: http://antlr-testing.sourceforge.net/ . It has some nice new features: * I'm finally writing tests for my test framework. (Infer what you will from this.) * I've made sure that it works with ANTLR 3.1. * You no longer have to add a bunch of ugly code to your grammars to override the normal error handling of ANTLR. * I've added a refuteToken() method to assist in testing lexers. I stole a trick from gUnit for the third item on this list. Previous versions of ANTLR Testing required you to add some code that would always throw an exception when something went wrong in processing. Now I look at standard error for any output; output means something went wrong. As for refuteToken(), I wanted to write assertions that said how input should NOT be scanned. Since I write my grammars incrementally (as a good agile developer), refuteToken() is happy to accept a rejection for a variety of reasons. For example, if I first implement identifiers, I can write refuteToken(MyLexer.IDENTIFIER, myTester.scanInput("123")); Since something like "x123" is probably a valid identifier, I really want to assert that an identifier cannot start with a digit. I can do this refuteToken() without having to define what an integer is! Later, when INTEGER is defined, this assertion (refutation?) will still pass because the token types will not match. jdf -- Jeremy D. Frens [EMAIL PROTECTED] http://www.norecess.org/ 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 -~----------~----~----~----~------~----~------~--~---
