code gen: complex event patterns from DSL