[antlr-interest] Automated testing of lexer/parser rules
Jeremy D. Frens
jdfrens at calvin.edu
Tue Apr 6 07:13:36 PDT 2004
Terence Parr wrote:
> On Apr 5, 2004, at 4:17 PM, Bharath S wrote:
>
>
>>Hi Grp,
>>
>>Can somebody provide information on how to automate
>>the testing of lexer/parser rules? I usually put my
>>test cases in a text file and feed it to my main
>>program using the direction operator. I am using Antlr
>>in Eclipse IDE and would like to automate testing
>>using JUnit. Can someone shed some light on this?
>
>
> Howdy. I will be putting some thought into this myself to test antlr 3
> functionality. Definitely you want to use the parse-tree/derivation
> stuff I put into 2.7.3 so you can see precisely how the tool parses
> your input.
I've created some test-case classes for my ANTLR stuff in two different
projects. Both projects are almost to a stage where I think I might be
able to extract a common test-case superclass for testing
ANTLR-generated code.
FWIW, I use Java reflection to make invoking ANTLR rules a bit easier.
Would this be of interest to anyone else?
jdf
-----
*** Jeremy D. Frens - Professor - Computer Science - Calvin College ***
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list