svf_flex now internally detects whether to assume --bison-locations or not

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@830 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Kolja Waschk 17 years ago
parent 7003cd045e
commit 79bd5f342f

@ -3,6 +3,7 @@
* configure.ac: Improve detection of flex version, get Subversion
revision from 1. svn info, or 2. ChangeLog, or 3. Revision tag,
auto-detect whether -lrt is needed
* src/svf/svf_flex.l: derive HAVE_MODERN_FLEX internally
* src/jtag.c: show version from config.h, compile without readline
* src/version.awk: not needed; SVN info now available in config.h
* src/Makefile.am: removed -lrt link and version.h target

@ -112,7 +112,6 @@ if test "$LEX" == flex ; then
fi
if test "$modern_flex" == yes ; then
AC_DEFINE([HAVE_MODERN_FLEX], 1, [Define if flex version is >= $flex_ref_version])
AC_MSG_RESULT([yes - flex $flex_version])
AM_CONDITIONAL([BISON_LOCATIONS], true)
else

@ -28,9 +28,10 @@
* Note: This lexer supports bison_locations if HAVE_MODERN_FLEX is
defined. Apart from this, the option --bison-locations has
to be specified on the command line.
Both the define and the command line option are controlled
by the configure script that enables this feature based on
the available version of flex.
The command line option is controlled by the configure
script that enables this feature based on the available
version of flex. The #define is derived below from the version
information that flex itself embeds in the *.c output.
*/
@ -45,7 +46,17 @@
static int map_keyw_ident(YYSTYPE *, char *);
static void align_string(char *);
/* autodetected by configure based on current flex version */
#ifdef YY_FLEX_MAJOR_VERSION
#if (YY_FLEX_MAJOR_VERSION > 2) ||\
((YY_FLEX_MAJOR_VERSION == 2) && ((YY_FLEX_MINOR_VERSION > 5) \
|| ((YY_FLEX_MINOR_VERSION == 5) && (YY_FLEX_SUBMINOR_VERSION >= 31))))
#undef HAVE_MODERN_FLEX
#define HAVE_MODERN_FLEX 1
#else
#undef HAVE_MODERN_FLEX
#endif
#endif
#ifdef HAVE_MODERN_FLEX
static void fix_yylloc(YYLTYPE *, char *);
static void fix_yylloc_nl(YYLTYPE *, char *);

Loading…
Cancel
Save