# and cleaner to make this rule ourselves instead of working around ylwrap
# and yywrap's antiquated notion of what is happening.
.l.c:
- $(AM_V_GEN)$(FLEX) -8 -o $@ $<
+ $(AM_V_GEN)$(FLEX) -8 -B -o $@ $<
.y.c:
$(AM_V_GEN)$(BISON) -o $@ $<
.out = "expecting CCBRACE or PIPE or NAME",
.ret = -1
},
+ { .in = "%{\\", .out = "Premature program end", .ret = -1 },
{ .in = "hello%{}world", .out = "helloworld", .ret = 0 },
/* basic lookup */
{ .in = "%{first}", .out = "hello", .ret = 0 },
#pragma GCC diagnostic push
+/* If we hit here, the program has prematurely ended */
+#define ECHO STMT_START { scanner_error(yyscanner, "Premature program end"); } STMT_END;
+
/* ignore strict bool warnings in generated code */
#ifdef HAVE_STRICT_BOOL
# pragma GCC diagnostic ignored "-Wstrict-bool"