Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » IMP » IMP source code formatting tool
IMP source code formatting tool [message #569136] Fri, 25 January 2008 20:04
Jurgen Vinju is currently offline Jurgen VinjuFriend
Messages: 5
Registered: July 2009
Junior Member

I just want to let everybody know that we've been working on a source
code formatting tool for IMP based on the Box formatting language.

Box is a general formatting formalism used in several forms by other
meta programming frameworks. In our tool we are using the box tools from
the ASF+SDF Meta-Environment directly (

The following outline of the user story is split in two parts:

1. Meta programmer defines a formatter:
To obtain a formatter for a new DSL or language extension, the meta
programmer maps language patterns to Box expressions using a special
editor. The editor allows pattern matching in concrete syntax of the DSL
or programming language at hand. When the meta programmer is done, this
mapping is used to construct a full mapping from programs (or parts of
programs) to Box. Any construct in the language that the meta programmer
forgot about, are formatted using default mappings to Box. After that,
the Box expression is mapped to source code again by a Box-to-Text

2. Actual programmer uses the generated formatter:
The generated formatter can be deployed (as an XML file) with an IMP
generated language plugin. The actual programmer can simple press the
Source Format menu option, or use the shortcut keys to format her source

The tool is designed to work with any kind of parsing technology that
satisfies a certain set of properties. The bridge is made by
implementing an interface. Also, to be able to parse patterns, the
parser for the DSL language needs extension with placeholders (meta

That's about it. The current state of the formatting plugin is a
functional prototype. It depends on ASF+SDF software, for which I will
start some IP discussion and administrative actions soon. The tool needs
fine tuning, testing and review before I would consider it finished.
I'll keep you posted on further developments.


Jurgen Vinju
Previous Topic:IMP source code formatting tool
Next Topic:Incremental builder and search functionality questions.
Goto Forum:

Current Time: Thu Jun 21 20:29:29 GMT 2018

Powered by FUDForum. Page generated in 0.01190 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top