On Thu, May 13, 2004 at 10:26:32AM -0500, Abhijit A. Mahabal wrote: : : On Wed, 12 May 2004, Larry Wall wrote: : : > In fact, I'd go so far as to say that it's almost impossible to do : > recursive descent when you allow for defining new operator precedence : > levels on the fly as Perl 6 does. : > : > : Operator precedence can be done in : > : a recdescent grammar straightforwardly enough. It's a bit longwinded, : > : but doable. : > : > Yes, of course, it *can* be done that way. The point is you don't : > *want* to do that part in recursive descent, : : I see a terminology issue looming here. Er, what is recdescent? The dragon : book and Parse::RecDescent do not seem to use the same defn. According to : aho/ullman "A parser that uses a set of recursive procedures to recognize : its input with no backtracking is called a recursive descent parser". (p : 180). Parse::RecDescent does not shy away from backtracking, and in : Aho/Ullman's eyes it would be a top-down parser, but not recdescent.
Well, I think the dragon book does violence to the language here.
And personally I'd be happy to do violence to the dragon book. (Not that it's *entirely* horrible, as I occasionally need to prop doors open or shim a broken table leg temporarily...)
But, anyway, snipping out the rest of this stuff...
The big problem is that I don't know *how* to implement a mixed-type parser generator. I'm not big on parsers in general, so I'm mostly stuck with the literature if I need to write one from scratch.
Since you've been itching to get into the internals anyway, this'd be a good place to start, y'know. :-P
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk