fix flex version check when >= 2.6

This commit is contained in:
Vianney Boyer
2015-12-17 21:06:16 +01:00
parent 6b9af54899
commit bca7990776

View File

@@ -21,7 +21,18 @@
// need to get rid of this and use a string...
#include <stdio.h>
#ifdef YY_FLEX_SUBMINOR_VERSION
# define YY_FLEX_VERSION \
(YY_FLEX_MAJOR_VERSION) * 1000000 \
+ (YY_FLEX_MINOR_VERSION) * 1000 \
+ (YY_FLEX_SUBMINOR_VERSION)
#else
# define YY_FLEX_VERSION \
(YY_FLEX_MAJOR_VERSION) * 1000000 \
+ (YY_FLEX_MINOR_VERSION) * 1000
#endif
// tokens
#include "DataFilter_yacc.h"/* generated by the scanner */
@@ -105,12 +116,12 @@ int DataFiltercolumn = 1;
. return DataFiltertext[0]; /* any other character, typically :, { or } */
%%
// Older versions of flex (prior to 2.5.9) do not have the destroy function
// Or We're not using GNU flex then we also won't have a destroy function
#if !defined(FLEX_SCANNER) || (YY_FLEX_SUBMINOR_VERSION < 9)
int DataFilterlex_destroy(void) { return 0; }
#endif
// Older versions of flex (prior to 2.5.9) do not have the destroy function
// Or We're not using GNU flex then we also won't have a destroy function
#if !defined(FLEX_SCANNER) || (YY_FLEX_VERSION < 2005009)
int DataFilterlex_destroy(void) { return 0; }
#endif
void DataFilter_setString(QString p)
{
BEGIN(0);