Well, I finally ran into a Python Unicode problem, sort of
Random832
random832 at fastmail.com
Sun Jul 3 22:20:50 EDT 2016
On Sun, Jul 3, 2016, at 21:15, Lawrence D’Oliveiro wrote:
> On Monday, July 4, 2016 at 12:40:14 PM UTC+12, BartC wrote:
> > The structure of such a parser doesn't need to exactly match the grammar
> > with a dedicated block of code for each operator precedence. It can be
> > table-driven so that an operator precedence value is just an attribute.
>
> Of course. But that’s not a recursive-descent parser any more.
It's still recursive descent if it, for example, calls the _same_ block
of code recursively with arguments to tell it which operator is being
considered. This would be analogous to, in Python, implementing a
recursive-descent parser with arbitrary callable objects instead of
simple functions.
More information about the Python-list
mailing list