[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Cardinal-dev] Compiler structure / AST format
From: |
Einar Karttunen |
Subject: |
Re: [Cardinal-dev] Compiler structure / AST format |
Date: |
Thu, 25 Apr 2002 04:05:56 +0300 |
User-agent: |
Mutt/1.3.25i |
On 24.04 17:39, Phil Tomson wrote:
> That would be good, but see my previous post on Ruth in the archive. It uses
> The current Ruby parser (the C/lex/yacc version that comes with the current
> Ruby) for compatibility with the current version of Ruby. It seems to me
> that if we start from scratch (or even if we start with some of the
> Ruby-in-Ruby parsers already available - like the one in RDoc for example)
> thta it's going to take quite a lot of our time just to make it compatible
> with the current incarnation of Ruby. Ruth, it would seem, would make it
> easier to chase a moving target. (that said, though, there are indeed some
> big advantages to having a Ruby parser written completely in Ruby).
>
I am currently looking at MetaRuby's RubyScheme which looks promising.
> The intermediate would make it eaiser to 'bolt-on' other VMs or to compile
> the intermediate to native code (like what is done in .NET and it's clr).
>
The reason for the immediate is the optimiser pass and the complexity of
backends.
* backends need to only know about the intermediate code not the AST
* frontends and backends can be switched with no recoding
* some optimisations common to all backends are very unnatural at the AST level
I think that we should try to first have a coherent design and then start coding
so please comment more on the compiler structure && what the intermediate
language
should be and do we need it at all.
- Einar Karttunen