diff --git a/source/tbsp.y b/source/tbsp.y index 3d693c4..62db1a1 100644 --- a/source/tbsp.y +++ b/source/tbsp.y @@ -1,8 +1,6 @@ %{ #include "tbsp.yy.h" - void yyerror(const char * const s, ...); - extern char * language; extern char * top; extern char * verbatim; @@ -27,6 +25,8 @@ #include <kvec.h> typedef kvec_t(rule_t) rule_vector_t; extern rule_vector_t rules; + + extern void yyerror(const char * const s, ...); } %code provides { void tbsp_tab_init(void); diff --git a/source/tbsp_c.l b/source/tbsp_c.l index a118764..e0a1a9d 100644 --- a/source/tbsp_c.l +++ b/source/tbsp_c.l @@ -1,5 +1,7 @@ -%{ +%top{ #define _GNU_SOURCE +} +%{ #include <stdio.h> #include <string.h>