dsl-tools

Which language (that runs on JVM) is best suited for creating a DSL?

二次信任 提交于 2019-12-03 13:00:04
问题 We have a requirement to create complex fixed length and variable length Strings. These strings might represent a customer profile, an order etc. Which JVM based programming language do you guys suggest? Idea is for a end user to create the strings using this DSL. So I am looking for validation, code completion etc. 回答1: With Xtext (http://www.eclipse.org/Xtext/) you get a nice editor for free when specifying your DSL. 回答2: Groovy http://docs.codehaus.org/display/GROOVY/Writing+Domain

Writing a compiler for a DSL in python

为君一笑 提交于 2019-12-03 06:25:20
问题 I am writing a game in python and have decided to create a DSL for the map data files. I know I could write my own parser with regex, but I am wondering if there are existing python tools which can do this more easily, like re2c which is used in the PHP engine. Some extra info: Yes, I do need a DSL, and even if I didn't I still want the experience of building and using one in a project. The DSL contains only data (declarative?), it doesn't get "executed". Most lines look like: SOMETHING: !abc