[antlr-interest] ANTLR & Scala?

Jim Idle jimi at temporal-wave.com
Fri Jul 13 09:39:37 PDT 2007


Well, the whole point of the code generation templates is that whether the final code is 'portable' or not is up to you and so why not something CPU specific.

In fact the generation of x86 assembler is fairly trivial as you have none of semantic restrictions of higher level languages to worry about. What isn't trivial though is that you need a runtime to go with it and writing all of that in x86 assemble would be quite tedious and not necessarily so much faster than the C runtime anyway.

I have been contemplating for some time a C-lite target. The idea of this is that where you are not generating trees but just want a script engine for 8 bit characters or something, then we might be able to generate a single self-contained .c.h pair without a runtime involved. I have not convinced myself that that solution spaces is big enough subset to worry about it though.

Jim


> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Jonathan Thomas
> Sent: Thursday, July 12, 2007 6:02 PM
> To: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] ANTLR & Scala?
> 
> 
> 
> Randall R Schulz said the following on 13/07/2007 10:28 AM:
> > The programming world needs better languages, and I'll put my money
> on
> > those grounded in computing theory, mathematical formalisms and
> logical
> > principles, any day!
> >
> >
> Yeah well it'd be good if we could stop rowing and climb the tree once
> in a while ( or else even just spend time mixing our metaphors
> completely ;-) )
> > Well, I'm sure something along those lines could be done, but you
> can't
> > short-cut the complexity of a compiler. Realistically, machine code
> > generation isn't simple.
> >
> >
> Yes, it was more of an invitation to "step up here self flagellating
> coders" :-) though I am impressed though with what assembler can
> achieve, ref. menuetos - compact, fast which would be attributes
> desired
> by my target users.
> 
> I did also wonder how the idea of an almost non-portable output would
> go
> with this community :-0 .


More information about the antlr-interest mailing list