Open ligurio opened 3 years ago
LGen - the Lua Language Generator (LGen) is a sentence (test data) generator based on syntax description and which uses coverage criteria to restrict the set of generated sentences. This generator takes as input a grammar described in a notation based on Extended BNF (EBNF) and returns a set of sentences of the language corresponding to this grammar.
There are type of programs that accept data matching context-free grammars: compilers, parsers etc. These programs can be easily tested using property-based approach with generator of strings matching context-free grammar accepted by program. There is such functionality exist in Hypothesis python module, see [1].
I found at least two Lua modules that generates parsers using PEG syntax, see [3] and [4].
It would be nice to create a generator that accepts grammar and produce a string matching this grammar.