[antlr-interest] Testing a grammar

Ulrich Frank Ulrich.Frank at dlr.de
Wed Mar 15 08:24:43 PST 2006

Hi there,

I have a more general problem namely I wrote a grammar and now I want  
to test it, which means I need test cases so that every posibility of  
the grammar is covered by one test case.
rule : "from" IDENT "select" (IDENT)?
for a complete coverage I need two test cases:
1. "from" abc "select"
2. "from" abc "select" def
Do you know an efficient approach getting all these test cases? How  
about recursion regarding a rule like this: plus : IDENT ("+" plus)+   ?

Thanks a lot,

More information about the antlr-interest mailing list