Monthly Archives: April 2009

How to kick off textual Domain Specific Languages (DSLs)?

I am playing with DSLs. As a developer without too much language/compiler experience, it is not easy to get started. Fortunately, my friend Yu has a lot of experience, and Internet is another resort for resources. So, it becomes a bit easier for my evening learning.

Based on my recent reading, I would recommend the following resources for kick-off. If you are a DSL beginner who dones’t have plenty of experience (like me), it may be helpful:

1. There are two papers
a. On the Specification of Textual Syntaxes for Models
b. TCS: a DSL for the Specification of Textual Concrete Syntaxes in Model Engineering
The papers are written by committers of eclipse TCS project. They help to give you a feel and look in an academic perspective. I think it good to know about basic framework of methodology and a few terms in implementing a DSL.

2. ANTLR, get your hands dirty
Having knowledge with ANTLR will help your language definition journey. It is quite easy to master ANTLR with well-prepared documentations:
a. ANTLR Getting Start
b. Five minites introduction ANTLR v3
c. ANTLR v3 by Mark Volkmann
d. Some DSL posts in the Article section.

3. Some Links for Domain Specific Languages
This is a post I wrote earlier. It contains a few useful links:
http://www.frankdu.com/weblog/archives/21

Write Xml editor by Extending WTP Xml Editor

Several months ago, I posted a blog about writing a Xml editor based on JFace Text Framework. What has changed in the past months?

On my side, I went to frequently the eclipse newsgroups. I went to EclipseCon’09 and listened to Xml editor tutorial by WTP committers. While more gained experience, I would recommend that you extend WTP xml editor to build your own. Reasons are simple:

1. You don’t need to invent wheels from scratch
2. You can improve yourselves by reading WTP source codes
3. There are active communities you can turn to for help.

I’d like to recommend some additional resources for building your own xml editors:

1. The slides and code “Extending the XML and JSP editors from the WTP Project“, by IBM WTP committers
2. The lecture at EclipseCon2009 “Building the XML Editor you’ve always wanted“, and slides/sample.

Hope it helps.