summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-07-13 22:22:16 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-07-13 22:22:16 +0000
commit27c2321b81de20dfac8255492e25ca25b66c6c3b (patch)
tree041166275a399c2726a206cb11fc75b80c93f5cf /usr.bin
parent255511a5b9a50bb24fde91470b8db1d6a7cd05d2 (diff)
updated to flex 2.5.3
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/lex/FlexLexer.h6
-rw-r--r--usr.bin/lex/VERSION2
-rw-r--r--usr.bin/lex/ccl.c4
-rw-r--r--usr.bin/lex/dfa.c4
-rw-r--r--usr.bin/lex/ecs.c4
-rw-r--r--usr.bin/lex/flex.skl38
-rw-r--r--usr.bin/lex/flexdef.h4
-rw-r--r--usr.bin/lex/gen.c84
-rw-r--r--usr.bin/lex/initscan.c46
-rw-r--r--usr.bin/lex/libmain.c9
-rw-r--r--usr.bin/lex/libyywrap.c4
-rw-r--r--usr.bin/lex/main.c6
-rw-r--r--usr.bin/lex/misc.c4
-rw-r--r--usr.bin/lex/nfa.c4
-rw-r--r--usr.bin/lex/parse.y4
-rw-r--r--usr.bin/lex/scan.l4
-rw-r--r--usr.bin/lex/sym.c4
-rw-r--r--usr.bin/lex/tblcmp.c4
-rw-r--r--usr.bin/lex/version.h4
-rw-r--r--usr.bin/lex/yylex.c4
20 files changed, 173 insertions, 70 deletions
diff --git a/usr.bin/lex/FlexLexer.h b/usr.bin/lex/FlexLexer.h
index a47a45ab55c..d61c88d8c16 100644
--- a/usr.bin/lex/FlexLexer.h
+++ b/usr.bin/lex/FlexLexer.h
@@ -1,6 +1,6 @@
-/* $OpenBSD: FlexLexer.h,v 1.2 1996/06/26 05:35:27 deraadt Exp $ */
+/* $OpenBSD: FlexLexer.h,v 1.3 1996/07/13 22:21:55 millert Exp $ */
-// $Header: /cvs/OpenBSD/src/usr.bin/lex/FlexLexer.h,v 1.2 1996/06/26 05:35:27 deraadt Exp $
+// $Header: /cvs/OpenBSD/src/usr.bin/lex/FlexLexer.h,v 1.3 1996/07/13 22:21:55 millert Exp $
// FlexLexer.h -- define interfaces for lexical analyzer classes generated
// by flex
@@ -180,6 +180,8 @@ protected:
int yy_more_flag;
int yy_more_len;
+ int yy_more_offset;
+ int yy_prev_more_offset;
};
#endif
diff --git a/usr.bin/lex/VERSION b/usr.bin/lex/VERSION
index 47c1247322d..cb2a4d11101 100644
--- a/usr.bin/lex/VERSION
+++ b/usr.bin/lex/VERSION
@@ -1,2 +1,2 @@
-A complete flex-2.5.2 distribution is available from ftp.ee.lbl.gov
+A complete flex-2.5.3 distribution is available from ftp.ee.lbl.gov
or prep.ai.mit.edu
diff --git a/usr.bin/lex/ccl.c b/usr.bin/lex/ccl.c
index 222ee718c15..e4a41999f5e 100644
--- a/usr.bin/lex/ccl.c
+++ b/usr.bin/lex/ccl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ccl.c,v 1.2 1996/06/26 05:35:28 deraadt Exp $ */
+/* $OpenBSD: ccl.c,v 1.3 1996/07/13 22:21:56 millert Exp $ */
/* ccl - routines for character classes */
@@ -28,7 +28,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/ccl.c,v 1.2 1996/06/26 05:35:28 deraadt Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/ccl.c,v 1.3 1996/07/13 22:21:56 millert Exp $ */
#include "flexdef.h"
diff --git a/usr.bin/lex/dfa.c b/usr.bin/lex/dfa.c
index 898d20b6a63..629b52fe1dd 100644
--- a/usr.bin/lex/dfa.c
+++ b/usr.bin/lex/dfa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dfa.c,v 1.2 1996/06/26 05:35:29 deraadt Exp $ */
+/* $OpenBSD: dfa.c,v 1.3 1996/07/13 22:21:57 millert Exp $ */
/* dfa - DFA construction routines */
@@ -28,7 +28,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/dfa.c,v 1.2 1996/06/26 05:35:29 deraadt Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/dfa.c,v 1.3 1996/07/13 22:21:57 millert Exp $ */
#include "flexdef.h"
diff --git a/usr.bin/lex/ecs.c b/usr.bin/lex/ecs.c
index 53fe8e8acec..7b2f1022114 100644
--- a/usr.bin/lex/ecs.c
+++ b/usr.bin/lex/ecs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ecs.c,v 1.2 1996/06/26 05:35:30 deraadt Exp $ */
+/* $OpenBSD: ecs.c,v 1.3 1996/07/13 22:21:57 millert Exp $ */
/* ecs - equivalence class routines */
@@ -28,7 +28,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/ecs.c,v 1.2 1996/06/26 05:35:30 deraadt Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/ecs.c,v 1.3 1996/07/13 22:21:57 millert Exp $ */
#include "flexdef.h"
diff --git a/usr.bin/lex/flex.skl b/usr.bin/lex/flex.skl
index 527c70df21b..62b0fefae76 100644
--- a/usr.bin/lex/flex.skl
+++ b/usr.bin/lex/flex.skl
@@ -1,9 +1,9 @@
-/* $OpenBSD: flex.skl,v 1.2 1996/06/26 05:35:32 deraadt Exp $ */
+/* $OpenBSD: flex.skl,v 1.3 1996/07/13 22:21:58 millert Exp $ */
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
- * $Header: /cvs/OpenBSD/src/usr.bin/lex/flex.skl,v 1.2 1996/06/26 05:35:32 deraadt Exp $
+ * $Header: /cvs/OpenBSD/src/usr.bin/lex/flex.skl,v 1.3 1996/07/13 22:21:58 millert Exp $
*/
#define FLEX_SCANNER
@@ -135,6 +135,7 @@ extern FILE *yyin, *yyout;
{ \
/* Undo effects of setting up yytext. */ \
*yy_cp = yy_hold_char; \
+ YY_RESTORE_YY_MORE_OFFSET \
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
@@ -321,6 +322,10 @@ static void yyunput YY_PROTO(( int c, char *buf_ptr ));
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
#ifndef YY_NO_INPUT
%- Standard (non-C++) definition
#ifdef __cplusplus
@@ -520,6 +525,7 @@ do_action: /* This label is used only to access EOF actions. */
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char;
+ YY_RESTORE_YY_MORE_OFFSET
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
@@ -657,6 +663,7 @@ yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout )
yy_looking_for_trail_begin = 0;
yy_more_flag = 0;
yy_more_len = 0;
+ yy_more_offset = yy_prev_more_offset = 0;
yy_start_stack_ptr = yy_start_stack_depth = 0;
yy_start_stack = 0;
@@ -751,7 +758,7 @@ int yyFlexLexer::yy_get_next_buffer()
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
- /* We matched a singled characater, the EOB, so
+ /* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
@@ -987,7 +994,7 @@ int yyFlexLexer::yyinput()
else
{ /* need more input */
- yytext_ptr = yy_c_buf_p;
+ int offset = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
@@ -996,8 +1003,7 @@ int yyFlexLexer::yyinput()
{
if ( yywrap() )
{
- yy_c_buf_p =
- yytext_ptr + YY_MORE_ADJ;
+ yy_c_buf_p = yytext_ptr + offset;
return EOF;
}
@@ -1011,7 +1017,7 @@ int yyFlexLexer::yyinput()
}
case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+ yy_c_buf_p = yytext_ptr + offset;
break;
case EOB_ACT_LAST_MATCH:
@@ -1437,7 +1443,7 @@ void yyFlexLexer::LexerError( yyconst char msg[] )
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
- yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
+ yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
@@ -1463,6 +1469,22 @@ int n;
}
#endif
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+ {
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+ }
+#endif
+
#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
diff --git a/usr.bin/lex/flexdef.h b/usr.bin/lex/flexdef.h
index cfc5d584e48..de675407fee 100644
--- a/usr.bin/lex/flexdef.h
+++ b/usr.bin/lex/flexdef.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: flexdef.h,v 1.2 1996/06/26 05:35:33 deraadt Exp $ */
+/* $OpenBSD: flexdef.h,v 1.3 1996/07/13 22:21:59 millert Exp $ */
/* flexdef - definitions file for flex */
@@ -28,7 +28,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-/* @(#) $Header: /cvs/OpenBSD/src/usr.bin/lex/flexdef.h,v 1.2 1996/06/26 05:35:33 deraadt Exp $ (LBL) */
+/* @(#) $Header: /cvs/OpenBSD/src/usr.bin/lex/flexdef.h,v 1.3 1996/07/13 22:21:59 millert Exp $ (LBL) */
#include <stdio.h>
#include <ctype.h>
diff --git a/usr.bin/lex/gen.c b/usr.bin/lex/gen.c
index 9d4aa8870c4..6bf99d8de75 100644
--- a/usr.bin/lex/gen.c
+++ b/usr.bin/lex/gen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gen.c,v 1.2 1996/06/26 05:35:34 deraadt Exp $ */
+/* $OpenBSD: gen.c,v 1.3 1996/07/13 22:22:01 millert Exp $ */
/* gen - actual generation (writing) of flex scanners */
@@ -28,7 +28,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/gen.c,v 1.2 1996/06/26 05:35:34 deraadt Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/gen.c,v 1.3 1996/07/13 22:22:01 millert Exp $ */
#include "flexdef.h"
@@ -715,12 +715,20 @@ void gen_NUL_trans()
(void) sprintf( NUL_ec_str, "%d", NUL_ec );
gen_next_compressed_state( NUL_ec_str );
- if ( reject )
- indent_puts( "*yy_state_ptr++ = yy_current_state;" );
-
do_indent();
-
out_dec( "yy_is_jam = (yy_current_state == %d);\n", jamstate );
+
+ if ( reject )
+ {
+ /* Only stack this state if it's a transition we
+ * actually make. If we stack it on a jam, then
+ * the state stack and yy_c_buf_p get out of sync.
+ */
+ indent_puts( "if ( ! yy_is_jam )" );
+ indent_up();
+ indent_puts( "*yy_state_ptr++ = yy_current_state;" );
+ indent_down();
+ }
}
/* If we've entered an accepting state, back up; note that
@@ -1060,7 +1068,7 @@ void make_tables()
*/
set_indent( 1 );
- if ( yymore_used )
+ if ( yymore_used && ! yytext_is_array )
{
indent_puts( "yytext_ptr -= yy_more_len; \\" );
indent_puts( "yyleng = (int) (yy_cp - yytext_ptr); \\" );
@@ -1073,13 +1081,31 @@ void make_tables()
skelout();
if ( yytext_is_array )
{
- indent_puts( "if ( yyleng >= YYLMAX ) \\" );
+ if ( yymore_used )
+ indent_puts(
+ "if ( yyleng + yy_more_offset >= YYLMAX ) \\" );
+ else
+ indent_puts( "if ( yyleng >= YYLMAX ) \\" );
+
indent_up();
indent_puts(
"YY_FATAL_ERROR( \"token too large, exceeds YYLMAX\" ); \\" );
indent_down();
- indent_puts(
+
+ if ( yymore_used )
+ {
+ indent_puts(
+"yy_flex_strncpy( &yytext[yy_more_offset], yytext_ptr, yyleng + 1 ); \\" );
+ indent_puts( "yyleng += yy_more_offset; \\" );
+ indent_puts(
+ "yy_prev_more_offset = yy_more_offset; \\" );
+ indent_puts( "yy_more_offset = 0; \\" );
+ }
+ else
+ {
+ indent_puts(
"yy_flex_strncpy( yytext, yytext_ptr, yyleng + 1 ); \\" );
+ }
}
set_indent( 0 );
@@ -1238,18 +1264,46 @@ void make_tables()
{
if ( ! C_plus_plus )
{
- indent_puts( "static int yy_more_flag = 0;" );
- indent_puts( "static int yy_more_len = 0;" );
+ if ( yytext_is_array )
+ {
+ indent_puts( "static int yy_more_offset = 0;" );
+ indent_puts(
+ "static int yy_prev_more_offset = 0;" );
+ }
+ else
+ {
+ indent_puts( "static int yy_more_flag = 0;" );
+ indent_puts( "static int yy_more_len = 0;" );
+ }
}
- indent_puts( "#define yymore() (yy_more_flag = 1)" );
- indent_puts( "#define YY_MORE_ADJ yy_more_len" );
+ if ( yytext_is_array )
+ {
+ indent_puts(
+ "#define yymore() (yy_more_offset = yy_flex_strlen( yytext ))" );
+ indent_puts( "#define YY_NEED_STRLEN" );
+ indent_puts( "#define YY_MORE_ADJ 0" );
+ indent_puts( "#define YY_RESTORE_YY_MORE_OFFSET \\" );
+ indent_up();
+ indent_puts( "{ \\" );
+ indent_puts( "yy_more_offset = yy_prev_more_offset; \\" );
+ indent_puts( "yyleng -= yy_more_offset; \\" );
+ indent_puts( "}" );
+ indent_down();
+ }
+ else
+ {
+ indent_puts( "#define yymore() (yy_more_flag = 1)" );
+ indent_puts( "#define YY_MORE_ADJ yy_more_len" );
+ indent_puts( "#define YY_RESTORE_YY_MORE_OFFSET" );
+ }
}
else
{
indent_puts( "#define yymore() yymore_used_but_not_detected" );
indent_puts( "#define YY_MORE_ADJ 0" );
+ indent_puts( "#define YY_RESTORE_YY_MORE_OFFSET" );
}
if ( ! C_plus_plus )
@@ -1333,13 +1387,13 @@ void make_tables()
set_indent( 2 );
- if ( yymore_used )
+ if ( yymore_used && ! yytext_is_array )
{
indent_puts( "yy_more_len = 0;" );
indent_puts( "if ( yy_more_flag )" );
indent_up();
indent_puts( "{" );
- indent_puts( "yy_more_len = yyleng;" );
+ indent_puts( "yy_more_len = yy_c_buf_p - yytext_ptr;" );
indent_puts( "yy_more_flag = 0;" );
indent_puts( "}" );
indent_down();
diff --git a/usr.bin/lex/initscan.c b/usr.bin/lex/initscan.c
index 80ed3f1684c..b0f9140d98c 100644
--- a/usr.bin/lex/initscan.c
+++ b/usr.bin/lex/initscan.c
@@ -1,10 +1,10 @@
-/* $OpenBSD: initscan.c,v 1.2 1996/06/26 05:35:36 deraadt Exp $ */
+/* $OpenBSD: initscan.c,v 1.3 1996/07/13 22:22:03 millert Exp $ */
#line 2 "scan.c"
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
- * $Header: /cvs/OpenBSD/src/usr.bin/lex/initscan.c,v 1.2 1996/06/26 05:35:36 deraadt Exp $
+ * $Header: /cvs/OpenBSD/src/usr.bin/lex/initscan.c,v 1.3 1996/07/13 22:22:03 millert Exp $
*/
#define FLEX_SCANNER
@@ -129,6 +129,7 @@ extern FILE *yyin, *yyout;
{ \
/* Undo effects of setting up yytext. */ \
*yy_cp = yy_hold_char; \
+ YY_RESTORE_YY_MORE_OFFSET \
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
@@ -1239,6 +1240,7 @@ static char *yy_last_accepting_cpos;
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "scan.l"
#define INITIAL 0
@@ -1270,7 +1272,7 @@ char *yytext;
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/initscan.c,v 1.2 1996/06/26 05:35:36 deraadt Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/initscan.c,v 1.3 1996/07/13 22:22:03 millert Exp $ */
#include "flexdef.h"
#include "parse.h"
@@ -1329,7 +1331,7 @@ char *yytext;
#define OPTION 17
#define LINEDIR 18
-#line 1331 "scan.c"
+#line 1333 "scan.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -1351,6 +1353,10 @@ static void yyunput YY_PROTO(( int c, char *buf_ptr ));
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
@@ -1490,7 +1496,7 @@ YY_DECL
Char nmdef[MAXLINE], myesc();
-#line 1492 "scan.c"
+#line 1498 "scan.c"
if ( yy_init )
{
@@ -2728,7 +2734,7 @@ YY_RULE_SETUP
#line 650 "scan.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
-#line 2730 "scan.c"
+#line 2736 "scan.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(SECT2):
case YY_STATE_EOF(CODEBLOCK):
@@ -2752,6 +2758,7 @@ case YY_STATE_EOF(LINEDIR):
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char;
+ YY_RESTORE_YY_MORE_OFFSET
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
@@ -2897,7 +2904,7 @@ static int yy_get_next_buffer()
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
- /* We matched a singled characater, the EOB, so
+ /* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
@@ -3142,7 +3149,7 @@ static int input()
else
{ /* need more input */
- yytext_ptr = yy_c_buf_p;
+ int offset = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
@@ -3151,8 +3158,7 @@ static int input()
{
if ( yywrap() )
{
- yy_c_buf_p =
- yytext_ptr + YY_MORE_ADJ;
+ yy_c_buf_p = yytext_ptr + offset;
return EOF;
}
@@ -3166,7 +3172,7 @@ static int input()
}
case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+ yy_c_buf_p = yytext_ptr + offset;
break;
case EOB_ACT_LAST_MATCH:
@@ -3531,7 +3537,7 @@ char msg[];
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
- yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
+ yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
@@ -3557,6 +3563,22 @@ int n;
}
#endif
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+ {
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+ }
+#endif
+
#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
diff --git a/usr.bin/lex/libmain.c b/usr.bin/lex/libmain.c
index 8d58cb686a6..7e755a2e093 100644
--- a/usr.bin/lex/libmain.c
+++ b/usr.bin/lex/libmain.c
@@ -1,8 +1,8 @@
-/* $OpenBSD: libmain.c,v 1.2 1996/06/26 05:35:36 deraadt Exp $ */
+/* $OpenBSD: libmain.c,v 1.3 1996/07/13 22:22:05 millert Exp $ */
/* libmain - flex run-time support library "main" function */
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/libmain.c,v 1.2 1996/06/26 05:35:36 deraadt Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/libmain.c,v 1.3 1996/07/13 22:22:05 millert Exp $ */
#include <sys/cdefs.h>
@@ -15,5 +15,8 @@ int argc;
char *argv[];
char *envp[];
{
- return yylex();
+ while ( yylex() != 0 )
+ ;
+
+ return 0;
}
diff --git a/usr.bin/lex/libyywrap.c b/usr.bin/lex/libyywrap.c
index c8bfed85d95..db715f99859 100644
--- a/usr.bin/lex/libyywrap.c
+++ b/usr.bin/lex/libyywrap.c
@@ -1,8 +1,8 @@
-/* $OpenBSD: libyywrap.c,v 1.2 1996/06/26 05:35:37 deraadt Exp $ */
+/* $OpenBSD: libyywrap.c,v 1.3 1996/07/13 22:22:06 millert Exp $ */
/* libyywrap - flex run-time support library "yywrap" function */
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/libyywrap.c,v 1.2 1996/06/26 05:35:37 deraadt Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/libyywrap.c,v 1.3 1996/07/13 22:22:06 millert Exp $ */
#include <sys/cdefs.h>
diff --git a/usr.bin/lex/main.c b/usr.bin/lex/main.c
index fc242a4af77..bc72734ca28 100644
--- a/usr.bin/lex/main.c
+++ b/usr.bin/lex/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.2 1996/06/26 05:35:38 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.3 1996/07/13 22:22:08 millert Exp $ */
/* flex - tool to generate fast lexical analyzers */
@@ -34,7 +34,7 @@ char copyright[] =
All rights reserved.\n";
#endif /* not lint */
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/main.c,v 1.2 1996/06/26 05:35:38 deraadt Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/main.c,v 1.3 1996/07/13 22:22:08 millert Exp $ */
#include "flexdef.h"
@@ -587,7 +587,7 @@ int argc;
char **argv;
{
int i, sawcmpflag;
- char *arg, *mktemp();
+ char *arg;
printstats = syntaxerror = trace = spprdflt = caseins = false;
lex_compat = C_plus_plus = backing_up_report = ddebug = fulltbl = false;
diff --git a/usr.bin/lex/misc.c b/usr.bin/lex/misc.c
index 6ba0d0bf805..d5d5843cf73 100644
--- a/usr.bin/lex/misc.c
+++ b/usr.bin/lex/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.2 1996/06/26 05:35:38 deraadt Exp $ */
+/* $OpenBSD: misc.c,v 1.3 1996/07/13 22:22:09 millert Exp $ */
/* misc - miscellaneous flex routines */
@@ -28,7 +28,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/misc.c,v 1.2 1996/06/26 05:35:38 deraadt Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/misc.c,v 1.3 1996/07/13 22:22:09 millert Exp $ */
#include "flexdef.h"
diff --git a/usr.bin/lex/nfa.c b/usr.bin/lex/nfa.c
index 8e1c79383a3..67a47a59df8 100644
--- a/usr.bin/lex/nfa.c
+++ b/usr.bin/lex/nfa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfa.c,v 1.2 1996/06/26 05:35:40 deraadt Exp $ */
+/* $OpenBSD: nfa.c,v 1.3 1996/07/13 22:22:10 millert Exp $ */
/* nfa - NFA construction routines */
@@ -28,7 +28,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/nfa.c,v 1.2 1996/06/26 05:35:40 deraadt Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/nfa.c,v 1.3 1996/07/13 22:22:10 millert Exp $ */
#include "flexdef.h"
diff --git a/usr.bin/lex/parse.y b/usr.bin/lex/parse.y
index 3321b97830d..cdbb9dcd806 100644
--- a/usr.bin/lex/parse.y
+++ b/usr.bin/lex/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.2 1996/06/26 05:35:40 deraadt Exp $ */
+/* $OpenBSD: parse.y,v 1.3 1996/07/13 22:22:12 millert Exp $ */
/* parse.y - parser for flex input */
@@ -35,7 +35,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/parse.y,v 1.2 1996/06/26 05:35:40 deraadt Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/parse.y,v 1.3 1996/07/13 22:22:12 millert Exp $ */
/* Some versions of bison are broken in that they use alloca() but don't
diff --git a/usr.bin/lex/scan.l b/usr.bin/lex/scan.l
index e3bbd2fdbb3..6f1721b1a10 100644
--- a/usr.bin/lex/scan.l
+++ b/usr.bin/lex/scan.l
@@ -1,4 +1,4 @@
-/* $OpenBSD: scan.l,v 1.2 1996/06/26 05:35:42 deraadt Exp $ */
+/* $OpenBSD: scan.l,v 1.3 1996/07/13 22:22:13 millert Exp $ */
/* scan.l - scanner for flex input */
@@ -29,7 +29,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/scan.l,v 1.2 1996/06/26 05:35:42 deraadt Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/scan.l,v 1.3 1996/07/13 22:22:13 millert Exp $ */
#include "flexdef.h"
#include "parse.h"
diff --git a/usr.bin/lex/sym.c b/usr.bin/lex/sym.c
index 2cf7f1567ed..774395addb3 100644
--- a/usr.bin/lex/sym.c
+++ b/usr.bin/lex/sym.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sym.c,v 1.2 1996/06/26 05:35:42 deraadt Exp $ */
+/* $OpenBSD: sym.c,v 1.3 1996/07/13 22:22:13 millert Exp $ */
/* sym - symbol table routines */
@@ -28,7 +28,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/sym.c,v 1.2 1996/06/26 05:35:42 deraadt Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/sym.c,v 1.3 1996/07/13 22:22:13 millert Exp $ */
#include "flexdef.h"
diff --git a/usr.bin/lex/tblcmp.c b/usr.bin/lex/tblcmp.c
index 1a9e18dd3ec..76d0a23c342 100644
--- a/usr.bin/lex/tblcmp.c
+++ b/usr.bin/lex/tblcmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tblcmp.c,v 1.2 1996/06/26 05:35:43 deraadt Exp $ */
+/* $OpenBSD: tblcmp.c,v 1.3 1996/07/13 22:22:14 millert Exp $ */
/* tblcmp - table compression routines */
@@ -28,7 +28,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/tblcmp.c,v 1.2 1996/06/26 05:35:43 deraadt Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/tblcmp.c,v 1.3 1996/07/13 22:22:14 millert Exp $ */
#include "flexdef.h"
diff --git a/usr.bin/lex/version.h b/usr.bin/lex/version.h
index 89c2975e95a..b6a64e254e9 100644
--- a/usr.bin/lex/version.h
+++ b/usr.bin/lex/version.h
@@ -1,3 +1,3 @@
-/* $OpenBSD: version.h,v 1.2 1996/06/26 05:35:44 deraadt Exp $ */
+/* $OpenBSD: version.h,v 1.3 1996/07/13 22:22:14 millert Exp $ */
-#define FLEX_VERSION "2.5.2"
+#define FLEX_VERSION "2.5.3"
diff --git a/usr.bin/lex/yylex.c b/usr.bin/lex/yylex.c
index 1e6947e98c7..d9f554b9998 100644
--- a/usr.bin/lex/yylex.c
+++ b/usr.bin/lex/yylex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: yylex.c,v 1.2 1996/06/26 05:35:44 deraadt Exp $ */
+/* $OpenBSD: yylex.c,v 1.3 1996/07/13 22:22:15 millert Exp $ */
/* yylex - scanner front-end for flex */
@@ -28,7 +28,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/yylex.c,v 1.2 1996/06/26 05:35:44 deraadt Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/yylex.c,v 1.3 1996/07/13 22:22:15 millert Exp $ */
#include <ctype.h>
#include "flexdef.h"