dsl

Syntax Highlighter for a Domain Specific Language

Hello Friends I have a DSL for which I intend to create a syntax highlighter for editors like vim, gedit and netbeans. Has anyone tried this before? Many thanks for any directions. Ketan ...

domain specific languages and compilers

I was looking over Martin Fowler's recent book contents - Domain Specific Languages and I noticed some ANTLR example - that got me thinking that writing compilers will become more and more popular since people needs in this matter will increase. So, will the compiler theory still be as arid (being subjective here) as it was until now or...

How can I traverse the EMF object tree generated by Xtext?

I'm using Xtext to define my DSL. Xtext generates a parser that lets me traverse the EMF model of my input DSL. I'd like to translate this EMF model into some other tree. To do this translation, I need to traverse the tree. But, I couldn't find a visitor class for the EMF model generated by Xtext. The closest thing that I've found is a S...

Why linking doesn't work in my Xtext-based DSL?

The following is the Xtext grammar for my DSL. Model: variableTypes=VariableTypes predicateTypes=PredicateTypes variableDeclarations= VariableDeclarations rules=Rules; VariableType: name=ID; VariableTypes: 'var types' (variableTypes+=VariableType)+; PredicateTypes: 'predicate types' (predicateTypes+=PredicateType)+; Predic...

Are there any design guides, tutorials or patterns for designing DSLs?

I am not looking for frameworks or tools, but for advice how to get from a rough idea to a nice DSL. ...

Good books on Ruby based DSL

I'm trying to create a DSL in ruby, can you suggest me some good books? I looked around amazon and safari but so far couldn't find any. Thanks in advance! ...

Does anybody know of a GUI DSL for Scala?

hi all does anybody knows a scala dsl on gui programming. regards. kula ...

Partially parse C++ for a domain-specific language

I would like to create a domain specific language as an augmented-C++ language. I will need mostly two types of contructs: Top-level constructs for specialized types or declarations In-code constructs, i.e. to add primitives to make functions calls or idiom easier The language will be used for scientific computing purposes, and will ...

Why is rails called a dsl?

Recently, when I tried to explain why Rails is a DSL to an intern at my organisation, I was not able to articulate my reasonings to the effect I would like to. Maybe I do not understand the space well enough to teach the nuances. Redirecting him to Martin Fowler' article or the google ranked one InfoQ or other material has not helped muc...

Ideas on C# DSL syntax

Hi, I am thinking about implementing a templating engine using only the plain C#/.NET 4 syntax with the benefit of static typing. Then on top of that templating language we could create Domain Specific Languages (let's say HTML4, XHTML, HTML5, RSS, Atom, Multipart Emails and so on). One of the best DSLs in .NET 4 (if not only one) i...

Using a Scala symbol literal results in NoSuchMethod

I have recently begun using Scala. I've written a DSL in it which can be used to describe a processing pipeline in medici. In my DSL, I've made use of symbols to signify an anchor, which can be used to put a fork (or a tee, if you prefer) in the pipeline. Here's a small sample program that runs correctly: object Test extends Pipeline...

Scala DSL, Object and infix notation

Hello guys, in Scala, if I want to implement a DSL, is there a way to do the following: I have an Object called "Draw" which contains the function def draw(d:Drawable) how can I make it so that I can import the Object and call it outside the object like: draw ball if ball extends the Drawable trait? The problem is that I want to u...

how do closures help in creating a DSL/fluent interface: PHP examples?

Can you give me an example, in PHP, that shows how closures are helpful in creating a DSL (fluent interface)? edit: The accepted answer in the following question tells about nested closures. If someone could translate that example to PHP that would be helpful too: http://stackoverflow.com/questions/1966515/experience-with-fluent-interf...

Recursive Syntax in Oslo

I'm writing my first DSL with Oslo and I am having a problem with a recursive syntax definition. The input has sections which can contain questions or other sections recursively (composite pattern) like this: Section: A Question: 1 Question: 2 Section: B Question: 1 End End My definition for a Section looks like this ...

how is FLUENT api different from other API

i have come across fluent api while studying DSLs. i have searched alot on FLUENT API..the basic conclusion which i could draw out was that fluent api uses method chaining in order to make the code fluent. but i cannot understand that in object oriented languages we can always create an object and can call the methods related to it. then...

Ruby Metaprogramming

I'm trying to write a DSL that allows me to do Policy.name do author "Foo" reviewed_by "Bar" end The following code can almost process it: class Policy include Singleton def self.method_missing(name,&block) puts name puts "#{yield}" end def self.author(name) puts name end def self.reviewed_by(name) put...

For what kind of problems DSL is the appropriate solution?

Possible Duplicate: When should I use a Domain Specific Language? For what kind of problems DSL(Domain-specific language) is the appropriate solution? ...

splat operator in groovy?

def foo(map, name) { println(map) } foo("bar", hi: "bye") will print [hi:bye] Now I have a previous map that I wish to pass along to foo. In pseudo code, something like: def otherMap = [hi: "world"] foo("bar", hi: "bye", otherMap*) So that it prints [hi:world] This doesn't work of course. Also, trying to pass just the map...

looking for RTF template system with simple DSL

Is there any framework that fills up rtf document with data? The idea is to make business people/testers change the document in MsWord and than generate reports from that. The problem is with tables, Id need to create some special DSL for handling tables and showing hidding text/page parts. Id rather not do that and use some existing s...

lambdaj installation

we have downloaded jar files for lambdaj and its dependencies which are again jar files. we do not know how to go about it. we have copied these files in the C:\Program Files\Java\jre6\lib\ext have set the class path in environment variales as: variable: classpath path: C:\Program Files\Java\jre6\lib\ext but we do not know how to go fu...