From b5d524c295d35c8c122e22c8ec8e9a1151ab6f7a Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Mon, 24 Nov 2014 23:56:54 +0100 Subject: [PATCH] Add Types.h to %code require in parser definition. --- Monicelli.ll | 1 - Monicelli.y | 7 ++++--- main.c | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Monicelli.ll b/Monicelli.ll index ceb6e5e..726e38a 100644 --- a/Monicelli.ll +++ b/Monicelli.ll @@ -1,5 +1,4 @@ %{ -#include "Type.h" #include "Monicelli.tab.h" #include #include diff --git a/Monicelli.y b/Monicelli.y index bef52b0..ee741d9 100644 --- a/Monicelli.y +++ b/Monicelli.y @@ -1,14 +1,15 @@ %{ -#include "Type.h" - #define YYERROR_VERBOSE extern void emit(const char *, ...); extern void yyerror(const char *); extern int yylex(); - %} +%code requires { + #include "Type.h" +} + %union { Type typeval; int intval; diff --git a/main.c b/main.c index 461e0b9..f963129 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,3 @@ -#include "Type.h" #include "Monicelli.tab.h" #include