[comp.lang.c] RD parsers

henry@utzoo.uucp (Henry Spencer) (07/19/88)

In article <3863@rpp386.UUCP> jfh@rpp386.UUCP (The Beach Bum) writes:
>the geneal case of trying to reduce the recursion present in the parser
>would seem to require a potentially arbitrary amount of look ahead, or
>as a minimum, the same amount of lookahead as the length of the shortest
>sentence the parser is trying to recognize.  clarifications, henry?

The *general* case of reducing recursion is hard.  However, if you're
willing to do a little bit of lookahead, and punt to the full machinery
when things get hard, you can get a lot of mileage out of avoiding the
recursive plunge in things like "x = 2;".  Many, many expressions
consist of a single variable or constant; optimizing those cases may
not be theoretically elegant but it's practically useful.

> Pournelle signature quote
>and what the hell does this mean???

Consider who the senior senator from Wisconsin is.
-- 
Anyone who buys Wisconsin cheese is|  Henry Spencer at U of Toronto Zoology
a traitor to mankind.  --Pournelle |uunet!mnetor!utzoo! henry @zoo.toronto.edu