From: Dave Thomas Date: 2002-09-17T01:44:16+09:00 Subject: Re: Why are parser tools rarely used in ruby? "MikkelFJ" writes: > Why is it that all the ruby source I find in the Ruby (windows) > distribution has zillions of handwritten parsers: rexml xpath, rdoc, > sgml-parser ? The RDoc history went something like this: I wanted to do RDoc for a long time, and was waiting for a parser in Ruby that could parse Ruby fully. There were (if I remember correctly) three options, but none could do the full parse (and do things like keep comments associated with the correct nodes in the parse tree). That situation may have changed now. At the same time, I was driven to keep RDoc self contained. I dislike downloading a simple package only to find I need to download the latest option parsing library (because the author preferred it over the installed one, and even though the author used no features that weren't in the standard one), strscan (because those extra 10mS are important), an XML library (ust because...) and so on. So, I had a look at the irb Ruby parser, and it turned out to be fairly simple to adapt. I've been slowly hacking it down and removing extra features over time, but even its first incarnation worked well, and worked in a couple of days. So, speaking for me, I found no compelling reason to use a parser generator for RDoc. If I were using Ruby to parse a more regular language, I'd probably use one. Cheers Dave