From 7c354490c1d5cf76496fe22ab2a17cd51e434e8b Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 6 Jan 2014 19:34:02 -0800 Subject: [PATCH] Do not allow the grammar to contain conflicts. --- Makefile.am | 1 + Makefile.in | 1 + 2 files changed, 2 insertions(+) diff --git a/Makefile.am b/Makefile.am index f34a4b6..d92adb5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -124,5 +124,6 @@ Console.$(OBJEXT) Cycript.tab.lo Driver.lo Handler.lo Highlight.lo Library.lo le CLEANFILES += Cycript.tab.cc Cycript.tab.hh location.hh position.hh stack.hh Cycript.output Cycript.tab.cc Cycript.tab.hh location.hh position.hh stack.hh Cycript.output: Cycript.yy $(BISON) -v --report=state $< + ! grep -n '^State [0-9]* conflicts:' Cycript.output ! grep -n '^ *$$default reduce using rule [0-9]* (Lex[A-Z][^)]*)$$' Cycript.output -B 2 | grep 'shift, and go to state [0-9]*$$' ! grep -n '^ *$$default reduce using rule [0-9]* (Lex[A-Z][^)]*)$$' Cycript.output -B 2 | grep -v '$$default' | grep 'reduce using rule [0-9]* ([^)]*)$$' diff --git a/Makefile.in b/Makefile.in index a1fdd8a..fe3ef22 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1342,6 +1342,7 @@ lex.cy.cpp: Cycript.l Console.$(OBJEXT) Cycript.tab.lo Driver.lo Handler.lo Highlight.lo Library.lo lex.cy.lo: Cycript.tab.hh Cycript.tab.cc Cycript.tab.hh location.hh position.hh stack.hh Cycript.output: Cycript.yy $(BISON) -v --report=state $< + ! grep -n '^State [0-9]* conflicts:' Cycript.output ! grep -n '^ *$$default reduce using rule [0-9]* (Lex[A-Z][^)]*)$$' Cycript.output -B 2 | grep 'shift, and go to state [0-9]*$$' ! grep -n '^ *$$default reduce using rule [0-9]* (Lex[A-Z][^)]*)$$' Cycript.output -B 2 | grep -v '$$default' | grep 'reduce using rule [0-9]* ([^)]*)$$' -- 2.47.2