dsl

Treetop: How to make combined rule?

I want to make a simple JSP parser by using Treetop. Now, I have the following problem: My basic grammar for starting is: grammar Jspgrammar rule jspToken '<%' end rule jspPageToken jspToken '@page' end jspToken should match '<%' while jspPageToken should match '<%@page' When I try this in irb: ...

Permanent node in DSL explorer

In my custom DSL tool I want a node in its Explorer which cannot be removed. Other than that, I want it to be like a regular node. Basically what I want is a node like the Xml Serialization Behavior in the DSL Explorer: Through using Reflector on the XmlSerializationDefinitionSerializer class in the Microsoft.VisualStudio.Modeling.Sdk...

Is WSA compiler in BOO safe to use?

In our program we use boo as macro system about 2 years. All works like a charm, but python syntax is weird for newcomers. As I know boo has white space agnostic (WSA) compiler with ruby like syntax: instead of def Hello(): print 'Hello' you can write: def Hello(): #notice colon!!! print 'Hello' end here is ideal :) def Hello() ...

XText for EClipse & Oslo Intellipad for SQL Server then WHAT FOR .NET ??

XText is a great editor and language manufacture for the DSLs in EClipse. I thought that Intellipad is the equivalent in the .NET world, of course as all I get disappointed when Microsoft announce that it would be part of SQL Server. Now if I need to create a DSL that runs on the .NET environment with editor that support coloring, intel...

Generating helper function module

I a writing a DSL to generate parsers for bioinformatics flat files. I would like to let the user define helper functions in block and then include the function in the parsing context object. I would like to use a syntax like: rules = Rules.new do helpers do def foo() #... end def bar( baz ) #... end ...

Is there a good tutorial on writing a custom language module for PLT Scheme?

Where should I start to write a custom language for PLT? Is there any information on the net (or maybe information in the manual I'm overseeing?) Or are the existing language packs the best reference for such a task? Thank you in advance! ...

Boo: is the following code possible

Is there a situation when the following is a valid Boo statement: target "something" requires "something" where target and requires can be a macros/method/anything other (except for keywords)? This is a DSL question, so any language hack will do as long as it compiles. ...

Method chaining and the finishing problem

Hi, are there any approaches, given a statement like the following First().Second(); to know from within First() whether/when Second() has executed? Reference: http://martinfowler.com/dslwip/MethodChaining.html ...

Can we have the two DSL language with same extension?

Hi I am developing a tool, and there are lots of Domain classes. I want to divide them in the different DSL's with same extension. So it is possible to have multiple DSL projects with same extension? And also after building the setup of all the dsl can we view all the Domain Classes of different DSL projects with same extension in To...

DSL, XamlDOM (.NET 4 Beta) and extending vs2008

I have the following situation: I want to develop a DSL. To generate the code, I would need the help of the XamlDOM Implementation, which offers static analysis and manipulation of XAML Code. Unfortunately, XamlDOM can only be used with .NET 4. I wouldn't have a problem using the vs2010 and .NET 4.0 Betas, but I need to target the DSL f...

A solution to highlight some parts of a text file in java ? How to implement a simple DSL editor ?

Hi, I'm trying to find a solution to highlight part of a text file in Java. Basically, what I'm doing is lexing and parsing a text file respecting a certain grammar, storing some information related to the various elements of this file and then logging the information to a database. I would like to have something more visual like a rep...

Parsing Documents with a DSL

I'm trying to come up with a way to go through about a million documents which are formal documents (for arguments sake, they are Thesis documents). They are not all standardized but close enough. They are Titles, sections, paragraphs etc. There are subtle differences that might crop up such as in english, we call a title "Title" but in ...

How to load toolbox items of different domain specific languages

I have 'n' different domain specifc languages e.g. language1, language2, ...., languagen each of which contains different toolbox items. Let say first language is for banking process, second one is for health process, third one is for insurance process etc. I want to load toolbox items of every above mentioned languages into every langu...

How can I transform a functional language in XML to Java?

I'm working with a DSL based on an XML schema that supports functional language features such as loops, variable state with context, and calls to external Java classes. I'd like to write a tool which takes the XML document and converts it to, at the very least, something that looks like Java, where the <set> tags get converted to variabl...

What separates a "private language WTF" from merely bad library/API/DSL design?

Some of the most entertaining Daily WTF stories feature private languages run amok. However, domain-specific languages can be quite powerful and seem to be increasingly popular. And of course we can't program at all without good libraries, but as the adage goes, "library design is language design". Nobody likes a bad API, but is the dif...

Custom WPF editor using the Visual Studio Shell

For the project I'm working on, I want to have a custom form designer. I want to use WPF to create custom XAML. I don't know exactly which changes will be in the XAML but it will be custom XML tags. At the moment if I add those tags in a XAML file and try to edit it with VS, I get errors. The custom tag data would come from custom Tool...

Building a "Semi-Natural Language" DSL in Ruby

I'm interested in building a DSL in Ruby for use in parsing microblog updates. Specifically, I thought that I could translate text into a Ruby string in the same way as the Rails gem allows "4.days.ago". I already have regex code that will translate the text @USER_A: give X points to @USER_B for accomplishing some task @USER_B: take Y p...

How to create an Array from other Array?

Is there a way for creating an array from other severals arrays, in Objective C? ...

Improving ANTLR DSL parse-error messages

I'm working on a domain-specific language (DSL) for non-programmers. Non-programmers make a lot of grammar mistakes: they misspell keywords, they don't close parentheses, they don't terminate blocks, etc. I'm using ANTLR to generate my parser; it provides a nifty mechanism for handling RecognitionExceptions to improve error handling. ...

Using JBoss DROOLS XMLDumper with .dslr file

I have a .dslr file consiting of a rule(dslr) and a dsl file. I need to get the XML output of the DRL from this dslr. I've tried different ways with the XMLDumper but cannot get it to work. Any ideas? ...