An xml-based language for creating random generators.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


An xml-based language for creating random generators.


usage: [-h] script

Evaluate a random generation script.

positional arguments:
  script      the script to evaluate

optional arguments:
  -h, --help  show this help message and exit

Generator is fast, open-ended, and easy to use. Anyone that can write XML can use Generator to create random generators for any concept that can be expressed in Backus-Naur Form. In essence, this allows the user to instantiate a sample of the language space with a few lines of code. Possible uses include test case and content generation.

The language specification is under development. is the Python prototype of the Generator interpreter.

The generator Language

Generator is written in XML. Since this is for random generators, Hello World becomes Hello Worlds:

  <!-- Comments are standard xml comments -->
  <!-- Template is the 'main' entry point of a generator -->
  <!-- Select tags are function calls for Set tags -->
  <template>Hello {@worlds}!</template>

  <!-- Tables are a convenient way to choose a random text element -->
  <table name="worlds">
      - Mercury
      - Venus
      - Earth
      - Mars
      - Jupiter
      - Saturn
      - Neptune
      - Uranus
$ ./examples/hello_worlds.xml
Hello Neptune!

For examples in the generator language, review the tests cases found in


Running Tests

You can run tests with Nose. To do so, go to the project level directory (the one with the README) and do