/* 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"
#if defined(__clang__)
#pragma clang diagnostic pop
+#else
+// must not pop -Wunused-function
+//#pragma GCC diagnostic pop
#endif
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
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
@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