Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [imp-dev] IMP for a lisp-like language (clojure)

Hi Jurgen,

2009/7/21 Jurgen Vinju <jurgen@xxxxxxxxx>
Hi Laurent,

The "Box" (not Block) tools are available for MacOSX as well now. That
being said,
I've yet to receive any external feedback (either positive or
negative) on the formatting
architecture for IMP, so please consider it alpha/beta quality.

Ok, thanks very much for the info.
 
In terms of efficiency, the current implementation has definite room
for improvement.
I can't be precise, but I guesstimate a 4000 line clojure program
would take 5 seconds or so
on a fast machine to format (independent of parsing to an AST). Maybe more.

For example, I currently have a performance problem with the current implementation I have done, "by hand" : I've plugged an antlr lexer as a TokenScanner into the default eclipse provided damagers/reparers/PresentationReconciler/etc. stuff.

One user reported a problem: when the displayed size of the editor is big (think more than 30 lines displayed at the same time), when one starts writing fast the display does not follow at all (to the point that it is , in practice, no more usable).

=> So that's the first test I did with IMP. I installed the X10 language IDE in eclipse, and did exactly that : create a new project, open a class, add 20 or 30 times the same line (in my example I tried with a line with a comment of approximately 80 characters), and maximize Eclipse and the editor. With such a configuration of approximately 30 lines displayed, I encounter the same problem that I have with my current implementation.

Is the X10 implementation an average example of the current capacity of IMP in terms of performance ?


I don't think it's necessary to reimplement your parser, although I
suspect that for clojure that
would not be a big thing to do. What is necessary is to extend your
parser with "meta variables"
such that you can use the IMP formatters' pattern matching facility.

I currently have an antlr grammar. I read in the docs that it's feasible to use antlr grammars by conforming to IMP interfaces. Is this adaptation to interfaces something that must be done just once for antlr, or must it be done for each new antlr grammar ? Differently said, do you know of an existing work released with an Open Source licence that would already help cross/build the antlr/IMP bridge ?

Regards,

--
Laurent

Back to the top