Kind of ParsTree for 1.9.1

2009/8/10 Jörg W Mittag [email protected]:

Unfortunately, by then it will already be too late.
I am not sure I get you here, when I call ruby -a it surely would not
be too late for the compiler to keep the AST. My question was rather,
would it be too much overhead for the VMs to be prepared to have the
AST and expose it via an API in that case?

Probably that is much work OTOH it would be great for studies and
experiments.
I hoped Charles would have some time to give me his view on this, but
of course he is a very busy man.

Cheers
Robert

On Mon, Aug 10, 2009 at 7:17 AM, Robert D.[email protected]
wrote:

I am not sure I get you here, when I call ruby -a it surely would not
be too late for the compiler to keep the AST. My question was rather,
would it be too much overhead for the VMs to be prepared to have the
AST and expose it via an API in that case?

Probably that is much work OTOH it would be great for studies and experiments.
I hoped Charles would have some time to give me his view on this, but
of course he is a very busy man.

The problem remains that ASTs may be different, or not even exist on
some impls that go straight to bytecode. Storing a source
representation would be easier, and then you can use an offline parser
library at runtime to parse it to whatever form you want.

  • Charlie