Redundancy/conflicts in expression rules.
Iain Buclaw
ibuclaw at gdcproject.org
Tue Feb 18 00:26:27 PST 2014
On 15 February 2014 20:09, Iain Buclaw <ibuclaw at gdcproject.org> wrote:
> On 14 February 2014 19:40, Rainer Schuetze <r.sagitario at gmx.de> wrote:
>>
>>
>> I think this is by design to disallow comparison operators and binary
>> operators in the same expression without paranthesis:
>>
>> int x = a & b < c;
>>
>
> Yeah, I didn't buy that argument at first. Not least because it didn't
> look like the conflicts came from '&'
>
As soon as I introduced
PrimaryExpression:
( Expression )
;
I just ended up reverting it back, so the expression parser happily
accepts (a & b < c); as well as variants with multiple brackets
inside.
At the moment it's just good to get a D expression evaluator thats'
actually working, then worry about was is invalid D later. :o)
Regards
Iain.
More information about the Digitalmars-d
mailing list