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) Is there no way to overload the way the rule resolves the shift/reduce? 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 prec directly before and after the comma but that didn't override the reduce into a shift. On Sun, Dec 22, 2013 at 11:43 AM, Akim Demaille <a...@lrde.epita.fr> wrote: > > Le 17 déc. 2013 à 09:25, Adam Smalin <acidzombi...@gmail.com> a écrit : > > > I still need help with this. I rewrote it maybe this will be more clear? > > > > I want to allow this > > > > var = var > > var, var = var > > var = var, var > > Maybe I am missing something, by how about clearly stating > that you can have several lvalues and rvalues? The following > grammar has no conflict, and requires no precedence/associativity. > > %% > body: > lvals '=' rvals > ; > > lvals: > lval > | lvals ',' lval > ; > > rvals: > rval > | rvals ',' rval > ; > > rval: "var" > lval: "var" > > _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison