On 04/07/2016 02: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.


All the parsers I write work the same way. If I can't describe them as recursive descent, then I don't know what they are.

This is just recognising that a bunch of specialised functions that are very similar can be reduced to one or two more generalised ones.

--
bartc
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to