Shift Reduce Conflict for arithmetic expressions in yacc
问题 This grammar has given me conflict despite specifying precedence of operators. Even in the Dragon book it's been resolved in such a way(the way implemented as first 7 lines below) but it still gets conflict! Below is the code implemented in yacc %right THEN_KW %right ELSE_KW %left XOR_KW OR_KW %right '=' %left AND_KW ALSO_KW %left EQ_KW LT_KW GT_KW LE_KW GE_KW %left PLUS_KW MINUS_KW %left MULT_KW DIV_KW MOD_KW %right NOT_KW arthlogicexpr -> operand | arthlogicexpr arthop arthlogicexpr arthop