codelion / gramtest

GramTest: A tool for Grammar based Test case generation
Apache License 2.0
85 stars 17 forks source link

Support ANTLR4 grammars #13

Closed marcospassos closed 6 years ago

marcospassos commented 7 years ago

Any chances of adding support to ANTLR4?

codelion commented 7 years ago

This will require some effort. If you look at the way gramtest works is that it uses the ANTLR4 grammar for BNF to generate the parser. Even though ANTL4 can be expressed as a grammar in ANTLR4 (see https://github.com/antlr/grammars-v4/tree/master/antlr4), the structure that is exposed by the parser is very generic and I am not sure how we can generate tests so that they would work for any arbitrary ANTLR4 grammar.