context-free grammar

%u wfunction at hotmail.com
Sun Mar 6 22:38:50 PST 2011


I didn't see this example being mentioned in this thread (although I
might have missed this), but would someone explain why (1) the code
below doesn't compile, and (2) why it's considered context-free?

struct MyStruct { ref MyStruct opMul(MyStruct x) { return this; } }
...
OpOverloadAbuse a, b;
a * b = b;

Thanks!


More information about the Digitalmars-d mailing list