aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2004-04-25 04:53:42 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2004-04-25 04:53:42 +0000
commitf31ddecf91ba18c2dfa6aaadc1cda97544d802bb (patch)
tree78e1caf6b3e53ac01ef5969bd8db5c7cbf5c8022
parentf0590fd589ea65bcd5dd9c40c1d1929af1a7d747 (diff)
Add support for flex 2.5.31.
svn path=/trunk/; revision=10684
-rw-r--r--epan/dfilter/scanner.l3
-rw-r--r--tools/lemon/lemonflex-tail.inc18
2 files changed, 19 insertions, 2 deletions
diff --git a/epan/dfilter/scanner.l b/epan/dfilter/scanner.l
index d8546b1016..3a2a62b076 100644
--- a/epan/dfilter/scanner.l
+++ b/epan/dfilter/scanner.l
@@ -1,6 +1,6 @@
%{
/*
- * $Id: scanner.l,v 1.16 2004/02/27 12:00:30 obiot Exp $
+ * $Id: scanner.l,v 1.17 2004/04/25 04:53:42 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -37,6 +37,7 @@
#define LVAL_TYPE stnode_t*
#define LVAL_INIT_VAL NULL
#define MODNAME df
+#define FLEX_YY_PREFIX df_
#include <lemonflex-head.inc>
diff --git a/tools/lemon/lemonflex-tail.inc b/tools/lemon/lemonflex-tail.inc
index 04eaf2ab2d..e71ac723e7 100644
--- a/tools/lemon/lemonflex-tail.inc
+++ b/tools/lemon/lemonflex-tail.inc
@@ -1,4 +1,4 @@
-/* $Id: lemonflex-tail.inc,v 1.1 2001/02/01 20:21:25 gram Exp $ */
+/* $Id: lemonflex-tail.inc,v 1.2 2004/04/25 04:53:42 gram Exp $ */
/* This file is #include'd at the bottom of a Lex/Flex scanner
for use with the Lemon parser. You must have #define'd:
@@ -19,6 +19,22 @@ int MODNAME_wrap(void);
#define CLEANUP_FUNC CONCAT(MODNAME,_scanner_cleanup)
#define WRAP_FUNC CONCAT(MODNAME,_wrap)
+/* flex 2.5.31 no longer #defines these as yy_* if used with -P. */
+#ifndef yy_scan_string
+#define yy_scan_string CONCAT(FLEX_YY_PREFIX, _scan_string)
+#endif
+
+#ifndef yy_create_buffer
+#define yy_create_buffer CONCAT(FLEX_YY_PREFIX, _create_buffer)
+#endif
+
+#ifndef yy_switch_to_buffer
+#define yy_switch_to_buffer CONCAT(FLEX_YY_PREFIX, _switch_to_buffer)
+#endif
+
+#ifndef yy_delete_buffer
+#define yy_delete_buffer CONCAT(FLEX_YY_PREFIX, _delete_buffer)
+#endif
/* Resets scanner and assigns the char* argument
* as the text to scan