Le 22 déc. 2013 à 18:38, Adam Smalin <acidzombi...@gmail.com> a écrit :
> That's one way to solve my literal problem but I would really like to make > ',' a higher precedence than '=' on that one rule (so it would shift instead > of reducing 100% of the time). > > Both sides should be rvals. What if someone wanted to do something like > > get_state().member[index].value, new_state, error_id = func(current_state, > config) That is still an lvalue on the lhs, not a rvalue. Unless one can also write f(x), y + 1 = 3, 3 Lvalues can be complex, indeed, they're more that simple variables. But they are typically not all the possible "exp"s. > Is there no way to overload the way the rule resolves the shift/reduce? No. > I tried prec and dprec several times one email is > http://lists.gnu.org/archive/html/help-bison/2013-12/msg00022.html > I tried using pref directly before and after the comma but that didn't > override the reduce into a shift. We probably need more details to understand why the proposed solutions don't apply in your case. _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison