Narrative-Engine is a project mainly written in ..., it's free.
This is a small experimental program to try to achieve variation in computer games on a higher abstraction level, using a context free grammar.