From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2001-12-30T15:58:09+09:00 Subject: [ruby-talk:29713] Ruby parsers in Ruby Wouldn't it be cool to have Ruby playing with Parrot before Python or even perhaps Perl? That could be a real coup. Dan Sugalski has suggested that it would be very helpful if we had a Ruby parser written in Ruby. It would initially need to spit out Parrot bytecode, but eventually we could give him an AST. Now, it seems to me that we have at least a couple of projects where we parse Ruby in Ruby (actually, three that I know of): 1) Markus Liedl's Ruby parser - it was announced a while back on Rubygarden that it was recently imported into the CVS tree (I think that means Ruby's CVS tree). 2) JRuby - It must have a frontend parser written in Ruby and then emits Java bytecode, right? 3) Matju's AST - which produces an abstract syntax tree of a Ruby program. Is there any possibility that efforts can be merged in this area? It seems that we have three options available and there must be a pretty good amount of code out there already for a Ruby parser written in pure Ruby, so instead of maintaining three different code bases perhaps we could create one Ruby in Ruby parser frontend (based on picking the best elements of the above three) and then create different 'backends'. The frontend would create an AST which could be fed to the different backends: JRuby - emits Java bytecode PRuby - emits Parrot bytecode RRuby - emits Ruby bytecode for upcomeing Rite VM While competition has it merits, I think this is an area where we as a community could benefit from joining forces instead of duplicating effort. Can anyone involved in the above three projects (or any other similar ones I might have missed) comment on the status of these projects and the feasability of merging them? Phil