[antlr-interest] Test lexer with gUnit

Leon Su leon.antlr at mac.com
Sun Sep 21 10:39:21 PDT 2008


Hi Todd,

gUnit currently is not able to test lexical rules individually. So if  
you would like to test some lexical rules only, you may need to add  
some new parser rules which only define corresponding lexical rules  
for testing. For example, there're two lexical rules: ID and INT.
then you may have the parser rules for testing lexical rules as below:
test_id:	ID;
test_int: INT;

Leon

On Sep 21, 2008, at 5:56 AM, Todd O'Bryan wrote:

> Is there any way to test lexical rules with gUnit? It seems that  
> the only rules you can test are parser rules, but I may be missing  
> something.
>
> Todd
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr- 
> interest/your-email-address
>



More information about the antlr-interest mailing list