Skip to content

DSL und der gefürchtete Parser

Martin Fowler schreibt gerade an einem Buch über Domain Spezifische Sprachen (DSL), und in diesem Zusammenhang produziert er interessante Blog Artikel. Ich möchte hier auf einen Artikel von Ihm hinweisen, mit dem Titel "Parser Fear". Amüsantes Zitat am Rande:
So why is there an unreasonable fear of writing parsers for DSLs? I think it boils down to two main reasons.
  • You didn't do the compiler class at university and therefore think parsers are scary.
  • You did do the compiler class at university and are therefore convinced that parsers are scary.
The first is easy to understand, people are naturally nervous of things they don't know about. The second reason is the one that's interesting. What this boils down to is how people come across parsing in universities. Parsing is usually only taught in a compiler class, where the context is to parse a full general purpose language. Parsing a general purpose language is much harder than parsing a Domain Specific Language, if nothing else because the grammar will be much bigger and often contain nasty wrinkles which you can avoid with a DSL.
Ist sicherlich interessant zu sehen was Fowler zusammenbrauen wird. Eine Sache dich ich übrigens interessant finde ist, dass er sich um das Thema DSL Workbenches im Buch "drückt" und selbst ANTLR als Basis verwendet. Immerhin gibt es doch einige sehr leistungsfähige Projekte zum Beispiel Eclipse Modelling oder Visual Studio DSL Tools.