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 #16449] Fri, 25 January 2008 20:04
Jurgen Vinju is currently offline Jurgen VinjuFriend
Messages: 5
Registered: July 2009
Junior Member
Hi,

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 (www.meta-environment.org).

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
processor.

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
code.

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
variables).

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.

Cheers,

Jurgen Vinju
Previous Topic:Status update
Next Topic:IMP source code formatting tool
Goto Forum:
  


Current Time: Sat Apr 27 01:43:18 GMT 2024

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

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

Back to the top