Upgraded to flex 2.4.7
This commit is contained in:
parent
02ee725315
commit
f08cab4100
|
@ -1 +1,2 @@
|
|||
Flex 2.4.6, available from ftp.ee.lbl.gov or prep.ai.mit.edu
|
||||
A complete flex-2.4.7 distribution is available from ftp.ee.lbl.gov
|
||||
or prep.ai.mit.edu
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* A lexical scanner generated by flex */
|
||||
|
||||
/* Scanner skeleton version:
|
||||
* $Header: /cvsroot/src/usr.bin/lex/Attic/flex.skl,v 1.5 1994/01/06 23:58:24 jtc Exp $
|
||||
* $Header: /cvsroot/src/usr.bin/lex/Attic/flex.skl,v 1.6 1994/08/19 16:22:13 jtc Exp $
|
||||
*/
|
||||
|
||||
#define FLEX_SCANNER
|
||||
|
@ -177,16 +177,20 @@ struct yy_buffer_state
|
|||
*/
|
||||
int yy_fill_buffer;
|
||||
|
||||
/* Whether we've seen an EOF on this buffer. */
|
||||
int yy_eof_status;
|
||||
#define EOF_NOT_SEEN 0
|
||||
/* "Pending" happens when the EOF has been seen but there's still
|
||||
* some text to process. Note that when we actually see the EOF,
|
||||
* we switch the status back to "not seen" (via yyrestart()), so
|
||||
* that the user can continue scanning by just pointing yyin at
|
||||
* a new input file.
|
||||
int yy_buffer_status;
|
||||
#define YY_BUFFER_NEW 0
|
||||
#define YY_BUFFER_NORMAL 1
|
||||
/* When an EOF's been seen but there's still some text to process
|
||||
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
|
||||
* shouldn't try reading from the input source any more. We might
|
||||
* still have a bunch of tokens to match, though, because of
|
||||
* possible backing-up.
|
||||
*
|
||||
* When we actually see the EOF, we change the status to "new"
|
||||
* (via yyrestart()), so that the user can continue scanning by
|
||||
* just pointing yyin at a new input file.
|
||||
*/
|
||||
#define EOF_PENDING 1
|
||||
#define YY_BUFFER_EOF_PENDING 2
|
||||
};
|
||||
|
||||
%- Standard (non-C++) definition
|
||||
|
@ -235,18 +239,18 @@ static void yy_pop_state YY_PROTO(( void ));
|
|||
static int yy_top_state YY_PROTO(( void ));
|
||||
%*
|
||||
|
||||
#ifndef yytext_ptr
|
||||
static void yy_flex_strcpy YY_PROTO(( char *, const char * ));
|
||||
#endif
|
||||
|
||||
static void *yy_flex_alloc YY_PROTO(( unsigned int ));
|
||||
static void *yy_flex_realloc YY_PROTO(( void *ptr, unsigned int ));
|
||||
static void *yy_flex_realloc YY_PROTO(( void *, unsigned int ));
|
||||
static void yy_flex_free YY_PROTO(( void * ));
|
||||
|
||||
#define yy_new_buffer yy_create_buffer
|
||||
|
||||
%% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here
|
||||
|
||||
#ifndef yytext_ptr
|
||||
static void yy_flex_strncpy YY_PROTO(( char *, const char *, int ));
|
||||
#endif
|
||||
|
||||
%- Standard (non-C++) definition
|
||||
#ifdef __cplusplus
|
||||
static int yyinput YY_PROTO(( void ));
|
||||
|
@ -449,18 +453,20 @@ do_action: /* This label is used only to access EOF actions. */
|
|||
/* Undo the effects of YY_DO_BEFORE_ACTION. */
|
||||
*yy_cp = yy_hold_char;
|
||||
|
||||
if ( yy_current_buffer->yy_input_file != yyin )
|
||||
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
|
||||
{
|
||||
/* This can happen if we scan a file, yywrap() returns
|
||||
* 1, and then later the user points yyin at a new
|
||||
* file to resume scanning. We have to assure
|
||||
/* We're scanning a new file or input source. It's
|
||||
* possible that this happened because the user
|
||||
* just pointed yyin at a new source and called
|
||||
* yylex(). If so, then we have to assure
|
||||
* consistency between yy_current_buffer and our
|
||||
* globals. Here is the right place to do so, because
|
||||
* this is the first action (other than possibly a
|
||||
* back-up) that will match for the new input file.
|
||||
* back-up) that will match for the new input source.
|
||||
*/
|
||||
yy_current_buffer->yy_input_file = yyin;
|
||||
yy_n_chars = yy_current_buffer->yy_n_chars;
|
||||
yy_current_buffer->yy_input_file = yyin;
|
||||
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
|
||||
}
|
||||
|
||||
/* Note that here we test for yy_c_buf_p "<=" to the position
|
||||
|
@ -654,7 +660,7 @@ int yyFlexLexer::yy_get_next_buffer()
|
|||
for ( i = 0; i < number_to_move; ++i )
|
||||
*(dest++) = *(source++);
|
||||
|
||||
if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )
|
||||
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
|
||||
/* don't do the read, it's not guaranteed to return an EOF,
|
||||
* just force an EOF
|
||||
*/
|
||||
|
@ -712,7 +718,8 @@ int yyFlexLexer::yy_get_next_buffer()
|
|||
else
|
||||
{
|
||||
ret_val = EOB_ACT_LAST_MATCH;
|
||||
yy_current_buffer->yy_eof_status = EOF_PENDING;
|
||||
yy_current_buffer->yy_buffer_status =
|
||||
YY_BUFFER_EOF_PENDING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -896,7 +903,7 @@ int yyFlexLexer::yyinput()
|
|||
}
|
||||
}
|
||||
|
||||
c = *yy_c_buf_p;
|
||||
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
|
||||
*yy_c_buf_p = '\0'; /* preserve yytext */
|
||||
yy_hold_char = *++yy_c_buf_p;
|
||||
|
||||
|
@ -1066,7 +1073,7 @@ void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file )
|
|||
|
||||
b->yy_fill_buffer = 1;
|
||||
|
||||
b->yy_eof_status = EOF_NOT_SEEN;
|
||||
b->yy_buffer_status = YY_BUFFER_NEW;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1171,15 +1178,17 @@ void yyFlexLexer::LexerError( const char msg[] )
|
|||
|
||||
#ifndef yytext_ptr
|
||||
#ifdef YY_USE_PROTOS
|
||||
static void yy_flex_strcpy( char *s1, const char *s2 )
|
||||
static void yy_flex_strncpy( char *s1, const char *s2, int n )
|
||||
#else
|
||||
static void yy_flex_strcpy( s1, s2 )
|
||||
static void yy_flex_strncpy( s1, s2, n )
|
||||
char *s1;
|
||||
const char *s2;
|
||||
int n;
|
||||
#endif
|
||||
{
|
||||
while ( (*(s1++) = *(s2++)) )
|
||||
;
|
||||
register int i;
|
||||
for ( i = 0; i < n; ++i )
|
||||
s1[i] = s2[i];
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
/* $Header: /cvsroot/src/usr.bin/lex/Attic/gen.c,v 1.8 1994/01/06 23:58:33 jtc Exp $ */
|
||||
/* $Header: /cvsroot/src/usr.bin/lex/Attic/gen.c,v 1.9 1994/08/19 16:22:15 jtc Exp $ */
|
||||
|
||||
#include "flexdef.h"
|
||||
|
||||
|
@ -1055,7 +1055,8 @@ void make_tables()
|
|||
indent_puts(
|
||||
"YY_FATAL_ERROR( \"token too large, exceeds YYLMAX\" ); \\" );
|
||||
indent_down();
|
||||
indent_puts( "yy_flex_strcpy( yytext, yytext_ptr ); \\" );
|
||||
indent_puts(
|
||||
"yy_flex_strncpy( yytext, yytext_ptr, yyleng + 1 ); \\" );
|
||||
}
|
||||
|
||||
set_indent( 0 );
|
||||
|
@ -1394,7 +1395,7 @@ void make_tables()
|
|||
/* Generate code for handling NUL's, if needed. */
|
||||
|
||||
/* First, deal with backing up and setting up yy_cp if the scanner
|
||||
* finds that it should JAM on the NUL>
|
||||
* finds that it should JAM on the NUL.
|
||||
*/
|
||||
skelout();
|
||||
set_indent( 7 );
|
||||
|
@ -1413,6 +1414,13 @@ void make_tables()
|
|||
indent_puts(
|
||||
"yy_current_state = yy_last_accepting_state;" );
|
||||
}
|
||||
|
||||
else
|
||||
/* Still need to initialize yy_cp, though
|
||||
* yy_current_state was set up by
|
||||
* yy_get_previous_state().
|
||||
*/
|
||||
indent_puts( "yy_cp = yy_c_buf_p;" );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* A lexical scanner generated by flex */
|
||||
|
||||
/* Scanner skeleton version:
|
||||
* $Header: /cvsroot/src/usr.bin/lex/Attic/initscan.c,v 1.8 1994/01/06 23:58:40 jtc Exp $
|
||||
* $Header: /cvsroot/src/usr.bin/lex/Attic/initscan.c,v 1.9 1994/08/19 16:22:18 jtc Exp $
|
||||
*/
|
||||
|
||||
#define FLEX_SCANNER
|
||||
|
@ -166,16 +166,20 @@ struct yy_buffer_state
|
|||
*/
|
||||
int yy_fill_buffer;
|
||||
|
||||
/* Whether we've seen an EOF on this buffer. */
|
||||
int yy_eof_status;
|
||||
#define EOF_NOT_SEEN 0
|
||||
/* "Pending" happens when the EOF has been seen but there's still
|
||||
* some text to process. Note that when we actually see the EOF,
|
||||
* we switch the status back to "not seen" (via yyrestart()), so
|
||||
* that the user can continue scanning by just pointing yyin at
|
||||
* a new input file.
|
||||
int yy_buffer_status;
|
||||
#define YY_BUFFER_NEW 0
|
||||
#define YY_BUFFER_NORMAL 1
|
||||
/* When an EOF's been seen but there's still some text to process
|
||||
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
|
||||
* shouldn't try reading from the input source any more. We might
|
||||
* still have a bunch of tokens to match, though, because of
|
||||
* possible backing-up.
|
||||
*
|
||||
* When we actually see the EOF, we change the status to "new"
|
||||
* (via yyrestart()), so that the user can continue scanning by
|
||||
* just pointing yyin at a new input file.
|
||||
*/
|
||||
#define EOF_PENDING 1
|
||||
#define YY_BUFFER_EOF_PENDING 2
|
||||
};
|
||||
|
||||
static YY_BUFFER_STATE yy_current_buffer = 0;
|
||||
|
@ -220,12 +224,8 @@ static void yy_push_state YY_PROTO(( int new_state ));
|
|||
static void yy_pop_state YY_PROTO(( void ));
|
||||
static int yy_top_state YY_PROTO(( void ));
|
||||
|
||||
#ifndef yytext_ptr
|
||||
static void yy_flex_strcpy YY_PROTO(( char *, const char * ));
|
||||
#endif
|
||||
|
||||
static void *yy_flex_alloc YY_PROTO(( unsigned int ));
|
||||
static void *yy_flex_realloc YY_PROTO(( void *ptr, unsigned int ));
|
||||
static void *yy_flex_realloc YY_PROTO(( void *, unsigned int ));
|
||||
static void yy_flex_free YY_PROTO(( void * ));
|
||||
|
||||
#define yy_new_buffer yy_create_buffer
|
||||
|
@ -257,6 +257,10 @@ FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
|
|||
extern char *yytext;
|
||||
#define yytext_ptr yytext
|
||||
|
||||
#ifndef yytext_ptr
|
||||
static void yy_flex_strncpy YY_PROTO(( char *, const char *, int ));
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
static int yyinput YY_PROTO(( void ));
|
||||
#else
|
||||
|
@ -890,7 +894,7 @@ char *yytext;
|
|||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
/* $Header: /cvsroot/src/usr.bin/lex/Attic/initscan.c,v 1.8 1994/01/06 23:58:40 jtc Exp $ */
|
||||
/* $Header: /cvsroot/src/usr.bin/lex/Attic/initscan.c,v 1.9 1994/08/19 16:22:18 jtc Exp $ */
|
||||
|
||||
#include "flexdef.h"
|
||||
#include "parse.h"
|
||||
|
@ -1963,18 +1967,20 @@ case YY_STATE_EOF(CODEBLOCK_2):
|
|||
/* Undo the effects of YY_DO_BEFORE_ACTION. */
|
||||
*yy_cp = yy_hold_char;
|
||||
|
||||
if ( yy_current_buffer->yy_input_file != yyin )
|
||||
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
|
||||
{
|
||||
/* This can happen if we scan a file, yywrap() returns
|
||||
* 1, and then later the user points yyin at a new
|
||||
* file to resume scanning. We have to assure
|
||||
/* We're scanning a new file or input source. It's
|
||||
* possible that this happened because the user
|
||||
* just pointed yyin at a new source and called
|
||||
* yylex(). If so, then we have to assure
|
||||
* consistency between yy_current_buffer and our
|
||||
* globals. Here is the right place to do so, because
|
||||
* this is the first action (other than possibly a
|
||||
* back-up) that will match for the new input file.
|
||||
* back-up) that will match for the new input source.
|
||||
*/
|
||||
yy_current_buffer->yy_input_file = yyin;
|
||||
yy_n_chars = yy_current_buffer->yy_n_chars;
|
||||
yy_current_buffer->yy_input_file = yyin;
|
||||
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
|
||||
}
|
||||
|
||||
/* Note that here we test for yy_c_buf_p "<=" to the position
|
||||
|
@ -2015,6 +2021,7 @@ case YY_STATE_EOF(CODEBLOCK_2):
|
|||
|
||||
else
|
||||
{
|
||||
yy_cp = yy_c_buf_p;
|
||||
goto yy_find_action;
|
||||
}
|
||||
}
|
||||
|
@ -2127,7 +2134,7 @@ static int yy_get_next_buffer()
|
|||
for ( i = 0; i < number_to_move; ++i )
|
||||
*(dest++) = *(source++);
|
||||
|
||||
if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )
|
||||
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
|
||||
/* don't do the read, it's not guaranteed to return an EOF,
|
||||
* just force an EOF
|
||||
*/
|
||||
|
@ -2185,7 +2192,8 @@ static int yy_get_next_buffer()
|
|||
else
|
||||
{
|
||||
ret_val = EOB_ACT_LAST_MATCH;
|
||||
yy_current_buffer->yy_eof_status = EOF_PENDING;
|
||||
yy_current_buffer->yy_buffer_status =
|
||||
YY_BUFFER_EOF_PENDING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2383,7 +2391,7 @@ static int input()
|
|||
}
|
||||
}
|
||||
|
||||
c = *yy_c_buf_p;
|
||||
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
|
||||
*yy_c_buf_p = '\0'; /* preserve yytext */
|
||||
yy_hold_char = *++yy_c_buf_p;
|
||||
|
||||
|
@ -2525,7 +2533,7 @@ FILE *file;
|
|||
|
||||
b->yy_fill_buffer = 1;
|
||||
|
||||
b->yy_eof_status = EOF_NOT_SEEN;
|
||||
b->yy_buffer_status = YY_BUFFER_NEW;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2609,15 +2617,17 @@ char msg[];
|
|||
|
||||
#ifndef yytext_ptr
|
||||
#ifdef YY_USE_PROTOS
|
||||
static void yy_flex_strcpy( char *s1, const char *s2 )
|
||||
static void yy_flex_strncpy( char *s1, const char *s2, int n )
|
||||
#else
|
||||
static void yy_flex_strcpy( s1, s2 )
|
||||
static void yy_flex_strncpy( s1, s2, n )
|
||||
char *s1;
|
||||
const char *s2;
|
||||
int n;
|
||||
#endif
|
||||
{
|
||||
while ( (*(s1++) = *(s2++)) )
|
||||
;
|
||||
register int i;
|
||||
for ( i = 0; i < n; ++i )
|
||||
s1[i] = s2[i];
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
/* $Header: /cvsroot/src/usr.bin/lex/Attic/nfa.c,v 1.6 1993/12/09 19:06:26 jtc Exp $ */
|
||||
/* $Header: /cvsroot/src/usr.bin/lex/Attic/nfa.c,v 1.7 1994/08/19 16:22:21 jtc Exp $ */
|
||||
|
||||
#include "flexdef.h"
|
||||
|
||||
|
@ -264,9 +264,11 @@ int mach, variable_trail_rule, headcnt, trailcnt;
|
|||
|
||||
/* Okay, in the action code at this point yytext and yyleng have
|
||||
* their proper final values for this rule, so here's the point
|
||||
* to do any user action.
|
||||
* to do any user action. But don't do it for continued actions,
|
||||
* as that'll result in multiple YY_USER_ACTION's.
|
||||
*/
|
||||
add_action( "YY_USER_ACTION\n" );
|
||||
if ( ! continued_action )
|
||||
add_action( "YY_USER_ACTION\n" );
|
||||
|
||||
line_directive_out( (FILE *) 0 );
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
#define FLEX_VERSION "2.4.6"
|
||||
#define FLEX_VERSION "2.4.7"
|
||||
|
|
Loading…
Reference in New Issue