bison shift instead of reduce. With reduce/reduce errors
问题 In my language i can write a = 1 b = 2 if true { } else { } if true { } **Here is the problem** else {} My grammer doesnt support newlines between statements. An else can only be used with an if. When i add optionalNL in my rule IfExpr: IF rval optionalNL codeBlock optionalNL ELSE codeBlock | IF rval optionalNL codeBlock The optionalNL before the else causes 3 reduce/reduce. Reason is it can reduce using the 2nd rule in IfExpr or reduce to exprLoop where it allows many newlines between