A (mostly) generic syntax tree generator.