* BUGS: Document buggy behavior of Solaris /usr/ccs/bin/lex. In
authorErez Zadok <ezk@cs.sunysb.edu>
Mon, 14 Jul 2003 02:15:04 +0000 (02:15 +0000)
committerErez Zadok <ezk@cs.sunysb.edu>
Mon, 14 Jul 2003 02:15:04 +0000 (02:15 +0000)
short, use flex.

* fsinfo/fsi_lex.l, amd/conf_tok.l: allocate more output slots so
lex scanners don't run out of mem.

BUGS
ChangeLog
amd/conf_tok.l
fsinfo/fsi_lex.l

diff --git a/BUGS b/BUGS
index d5053dcb2ebb646a1c6816b8416ea53ea7b71ae2..71360f595326f430171b9bf6ce811e2da307fe85 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -210,5 +210,11 @@ default).  Nonetheless, if a TCP connection breaks, under certain unclear
 circumstances the kernel might "forget" about that flag and start using
 unprivileged ports, causing the same EPERM error above.
 
+(14) Solaris
+
+The line "%option" in *.l files may cause Solaris /usr/ccs/bin/lex to abort
+with the error "missing translation value."  This is a bug in Solaris lex.
+Use GNU Flex instead.   You can download ready-made flex binaries from
+www.sunfreeware.com.
 
 Erez & Ion
index 675d60d9a9d0402ddfafdd659ac30dac250aa79e..8af118c5f28e0f5573b85582c93446f5859aa837 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2003-07-13  Erez Zadok  <ezk@filer.fsl.cs.sunysb.edu>
+
+       * BUGS: Document buggy behavior of Solaris /usr/ccs/bin/lex.  In
+       short, use flex.
+
+2003-07-13  Erez Zadok  <ezk@a-hpux11.fsl.cs.sunysb.edu>
+
+       * fsinfo/fsi_lex.l, amd/conf_tok.l: allocate more output slots so
+       lex scanners don't run out of mem.
+
 2003-07-13  Ion Badulescu  <lionut@gonzales.badula.org>
 
        * amd/amfs_generic.c (amfs_lookup_mntfs): ditto as below for the
index 8643f6b4ca471242770136c099a4bb20c2f142a2..89ae9acf3e49fa32cd311cfd5e5ab986e35a38f9 100644 (file)
@@ -38,7 +38,7 @@
  * SUCH DAMAGE.
  *
  *
- * $Id: conf_tok.l,v 1.9 2003/07/13 19:11:19 ezk Exp $
+ * $Id: conf_tok.l,v 1.10 2003/07/14 02:15:05 ezk Exp $
  *
  */
 
 # ifndef ECHO
 #  define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
 # endif /* not ECHO */
-int ayylineno = 0;
 #endif /* FLEX_SCANNER */
 
+int ayylineno = 0;
+
 int yylex(void);
 /*
  * some systems such as DU-4.x have a different GNU flex in /usr/bin
@@ -104,9 +105,13 @@ int yywrap(void);
 
 %}
 
+/* This option causes Solaris lex to fail.  See BUGS file */
 /* no need to use yyunput() */
 %option nounput
 
+/* allocate more output slots so lex scanners don't run out of mem */
+%o 1024
+
 DIGIT          [0-9]
 ALPHA          [A-Za-z]
 ALPHANUM       [A-Za-z0-9]
index 05fa270a2c443781526a9f8d04ff4dbedb8ea5ba..935d20e4f0d0a82a0039c2589e51b3955fb387bb 100644 (file)
@@ -38,7 +38,7 @@
  * SUCH DAMAGE.
  *
  *
- * $Id: fsi_lex.l,v 1.10 2003/07/13 19:11:19 ezk Exp $
+ * $Id: fsi_lex.l,v 1.11 2003/07/14 02:15:06 ezk Exp $
  *
  */
 
@@ -47,8 +47,9 @@
  * TODO: Needs rewriting.
  */
 
-#ifdef FLEX_SCANNER
 static int ayylineno;
+
+#ifdef FLEX_SCANNER
 # define INIT_STATE {                          \
                switch ((yy_start - 1) / 2) {   \
                case 0:                         \
@@ -158,9 +159,13 @@ struct r {
 
 %}
 
+/* This option causes Solaris lex to fail.  See BUGS file */
 /* no need to use yyunput() */
 %option nounput
 
+/* allocate more output slots so lex scanners don't run out of mem */
+%o 1024
+
 %start F Q
 
 %%