The Dada Engine is a system for generating random text from grammars. It compiles and runs on (most) UNIX-like systems. Other similar program is rmutt.
The format resembles C in some way (including the preprocessor macros). Rules, expressions, variables, etc are supported.
Example file is:
factoid: "they are watching us" | "things go better with Coke"
| "the woodpecker never bashes his brains out"
| ["love"|"greed"|"angular momentum"] " makes the world go round"
#ifdef UNIX
| "motd is not a daemon but a text file"
#endif
;