From 5dd5a073678fcf4b96b65ddc680c079953eed2cc Mon Sep 17 00:00:00 2001 From: noa body Date: Mon, 14 May 2018 20:55:19 -0600 Subject: [PATCH] YY_CURRENT_BUFFER workaround amended and smbase placed in path --- ast/gramlex.cc | 8 ++++---- smbase/configure.pl | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ast/gramlex.cc b/ast/gramlex.cc index 17be528..3288659 100644 --- a/ast/gramlex.cc +++ b/ast/gramlex.cc @@ -9,9 +9,9 @@ #include // cout, ifstream -// workaround for flex-2.5.31 -#ifdef FLEX_STD // detect later versions of flex - // copied from flex's output +// workaround for flex-2.5.31 and later +#ifndef yy_current_buffer // FlexLexer.h changed function + // check for macro definition #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) @@ -19,7 +19,7 @@ // the 'yy_current_buffer' field was replaced by the buffer stack // alluded to above #define yy_current_buffer YY_CURRENT_BUFFER -#endif // FLEX_STD +#endif // yy_current_buffer // ----------------- GrammarLexer::AltReportError --------------- diff --git a/smbase/configure.pl b/smbase/configure.pl index 06b9678..7173f92 100755 --- a/smbase/configure.pl +++ b/smbase/configure.pl @@ -2,6 +2,7 @@ # configure script for smbase use strict 'subs'; +use lib '.'; require sm_config;