flex problems [was: slightly more info for bogoutil segfault]

David Relson relson at osagesoftware.com
Sun Aug 3 01:55:18 CEST 2003


At 07:43 PM 8/2/03, Clint Adams wrote:
> > Breaks how?
>
>flex -olexer_v3.c ../../bogofilter/src/lexer_v3.l
>if gcc -DHAVE_CONFIG_H -I. -I../../bogofilter/src 
>-I.  -I../../bogofilter/src/dcdflib/doc  -DBOGOFILTER -g -O2  -Wall -W 
>-Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wbad-function-cast 
>-Wcast-qual -Wcast-align -Wwrite-strings -Waggregate-return 
>-Wmissing-declarations -Wmissing-format-attribute -Wnested-externs -ggdb 
>-fno-common -Wchar-subscripts -Wcomment -Wimplicit -Wsequence-point 
>-Wreturn-type -Wfloat-equal -Wpointer-arith -Wno-system-headers -MT 
>lexer_v3.o -MD -MP -MF ".deps/lexer_v3.Tpo" \
>   -c -o lexer_v3.o `test -f 'lexer_v3.c' || echo 
> '../../bogofilter/src/'`lexer_v3.c; \
>then mv -f ".deps/lexer_v3.Tpo" ".deps/lexer_v3.Po"; \
>else rm -f ".deps/lexer_v3.Tpo"; exit 1; \
>fi
>lexer_v3.c:39001: warning: no previous prototype for `lexer_v3_get_lineno'
>lexer_v3.c:39010: warning: no previous prototype for `lexer_v3_get_in'
>lexer_v3.c:39018: warning: no previous prototype for `lexer_v3_get_out'
>lexer_v3.c:39026: warning: no previous prototype for `lexer_v3_get_leng'
>lexer_v3.c:39035: warning: no previous prototype for `lexer_v3_get_text'
>lexer_v3.c:39044: warning: no previous prototype for `lexer_v3_set_lineno'
>lexer_v3.c:39056: warning: no previous prototype for `lexer_v3_set_in'
>lexer_v3.c:39061: warning: no previous prototype for `lexer_v3_set_out'
>lexer_v3.c:39066: warning: no previous prototype for `lexer_v3_get_debug'
>lexer_v3.c:39071: warning: no previous prototype for `lexer_v3_set_debug'
>lexer_v3.c:39077: warning: no previous prototype for `lexer_v3_lex_destroy'
>../../bogofilter/src/lexer_v3.l: In function `reorder_html':
>../../bogofilter/src/lexer_v3.l:284: error: `yytext_ptr' undeclared (first 
>use in this function)
>../../bogofilter/src/lexer_v3.l:284: error: (Each undeclared identifier is 
>reported only once
>../../bogofilter/src/lexer_v3.l:284: error: for each function it appears in.)

Can you send me the generated lexer_v3.c file?  Looking at my copy 
(generated by flex version 2.5.4), line lexer_v3.l:284 is unput(), where 
unput is a flex defined macro that uses yytext_ptr, which is defined as 
"#define yytext_ptr yytext".  Let's see what the newer flex 2.5.31 does !!!





More information about the bogofilter-dev mailing list