lundi 20 février 2017

Algorithm to generate finite language from non-recursive context-free grammar

I am searching an algorithm to generate the complete finite language from a non-recursive context-free grammar. The application is the generation of a set of possible scenarios for test automation.

Example grammar in EBNF (S is the start rule):

S = Sender, Receiver;
Sender = Human | Machine;
Human = "user-type-1" | "user-type-2"
Machine = Access, Protocol;
Access = "internal" | "external";
Protocol = "soap" | "smtp";
Receiver = "local" | "remote";

should produce a set of sentences like:

user-type-1 local
internal soap local
external smtp remote

Examples and literature I have found so far refered to randomised generation of examples based on recursive grammars. But my problem is more simple. All hints, names or links to publications are welcome.

Thanks,

S.

Aucun commentaire:

Enregistrer un commentaire