dsl

Is it possible to evaluate a Ruby DSL in a non-global context?

I'm using Blockenspiel to create a DSL with Ruby. It works great and solves a lot of my problems, but I encountered the following problem that is not strictly related to Blockenspiel. Suppose I have a DSL that looks like this: dish do name = 'Pizza' ingredients = ... nutrition_facts = ... end dish do name = 'Doner' ingredie...

Groovy Read/Run DSL

I'm looking to create a new DSL using groovy, but I'm having trouble figuring out the best way to have groovy read the dsl. I want users to be able to create a dsl and actually run the dsl, without having to talk to the application code. game.groovy (as the dsl): import com.foo.groovygame.Game go north 10 search find ana turn right ...

JBOSS DROOLS using XmlDumper with .dslr

I am able to parse a .DRL file into the XmlDumper and get the correct output. How I can I pass a .DSLR file through the XmlDumper to achieve the same results? The .DSLR file contains the language file(.DSL) ...

Language to define references between elements in a 2D array/grid.

Has someone created a language which can be used to track/analyze dependencies between grid cells in a generic way? I'm trying to write a spreadsheet which uses a functional language. What I'm after is something similar to what Excel might use to manage references between cells. The language will be used create a model which can be anal...

Can I use XText for a DSL involving an XML file type?

I have defined a small DSL that is mostly written in the form of different types of XML files in conjuction with some property files. This works very well but I wish to create an Eclipse Editor to make editing these files easier for beginners (I already have a working parser). The main XML file can reference some items from the .propert...

Are Domain Specific Languages (DSL) bad for the Common Programmer?

I have lately been delving into F# and the new DSL stuff as in the Microsoft SQL Server Modelling CTP, and have some concerns. Will this new idea that will come about be bad for skilled programmers? Is code going to be dumbed down? I know I sound like a luddite, but this does worry me, after spending years of time practising in my cra...

LINQ-like or SQL-like DSL for end-users to run queries to select (not modify) data?

For a utility I'm working on, the client would like to be able to generate graphic reports on the data that has been collected. I can already generate a couple canned graphs (using ZedGraph, which is a very nice library); however, the utility would be much more flexible if the graphs were more programmable or configurable by the end-use...

Ruby DSL experiences ?

Hi, I don't know anything in Ruby, but i'm pretty interested in DSLs. And DSL seems to be a buzz word for you community. Do you actually implement DSLs in Ruby for your own purposes ? If so, how complex and how dedicated are they ? i've seen this question here, but i'm more interested in your everyday experience. thanks. ...

Can a Domain Specific Language (DSL) be localized?

I have never written a DSL, but I am considering it as a feature for a new project (hypothetical). It would be for end users to be able to express in natural language concepts such as weekdays between 10 and 11 except on the first monday of the month. Dutch users might write weekdagen tussen 10 en 11 behalve op de eerste maandag van de ...

Good grammar for date data type for recursive descent parser LL(1)

I'm building a custom expression parser and evaluator for production environment to provide a limited DSL to the users. The parser itself as the DSL, need to be simple. The parser is going to be built in an exotic language that doesn't support dynamic expression parsing nor has any parser generator tools available. My current decision ...

How to force c# binary int division to return a double?

How to force double x = 3 / 2; to return 1.5 in x without the D suffix or casting? Is there any kind of operator overload that can be done? Or some compiler option? Amazingly, it's not so simple to add the casting or suffix for the following reason: Business users need to write and debug their own formulas. Presently C# is getting us...

Transforming TT files in MsBuild

I need to build a DSL Solution using MsBuild and want to be able to transform the TT files, I have tried the guide on http://msdn.microsoft.com/en-us/library/ee847423(VS.100).aspx but I am getting the following errors: Failed to resolve include text for file:{0} and also Loading the include file '{0}' returned a null or empty...

Expand / Collapse Swimlane (Domain Specific Language) C#

I have multiple swimlanes on the surface, Is it possible to have expand / collapse functionality to these swimlanes?. My swimlanes are going to contain different shapes (Image Shapes), Geometry shape etc. I have tried the nesting of a geometry shpes but it only contains the geometry shapes not image shapes i.e. I have already created a...

What are the main differences between Jetbrains' MPS and Eclipse Xtext?

I have used Eclipse Xtext in several projects. I loved the ease of defining a grammar over an Ecore (meta)model and letting everything generated for you including awesome Eclipse plugin editor, but I was quite uncomfortable with the underlying EMF framework with everything hard-wired in static fields. Lately I came across Jetbrains' MPS...

C++ domain specific embedded language operators

hi. In numerical oriented languages (Matlab, Fortran) range operator and semantics is very handy when working with multidimensional data. For example: A(i:j,k,:n) // represents two-dimensional slice B(i:j,0:n) of A at index k unfortunately C++ does not have range operator (:). of course it can be emulated using range/slice functor, b...

DSL to generate test data

There're several ways to generate data for tests (not only unit tests), for example, Object Mother, builders, etc. Another useful approach is to write test data as plain text: product: Main; prices: 145, 255; Expire: 10-Apr-2011; qty: 2; includes: Sub product: Sub; prices: 145, 255; Expire: 10-Apr-2011; qty: 2 and then parse it into...

Game engine deployment strategy for the Android?

In college, my senior project was to create a simple 2D game engine complete with a scripting language which compiled to bytecode, which was interpreted. For fun, I'd like to port the engine to android. I'm new to android development, so I'm not sure which way to go as far as deploying the engine on the phone. The easiest way I suppose ...

Implementing "Generator" support in a custom language

I've got a bit of fettish for language design and I'm currently playing around with my own hobby language. (http://rogeralsing.com/2010/04/14/playing-with-plastic/) One thing that really makes my mind bleed is "generators" and the "yield" keyword. I know C# uses AST transformation to transform enumerator methods into statemachines. But...

Patterns to implement this grammar into C# code

Hey guys, I'm creating this little BNF grammar and I wanted to <template>::= <types><editors> <types>::= <type>+ <type>::= <property>+ <property>::= <name><type> <editors>::= <editor>+ <editor>::= <name><type>(<textfield>|<form>|<list>|<pulldown>)+ <textfield>::= <label><property>[<editable>] <form>::= <label><property><editor> <list>:...

Using Tcl DSL in Python

I have a bunch of Python functions. Let's call them foo, bar and baz. They accept variable number of string arguments and does other sophisticated things (like accessing the network). I want the "user" (let's assume he is only familiar with Tcl) to write scripts in Tcl using those functions. Here's an example (taken from Macports) th...