See: Project: Creating a DSL for Board Game Rules