[antlr-interest] Testing a grammar
Bryan Ewbank
ewbank at gmail.com
Thu Mar 16 06:39:39 PST 2006
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