"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/scan.c" between
flex-2.6.3.tar.gz and flex-2.6.4.tar.gz

About: Flex ("Fast Lexical Analyzer") is a tool for generating scanners/tokenizers.

scan.c  (flex-2.6.3):scan.c  (flex-2.6.4)
#line 1 "scan.c"
#line 2 "scan.c" #line 3 "scan.c"
#define YY_INT_ALIGNED short int #define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */ /* A lexical scanner generated by flex */
#define FLEX_SCANNER #define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6 #define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 2 #define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0 #if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA #define FLEX_BETA
#endif #endif
/* First, we deal with platform-specific or compiler-specific issues. */ /* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */ /* begin standard C headers. */
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
skipping to change at line 86 skipping to change at line 87
#ifndef UINT8_MAX #ifndef UINT8_MAX
#define UINT8_MAX (255U) #define UINT8_MAX (255U)
#endif #endif
#ifndef UINT16_MAX #ifndef UINT16_MAX
#define UINT16_MAX (65535U) #define UINT16_MAX (65535U)
#endif #endif
#ifndef UINT32_MAX #ifndef UINT32_MAX
#define UINT32_MAX (4294967295U) #define UINT32_MAX (4294967295U)
#endif #endif
#ifndef SIZE_MAX
#define SIZE_MAX (~(size_t)0)
#endif
#endif /* ! C99 */ #endif /* ! C99 */
#endif /* ! FLEXINT_H */ #endif /* ! FLEXINT_H */
/* begin standard C++ headers. */
/* TODO: this is always defined, so inline it */ /* TODO: this is always defined, so inline it */
#define yyconst const #define yyconst const
#if defined(__GNUC__) && __GNUC__ >= 3 #if defined(__GNUC__) && __GNUC__ >= 3
#define yynoreturn __attribute__((__noreturn__)) #define yynoreturn __attribute__((__noreturn__))
#else #else
#define yynoreturn #define yynoreturn
#endif #endif
/* Returned upon end-of-file. */ /* Returned upon end-of-file. */
skipping to change at line 121 skipping to change at line 128
#define BEGIN (yy_start) = 1 + 2 * #define BEGIN (yy_start) = 1 + 2 *
/* Translate the current start state into a value that can be later handed /* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex * to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility. * compatibility.
*/ */
#define YY_START (((yy_start) - 1) / 2) #define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START #define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */ /* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */ /* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart(yyin ) #define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0 #define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */ /* Size of default input buffer. */
#ifndef YY_BUF_SIZE #ifndef YY_BUF_SIZE
#ifdef __ia64__ #ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k. /* On IA-64, the buffer size is 16k, not 8k.
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
* Ditto for the __ia64__ case accordingly. * Ditto for the __ia64__ case accordingly.
*/ */
#define YY_BUF_SIZE 32768 #define YY_BUF_SIZE 32768
skipping to change at line 287 skipping to change at line 294
void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
void yy_delete_buffer ( YY_BUFFER_STATE b ); void yy_delete_buffer ( YY_BUFFER_STATE b );
void yy_flush_buffer ( YY_BUFFER_STATE b ); void yy_flush_buffer ( YY_BUFFER_STATE b );
void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
void yypop_buffer_state ( void ); void yypop_buffer_state ( void );
static void yyensure_buffer_stack ( void ); static void yyensure_buffer_stack ( void );
static void yy_load_buffer_state ( void ); static void yy_load_buffer_state ( void );
static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
void *yyalloc ( yy_size_t ); void *yyalloc ( yy_size_t );
void *yyrealloc ( void *, yy_size_t ); void *yyrealloc ( void *, yy_size_t );
void yyfree ( void * ); void yyfree ( void * );
#define yy_new_buffer yy_create_buffer #define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \ #define yy_set_interactive(is_interactive) \
{ \ { \
if ( ! YY_CURRENT_BUFFER ){ \ if ( ! YY_CURRENT_BUFFER ){ \
yyensure_buffer_stack (); \ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \ YY_CURRENT_BUFFER_LVALUE = \
yy_create_buffer(yyin,YY_BUF_SIZE ); \ yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \ } \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
} }
#define yy_set_bol(at_bol) \ #define yy_set_bol(at_bol) \
{ \ { \
if ( ! YY_CURRENT_BUFFER ){\ if ( ! YY_CURRENT_BUFFER ){\
yyensure_buffer_stack (); \ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \ YY_CURRENT_BUFFER_LVALUE = \
yy_create_buffer(yyin,YY_BUF_SIZE ); \ yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \ } \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
} }
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* Begin user sect3 */ /* Begin user sect3 */
typedef flex_uint8_t YY_CHAR; typedef flex_uint8_t YY_CHAR;
FILE *yyin = NULL, *yyout = NULL; FILE *yyin = NULL, *yyout = NULL;
skipping to change at line 1915 skipping to change at line 1922
#define YY_DECL \ #define YY_DECL \
int flexscan(void) int flexscan(void)
#define RETURNCHAR \ #define RETURNCHAR \
yylval = (unsigned char) yytext[0]; \ yylval = (unsigned char) yytext[0]; \
return CHAR; return CHAR;
#define RETURNNAME \ #define RETURNNAME \
if(yyleng < MAXLINE) \ if(yyleng < MAXLINE) \
{ \ { \
strcpy( nmstr, yytext ); \ strncpy( nmstr, yytext, sizeof(nmstr) ); \
return NAME; \ return NAME; \
} \ } \
else \ else \
do { \ do { \
synerr(_("Input line too long\n")); \ synerr(_("Input line too long\n")); \
FLEX_EXIT(EXIT_FAILURE); \ FLEX_EXIT(EXIT_FAILURE); \
} while (0) } while (0)
#define PUT_BACK_STRING(str, start) \ #define PUT_BACK_STRING(str, start) \
{ size_t i = strlen( str ); \ { size_t i = strlen( str ); \
skipping to change at line 1959 skipping to change at line 1966
yy_push_state(CODEBLOCK); \ yy_push_state(CODEBLOCK); \
if ((indented_code = x)) ACTION_ECHO; \ if ((indented_code = x)) ACTION_ECHO; \
} while(0) } while(0)
#define END_CODEBLOCK do { \ #define END_CODEBLOCK do { \
yy_pop_state();\ yy_pop_state();\
add_action(M4QEND); \ add_action(M4QEND); \
if (!indented_code) line_directive_out(NULL, 0);\ if (!indented_code) line_directive_out(NULL, 0);\
} while (0) } while (0)
#line 1959 "scan.c" #line 1966 "scan.c"
#line 1961 "scan.c" #line 1968 "scan.c"
#define INITIAL 0 #define INITIAL 0
#define SECT2 1 #define SECT2 1
#define SECT2PROLOG 2 #define SECT2PROLOG 2
#define SECT3 3 #define SECT3 3
#define CODEBLOCK 4 #define CODEBLOCK 4
#define PICKUPDEF 5 #define PICKUPDEF 5
#define SC 6 #define SC 6
#define CARETISBOL 7 #define CARETISBOL 7
#define NUM 8 #define NUM 8
skipping to change at line 2208 skipping to change at line 2215
if ( ! yyin ) if ( ! yyin )
yyin = stdin; yyin = stdin;
if ( ! yyout ) if ( ! yyout )
yyout = stdout; yyout = stdout;
if ( ! YY_CURRENT_BUFFER ) { if ( ! YY_CURRENT_BUFFER ) {
yyensure_buffer_stack (); yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE = YY_CURRENT_BUFFER_LVALUE =
yy_create_buffer(yyin,YY_BUF_SIZE ); yy_create_buffer( yyin, YY_BUF_SIZE );
} }
yy_load_buffer_state( ); yy_load_buffer_state( );
} }
{ {
#line 158 "scan.l" #line 158 "scan.l"
#line 160 "scan.l" #line 160 "scan.l"
static int bracelevel, didadef, indented_code; static int bracelevel, didadef, indented_code;
static int doing_rule_action = false; static int doing_rule_action = false;
static int option_sense; static int option_sense;
int doing_codeblock = false; int doing_codeblock = false;
int brace_depth=0, brace_start_line=0; int brace_depth=0, brace_start_line=0;
char nmdef[MAXLINE]; char nmdef[MAXLINE];
#line 2227 "scan.c" #line 2234 "scan.c"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is rea ched */ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is rea ched */
{ {
yy_cp = (yy_c_buf_p); yy_cp = (yy_c_buf_p);
/* Support of yytext. */ /* Support of yytext. */
*yy_cp = (yy_hold_char); *yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of /* yy_bp points to the position in yy_ch_buf of the start of
* the current run. * the current run.
skipping to change at line 2391 skipping to change at line 2398
YY_RULE_SETUP YY_RULE_SETUP
#line 206 "scan.l" #line 206 "scan.l"
synerr( _( "unrecognized '%' directive" ) ); synerr( _( "unrecognized '%' directive" ) );
YY_BREAK YY_BREAK
case 17: case 17:
YY_RULE_SETUP YY_RULE_SETUP
#line 208 "scan.l" #line 208 "scan.l"
{ {
if(yyleng < MAXLINE) if(yyleng < MAXLINE)
{ {
strcpy( nmstr, yytext ); strncpy( nmstr, yytext, sizeof(nmstr) );
} }
else else
{ {
synerr( _("Definition name too long\n")); synerr( _("Definition name too long\n"));
FLEX_EXIT(EXIT_FAILURE); FLEX_EXIT(EXIT_FAILURE);
} }
didadef = false; didadef = false;
BEGIN(PICKUPDEF); BEGIN(PICKUPDEF);
} }
skipping to change at line 2519 skipping to change at line 2526
} }
YY_BREAK YY_BREAK
case 36: case 36:
YY_RULE_SETUP YY_RULE_SETUP
#line 265 "scan.l" #line 265 "scan.l"
/* ignore spurious characters */ /* ignore spurious characters */
YY_BREAK YY_BREAK
case 37: case 37:
YY_RULE_SETUP YY_RULE_SETUP
#line 269 "scan.l" #line 268 "scan.l"
ACTION_ECHO_QSTART; ACTION_ECHO_QSTART;
YY_BREAK YY_BREAK
case 38: case 38:
YY_RULE_SETUP YY_RULE_SETUP
#line 270 "scan.l" #line 269 "scan.l"
ACTION_ECHO_QEND; ACTION_ECHO_QEND;
YY_BREAK YY_BREAK
case 39: case 39:
/* rule 39 can match eol */ /* rule 39 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 274 "scan.l" #line 273 "scan.l"
++linenum; END_CODEBLOCK; ++linenum; END_CODEBLOCK;
YY_BREAK YY_BREAK
case 40: case 40:
YY_RULE_SETUP YY_RULE_SETUP
#line 275 "scan.l" #line 274 "scan.l"
ACTION_ECHO; ACTION_ECHO;
YY_BREAK YY_BREAK
case 41: case 41:
YY_RULE_SETUP YY_RULE_SETUP
#line 276 "scan.l" #line 275 "scan.l"
ACTION_ECHO; ACTION_ECHO;
YY_BREAK YY_BREAK
case 42: case 42:
/* rule 42 can match eol */ /* rule 42 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 277 "scan.l" #line 276 "scan.l"
{ {
++linenum; ++linenum;
ACTION_ECHO; ACTION_ECHO;
if ( indented_code ) END_CODEBLOCK; if ( indented_code ) END_CODEBLOCK;
} }
YY_BREAK YY_BREAK
case 43: case 43:
YY_RULE_SETUP YY_RULE_SETUP
#line 285 "scan.l" #line 284 "scan.l"
{ {
if( --brace_depth == 0){ if( --brace_depth == 0){
/* TODO: Matched. */ /* TODO: Matched. */
yy_pop_state(); yy_pop_state();
}else }else
buf_strnappend(&top_buf, yytext, yyleng); buf_strnappend(&top_buf, yytext, yyleng);
} }
YY_BREAK YY_BREAK
case 44: case 44:
YY_RULE_SETUP YY_RULE_SETUP
#line 293 "scan.l" #line 292 "scan.l"
{ {
brace_depth++; brace_depth++;
buf_strnappend(&top_buf, yytext, yyleng); buf_strnappend(&top_buf, yytext, yyleng);
} }
YY_BREAK YY_BREAK
case 45: case 45:
/* rule 45 can match eol */ /* rule 45 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 298 "scan.l" #line 297 "scan.l"
{ {
++linenum; ++linenum;
buf_strnappend(&top_buf, yytext, yyleng); buf_strnappend(&top_buf, yytext, yyleng);
} }
YY_BREAK YY_BREAK
case 46: case 46:
YY_RULE_SETUP YY_RULE_SETUP
#line 303 "scan.l" #line 302 "scan.l"
buf_strnappend(&top_buf, escaped_qstart, (int) strlen(escaped_qstart)); buf_strnappend(&top_buf, escaped_qstart, (int) strlen(escaped_qstart));
YY_BREAK YY_BREAK
case 47: case 47:
YY_RULE_SETUP YY_RULE_SETUP
#line 304 "scan.l" #line 303 "scan.l"
buf_strnappend(&top_buf, escaped_qend, (int) strlen(escaped_qend)); buf_strnappend(&top_buf, escaped_qend, (int) strlen(escaped_qend));
YY_BREAK YY_BREAK
case 48: case 48:
YY_RULE_SETUP YY_RULE_SETUP
#line 305 "scan.l" #line 304 "scan.l"
{ {
buf_strnappend(&top_buf, yytext, yyleng); buf_strnappend(&top_buf, yytext, yyleng);
} }
YY_BREAK YY_BREAK
case YY_STATE_EOF(CODEBLOCK_MATCH_BRACE): case YY_STATE_EOF(CODEBLOCK_MATCH_BRACE):
#line 309 "scan.l" #line 308 "scan.l"
{ {
linenum = brace_start_line; linenum = brace_start_line;
synerr(_("Unmatched '{'")); synerr(_("Unmatched '{'"));
yyterminate(); yyterminate();
} }
YY_BREAK YY_BREAK
case 49: case 49:
YY_RULE_SETUP YY_RULE_SETUP
#line 318 "scan.l" #line 317 "scan.l"
/* separates name and definition */ /* separates name and definition */
YY_BREAK YY_BREAK
case 50: case 50:
YY_RULE_SETUP YY_RULE_SETUP
#line 320 "scan.l" #line 319 "scan.l"
{ {
if(yyleng < MAXLINE) if(yyleng < MAXLINE)
{ {
strcpy( nmdef, yytext ); strncpy( nmdef, yytext, sizeof(nmdef) );
} }
else else
{ {
format_synerr( _("Definition value for {%s} too long\n "), nmstr); format_synerr( _("Definition value for {%s} too long\n "), nmstr);
FLEX_EXIT(EXIT_FAILURE); FLEX_EXIT(EXIT_FAILURE);
} }
/* Skip trailing whitespace. */ /* Skip trailing whitespace. */
{ {
size_t i = strlen( nmdef ); size_t i = strlen( nmdef );
while (i > 0 && (nmdef[i-1] == ' ' || nmdef[i-1] == ' \t')) while (i > 0 && (nmdef[i-1] == ' ' || nmdef[i-1] == ' \t'))
skipping to change at line 2642 skipping to change at line 2649
nmdef[i] = '\0'; nmdef[i] = '\0';
} }
ndinstal( nmstr, nmdef ); ndinstal( nmstr, nmdef );
didadef = true; didadef = true;
} }
YY_BREAK YY_BREAK
case 51: case 51:
/* rule 51 can match eol */ /* rule 51 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 342 "scan.l" #line 341 "scan.l"
{ {
if ( ! didadef ) if ( ! didadef )
synerr( _( "incomplete name definition" ) ); synerr( _( "incomplete name definition" ) );
BEGIN(INITIAL); BEGIN(INITIAL);
++linenum; ++linenum;
} }
YY_BREAK YY_BREAK
case 52: case 52:
/* rule 52 can match eol */ /* rule 52 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 352 "scan.l" #line 351 "scan.l"
++linenum; BEGIN(INITIAL); ++linenum; BEGIN(INITIAL);
YY_BREAK YY_BREAK
case 53: case 53:
YY_RULE_SETUP YY_RULE_SETUP
#line 353 "scan.l" #line 352 "scan.l"
option_sense = true; option_sense = true;
YY_BREAK YY_BREAK
case 54: case 54:
YY_RULE_SETUP YY_RULE_SETUP
#line 355 "scan.l" #line 354 "scan.l"
return '='; return '=';
YY_BREAK YY_BREAK
case 55: case 55:
YY_RULE_SETUP YY_RULE_SETUP
#line 357 "scan.l" #line 356 "scan.l"
option_sense = ! option_sense; option_sense = ! option_sense;
YY_BREAK YY_BREAK
case 56: case 56:
YY_RULE_SETUP YY_RULE_SETUP
#line 359 "scan.l" #line 358 "scan.l"
csize = option_sense ? 128 : 256; csize = option_sense ? 128 : 256;
YY_BREAK YY_BREAK
case 57: case 57:
YY_RULE_SETUP YY_RULE_SETUP
#line 360 "scan.l" #line 359 "scan.l"
csize = option_sense ? 256 : 128; csize = option_sense ? 256 : 128;
YY_BREAK YY_BREAK
case 58: case 58:
YY_RULE_SETUP YY_RULE_SETUP
#line 362 "scan.l" #line 361 "scan.l"
long_align = option_sense; long_align = option_sense;
YY_BREAK YY_BREAK
case 59: case 59:
YY_RULE_SETUP YY_RULE_SETUP
#line 363 "scan.l" #line 362 "scan.l"
{ {
ACTION_M4_IFDEF( "M4""_YY_ALWAYS_INTERACTIVE", option_sen se ); ACTION_M4_IFDEF( "M4""_YY_ALWAYS_INTERACTIVE", option_sen se );
interactive = option_sense; interactive = option_sense;
} }
YY_BREAK YY_BREAK
case 60: case 60:
YY_RULE_SETUP YY_RULE_SETUP
#line 367 "scan.l" #line 366 "scan.l"
yytext_is_array = option_sense; yytext_is_array = option_sense;
YY_BREAK YY_BREAK
case 61: case 61:
YY_RULE_SETUP YY_RULE_SETUP
#line 368 "scan.l" #line 367 "scan.l"
backing_up_report = option_sense; backing_up_report = option_sense;
YY_BREAK YY_BREAK
case 62: case 62:
YY_RULE_SETUP YY_RULE_SETUP
#line 369 "scan.l" #line 368 "scan.l"
interactive = ! option_sense; interactive = ! option_sense;
YY_BREAK YY_BREAK
case 63: case 63:
YY_RULE_SETUP YY_RULE_SETUP
#line 370 "scan.l" #line 369 "scan.l"
bison_bridge_lval = option_sense; bison_bridge_lval = option_sense;
YY_BREAK YY_BREAK
case 64: case 64:
YY_RULE_SETUP YY_RULE_SETUP
#line 371 "scan.l" #line 370 "scan.l"
{ if((bison_bridge_lloc = option_sense)) { if((bison_bridge_lloc = option_sense))
bison_bridge_lval = true; bison_bridge_lval = true;
} }
YY_BREAK YY_BREAK
case 65: case 65:
YY_RULE_SETUP YY_RULE_SETUP
#line 374 "scan.l" #line 373 "scan.l"
C_plus_plus = option_sense; C_plus_plus = option_sense;
YY_BREAK YY_BREAK
case 66: case 66:
YY_RULE_SETUP YY_RULE_SETUP
#line 375 "scan.l" #line 374 "scan.l"
sf_set_case_ins(!option_sense); sf_set_case_ins(!option_sense);
YY_BREAK YY_BREAK
case 67: case 67:
YY_RULE_SETUP YY_RULE_SETUP
#line 376 "scan.l" #line 375 "scan.l"
sf_set_case_ins(option_sense); sf_set_case_ins(option_sense);
YY_BREAK YY_BREAK
case 68: case 68:
YY_RULE_SETUP YY_RULE_SETUP
#line 377 "scan.l" #line 376 "scan.l"
ddebug = option_sense; ddebug = option_sense;
YY_BREAK YY_BREAK
case 69: case 69:
YY_RULE_SETUP YY_RULE_SETUP
#line 378 "scan.l" #line 377 "scan.l"
spprdflt = ! option_sense; spprdflt = ! option_sense;
YY_BREAK YY_BREAK
case 70: case 70:
YY_RULE_SETUP YY_RULE_SETUP
#line 379 "scan.l" #line 378 "scan.l"
useecs = option_sense; useecs = option_sense;
YY_BREAK YY_BREAK
case 71: case 71:
YY_RULE_SETUP YY_RULE_SETUP
#line 380 "scan.l" #line 379 "scan.l"
{ {
useecs = usemecs = false; useecs = usemecs = false;
use_read = fullspd = true; use_read = fullspd = true;
} }
YY_BREAK YY_BREAK
case 72: case 72:
YY_RULE_SETUP YY_RULE_SETUP
#line 384 "scan.l" #line 383 "scan.l"
{ {
useecs = usemecs = false; useecs = usemecs = false;
use_read = fulltbl = true; use_read = fulltbl = true;
} }
YY_BREAK YY_BREAK
case 73: case 73:
YY_RULE_SETUP YY_RULE_SETUP
#line 388 "scan.l" #line 387 "scan.l"
ACTION_IFDEF("YY_NO_INPUT", ! option_sense); ACTION_IFDEF("YY_NO_INPUT", ! option_sense);
YY_BREAK YY_BREAK
case 74: case 74:
YY_RULE_SETUP YY_RULE_SETUP
#line 389 "scan.l" #line 388 "scan.l"
interactive = option_sense; interactive = option_sense;
YY_BREAK YY_BREAK
case 75: case 75:
YY_RULE_SETUP YY_RULE_SETUP
#line 390 "scan.l" #line 389 "scan.l"
lex_compat = option_sense; lex_compat = option_sense;
YY_BREAK YY_BREAK
case 76: case 76:
YY_RULE_SETUP YY_RULE_SETUP
#line 391 "scan.l" #line 390 "scan.l"
posix_compat = option_sense; posix_compat = option_sense;
YY_BREAK YY_BREAK
case 77: case 77:
YY_RULE_SETUP YY_RULE_SETUP
#line 392 "scan.l" #line 391 "scan.l"
gen_line_dirs = option_sense; gen_line_dirs = option_sense;
YY_BREAK YY_BREAK
case 78: case 78:
YY_RULE_SETUP YY_RULE_SETUP
#line 393 "scan.l" #line 392 "scan.l"
{ {
ACTION_M4_IFDEF( "M4""_YY_MAIN", option_sense); ACTION_M4_IFDEF( "M4""_YY_MAIN", option_sense);
/* Override yywrap */ /* Override yywrap */
if( option_sense == true ) if( option_sense == true )
do_yywrap = false; do_yywrap = false;
} }
YY_BREAK YY_BREAK
case 79: case 79:
YY_RULE_SETUP YY_RULE_SETUP
#line 399 "scan.l" #line 398 "scan.l"
usemecs = option_sense; usemecs = option_sense;
YY_BREAK YY_BREAK
case 80: case 80:
YY_RULE_SETUP YY_RULE_SETUP
#line 400 "scan.l" #line 399 "scan.l"
{ {
ACTION_M4_IFDEF( "M4""_YY_NEVER_INTERACTIVE", option_sens e ); ACTION_M4_IFDEF( "M4""_YY_NEVER_INTERACTIVE", option_sens e );
interactive = !option_sense; interactive = !option_sense;
} }
YY_BREAK YY_BREAK
case 81: case 81:
YY_RULE_SETUP YY_RULE_SETUP
#line 404 "scan.l" #line 403 "scan.l"
performance_report += option_sense ? 1 : -1; performance_report += option_sense ? 1 : -1;
YY_BREAK YY_BREAK
case 82: case 82:
YY_RULE_SETUP YY_RULE_SETUP
#line 405 "scan.l" #line 404 "scan.l"
yytext_is_array = ! option_sense; yytext_is_array = ! option_sense;
YY_BREAK YY_BREAK
case 83: case 83:
YY_RULE_SETUP YY_RULE_SETUP
#line 406 "scan.l" #line 405 "scan.l"
use_read = option_sense; use_read = option_sense;
YY_BREAK YY_BREAK
case 84: case 84:
YY_RULE_SETUP YY_RULE_SETUP
#line 407 "scan.l" #line 406 "scan.l"
reentrant = option_sense; reentrant = option_sense;
YY_BREAK YY_BREAK
case 85: case 85:
YY_RULE_SETUP YY_RULE_SETUP
#line 408 "scan.l" #line 407 "scan.l"
reject_really_used = option_sense; reject_really_used = option_sense;
YY_BREAK YY_BREAK
case 86: case 86:
YY_RULE_SETUP YY_RULE_SETUP
#line 409 "scan.l" #line 408 "scan.l"
ACTION_M4_IFDEF( "M4""_YY_STACK_USED", option_sense ); ACTION_M4_IFDEF( "M4""_YY_STACK_USED", option_sense );
YY_BREAK YY_BREAK
case 87: case 87:
YY_RULE_SETUP YY_RULE_SETUP
#line 410 "scan.l" #line 409 "scan.l"
do_stdinit = option_sense; do_stdinit = option_sense;
YY_BREAK YY_BREAK
case 88: case 88:
YY_RULE_SETUP YY_RULE_SETUP
#line 411 "scan.l" #line 410 "scan.l"
use_stdout = option_sense; use_stdout = option_sense;
YY_BREAK YY_BREAK
case 89: case 89:
YY_RULE_SETUP YY_RULE_SETUP
#line 412 "scan.l" #line 411 "scan.l"
ACTION_IFDEF("YY_NO_UNISTD_H", ! option_sense); ACTION_IFDEF("YY_NO_UNISTD_H", ! option_sense);
YY_BREAK YY_BREAK
case 90: case 90:
YY_RULE_SETUP YY_RULE_SETUP
#line 413 "scan.l" #line 412 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_UNPUT", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_UNPUT", ! option_sense);
YY_BREAK YY_BREAK
case 91: case 91:
YY_RULE_SETUP YY_RULE_SETUP
#line 414 "scan.l" #line 413 "scan.l"
printstats = option_sense; printstats = option_sense;
YY_BREAK YY_BREAK
case 92: case 92:
YY_RULE_SETUP YY_RULE_SETUP
#line 415 "scan.l" #line 414 "scan.l"
nowarn = ! option_sense; nowarn = ! option_sense;
YY_BREAK YY_BREAK
case 93: case 93:
YY_RULE_SETUP YY_RULE_SETUP
#line 416 "scan.l" #line 415 "scan.l"
do_yylineno = option_sense; ACTION_M4_IFDEF("M4""_YY_USE_LINENO", option_sense); do_yylineno = option_sense; ACTION_M4_IFDEF("M4""_YY_USE_LINENO", option_sense);
YY_BREAK YY_BREAK
case 94: case 94:
YY_RULE_SETUP YY_RULE_SETUP
#line 417 "scan.l" #line 416 "scan.l"
yymore_really_used = option_sense; yymore_really_used = option_sense;
YY_BREAK YY_BREAK
case 95: case 95:
YY_RULE_SETUP YY_RULE_SETUP
#line 418 "scan.l" #line 417 "scan.l"
do_yywrap = option_sense; do_yywrap = option_sense;
YY_BREAK YY_BREAK
case 96: case 96:
YY_RULE_SETUP YY_RULE_SETUP
#line 420 "scan.l" #line 419 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_PUSH_STATE", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_PUSH_STATE", ! option_sense);
YY_BREAK YY_BREAK
case 97: case 97:
YY_RULE_SETUP YY_RULE_SETUP
#line 421 "scan.l" #line 420 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_POP_STATE", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_POP_STATE", ! option_sense);
YY_BREAK YY_BREAK
case 98: case 98:
YY_RULE_SETUP YY_RULE_SETUP
#line 422 "scan.l" #line 421 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_TOP_STATE", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_TOP_STATE", ! option_sense);
YY_BREAK YY_BREAK
case 99: case 99:
YY_RULE_SETUP YY_RULE_SETUP
#line 424 "scan.l" #line 423 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_SCAN_BUFFER", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_SCAN_BUFFER", ! option_sense);
YY_BREAK YY_BREAK
case 100: case 100:
YY_RULE_SETUP YY_RULE_SETUP
#line 425 "scan.l" #line 424 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_SCAN_BYTES", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_SCAN_BYTES", ! option_sense);
YY_BREAK YY_BREAK
case 101: case 101:
YY_RULE_SETUP YY_RULE_SETUP
#line 426 "scan.l" #line 425 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_SCAN_STRING", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_SCAN_STRING", ! option_sense);
YY_BREAK YY_BREAK
case 102: case 102:
YY_RULE_SETUP YY_RULE_SETUP
#line 428 "scan.l" #line 427 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_FLEX_ALLOC", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_FLEX_ALLOC", ! option_sense);
YY_BREAK YY_BREAK
case 103: case 103:
YY_RULE_SETUP YY_RULE_SETUP
#line 429 "scan.l" #line 428 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_FLEX_REALLOC", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_FLEX_REALLOC", ! option_sense);
YY_BREAK YY_BREAK
case 104: case 104:
YY_RULE_SETUP YY_RULE_SETUP
#line 430 "scan.l" #line 429 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_FLEX_FREE", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_FLEX_FREE", ! option_sense);
YY_BREAK YY_BREAK
case 105: case 105:
YY_RULE_SETUP YY_RULE_SETUP
#line 432 "scan.l" #line 431 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_GET_DEBUG", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_GET_DEBUG", ! option_sense);
YY_BREAK YY_BREAK
case 106: case 106:
YY_RULE_SETUP YY_RULE_SETUP
#line 433 "scan.l" #line 432 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_SET_DEBUG", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_SET_DEBUG", ! option_sense);
YY_BREAK YY_BREAK
case 107: case 107:
YY_RULE_SETUP YY_RULE_SETUP
#line 434 "scan.l" #line 433 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_GET_EXTRA", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_GET_EXTRA", ! option_sense);
YY_BREAK YY_BREAK
case 108: case 108:
YY_RULE_SETUP YY_RULE_SETUP
#line 435 "scan.l" #line 434 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_SET_EXTRA", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_SET_EXTRA", ! option_sense);
YY_BREAK YY_BREAK
case 109: case 109:
YY_RULE_SETUP YY_RULE_SETUP
#line 436 "scan.l" #line 435 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_GET_LENG", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_GET_LENG", ! option_sense);
YY_BREAK YY_BREAK
case 110: case 110:
YY_RULE_SETUP YY_RULE_SETUP
#line 437 "scan.l" #line 436 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_GET_TEXT", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_GET_TEXT", ! option_sense);
YY_BREAK YY_BREAK
case 111: case 111:
YY_RULE_SETUP YY_RULE_SETUP
#line 438 "scan.l" #line 437 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_GET_LINENO", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_GET_LINENO", ! option_sense);
YY_BREAK YY_BREAK
case 112: case 112:
YY_RULE_SETUP YY_RULE_SETUP
#line 439 "scan.l" #line 438 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_SET_LINENO", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_SET_LINENO", ! option_sense);
YY_BREAK YY_BREAK
case 113: case 113:
YY_RULE_SETUP YY_RULE_SETUP
#line 440 "scan.l" #line 439 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_GET_IN", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_GET_IN", ! option_sense);
YY_BREAK YY_BREAK
case 114: case 114:
YY_RULE_SETUP YY_RULE_SETUP
#line 441 "scan.l" #line 440 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_SET_IN", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_SET_IN", ! option_sense);
YY_BREAK YY_BREAK
case 115: case 115:
YY_RULE_SETUP YY_RULE_SETUP
#line 442 "scan.l" #line 441 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_GET_OUT", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_GET_OUT", ! option_sense);
YY_BREAK YY_BREAK
case 116: case 116:
YY_RULE_SETUP YY_RULE_SETUP
#line 443 "scan.l" #line 442 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_SET_OUT", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_SET_OUT", ! option_sense);
YY_BREAK YY_BREAK
case 117: case 117:
YY_RULE_SETUP YY_RULE_SETUP
#line 444 "scan.l" #line 443 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_GET_LVAL", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_GET_LVAL", ! option_sense);
YY_BREAK YY_BREAK
case 118: case 118:
YY_RULE_SETUP YY_RULE_SETUP
#line 445 "scan.l" #line 444 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_SET_LVAL", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_SET_LVAL", ! option_sense);
YY_BREAK YY_BREAK
case 119: case 119:
YY_RULE_SETUP YY_RULE_SETUP
#line 446 "scan.l" #line 445 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_GET_LLOC", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_GET_LLOC", ! option_sense);
YY_BREAK YY_BREAK
case 120: case 120:
YY_RULE_SETUP YY_RULE_SETUP
#line 447 "scan.l" #line 446 "scan.l"
ACTION_M4_IFDEF("M4""_YY_NO_SET_LLOC", ! option_sense); ACTION_M4_IFDEF("M4""_YY_NO_SET_LLOC", ! option_sense);
YY_BREAK YY_BREAK
case 121: case 121:
YY_RULE_SETUP YY_RULE_SETUP
#line 449 "scan.l" #line 448 "scan.l"
return TOK_EXTRA_TYPE; return TOK_EXTRA_TYPE;
YY_BREAK YY_BREAK
case 122: case 122:
YY_RULE_SETUP YY_RULE_SETUP
#line 450 "scan.l" #line 449 "scan.l"
return TOK_OUTFILE; return TOK_OUTFILE;
YY_BREAK YY_BREAK
case 123: case 123:
YY_RULE_SETUP YY_RULE_SETUP
#line 451 "scan.l" #line 450 "scan.l"
return TOK_PREFIX; return TOK_PREFIX;
YY_BREAK YY_BREAK
case 124: case 124:
YY_RULE_SETUP YY_RULE_SETUP
#line 452 "scan.l" #line 451 "scan.l"
return TOK_YYCLASS; return TOK_YYCLASS;
YY_BREAK YY_BREAK
case 125: case 125:
YY_RULE_SETUP YY_RULE_SETUP
#line 453 "scan.l" #line 452 "scan.l"
return TOK_HEADER_FILE; return TOK_HEADER_FILE;
YY_BREAK YY_BREAK
case 126: case 126:
YY_RULE_SETUP YY_RULE_SETUP
#line 454 "scan.l" #line 453 "scan.l"
return TOK_TABLES_FILE; return TOK_TABLES_FILE;
YY_BREAK YY_BREAK
case 127: case 127:
YY_RULE_SETUP YY_RULE_SETUP
#line 455 "scan.l" #line 454 "scan.l"
{ {
tablesverify = option_sense; tablesverify = option_sense;
if(!tablesext && option_sense) if(!tablesext && option_sense)
tablesext = true; tablesext = true;
} }
YY_BREAK YY_BREAK
case 128: case 128:
YY_RULE_SETUP YY_RULE_SETUP
#line 462 "scan.l" #line 461 "scan.l"
{ {
if(yyleng-1 < MAXLINE) if(yyleng-1 < MAXLINE)
{ {
strcpy( nmstr, yytext + 1 ); strncpy( nmstr, yytext + 1, sizeof(nmstr) );
} }
else else
{ {
synerr( _("Option line too long\n")); synerr( _("Option line too long\n"));
FLEX_EXIT(EXIT_FAILURE); FLEX_EXIT(EXIT_FAILURE);
} }
nmstr[strlen( nmstr ) - 1] = '\0'; nmstr[strlen( nmstr ) - 1] = '\0';
return NAME; return NAME;
} }
YY_BREAK YY_BREAK
case 129: case 129:
YY_RULE_SETUP YY_RULE_SETUP
#line 476 "scan.l" #line 475 "scan.l"
{ {
format_synerr( _( "unrecognized %%option: %s" ), format_synerr( _( "unrecognized %%option: %s" ),
yytext ); yytext );
BEGIN(RECOVER); BEGIN(RECOVER);
} }
YY_BREAK YY_BREAK
case 130: case 130:
/* rule 130 can match eol */ /* rule 130 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 483 "scan.l" #line 482 "scan.l"
++linenum; BEGIN(INITIAL); ++linenum; BEGIN(INITIAL);
YY_BREAK YY_BREAK
case 131: case 131:
YY_RULE_SETUP YY_RULE_SETUP
#line 487 "scan.l" #line 486 "scan.l"
++bracelevel; yyless( 2 ); /* eat only %{ */ ++bracelevel; yyless( 2 ); /* eat only %{ */
YY_BREAK YY_BREAK
case 132: case 132:
YY_RULE_SETUP YY_RULE_SETUP
#line 488 "scan.l" #line 487 "scan.l"
--bracelevel; yyless( 2 ); /* eat only %} */ --bracelevel; yyless( 2 ); /* eat only %} */
YY_BREAK YY_BREAK
case 133: case 133:
YY_RULE_SETUP YY_RULE_SETUP
#line 490 "scan.l" #line 489 "scan.l"
START_CODEBLOCK(true); /* indented code in prolog */ START_CODEBLOCK(true); /* indented code in prolog */
YY_BREAK YY_BREAK
case 134: case 134:
YY_RULE_SETUP YY_RULE_SETUP
#line 492 "scan.l" #line 491 "scan.l"
{ {
/* non-indented code */ /* non-indented code */
if ( bracelevel <= 0 ) { if ( bracelevel <= 0 ) {
/* not in %{ ... %} */ /* not in %{ ... %} */
yyless( 0 ); /* put it all back */ yyless( 0 ); /* put it all back */
yy_set_bol( 1 ); yy_set_bol( 1 );
mark_prolog(); mark_prolog();
BEGIN(SECT2); BEGIN(SECT2);
} else { } else {
START_CODEBLOCK(true); START_CODEBLOCK(true);
} }
} }
YY_BREAK YY_BREAK
case 135: case 135:
YY_RULE_SETUP YY_RULE_SETUP
#line 505 "scan.l" #line 504 "scan.l"
ACTION_ECHO; ACTION_ECHO;
YY_BREAK YY_BREAK
case 136: case 136:
/* rule 136 can match eol */ /* rule 136 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 506 "scan.l" #line 505 "scan.l"
++linenum; ACTION_ECHO; ++linenum; ACTION_ECHO;
YY_BREAK YY_BREAK
case YY_STATE_EOF(SECT2PROLOG): case YY_STATE_EOF(SECT2PROLOG):
#line 508 "scan.l" #line 507 "scan.l"
{ {
mark_prolog(); mark_prolog();
sectnum = 0; sectnum = 0;
yyterminate(); /* to stop the parser */ yyterminate(); /* to stop the parser */
} }
YY_BREAK YY_BREAK
case 137: case 137:
/* rule 137 can match eol */ /* rule 137 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 516 "scan.l" #line 515 "scan.l"
++linenum; /* allow blank lines in section 2 */ ++linenum; /* allow blank lines in section 2 */
YY_BREAK YY_BREAK
case 138: case 138:
YY_RULE_SETUP YY_RULE_SETUP
#line 518 "scan.l" #line 517 "scan.l"
{ {
indented_code = false; indented_code = false;
doing_codeblock = true; doing_codeblock = true;
bracelevel = 1; bracelevel = 1;
BEGIN(PERCENT_BRACE_ACTION); BEGIN(PERCENT_BRACE_ACTION);
} }
YY_BREAK YY_BREAK
case 139: case 139:
YY_RULE_SETUP YY_RULE_SETUP
#line 525 "scan.l" #line 524 "scan.l"
{ {
/* Allow "<" to appear in (?x) patterns. */ /* Allow "<" to appear in (?x) patterns. */
if (!sf_skip_ws()) if (!sf_skip_ws())
BEGIN(SC); BEGIN(SC);
return '<'; return '<';
} }
YY_BREAK YY_BREAK
case 140: case 140:
YY_RULE_SETUP YY_RULE_SETUP
#line 531 "scan.l" #line 530 "scan.l"
return '^'; return '^';
YY_BREAK YY_BREAK
case 141: case 141:
YY_RULE_SETUP YY_RULE_SETUP
#line 532 "scan.l" #line 531 "scan.l"
BEGIN(QUOTE); return '"'; BEGIN(QUOTE); return '"';
YY_BREAK YY_BREAK
case 142: case 142:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 1; (yy_c_buf_p) = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP YY_RULE_SETUP
#line 533 "scan.l" #line 532 "scan.l"
{ {
BEGIN(NUM); BEGIN(NUM);
if ( lex_compat || posix_compat ) if ( lex_compat || posix_compat )
return BEGIN_REPEAT_POSIX; return BEGIN_REPEAT_POSIX;
else else
return BEGIN_REPEAT_FLEX; return BEGIN_REPEAT_FLEX;
} }
YY_BREAK YY_BREAK
case 143: case 143:
/* rule 143 can match eol */ /* rule 143 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_bp + 1); YY_LINENO_REWIND_TO(yy_bp + 1);
(yy_c_buf_p) = yy_cp = yy_bp + 1; (yy_c_buf_p) = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP YY_RULE_SETUP
#line 540 "scan.l" #line 539 "scan.l"
return '$'; return '$';
YY_BREAK YY_BREAK
case 144: case 144:
YY_RULE_SETUP YY_RULE_SETUP
#line 542 "scan.l" #line 541 "scan.l"
{ {
bracelevel = 1; bracelevel = 1;
BEGIN(PERCENT_BRACE_ACTION); BEGIN(PERCENT_BRACE_ACTION);
if ( in_rule ) if ( in_rule )
{ {
doing_rule_action = true; doing_rule_action = true;
in_rule = false; in_rule = false;
return '\n'; return '\n';
} }
} }
YY_BREAK YY_BREAK
case 145: case 145:
/* rule 145 can match eol */ /* rule 145 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 553 "scan.l" #line 552 "scan.l"
{ {
if (sf_skip_ws()){ if (sf_skip_ws()){
/* We're in the middle of a (?x: ) pattern. */ /* We're in the middle of a (?x: ) pattern. */
/* Push back everything starting at the "|" */ /* Push back everything starting at the "|" */
int amt = (int) (strchr (yytext, '|') - yytext); int amt = (int) (strchr (yytext, '|') - yytext);
yyless(amt); yyless(amt);
} }
else { else {
add_action("]""]"); add_action("]""]");
continued_action = true; continued_action = true;
++linenum; ++linenum;
return '\n'; return '\n';
} }
} }
YY_BREAK YY_BREAK
case 146: case 146:
YY_RULE_SETUP YY_RULE_SETUP
#line 568 "scan.l" #line 567 "scan.l"
{ {
if (sf_skip_ws()){ if (sf_skip_ws()){
/* We're in the middle of a (?x: ) pattern. */ /* We're in the middle of a (?x: ) pattern. */
yy_push_state(COMMENT_DISCARD); yy_push_state(COMMENT_DISCARD);
} }
else{ else{
yyless( yyleng - 2 ); /* put back '/', '*' */ yyless( yyleng - 2 ); /* put back '/', '*' */
bracelevel = 0; bracelevel = 0;
continued_action = false; continued_action = false;
BEGIN(ACTION); BEGIN(ACTION);
} }
} }
YY_BREAK YY_BREAK
case 147: case 147:
YY_RULE_SETUP YY_RULE_SETUP
#line 582 "scan.l" #line 581 "scan.l"
/* allow indented rules */ ; /* allow indented rules */ ;
YY_BREAK YY_BREAK
case 148: case 148:
YY_RULE_SETUP YY_RULE_SETUP
#line 584 "scan.l" #line 583 "scan.l"
{ {
if (sf_skip_ws()){ if (sf_skip_ws()){
/* We're in the middle of a (?x: ) pattern. */ /* We're in the middle of a (?x: ) pattern. */
} }
else{ else{
/* This rule is separate from the one below because /* This rule is separate from the one below because
* otherwise we get variable trailing context, so * otherwise we get variable trailing context, so
* we can't build the scanner using -{f,F}. * we can't build the scanner using -{f,F}.
*/ */
bracelevel = 0; bracelevel = 0;
skipping to change at line 3284 skipping to change at line 3291
doing_rule_action = true; doing_rule_action = true;
in_rule = false; in_rule = false;
return '\n'; return '\n';
} }
} }
} }
YY_BREAK YY_BREAK
case 149: case 149:
/* rule 149 can match eol */ /* rule 149 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 606 "scan.l" #line 605 "scan.l"
{ {
if (sf_skip_ws()){ if (sf_skip_ws()){
/* We're in the middle of a (?x: ) pattern. */ /* We're in the middle of a (?x: ) pattern. */
++linenum; ++linenum;
} }
else{ else{
bracelevel = 0; bracelevel = 0;
continued_action = false; continued_action = false;
BEGIN(ACTION); BEGIN(ACTION);
unput( '\n' ); /* so <ACTION> sees it */ unput( '\n' ); /* so <ACTION> sees it */
skipping to change at line 3306 skipping to change at line 3313
if ( in_rule ) if ( in_rule )
{ {
doing_rule_action = true; doing_rule_action = true;
in_rule = false; in_rule = false;
return '\n'; return '\n';
} }
} }
} }
YY_BREAK YY_BREAK
case 150: case 150:
#line 627 "scan.l" #line 626 "scan.l"
case 151: case 151:
YY_RULE_SETUP YY_RULE_SETUP
#line 627 "scan.l" #line 626 "scan.l"
return EOF_OP; return EOF_OP;
YY_BREAK YY_BREAK
case 152: case 152:
YY_RULE_SETUP YY_RULE_SETUP
#line 629 "scan.l" #line 628 "scan.l"
{ {
sectnum = 3; sectnum = 3;
BEGIN(no_section3_escape ? SECT3_NOESCAPE : SECT3); BEGIN(no_section3_escape ? SECT3_NOESCAPE : SECT3);
outn("/* Begin user sect3 */"); outn("/* Begin user sect3 */");
yyterminate(); /* to stop the parser */ yyterminate(); /* to stop the parser */
} }
YY_BREAK YY_BREAK
case 153: case 153:
YY_RULE_SETUP YY_RULE_SETUP
#line 637 "scan.l" #line 636 "scan.l"
{ {
int cclval; int cclval;
if(yyleng < MAXLINE) if(yyleng < MAXLINE)
{ {
strcpy( nmstr, yytext ); strncpy( nmstr, yytext, sizeof(nmstr) );
} }
else else
{ {
synerr( _("Input line too long\n")); synerr( _("Input line too long\n"));
FLEX_EXIT(EXIT_FAILURE); FLEX_EXIT(EXIT_FAILURE);
} }
/* Check to see if we've already encountered this /* Check to see if we've already encountered this
* ccl. * ccl.
*/ */
skipping to change at line 3375 skipping to change at line 3382
*/ */
yyless( 1 ); yyless( 1 );
BEGIN(FIRSTCCL); BEGIN(FIRSTCCL);
return '['; return '[';
} }
} }
YY_BREAK YY_BREAK
case 154: case 154:
YY_RULE_SETUP YY_RULE_SETUP
#line 683 "scan.l" #line 682 "scan.l"
return CCL_OP_DIFF; return CCL_OP_DIFF;
YY_BREAK YY_BREAK
case 155: case 155:
YY_RULE_SETUP YY_RULE_SETUP
#line 684 "scan.l" #line 683 "scan.l"
return CCL_OP_UNION; return CCL_OP_UNION;
YY_BREAK YY_BREAK
/* Check for :space: at the end of the rule so we don't /* Check for :space: at the end of the rule so we don't
* wrap the expanded regex in '(' ')' -- breaking trailing * wrap the expanded regex in '(' ')' -- breaking trailing
* context. * context.
*/ */
case 156: case 156:
/* rule 156 can match eol */ /* rule 156 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 691 "scan.l" #line 690 "scan.l"
{ {
char *nmdefptr; char *nmdefptr;
int end_is_ws, end_ch; int end_is_ws, end_ch;
end_ch = yytext[yyleng-1]; end_ch = yytext[yyleng-1];
end_is_ws = end_ch != '}' ? 1 : 0; end_is_ws = end_ch != '}' ? 1 : 0;
if(yyleng-1 < MAXLINE) if(yyleng-1 < MAXLINE)
{ {
strcpy( nmstr, yytext + 1 ); strncpy( nmstr, yytext + 1, sizeof(nmstr) );
} }
else else
{ {
synerr( _("Input line too long\n")); synerr( _("Input line too long\n"));
FLEX_EXIT(EXIT_FAILURE); FLEX_EXIT(EXIT_FAILURE);
} }
nmstr[yyleng - 2 - end_is_ws] = '\0'; /* chop trailing brace */ nmstr[yyleng - 2 - end_is_ws] = '\0'; /* chop trailing brace */
if ( (nmdefptr = ndlookup( nmstr )) == 0 ) if ( (nmdefptr = ndlookup( nmstr )) == 0 )
format_synerr( format_synerr(
skipping to change at line 3441 skipping to change at line 3448
{ {
unput(')'); unput(')');
PUT_BACK_STRING(nmdefptr, 0); PUT_BACK_STRING(nmdefptr, 0);
unput('('); unput('(');
} }
} }
} }
YY_BREAK YY_BREAK
case 157: case 157:
YY_RULE_SETUP YY_RULE_SETUP
#line 739 "scan.l" #line 738 "scan.l"
{ {
if (sf_skip_ws()) if (sf_skip_ws())
yy_push_state(COMMENT_DISCARD); yy_push_state(COMMENT_DISCARD);
else{ else{
/* Push back the "*" and return "/" as usual. */ /* Push back the "*" and return "/" as usual. */
yyless(1); yyless(1);
return '/'; return '/';
} }
} }
YY_BREAK YY_BREAK
case 158: case 158:
YY_RULE_SETUP YY_RULE_SETUP
#line 749 "scan.l" #line 748 "scan.l"
{ {
if (lex_compat || posix_compat){ if (lex_compat || posix_compat){
/* Push back the "?#" and treat it like a normal parens. */ /* Push back the "?#" and treat it like a normal parens. */
yyless(1); yyless(1);
sf_push(); sf_push();
return '('; return '(';
} }
else else
yy_push_state(EXTENDED_COMMENT); yy_push_state(EXTENDED_COMMENT);
} }
YY_BREAK YY_BREAK
case 159: case 159:
YY_RULE_SETUP YY_RULE_SETUP
#line 759 "scan.l" #line 758 "scan.l"
{ {
sf_push(); sf_push();
if (lex_compat || posix_compat) if (lex_compat || posix_compat)
/* Push back the "?" and treat it like a normal parens. */ /* Push back the "?" and treat it like a normal parens. */
yyless(1); yyless(1);
else else
BEGIN(GROUP_WITH_PARAMS); BEGIN(GROUP_WITH_PARAMS);
return '('; return '(';
} }
YY_BREAK YY_BREAK
case 160: case 160:
YY_RULE_SETUP YY_RULE_SETUP
#line 768 "scan.l" #line 767 "scan.l"
sf_push(); return '('; sf_push(); return '(';
YY_BREAK YY_BREAK
case 161: case 161:
YY_RULE_SETUP YY_RULE_SETUP
#line 769 "scan.l" #line 768 "scan.l"
{ {
if (_sf_top_ix > 0) { if (_sf_top_ix > 0) {
sf_pop(); sf_pop();
return ')'; return ')';
} else } else
synerr(_("unbalanced parenthesis")); synerr(_("unbalanced parenthesis"));
} }
YY_BREAK YY_BREAK
case 162: case 162:
YY_RULE_SETUP YY_RULE_SETUP
#line 777 "scan.l" #line 776 "scan.l"
return (unsigned char) yytext[0]; return (unsigned char) yytext[0];
YY_BREAK YY_BREAK
case 163: case 163:
YY_RULE_SETUP YY_RULE_SETUP
#line 778 "scan.l" #line 777 "scan.l"
RETURNCHAR; RETURNCHAR;
YY_BREAK YY_BREAK
case 164: case 164:
/* rule 164 can match eol */ /* rule 164 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 783 "scan.l" #line 782 "scan.l"
++linenum; /* Allow blank lines & continuations */ ++linenum; /* Allow blank lines & continuations */
YY_BREAK YY_BREAK
case 165: case 165:
YY_RULE_SETUP YY_RULE_SETUP
#line 784 "scan.l" #line 783 "scan.l"
return (unsigned char) yytext[0]; return (unsigned char) yytext[0];
YY_BREAK YY_BREAK
case 166: case 166:
YY_RULE_SETUP YY_RULE_SETUP
#line 785 "scan.l" #line 784 "scan.l"
BEGIN(SECT2); return '>'; BEGIN(SECT2); return '>';
YY_BREAK YY_BREAK
case 167: case 167:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 1; (yy_c_buf_p) = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP YY_RULE_SETUP
#line 786 "scan.l" #line 785 "scan.l"
BEGIN(CARETISBOL); return '>'; BEGIN(CARETISBOL); return '>';
YY_BREAK YY_BREAK
case 168: case 168:
YY_RULE_SETUP YY_RULE_SETUP
#line 787 "scan.l" #line 786 "scan.l"
RETURNNAME; RETURNNAME;
YY_BREAK YY_BREAK
case 169: case 169:
YY_RULE_SETUP YY_RULE_SETUP
#line 788 "scan.l" #line 787 "scan.l"
{ {
format_synerr( _( "bad <start condition>: %s" ), format_synerr( _( "bad <start condition>: %s" ),
yytext ); yytext );
} }
YY_BREAK YY_BREAK
case 170: case 170:
YY_RULE_SETUP YY_RULE_SETUP
#line 794 "scan.l" #line 793 "scan.l"
BEGIN(SECT2); return '^'; BEGIN(SECT2); return '^';
YY_BREAK YY_BREAK
case 171: case 171:
YY_RULE_SETUP YY_RULE_SETUP
#line 798 "scan.l" #line 797 "scan.l"
RETURNCHAR; RETURNCHAR;
YY_BREAK YY_BREAK
case 172: case 172:
YY_RULE_SETUP YY_RULE_SETUP
#line 799 "scan.l" #line 798 "scan.l"
BEGIN(SECT2); return '"'; BEGIN(SECT2); return '"';
YY_BREAK YY_BREAK
case 173: case 173:
/* rule 173 can match eol */ /* rule 173 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 801 "scan.l" #line 800 "scan.l"
{ {
synerr( _( "missing quote" ) ); synerr( _( "missing quote" ) );
BEGIN(SECT2); BEGIN(SECT2);
++linenum; ++linenum;
return '"'; return '"';
} }
YY_BREAK YY_BREAK
case 174: case 174:
YY_RULE_SETUP YY_RULE_SETUP
#line 810 "scan.l" #line 809 "scan.l"
BEGIN(SECT2); BEGIN(SECT2);
YY_BREAK YY_BREAK
case 175: case 175:
YY_RULE_SETUP YY_RULE_SETUP
#line 811 "scan.l" #line 810 "scan.l"
BEGIN(GROUP_MINUS_PARAMS); BEGIN(GROUP_MINUS_PARAMS);
YY_BREAK YY_BREAK
case 176: case 176:
YY_RULE_SETUP YY_RULE_SETUP
#line 812 "scan.l" #line 811 "scan.l"
sf_set_case_ins(1); sf_set_case_ins(1);
YY_BREAK YY_BREAK
case 177: case 177:
YY_RULE_SETUP YY_RULE_SETUP
#line 813 "scan.l" #line 812 "scan.l"
sf_set_dot_all(1); sf_set_dot_all(1);
YY_BREAK YY_BREAK
case 178: case 178:
YY_RULE_SETUP YY_RULE_SETUP
#line 814 "scan.l" #line 813 "scan.l"
sf_set_skip_ws(1); sf_set_skip_ws(1);
YY_BREAK YY_BREAK
case 179: case 179:
YY_RULE_SETUP YY_RULE_SETUP
#line 817 "scan.l" #line 816 "scan.l"
BEGIN(SECT2); BEGIN(SECT2);
YY_BREAK YY_BREAK
case 180: case 180:
YY_RULE_SETUP YY_RULE_SETUP
#line 818 "scan.l" #line 817 "scan.l"
sf_set_case_ins(0); sf_set_case_ins(0);
YY_BREAK YY_BREAK
case 181: case 181:
YY_RULE_SETUP YY_RULE_SETUP
#line 819 "scan.l" #line 818 "scan.l"
sf_set_dot_all(0); sf_set_dot_all(0);
YY_BREAK YY_BREAK
case 182: case 182:
YY_RULE_SETUP YY_RULE_SETUP
#line 820 "scan.l" #line 819 "scan.l"
sf_set_skip_ws(0); sf_set_skip_ws(0);
YY_BREAK YY_BREAK
case 183: case 183:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 1; (yy_c_buf_p) = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP YY_RULE_SETUP
#line 824 "scan.l" #line 823 "scan.l"
BEGIN(CCL); return '^'; BEGIN(CCL); return '^';
YY_BREAK YY_BREAK
case 184: case 184:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 1; (yy_c_buf_p) = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP YY_RULE_SETUP
#line 825 "scan.l" #line 824 "scan.l"
return '^'; return '^';
YY_BREAK YY_BREAK
case 185: case 185:
YY_RULE_SETUP YY_RULE_SETUP
#line 826 "scan.l" #line 825 "scan.l"
BEGIN(CCL); RETURNCHAR; BEGIN(CCL); RETURNCHAR;
YY_BREAK YY_BREAK
case 186: case 186:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 1; (yy_c_buf_p) = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP YY_RULE_SETUP
#line 830 "scan.l" #line 829 "scan.l"
return '-'; return '-';
YY_BREAK YY_BREAK
case 187: case 187:
YY_RULE_SETUP YY_RULE_SETUP
#line 831 "scan.l" #line 830 "scan.l"
RETURNCHAR; RETURNCHAR;
YY_BREAK YY_BREAK
case 188: case 188:
YY_RULE_SETUP YY_RULE_SETUP
#line 832 "scan.l" #line 831 "scan.l"
BEGIN(SECT2); return ']'; BEGIN(SECT2); return ']';
YY_BREAK YY_BREAK
case 189: case 189:
/* rule 189 can match eol */ /* rule 189 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 833 "scan.l" #line 832 "scan.l"
{ {
synerr( _( "bad character class" ) ); synerr( _( "bad character class" ) );
BEGIN(SECT2); BEGIN(SECT2);
return ']'; return ']';
} }
YY_BREAK YY_BREAK
case 190: case 190:
YY_RULE_SETUP YY_RULE_SETUP
#line 841 "scan.l" #line 840 "scan.l"
BEGIN(CCL); return CCE_ALNUM; BEGIN(CCL); return CCE_ALNUM;
YY_BREAK YY_BREAK
case 191: case 191:
YY_RULE_SETUP YY_RULE_SETUP
#line 842 "scan.l" #line 841 "scan.l"
BEGIN(CCL); return CCE_ALPHA; BEGIN(CCL); return CCE_ALPHA;
YY_BREAK YY_BREAK
case 192: case 192:
YY_RULE_SETUP YY_RULE_SETUP
#line 843 "scan.l" #line 842 "scan.l"
BEGIN(CCL); return CCE_BLANK; BEGIN(CCL); return CCE_BLANK;
YY_BREAK YY_BREAK
case 193: case 193:
YY_RULE_SETUP YY_RULE_SETUP
#line 844 "scan.l" #line 843 "scan.l"
BEGIN(CCL); return CCE_CNTRL; BEGIN(CCL); return CCE_CNTRL;
YY_BREAK YY_BREAK
case 194: case 194:
YY_RULE_SETUP YY_RULE_SETUP
#line 845 "scan.l" #line 844 "scan.l"
BEGIN(CCL); return CCE_DIGIT; BEGIN(CCL); return CCE_DIGIT;
YY_BREAK YY_BREAK
case 195: case 195:
YY_RULE_SETUP YY_RULE_SETUP
#line 846 "scan.l" #line 845 "scan.l"
BEGIN(CCL); return CCE_GRAPH; BEGIN(CCL); return CCE_GRAPH;
YY_BREAK YY_BREAK
case 196: case 196:
YY_RULE_SETUP YY_RULE_SETUP
#line 847 "scan.l" #line 846 "scan.l"
BEGIN(CCL); return CCE_LOWER; BEGIN(CCL); return CCE_LOWER;
YY_BREAK YY_BREAK
case 197: case 197:
YY_RULE_SETUP YY_RULE_SETUP
#line 848 "scan.l" #line 847 "scan.l"
BEGIN(CCL); return CCE_PRINT; BEGIN(CCL); return CCE_PRINT;
YY_BREAK YY_BREAK
case 198: case 198:
YY_RULE_SETUP YY_RULE_SETUP
#line 849 "scan.l" #line 848 "scan.l"
BEGIN(CCL); return CCE_PUNCT; BEGIN(CCL); return CCE_PUNCT;
YY_BREAK YY_BREAK
case 199: case 199:
YY_RULE_SETUP YY_RULE_SETUP
#line 850 "scan.l" #line 849 "scan.l"
BEGIN(CCL); return CCE_SPACE; BEGIN(CCL); return CCE_SPACE;
YY_BREAK YY_BREAK
case 200: case 200:
YY_RULE_SETUP YY_RULE_SETUP
#line 851 "scan.l" #line 850 "scan.l"
BEGIN(CCL); return CCE_UPPER; BEGIN(CCL); return CCE_UPPER;
YY_BREAK YY_BREAK
case 201: case 201:
YY_RULE_SETUP YY_RULE_SETUP
#line 852 "scan.l" #line 851 "scan.l"
BEGIN(CCL); return CCE_XDIGIT; BEGIN(CCL); return CCE_XDIGIT;
YY_BREAK YY_BREAK
case 202: case 202:
YY_RULE_SETUP YY_RULE_SETUP
#line 854 "scan.l" #line 853 "scan.l"
BEGIN(CCL); return CCE_NEG_ALNUM; BEGIN(CCL); return CCE_NEG_ALNUM;
YY_BREAK YY_BREAK
case 203: case 203:
YY_RULE_SETUP YY_RULE_SETUP
#line 855 "scan.l" #line 854 "scan.l"
BEGIN(CCL); return CCE_NEG_ALPHA; BEGIN(CCL); return CCE_NEG_ALPHA;
YY_BREAK YY_BREAK
case 204: case 204:
YY_RULE_SETUP YY_RULE_SETUP
#line 856 "scan.l" #line 855 "scan.l"
BEGIN(CCL); return CCE_NEG_BLANK; BEGIN(CCL); return CCE_NEG_BLANK;
YY_BREAK YY_BREAK
case 205: case 205:
YY_RULE_SETUP YY_RULE_SETUP
#line 857 "scan.l" #line 856 "scan.l"
BEGIN(CCL); return CCE_NEG_CNTRL; BEGIN(CCL); return CCE_NEG_CNTRL;
YY_BREAK YY_BREAK
case 206: case 206:
YY_RULE_SETUP YY_RULE_SETUP
#line 858 "scan.l" #line 857 "scan.l"
BEGIN(CCL); return CCE_NEG_DIGIT; BEGIN(CCL); return CCE_NEG_DIGIT;
YY_BREAK YY_BREAK
case 207: case 207:
YY_RULE_SETUP YY_RULE_SETUP
#line 859 "scan.l" #line 858 "scan.l"
BEGIN(CCL); return CCE_NEG_GRAPH; BEGIN(CCL); return CCE_NEG_GRAPH;
YY_BREAK YY_BREAK
case 208: case 208:
YY_RULE_SETUP YY_RULE_SETUP
#line 860 "scan.l" #line 859 "scan.l"
BEGIN(CCL); return CCE_NEG_LOWER; BEGIN(CCL); return CCE_NEG_LOWER;
YY_BREAK YY_BREAK
case 209: case 209:
YY_RULE_SETUP YY_RULE_SETUP
#line 861 "scan.l" #line 860 "scan.l"
BEGIN(CCL); return CCE_NEG_PRINT; BEGIN(CCL); return CCE_NEG_PRINT;
YY_BREAK YY_BREAK
case 210: case 210:
YY_RULE_SETUP YY_RULE_SETUP
#line 862 "scan.l" #line 861 "scan.l"
BEGIN(CCL); return CCE_NEG_PUNCT; BEGIN(CCL); return CCE_NEG_PUNCT;
YY_BREAK YY_BREAK
case 211: case 211:
YY_RULE_SETUP YY_RULE_SETUP
#line 863 "scan.l" #line 862 "scan.l"
BEGIN(CCL); return CCE_NEG_SPACE; BEGIN(CCL); return CCE_NEG_SPACE;
YY_BREAK YY_BREAK
case 212: case 212:
YY_RULE_SETUP YY_RULE_SETUP
#line 864 "scan.l" #line 863 "scan.l"
BEGIN(CCL); return CCE_NEG_UPPER; BEGIN(CCL); return CCE_NEG_UPPER;
YY_BREAK YY_BREAK
case 213: case 213:
YY_RULE_SETUP YY_RULE_SETUP
#line 865 "scan.l" #line 864 "scan.l"
BEGIN(CCL); return CCE_NEG_XDIGIT; BEGIN(CCL); return CCE_NEG_XDIGIT;
YY_BREAK YY_BREAK
case 214: case 214:
YY_RULE_SETUP YY_RULE_SETUP
#line 866 "scan.l" #line 865 "scan.l"
{ {
format_synerr( format_synerr(
_( "bad character class expression: %s" ), _( "bad character class expression: %s" ),
yytext ); yytext );
BEGIN(CCL); return CCE_ALNUM; BEGIN(CCL); return CCE_ALNUM;
} }
YY_BREAK YY_BREAK
case 215: case 215:
YY_RULE_SETUP YY_RULE_SETUP
#line 875 "scan.l" #line 874 "scan.l"
{ {
yylval = myctoi( yytext ); yylval = myctoi( yytext );
return NUMBER; return NUMBER;
} }
YY_BREAK YY_BREAK
case 216: case 216:
YY_RULE_SETUP YY_RULE_SETUP
#line 880 "scan.l" #line 879 "scan.l"
return ','; return ',';
YY_BREAK YY_BREAK
case 217: case 217:
YY_RULE_SETUP YY_RULE_SETUP
#line 881 "scan.l" #line 880 "scan.l"
{ {
BEGIN(SECT2); BEGIN(SECT2);
if ( lex_compat || posix_compat ) if ( lex_compat || posix_compat )
return END_REPEAT_POSIX; return END_REPEAT_POSIX;
else else
return END_REPEAT_FLEX; return END_REPEAT_FLEX;
} }
YY_BREAK YY_BREAK
case 218: case 218:
YY_RULE_SETUP YY_RULE_SETUP
#line 889 "scan.l" #line 888 "scan.l"
{ {
synerr( _( "bad character inside {}'s" ) ); synerr( _( "bad character inside {}'s" ) );
BEGIN(SECT2); BEGIN(SECT2);
return '}'; return '}';
} }
YY_BREAK YY_BREAK
case 219: case 219:
/* rule 219 can match eol */ /* rule 219 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 895 "scan.l" #line 894 "scan.l"
{ {
synerr( _( "missing }" ) ); synerr( _( "missing }" ) );
BEGIN(SECT2); BEGIN(SECT2);
++linenum; ++linenum;
return '}'; return '}';
} }
YY_BREAK YY_BREAK
case 220: case 220:
YY_RULE_SETUP YY_RULE_SETUP
#line 905 "scan.l" #line 904 "scan.l"
bracelevel = 0; bracelevel = 0;
YY_BREAK YY_BREAK
case 221: case 221:
YY_RULE_SETUP YY_RULE_SETUP
#line 907 "scan.l" #line 906 "scan.l"
ACTION_ECHO; yy_push_state( CODE_COMMENT ); ACTION_ECHO; yy_push_state( CODE_COMMENT );
YY_BREAK YY_BREAK
case 222: case 222:
YY_RULE_SETUP YY_RULE_SETUP
#line 910 "scan.l" #line 909 "scan.l"
{ {
ACTION_ECHO; ACTION_ECHO;
CHECK_REJECT(yytext); CHECK_REJECT(yytext);
} }
YY_BREAK YY_BREAK
case 223: case 223:
YY_RULE_SETUP YY_RULE_SETUP
#line 914 "scan.l" #line 913 "scan.l"
{ {
ACTION_ECHO; ACTION_ECHO;
CHECK_YYMORE(yytext); CHECK_YYMORE(yytext);
} }
YY_BREAK YY_BREAK
case 224: case 224:
YY_RULE_SETUP YY_RULE_SETUP
#line 920 "scan.l" #line 919 "scan.l"
ACTION_ECHO; ACTION_ECHO;
YY_BREAK YY_BREAK
case 225: case 225:
/* rule 225 can match eol */ /* rule 225 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 921 "scan.l" #line 920 "scan.l"
{ {
++linenum; ++linenum;
ACTION_ECHO; ACTION_ECHO;
if (bracelevel == 0 || (doing_codeblock && indented_code)) { if (bracelevel <= 0 || (doing_codeblock && indented_code)) {
if ( doing_rule_action ) if ( doing_rule_action )
add_action( "\tYY_BREAK]""]\n" ); add_action( "\tYY_BREAK]""]\n" );
doing_rule_action = doing_codeblock = false; doing_rule_action = doing_codeblock = false;
BEGIN(SECT2); BEGIN(SECT2);
} }
} }
YY_BREAK YY_BREAK
/* Reject and YYmore() are checked for above, in PERCENT_BRACE_ACTION */ /* Reject and YYmore() are checked for above, in PERCENT_BRACE_ACTION */
case 226: case 226:
YY_RULE_SETUP YY_RULE_SETUP
#line 937 "scan.l" #line 936 "scan.l"
ACTION_ECHO; ++bracelevel; ACTION_ECHO; ++bracelevel;
YY_BREAK YY_BREAK
case 227: case 227:
YY_RULE_SETUP YY_RULE_SETUP
#line 938 "scan.l" #line 937 "scan.l"
ACTION_ECHO; --bracelevel; ACTION_ECHO; --bracelevel;
YY_BREAK YY_BREAK
case 228: case 228:
YY_RULE_SETUP YY_RULE_SETUP
#line 939 "scan.l" #line 938 "scan.l"
ACTION_ECHO; ACTION_ECHO;
YY_BREAK YY_BREAK
case 229: case 229:
YY_RULE_SETUP YY_RULE_SETUP
#line 940 "scan.l" #line 939 "scan.l"
ACTION_ECHO; ACTION_ECHO;
YY_BREAK YY_BREAK
case 230: case 230:
YY_RULE_SETUP YY_RULE_SETUP
#line 941 "scan.l" #line 940 "scan.l"
ACTION_ECHO; /* character constant */ ACTION_ECHO; /* character constant */
YY_BREAK YY_BREAK
case 231: case 231:
YY_RULE_SETUP YY_RULE_SETUP
#line 942 "scan.l" #line 941 "scan.l"
ACTION_ECHO; BEGIN(CHARACTER_CONSTANT); ACTION_ECHO; BEGIN(CHARACTER_CONSTANT);
YY_BREAK YY_BREAK
case 232: case 232:
YY_RULE_SETUP YY_RULE_SETUP
#line 943 "scan.l" #line 942 "scan.l"
ACTION_ECHO; BEGIN(ACTION_STRING); ACTION_ECHO; BEGIN(ACTION_STRING);
YY_BREAK YY_BREAK
case 233: case 233:
/* rule 233 can match eol */ /* rule 233 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 944 "scan.l" #line 943 "scan.l"
{ {
++linenum; ++linenum;
ACTION_ECHO; ACTION_ECHO;
if (bracelevel == 0) { if (bracelevel <= 0) {
if ( doing_rule_action ) if ( doing_rule_action )
add_action( "\tYY_BREAK]""]\n" ); add_action( "\tYY_BREAK]""]\n" );
doing_rule_action = false; doing_rule_action = false;
BEGIN(SECT2); BEGIN(SECT2);
} }
} }
YY_BREAK YY_BREAK
case 234: case 234:
YY_RULE_SETUP YY_RULE_SETUP
#line 955 "scan.l" #line 954 "scan.l"
ACTION_ECHO; ACTION_ECHO;
YY_BREAK YY_BREAK
case 235: case 235:
YY_RULE_SETUP YY_RULE_SETUP
#line 959 "scan.l" #line 958 "scan.l"
ACTION_ECHO; ACTION_ECHO;
YY_BREAK YY_BREAK
case 236: case 236:
YY_RULE_SETUP YY_RULE_SETUP
#line 960 "scan.l" #line 959 "scan.l"
ACTION_ECHO; BEGIN(ACTION); ACTION_ECHO; BEGIN(ACTION);
YY_BREAK YY_BREAK
case 237: case 237:
YY_RULE_SETUP YY_RULE_SETUP
#line 963 "scan.l" #line 962 "scan.l"
ACTION_ECHO; ACTION_ECHO;
YY_BREAK YY_BREAK
case 238: case 238:
YY_RULE_SETUP YY_RULE_SETUP
#line 964 "scan.l" #line 963 "scan.l"
ACTION_ECHO; BEGIN(ACTION); ACTION_ECHO; BEGIN(ACTION);
YY_BREAK YY_BREAK
case 239: case 239:
/* rule 239 can match eol */ /* rule 239 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 967 "scan.l" #line 966 "scan.l"
ACTION_ECHO; ACTION_ECHO;
YY_BREAK YY_BREAK
case 240: case 240:
/* rule 240 can match eol */ /* rule 240 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 968 "scan.l" #line 967 "scan.l"
ACTION_ECHO; ACTION_ECHO;
YY_BREAK YY_BREAK
case 241: case 241:
/* rule 241 can match eol */ /* rule 241 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 969 "scan.l" #line 968 "scan.l"
++linenum; ACTION_ECHO; BEGIN(ACTION);
YY_BREAK YY_BREAK
case 242: case 242:
YY_RULE_SETUP YY_RULE_SETUP
#line 970 "scan.l" #line 969 "scan.l"
ACTION_ECHO; ACTION_ECHO;
YY_BREAK YY_BREAK
case YY_STATE_EOF(COMMENT): case YY_STATE_EOF(COMMENT):
case YY_STATE_EOF(CODE_COMMENT): case YY_STATE_EOF(CODE_COMMENT):
case YY_STATE_EOF(COMMENT_DISCARD): case YY_STATE_EOF(COMMENT_DISCARD):
case YY_STATE_EOF(ACTION): case YY_STATE_EOF(ACTION):
case YY_STATE_EOF(ACTION_STRING): case YY_STATE_EOF(ACTION_STRING):
case YY_STATE_EOF(CHARACTER_CONSTANT): case YY_STATE_EOF(CHARACTER_CONSTANT):
#line 973 "scan.l" #line 972 "scan.l"
{ {
synerr( _( "EOF encountered inside an action" ) ); synerr( _( "EOF encountered inside an action" ) );
yyterminate(); yyterminate();
} }
YY_BREAK YY_BREAK
case YY_STATE_EOF(EXTENDED_COMMENT): case YY_STATE_EOF(EXTENDED_COMMENT):
case YY_STATE_EOF(GROUP_WITH_PARAMS): case YY_STATE_EOF(GROUP_WITH_PARAMS):
case YY_STATE_EOF(GROUP_MINUS_PARAMS): case YY_STATE_EOF(GROUP_MINUS_PARAMS):
#line 978 "scan.l" #line 977 "scan.l"
{ {
synerr( _( "EOF encountered inside pattern" ) ); synerr( _( "EOF encountered inside pattern" ) );
yyterminate(); yyterminate();
} }
YY_BREAK YY_BREAK
case 243: case 243:
YY_RULE_SETUP YY_RULE_SETUP
#line 983 "scan.l" #line 982 "scan.l"
{ {
yylval = myesc( (unsigned char *) yytext ); yylval = myesc( (unsigned char *) yytext );
if ( YY_START == FIRSTCCL ) if ( YY_START == FIRSTCCL )
BEGIN(CCL); BEGIN(CCL);
return CHAR; return CHAR;
} }
YY_BREAK YY_BREAK
case 244: case 244:
YY_RULE_SETUP YY_RULE_SETUP
#line 993 "scan.l" #line 992 "scan.l"
fputs(escaped_qstart, yyout); fputs(escaped_qstart, yyout);
YY_BREAK YY_BREAK
case 245: case 245:
YY_RULE_SETUP YY_RULE_SETUP
#line 994 "scan.l" #line 993 "scan.l"
fputs(escaped_qend, yyout); fputs(escaped_qend, yyout);
YY_BREAK YY_BREAK
case 246: case 246:
/* rule 246 can match eol */ /* rule 246 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 995 "scan.l" #line 994 "scan.l"
ECHO; ECHO;
YY_BREAK YY_BREAK
case 247: case 247:
YY_RULE_SETUP YY_RULE_SETUP
#line 996 "scan.l" #line 995 "scan.l"
ECHO; ECHO;
YY_BREAK YY_BREAK
case YY_STATE_EOF(SECT3): case YY_STATE_EOF(SECT3):
#line 997 "scan.l" #line 996 "scan.l"
{ {
sectnum = 0; sectnum = 0;
yyterminate(); yyterminate();
} }
YY_BREAK YY_BREAK
case 248: case 248:
YY_RULE_SETUP YY_RULE_SETUP
#line 1003 "scan.l" #line 1002 "scan.l"
fprintf(yyout, "[""[%s]""]", escaped_qstart); fprintf(yyout, "[""[%s]""]", escaped_qstart);
YY_BREAK YY_BREAK
case 249: case 249:
YY_RULE_SETUP YY_RULE_SETUP
#line 1004 "scan.l" #line 1003 "scan.l"
fprintf(yyout, "[""[%s]""]", escaped_qend); fprintf(yyout, "[""[%s]""]", escaped_qend);
YY_BREAK YY_BREAK
case 250: case 250:
/* rule 250 can match eol */ /* rule 250 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 1005 "scan.l" #line 1004 "scan.l"
ECHO; ECHO;
YY_BREAK YY_BREAK
case 251: case 251:
YY_RULE_SETUP YY_RULE_SETUP
#line 1006 "scan.l" #line 1005 "scan.l"
ECHO; ECHO;
YY_BREAK YY_BREAK
case YY_STATE_EOF(SECT3_NOESCAPE): case YY_STATE_EOF(SECT3_NOESCAPE):
#line 1007 "scan.l" #line 1006 "scan.l"
{ {
sectnum = 0; sectnum = 0;
yyterminate(); yyterminate();
} }
YY_BREAK YY_BREAK
case 252: case 252:
/* rule 252 can match eol */ /* rule 252 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 1012 "scan.l" #line 1011 "scan.l"
format_synerr( _( "bad character: %s" ), yytext ); format_synerr( _( "bad character: %s" ), yytext );
YY_BREAK YY_BREAK
case 253: case 253:
YY_RULE_SETUP YY_RULE_SETUP
#line 1014 "scan.l" #line 1013 "scan.l"
YY_FATAL_ERROR( "flex scanner jammed" ); YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK YY_BREAK
#line 4128 "scan.c" #line 4135 "scan.c"
case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(SECT2): case YY_STATE_EOF(SECT2):
case YY_STATE_EOF(CODEBLOCK): case YY_STATE_EOF(CODEBLOCK):
case YY_STATE_EOF(PICKUPDEF): case YY_STATE_EOF(PICKUPDEF):
case YY_STATE_EOF(SC): case YY_STATE_EOF(SC):
case YY_STATE_EOF(CARETISBOL): case YY_STATE_EOF(CARETISBOL):
case YY_STATE_EOF(NUM): case YY_STATE_EOF(NUM):
case YY_STATE_EOF(QUOTE): case YY_STATE_EOF(QUOTE):
case YY_STATE_EOF(FIRSTCCL): case YY_STATE_EOF(FIRSTCCL):
case YY_STATE_EOF(CCL): case YY_STATE_EOF(CCL):
skipping to change at line 4195 skipping to change at line 4202
goto yy_find_action; goto yy_find_action;
} }
} }
else switch ( yy_get_next_buffer( ) ) else switch ( yy_get_next_buffer( ) )
{ {
case EOB_ACT_END_OF_FILE: case EOB_ACT_END_OF_FILE:
{ {
(yy_did_buffer_switch_on_eof) = 0; (yy_did_buffer_switch_on_eof) = 0;
if ( yywrap( ) ) if ( yywrap( ) )
{ {
/* Note: because we've taken care in /* Note: because we've taken care in
* yy_get_next_buffer() to have set up * yy_get_next_buffer() to have set up
* yytext, we can now set up * yytext, we can now set up
* yy_c_buf_p so that if some total * yy_c_buf_p so that if some total
* hoser (like flex itself) wants to * hoser (like flex itself) wants to
* call the scanner after we return the * call the scanner after we return the
* YY_NULL, it'll still work - another * YY_NULL, it'll still work - another
* YY_NULL will get returned. * YY_NULL will get returned.
*/ */
skipping to change at line 4327 skipping to change at line 4334
{ {
int new_size = b->yy_buf_size * 2; int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 ) if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8; b->yy_buf_size += b->yy_buf_size / 8;
else else
b->yy_buf_size *= 2; b->yy_buf_size *= 2;
b->yy_ch_buf = (char *) b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */ /* Include room in for 2 EOB chars. */
yyrealloc((void *) b->yy_ch_buf,(yy_size_ yyrealloc( (void *) b->yy_ch_buf,
t) (b->yy_buf_size + 2) ); (yy_size_t) (b->yy_buf_s
ize + 2) );
} }
else else
/* Can't grow it, we don't own it. */ /* Can't grow it, we don't own it. */
b->yy_ch_buf = NULL; b->yy_ch_buf = NULL;
if ( ! b->yy_ch_buf ) if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" ); "fatal error - scanner input buffer overflow" );
(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
skipping to change at line 4359 skipping to change at line 4367
(yy_n_chars), num_to_read ); (yy_n_chars), num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
} }
if ( (yy_n_chars) == 0 ) if ( (yy_n_chars) == 0 )
{ {
if ( number_to_move == YY_MORE_ADJ ) if ( number_to_move == YY_MORE_ADJ )
{ {
ret_val = EOB_ACT_END_OF_FILE; ret_val = EOB_ACT_END_OF_FILE;
yyrestart(yyin ); yyrestart( yyin );
} }
else else
{ {
ret_val = EOB_ACT_LAST_MATCH; ret_val = EOB_ACT_LAST_MATCH;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
YY_BUFFER_EOF_PENDING; YY_BUFFER_EOF_PENDING;
} }
} }
else else
ret_val = EOB_ACT_CONTINUE_SCAN; ret_val = EOB_ACT_CONTINUE_SCAN;
if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_si ze) { if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_si ze) {
/* Extend the array by 50%, plus the number we really need. */ /* Extend the array by 50%, plus the number we really need. */
int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1 ); int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1 );
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size ); (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)
new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buf fer()" ); YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buf fer()" );
/* "- 2" to take care of EOB's */
YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
} }
(yy_n_chars) += number_to_move; (yy_n_chars) += number_to_move;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR ; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR ;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_ CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_ CHAR;
(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
return ret_val; return ret_val;
} }
skipping to change at line 4530 skipping to change at line 4541
* sees that we've accumulated a * sees that we've accumulated a
* token and flags that we need to * token and flags that we need to
* try matching the token before * try matching the token before
* proceeding. But for input(), * proceeding. But for input(),
* there's no matching to consider. * there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH * So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE. * to EOB_ACT_END_OF_FILE.
*/ */
/* Reset buffer status. */ /* Reset buffer status. */
yyrestart(yyin ); yyrestart( yyin );
/*FALLTHROUGH*/ /*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE: case EOB_ACT_END_OF_FILE:
{ {
if ( yywrap( ) ) if ( yywrap( ) )
return 0; return 0;
if ( ! (yy_did_buffer_switch_on_eof) ) if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE; YY_NEW_FILE;
#ifdef __cplusplus #ifdef __cplusplus
return yyinput(); return yyinput();
#else #else
return input(); return input();
#endif #endif
} }
skipping to change at line 4576 skipping to change at line 4587
* @param input_file A readable stream. * @param input_file A readable stream.
* *
* @note This function does not reset the start condition to @c INITIAL . * @note This function does not reset the start condition to @c INITIAL .
*/ */
void yyrestart (FILE * input_file ) void yyrestart (FILE * input_file )
{ {
if ( ! YY_CURRENT_BUFFER ){ if ( ! YY_CURRENT_BUFFER ){
yyensure_buffer_stack (); yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE = YY_CURRENT_BUFFER_LVALUE =
yy_create_buffer(yyin,YY_BUF_SIZE ); yy_create_buffer( yyin, YY_BUF_SIZE );
} }
yy_init_buffer(YY_CURRENT_BUFFER,input_file ); yy_init_buffer( YY_CURRENT_BUFFER, input_file );
yy_load_buffer_state( ); yy_load_buffer_state( );
} }
/** Switch to a different input buffer. /** Switch to a different input buffer.
* @param new_buffer The new input buffer. * @param new_buffer The new input buffer.
* *
*/ */
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{ {
/* TODO. We should be able to replace this entire function body /* TODO. We should be able to replace this entire function body
skipping to change at line 4608 skipping to change at line 4619
if ( YY_CURRENT_BUFFER ) if ( YY_CURRENT_BUFFER )
{ {
/* Flush out information for old buffer. */ /* Flush out information for old buffer. */
*(yy_c_buf_p) = (yy_hold_char); *(yy_c_buf_p) = (yy_hold_char);
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
} }
YY_CURRENT_BUFFER_LVALUE = new_buffer; YY_CURRENT_BUFFER_LVALUE = new_buffer;
yy_load_buffer_state( ); yy_load_buffer_state( );
/* We don't actually know whether we did this switch during /* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag * EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe * is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it. * to go ahead and always set it.
*/ */
(yy_did_buffer_switch_on_eof) = 1; (yy_did_buffer_switch_on_eof) = 1;
} }
static void yy_load_buffer_state (void) static void yy_load_buffer_state (void)
skipping to change at line 4636 skipping to change at line 4647
/** Allocate and initialize an input buffer state. /** Allocate and initialize an input buffer state.
* @param file A readable stream. * @param file A readable stream.
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_ SIZE. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_ SIZE.
* *
* @return the allocated buffer state. * @return the allocated buffer state.
*/ */
YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
{ {
YY_BUFFER_STATE b; YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b ) if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size; b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because /* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters. * we need to put in 2 end-of-buffer characters.
*/ */
b->yy_ch_buf = (char *) yyalloc((yy_size_t) (b->yy_buf_size + 2) ); b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
if ( ! b->yy_ch_buf ) if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1; b->yy_is_our_buffer = 1;
yy_init_buffer(b,file ); yy_init_buffer( b, file );
return b; return b;
} }
/** Destroy the buffer. /** Destroy the buffer.
* @param b a buffer created with yy_create_buffer() * @param b a buffer created with yy_create_buffer()
* *
*/ */
void yy_delete_buffer (YY_BUFFER_STATE b ) void yy_delete_buffer (YY_BUFFER_STATE b )
{ {
if ( ! b ) if ( ! b )
return; return;
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer ) if ( b->yy_is_our_buffer )
yyfree((void *) b->yy_ch_buf ); yyfree( (void *) b->yy_ch_buf );
yyfree((void *) b ); yyfree( (void *) b );
} }
/* Initializes or reinitializes a buffer. /* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer, * This function is sometimes called more than once on the same buffer,
* such as during a yyrestart() or at EOF. * such as during a yyrestart() or at EOF.
*/ */
static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
{ {
int oerrno = errno; int oerrno = errno;
yy_flush_buffer(b ); yy_flush_buffer( b );
b->yy_input_file = file; b->yy_input_file = file;
b->yy_fill_buffer = 1; b->yy_fill_buffer = 1;
/* If b is the current buffer, then yy_init_buffer was _probably_ /* If b is the current buffer, then yy_init_buffer was _probably_
* called from yyrestart() or through yy_get_next_buffer. * called from yyrestart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column. * In that case, we don't want to reset the lineno or column.
*/ */
if (b != YY_CURRENT_BUFFER){ if (b != YY_CURRENT_BUFFER){
b->yy_bs_lineno = 1; b->yy_bs_lineno = 1;
skipping to change at line 4727 skipping to change at line 4738
*/ */
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1; b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW; b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER ) if ( b == YY_CURRENT_BUFFER )
yy_load_buffer_state( ); yy_load_buffer_state( );
} }
/** Pushes the new state onto the stack. The new state becomes /** Pushes the new state onto the stack. The new state becomes
* the current state. This function will allocate the stack * the current state. This function will allocate the stack
* if necessary. * if necessary.
* @param new_buffer The new state. * @param new_buffer The new state.
* *
*/ */
void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{ {
skipping to change at line 4758 skipping to change at line 4769
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
} }
/* Only push if top exists. Otherwise, replace top. */ /* Only push if top exists. Otherwise, replace top. */
if (YY_CURRENT_BUFFER) if (YY_CURRENT_BUFFER)
(yy_buffer_stack_top)++; (yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer; YY_CURRENT_BUFFER_LVALUE = new_buffer;
/* copied from yy_switch_to_buffer. */ /* copied from yy_switch_to_buffer. */
yy_load_buffer_state( ); yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1; (yy_did_buffer_switch_on_eof) = 1;
} }
/** Removes and deletes the top of the stack, if present. /** Removes and deletes the top of the stack, if present.
* The next element becomes the new top. * The next element becomes the new top.
* *
*/ */
void yypop_buffer_state (void) void yypop_buffer_state (void)
{ {
if (!YY_CURRENT_BUFFER) if (!YY_CURRENT_BUFFER)
return; return;
yy_delete_buffer(YY_CURRENT_BUFFER ); yy_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL; YY_CURRENT_BUFFER_LVALUE = NULL;
if ((yy_buffer_stack_top) > 0) if ((yy_buffer_stack_top) > 0)
--(yy_buffer_stack_top); --(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) { if (YY_CURRENT_BUFFER) {
yy_load_buffer_state( ); yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1; (yy_did_buffer_switch_on_eof) = 1;
} }
} }
/* Allocates the stack if it does not exist. /* Allocates the stack if it does not exist.
* Guarantees space for at least one push. * Guarantees space for at least one push.
*/ */
static void yyensure_buffer_stack (void) static void yyensure_buffer_stack (void)
{ {
yy_size_t num_to_alloc; yy_size_t num_to_alloc;
skipping to change at line 4844 skipping to change at line 4855
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
{ {
YY_BUFFER_STATE b; YY_BUFFER_STATE b;
if ( size < 2 || if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR ) base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */ /* They forgot to leave room for the EOB's. */
return NULL; return NULL;
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b ) if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base; b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0; b->yy_is_our_buffer = 0;
b->yy_input_file = NULL; b->yy_input_file = NULL;
b->yy_n_chars = b->yy_buf_size; b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0; b->yy_is_interactive = 0;
b->yy_at_bol = 1; b->yy_at_bol = 1;
b->yy_fill_buffer = 0; b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW; b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer(b ); yy_switch_to_buffer( b );
return b; return b;
} }
/** Setup the input buffer state to scan a string. The next call to yylex() will /** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str. * scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan * @param yystr a NUL-terminated string to scan
* *
* @return the newly allocated buffer state object. * @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use * @note If you want to scan bytes that may contain NUL values, then use
* yy_scan_bytes() instead. * yy_scan_bytes() instead.
*/ */
YY_BUFFER_STATE yy_scan_string (const char * yystr ) YY_BUFFER_STATE yy_scan_string (const char * yystr )
{ {
return yy_scan_bytes(yystr,(int) strlen(yystr) ); return yy_scan_bytes( yystr, (int) strlen(yystr) );
} }
/** Setup the input buffer state to scan the given bytes. The next call to yylex () will /** Setup the input buffer state to scan the given bytes. The next call to yylex () will
* scan from a @e copy of @a bytes. * scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan * @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* *
* @return the newly allocated buffer state object. * @return the newly allocated buffer state object.
*/ */
YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
{ {
YY_BUFFER_STATE b; YY_BUFFER_STATE b;
char *buf; char *buf;
yy_size_t n; yy_size_t n;
int i; int i;
/* Get memory for full buffer, including space for trailing EOB's. */ /* Get memory for full buffer, including space for trailing EOB's. */
n = (yy_size_t) (_yybytes_len + 2); n = (yy_size_t) (_yybytes_len + 2);
buf = (char *) yyalloc(n ); buf = (char *) yyalloc( n );
if ( ! buf ) if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i ) for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i]; buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer(buf,n ); b = yy_scan_buffer( buf, n );
if ( ! b ) if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it /* It's okay to grow etc. this buffer, and we should throw it
* away when we're done. * away when we're done.
*/ */
b->yy_is_our_buffer = 1; b->yy_is_our_buffer = 1;
return b; return b;
} }
skipping to change at line 4924 skipping to change at line 4935
static void yy_push_state (int _new_state ) static void yy_push_state (int _new_state )
{ {
if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
{ {
yy_size_t new_size; yy_size_t new_size;
(yy_start_stack_depth) += YY_START_STACK_INCR; (yy_start_stack_depth) += YY_START_STACK_INCR;
new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int ); new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int );
if ( ! (yy_start_stack) ) if ( ! (yy_start_stack) )
(yy_start_stack) = (int *) yyalloc(new_size ); (yy_start_stack) = (int *) yyalloc( new_size );
else else
(yy_start_stack) = (int *) yyrealloc((void *) (yy_start_s (yy_start_stack) = (int *) yyrealloc(
tack),new_size ); (void *) (yy_start_stack), new_size );
if ( ! (yy_start_stack) ) if ( ! (yy_start_stack) )
YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
} }
(yy_start_stack)[(yy_start_stack_ptr)++] = YY_START; (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
BEGIN(_new_state); BEGIN(_new_state);
} }
skipping to change at line 4952 skipping to change at line 4964
BEGIN((yy_start_stack)[(yy_start_stack_ptr)]); BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
} }
#ifndef YY_EXIT_FAILURE #ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2 #define YY_EXIT_FAILURE 2
#endif #endif
static void yynoreturn yy_fatal_error (const char* msg ) static void yynoreturn yy_fatal_error (const char* msg )
{ {
(void) fprintf( stderr, "%s\n", msg ); fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE ); exit( YY_EXIT_FAILURE );
} }
/* Redefine yyless() so it works in section 3 code. */ /* Redefine yyless() so it works in section 3 code. */
#undef yyless #undef yyless
#define yyless(n) \ #define yyless(n) \
do \ do \
{ \ { \
/* Undo effects of setting up yytext. */ \ /* Undo effects of setting up yytext. */ \
skipping to change at line 5091 skipping to change at line 5103
*/ */
return 0; return 0;
} }
/* yylex_destroy is for both reentrant and non-reentrant scanners. */ /* yylex_destroy is for both reentrant and non-reentrant scanners. */
int yylex_destroy (void) int yylex_destroy (void)
{ {
/* Pop the buffer stack, destroying each element. */ /* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){ while(YY_CURRENT_BUFFER){
yy_delete_buffer(YY_CURRENT_BUFFER ); yy_delete_buffer( YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL; YY_CURRENT_BUFFER_LVALUE = NULL;
yypop_buffer_state(); yypop_buffer_state();
} }
/* Destroy the stack itself. */ /* Destroy the stack itself. */
yyfree((yy_buffer_stack) ); yyfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL; (yy_buffer_stack) = NULL;
/* Destroy the start condition stack. */ /* Destroy the start condition stack. */
yyfree((yy_start_stack) ); yyfree( (yy_start_stack) );
(yy_start_stack) = NULL; (yy_start_stack) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the ne xt time /* Reset the globals. This is important in a non-reentrant scanner so the ne xt time
* yylex() is called, initialization will occur. */ * yylex() is called, initialization will occur. */
yy_init_globals( ); yy_init_globals( );
return 0; return 0;
} }
/* /*
skipping to change at line 5161 skipping to change at line 5173
return realloc(ptr, size); return realloc(ptr, size);
} }
void yyfree (void * ptr ) void yyfree (void * ptr )
{ {
free( (char *) ptr ); /* see yyrealloc() for (char *) c ast */ free( (char *) ptr ); /* see yyrealloc() for (char *) c ast */
} }
#define YYTABLES_NAME "yytables" #define YYTABLES_NAME "yytables"
#line 1014 "scan.l" #line 1013 "scan.l"
int yywrap(void) int yywrap(void)
{ {
if ( --num_input_files > 0 ) if ( --num_input_files > 0 )
{ {
set_input_file( *++input_files ); set_input_file( *++input_files );
return 0; return 0;
} }
else else
 End of changes. 277 change blocks. 
285 lines changed or deleted 295 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS