Hello,
I'm a beginner with ANTLR and with gUnit and need some help about gUnit. The only documentation about gUnit I have is http://www.antlr.org/wiki/display/ANTLR3/gUnit+-+Grammar+Unit+Testing To get a better understanding of how gUnit works I created a really small example which does not work correctly. I have a grammar for parsing language { a, A, b, B, ab, Ab, aB, AB } defined in a file Sample.g: grammar Sample; @header { package parser; } @lexer::header { package parser; } A : 'a' | 'A'; B : 'b' | 'B'; start : A | (A B) | B ; Further I have some unit tests defined in file Sample.gunit: gunit Sample; @header{ package parser; } A: "a" OK "A" OK "b" FAIL B: "b" OK "B" OK "a" FAIL start: "a" OK "ab" OK When I run the tests using Maven (org.antlr:maven-gunit-plugin:3.3) with ANTLR 3.3 I get the following failures: ----------------------------------------------------------------------- executing testsuite for grammar:Sample with 8 tests ----------------------------------------------------------------------- 2 failures found: test7 (start, line19) - expected: OK actual: FAIL test8 (start, line20) - expected: OK actual: FAIL Tests run: 8, Failures: 2 What is the reason for the last two tests (for rule "start:") failing? Perhaps this is not a problem with the test case but the grammar doesn't work as expected? Cheers, Meikel 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.
