I’ve used and created domain-specific languages before, plenty of times (e.g. using yacc/lex). Normally we’d start with grammar written in BNF, and a bunch of keywords. This is easy to do, easy to share.
Recently, I’ve started working with diagrammatic programming languages – closest parallel is circuit-diagrams in electronics, where it’s very difficult to express ideas in text, but very easy to express them in wiring-diagrams.
This is a new and novel problem for me: how to efficiently express these mini-languages, and share concepts in them with colleagues?
(i.e. how to whiteboard-program within them. Actual programming is easy – you have physical components to hand)
Are there tools for this? Or good/best practices (e.g. equivalent of “always use BNF as starting point for your new DSL, and use tools like yacc to generate the parser, compiler, etc”). My googlefu is proving weak – all I get is false positives for wiring diagrams, and UML editors (since these are custom languages, UML doesn’t seem to help)
6
There are tools available that will allow you to represent your DSL graphically and then use the graphic representation to “program” the DSL. These are called “DSL Workbenches”
Right now the only DSL workbench that I can think of that is specifically targetting Graphic DSLs is Microsoft’s DSL Tools. There might be others out there, but that’s the only one that has hit my radar.
I am not aware of any tools that are generic enough for your purposes but perhaps I can help with your Google-Fu…
If you are not familiar with the concept of Dataflow programming languages the wikipedia article is a great place to start – it should at least help make your google-searches a little more targeted to more appropriate content.
I would also recommend that you check out some of the graphical programming languages described there, especially LabView/G. My thought here is that the symbolic languages used in such tools can be easily mimicked in tools like Visio. I am someone who uses pictures and diagrams a lot to communicate with my technical peers and over time I have come to adopt a kind of visual short-hand that looks a lot like LabView’s programming language – especially when I am trying to communicate something in the realm of parallelism or multi-threading. I have a set of VISIO template shapes that I use for this purpose… it was a little spendy in terms of VISIO shape authoring learning curve but I think it was worth it.
Not sure, if is what you are looking for, but, aA visual way to express a programming language are “Syntax diagrams”, also known as “RailRoad diagrams”
http://en.wikipedia.org/wiki/Syntax_diagram
Good Luck
1