[antlr-interest] Testing lexer grammars with gunit

Gavin Lambert antlr at mirality.co.nz
Tue Nov 24 00:02:21 PST 2009


At 10:48 24/11/2009, Jim Idle wrote:
>Not sure myself – it might be coded for 
>composite grammars I suppose. What you could do 
>though is create a small grammar that imports 
>your lexer and has a dummy parse rule, then test 
>that grammar. This would be a workaround of course.

Or just use your favourite brand of 
regular-code-unit-tester.  That's what I 
do.  Pumping some text in and verifying the token 
stream coming out is fairly straightforward, after all.



More information about the antlr-interest mailing list