]> git.saurik.com Git - cycript.git/commitdiff
Remove flex/gperf hacks (this was fixed upstream).
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 29 Nov 2015 07:14:11 +0000 (23:14 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 29 Nov 2015 07:14:11 +0000 (23:14 -0800)
Cycript.l.in
Makefile.am
Makefile.in

index 0d0218ffec625685d0e5776d58e08a195f40c741..fa27d9f4f790ea229b3d605ca90cc905433d4f7a 100644 (file)
 
 /* XXX: supposedly I will be screwed on very very long multi-line comments and need to replace these with a manual lexer. http://websrv.cs.fsu.edu/~engelen/courses/COP5621/Pr2.pdf */
 
-%{
-
+%top{
 #if defined(__clang__)
 #pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wunknown-pragmas"
+#pragma clang diagnostic ignored "-Wunused-variable"
 #pragma clang diagnostic ignored "-Wdeprecated-register"
+#else
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wsign-compare"
+#pragma GCC diagnostic ignored "-Wunused-function"
+#pragma GCC diagnostic ignored "-Wunused-variable"
 #endif
+}
+
+%{
 
 #define YYLTYPE CYLocation
 #include "Cycript.tab.hh"
@@ -648,4 +655,7 @@ void CYDriver::PopCondition() {
 
 #if defined(__clang__)
 #pragma clang diagnostic pop
+#else
+// must not pop -Wunused-function
+//#pragma GCC diagnostic pop
 #endif
index 2cc8b2a7c0ac0e73b72a2bed08ca40bb43d42286..0519e2ddba7f1646c83db059af959452230031f0 100644 (file)
@@ -71,7 +71,7 @@ Bridge.gperf: Bridge.def Bridge.sh
 
 CLEANFILES += Bridge.hpp
 Bridge.hpp: Bridge.gperf
-       $(GPERF) $< | $(SED) -e 's/defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__/0/' >$@
+       $(GPERF) $< >$@
 endif
 
 if CY_JAVA
@@ -105,7 +105,7 @@ Cycript.l: Cycript.l.in UnicodeIDStart.l UnicodeIDContinue.l
 
 CLEANFILES += lex.cy.cpp
 lex.cy.cpp: Cycript.l
-       $(FLEX) -b -t $< | $(SED) -e 's/int yyl;/yy_size_t yyl;/;s/int yyleng_r;/yy_size_t yyleng_r;/;s/yyg =/yyg __attribute__((__unused__)) =/' >$@
+       $(FLEX) -o $@ $<
        grep -F 'No backing up.' lex.backup >/dev/null
 
 Console.$(OBJEXT) Cycript.tab.lo Driver.lo Handler.lo Highlight.lo Library.lo lex.cy.lo: Cycript.tab.hh
index 399da56199b0a1ea14a97bdb211001ae9b305423..94714ce11c6609ddf2dde17d8cbe8a34b62e9284 100644 (file)
@@ -1325,13 +1325,13 @@ uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES
 @CY_EXECUTE_TRUE@Bridge.gperf: Bridge.def Bridge.sh
 @CY_EXECUTE_TRUE@      $(srcdir)/Bridge.sh $< >$@
 @CY_EXECUTE_TRUE@Bridge.hpp: Bridge.gperf
-@CY_EXECUTE_TRUE@      $(GPERF) $< | $(SED) -e 's/defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__/0/' >$@
+@CY_EXECUTE_TRUE@      $(GPERF) $< >$@
 Cycript.yy: Cycript.yy.in
        $(srcdir)/Filter.sh $< >$@ $(filters)
 Cycript.l: Cycript.l.in UnicodeIDStart.l UnicodeIDContinue.l
        $(srcdir)/Filter.sh $< >$@ $(filters)
 lex.cy.cpp: Cycript.l
-       $(FLEX) -b -t $< | $(SED) -e 's/int yyl;/yy_size_t yyl;/;s/int yyleng_r;/yy_size_t yyleng_r;/;s/yyg =/yyg __attribute__((__unused__)) =/' >$@
+       $(FLEX) -o $@ $<
        grep -F 'No backing up.' lex.backup >/dev/null
 
 Console.$(OBJEXT) Cycript.tab.lo Driver.lo Handler.lo Highlight.lo Library.lo lex.cy.lo: Cycript.tab.hh