On Sat, 19 May 2001, ts wrote: > >>>>> "M" == Mathieu Bouchard <matju / sympatico.ca> writes: > > M> A. Keep the "Ruby Parser in Ruby" as a reference implementation > > Well, it exist a reference implementation for ruby, see parse.y > > :-(((((( > > Guy Decoux While I have lex and yacc on my resume it is mostly in the hopes that people will be impressed and not ask me to actually *implement* something with them... ;-) Seriously, I have looked at parse.y until I am blue in the face and no good has come out of it. I considered SWIGing parse.tab.c but it turned out to be a painful process and I stopped. Perhaps there is a way to do a Java implementation in a slightly easier way. For example, a two-stage process: let CRuby do it's work parsing the source file and then access it's parse tree to create Java code. Hm... come to think of it, I haven't dug deep enough to figure out just how Ruby does implement it's parse tree (something that I will definitely have to know before going much further with this project!). Another method is to take the Ruby source tree and translate line by line to Java... this is the method used by Jython. I believe that the Python syntax is much simpler to parse, however... somebody correct me if I am wrong... but nonetheless it is a moot point since Python user programs have access to the internal parser and AST trees from the parser.py module... Hm...