In message <[EMAIL PROTECTED]>, Diez B. Roggisch wrote: > [EMAIL PROTECTED] schrieb: >> I'm a compiler newbie and curious if Python grammar is able to >> be parsed by a recursive descent parser or if it requires >> a more powerful algorithm. > > I might be mistaken, but isn't recursive descent one of the more > powerful parsing techniques - for the price of non-linearity and even > potentially non-termination?
No, you're thinking of LR(k) bottom-up parsers. Recursive descent is a top-down parser--might be the same thing as LL(1), I'm not sure. It's easy to implement and easy to understand, to the point where there is strong pressure on programming-language designers to make sure their languages can be parsed with recursive descent. -- http://mail.python.org/mailman/listinfo/python-list