changeset 10019:7ad32bf759c3

lex.cc: Use %top block to include config.h
author John W. Eaton <jwe@octave.org>
date Wed, 23 Dec 2009 20:58:06 -0600
parents fb8834c12035
children ffee051323f8
files src/ChangeLog src/lex.ll
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Dec 23 14:25:51 2009 +0100
+++ b/src/ChangeLog	Wed Dec 23 20:58:06 2009 -0600
@@ -1,3 +1,7 @@
+2009-12-23  John W. Eaton  <jwe@octave.org>
+
+	* lex.ll: Use %top block to include config.h.
+
 2009-12-16  Jaroslav Hajek  <highegg@gmail.com>
 
 	* DLD-FUNCTIONS/max.cc (do_cumminmax_body): Support also btyp_bool.
--- a/src/lex.ll	Wed Dec 23 14:25:51 2009 +0100
+++ b/src/lex.ll	Wed Dec 23 20:58:06 2009 -0600
@@ -24,6 +24,12 @@
 
 %option prefix = "octave_"
 
+%top {
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+}
+
 %s COMMAND_START
 %s MATRIX_START
 
@@ -31,9 +37,6 @@
 %x FUNCTION_FILE_BEGIN
 
 %{
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
 
 #include <cctype>
 #include <cstring>