A random generator based on a generalised Backus-Naur Form grammar