From: Charles Comstock Date: 2004-02-22T05:19:50+09:00 Subject: Re: Ruby to Parrot compiler Simon Strandgaard wrote: > On Sat, 21 Feb 2004 09:54:25 -0500, Sean Ross wrote: > >>This is probably naive, but I was wondering why you couldn't just use Ruby's >>existing front-end implementation to parse and build an AST, and then build >>a seperate generator that takes the AST as input to compile and emit > > [snip] > > Cool.. a ruby2ast converter. > > Question: is the AST a bunch of ruby classes, which can be > manipulated/navigated through Ruby? > > > One day, I hope, to extend my editor so it can interact with Rubys AST, > then some really nice things becomes possible: > > * advanced syntax coloring which can identify syntax-errors. > * obtain advanced help about the code under the cursor. > * advanced code completion. > > > -- > Simon Strandgaard > I think we definitely need a meta-aware ruby interpreter that you can hook some stuff when it's parsing it's own file. Or even just an interpreter switch that dumps the parse tree in a couple of different formats, if it's too hard to get it at runtime. This would make it much easier for alot of things. Charles Comstock