Posts Tagged ‘ EBNF ’

Generate EBNF-Descriptions for Xtext-based DSL

Creating DSLs in Xtext is easy and works out of the box. However, when it comes to documentation,  things get tricky. Your DSL should be used by other programmers to model a system that maybe didn’t take part in defining the language. So how can you describe the usage of your language to these guys?

Of course there is the possibility to provide code-snippets as examples and the tool support Xtext generated for your languages eases its use. However, sometimes a more complete documentation is useful. Using the original .xtext file for that purpose is not the best way, because its crowded with internal information for the parser that the user of the DSLs doesn’t care about. Furthermore, only few people are used to the Xtext-Language. The good old way is to provide a BNF or EBNF description of the language.

In this posts I will describe how to automatically generate EBNF descriptions for your DSL.
Continue reading