aboutsummaryrefslogtreecommitdiff
path: root/scanner.l
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-09-26 21:59:39 -0700
committerGuy Harris <guy@alum.mit.edu>2015-09-26 21:59:39 -0700
commit757c5c29783b3de1a0c75c521362e592bf7dc5c9 (patch)
treea3c8a09d6fb512041214daabf3324083bb0c2ce1 /scanner.l
parentb56a5baa48d760e9c4b4f8a46e9036ce703ac435 (diff)
downloadlibpcap-757c5c29783b3de1a0c75c521362e592bf7dc5c9.tar.gz
Redo the way we handle .l and .y files.
Use AC_PROG_LEX and AC_PROG_YACC to find {f}lex and yacc/bison/byacc. Once we've found them, make sure {f}lex can handle -P, --header-file, --nounput, and -o, and can parse our scanner.l, and make sure yacc/bison/byacc can handle -p and -o. If that fails, fail, suggesting that the user get versions that can (such as Flex and Bison/Berkeley YACC). If that doesn't fail, use those options; don't use runlex.sh.
Diffstat (limited to 'scanner.l')
-rw-r--r--scanner.l9
1 files changed, 7 insertions, 2 deletions
diff --git a/scanner.l b/scanner.l
index d149726b..6b46fbe3 100644
--- a/scanner.l
+++ b/scanner.l
@@ -1,10 +1,15 @@
-%top{
+%top {
/* Must come first for _LARGE_FILE_API on AIX. */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
}
+/*
+ * We don't read from the terminal.
+ */
+%option never-interactive
+
%{
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -87,7 +92,7 @@
#endif /*INET6*/
#include <pcap/namedb.h>
-#include "tokdefs.h"
+#include "grammar.h"
#ifdef HAVE_OS_PROTO_H
#include "os-proto.h"