On 07/07/2012 09:35 PM, Roman D. Boiko wrote:
On Saturday, 7 July 2012 at 19:29:47 UTC, Dmitry Olshansky wrote:
Another idea that I've never realized is to add operator precedence
grammar to pegged. Of course it should fit naturally with traditional
PEG, for instance taking responsibility for parsing expressions.

But that's already available by explicitly defining expression grammar
via nested rules. See for example the examples/dgrammar.d in Pegged.
This way, for example, multiplication has precedence over addition. (It
looks like I misunderstood you. Did I?)

http://en.wikipedia.org/wiki/Operator-precedence_parser#Precedence_climbing_method

Reply via email to