From: Robert Feldt Date: 2004-02-29T15:54:27+09:00 Subject: Re: Ruby Compiler [was Introducing myself and my interest in ruby] Phil Tomson wrote: >>Concerning this and the discussion about what parser to use I'd say that >>what we really need is to decide on a common AST representation for >>Ruby. Then we can have different parser front-ends generating the >>correct type of AST and have different analysis and code generation >>back-ends. >> >> > >Yes, quite true. > > > >>I'd say that in general though it's not the design of this or the >>parsing that is the hard part; these things are pretty standard in >>CS/compiler construction; the hard part is what kind of run-time support >>is needed (and of course how you implement it) for Ruby semantics. >> >> > >Right, like how do you deal with eval - it should be doable in the runtime >lib. > > > Yes, but also the semantics of normal class creation, method additions etc, what makes Ruby Ruby... ;) >>BTW, I have two thesis students working (they'll be starting in 3 weeks >>actually) on Ruby compilers, one for compiling to MSIL/CIL and one for >>compiling to llvm. Would be great if all these different Ruby compiler >>projects could eventually share code although I think it's too early for >>that at this point... >> >> > >That's great we've got grad student slaves working on a Ruby compiler ;-) > > > They're mid-level thesis so it's two 10 week projects but yes, basically you're right ;). The goal is to get two prototypes that covers some small part of Ruby to show if/how it's feasible to do it. Based on that one can decide how to proceed. >But seriously, this sounds like a great time to coordinate efforts. I'm >not sure it's too early to do that. > > > Coordinate by creating common AST format I'd say, the rest is not clear how much overlap it's going to be imho. >BTW: What's llvm? > > > http://llvm.cs.uiuc.edu/ Compiler infrastructure with abstract assembly language which they can generate different machine codes from => we can abstract away from back-end; if we just generate llvm assembly they take care of the CPU-specific stuff. /Robert