[antlr-interest] Testing a grammar

Terence Parr parrt at cs.usfca.edu
Thu Mar 16 08:42:48 PST 2006


Hi Gang, nice discussion.  Note that in addtion to RandomPhrase, I  
plan on building another tool (secret name) that attempts to provide  
variations on valid programs (semantically and syntactically) that  
are invalid, again hoping to crash the language tool.

Ter

On Mar 16, 2006, at 6:39 AM, Bryan Ewbank wrote:

> On 3/16/06, Ulrich Frank <Ulrich.Frank at dlr.de> wrote:
>> So summarizing your opinions and proposals I get the following:
>>
>> It doesn't make sense to create test input for a application using  
>> a parser
>> because the test input can only be generated based on the grammar  
>> itself. So
>> of course the test input follows the rules of the grammar.  
>> Conclusion: I can
>> only use the test input automatically generated based on the  
>> grammar to
>> verify, if the test input is correct.
>
> You can create syntactically illegal input to test error legs as  
> well - just
> inject a token that is not part of the follow set at any point in  
> the token
> stream.
>
> - Bryan



More information about the antlr-interest mailing list