nitcc: detect S/R even if R/R conflict as a solution is to shift in case of S/R/R
authorJean Privat <jean@pryen.org>
Wed, 9 Sep 2015 09:28:21 +0000 (05:28 -0400)
committerJean Privat <jean@pryen.org>
Wed, 9 Sep 2015 09:28:21 +0000 (05:28 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

contrib/nitcc/src/grammar.nit

index 0a10beb..b3b2c6b 100644 (file)
@@ -1001,7 +1001,8 @@ class LRState
                        if a.length > 1 then
                                print "REDUCE/REDUCE Conflict on state {self.number} {self.name} for token {t}:"
                                for i in a do print "\treduce: {i}"
-                       else if guarded_shift.has_key(t) then
+                       end
+                       if guarded_shift.has_key(t) then
                                var ri = a.first
                                var confs = new Array[Item]
                                var ress = new Array[String]