Redundancy/conflicts in expression rules.

Iain Buclaw ibuclaw at gdcproject.org
Wed Feb 12 16:18:20 PST 2014


On 13 February 2014 00:06, Brian Schott <briancschott at gmail.com> wrote:
> On Thursday, 13 February 2014 at 00:00:11 UTC, Iain Buclaw wrote:
>>
>> I'm just curious if anyone else has stumbled onto this, and whether or not
>> it's just human error on my part.  :o)
>>
>> Regards
>> Iain.
>
>
> It's dangerous to go alone. Take this!
>
> https://github.com/Hackerpilot/DGrammar

Thanks!  Having a look at D.g4, I'm seeing that you do the same with the rules:

andAndExpression:
      orExpression
    | andAndExpression '&&' orExpression
    ;

/*...*/

andExpression:
      cmpExpression
    | andExpression '&' cmpExpression
    ;

cmpExpression:
      shiftExpression
    | equalExpression
    | identityExpression
    | relExpression
    | inExpression
    ;


More information about the Digitalmars-d mailing list