You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if it is an interesting point on a tradeoff curve. If I am willing to stomach code generation anyway, using [G]LR or at least a proper external grammar DSL seems like a better idea. The main appeal of Pratt parseing to me is that you don't need any extra tools to do it :-)
@matklad I know it does not sound super interesting :). there are a bunch of expression-like languages like Excel, DAX, RDL, etc with little differences. As usual it would be nice to have, but adapting code of this repo is faster approach for now
maybe @segeljakt (author of pratt) might be interested to implement such declarative approach :)
@matklad thanks for wonderful examples of pratt-style parsers
wondering if you have time to generalize it further :)
here is an idea of an declarative way to make expression parsers in no time:
i.e. you just define binding power for operators and define expression categories.
actually the idea is inspired by logos which provides declarative way to generate lexers
I know there are several attempts to do that, but they are still verbose IMO :)
The text was updated successfully, but these errors were encountered: