3 ms·
Seems like a relevant place to put a link to this paper: David R. Hanson, "Compact Recursive-descent Parsing of Expressions", 1985 https://drhanson.s3.amazona
by peterfirefly 4y ago
Seems like a relevant place to put a link to this paper:
David R. Hanson, "Compact Recursive-descent Parsing of Expressions", 1985
https://drhanson.s3.amazonaws.com/storage/documents/compact.pdf https://drhanson.s3.amazonaws.com/storage/documents/compact....
There are languages (such as ML) that allow the definition of new operators with a choice of precedence and associativity. Using a table like the one Hanson suggests and modifying it at compile-time is an obvious way to handle that feature.