Let's stop parser Hell

Timon Gehr timon.gehr at gmx.ch
Sat Jul 7 12:50:36 PDT 2012


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


More information about the Digitalmars-d mailing list