lex/flex-problem scanning file many times

lex/flex-problem scanning file many times

Post by Nicolas Schmi » Thu, 03 Aug 1995 04:00:00



Does anyone have experience in using lex/flex to scan a file
more than one time? If so, what variables have to be reset
or which functions have to be called to make the scanner
work??

With flex I tried to use yyrestart() after opening the same
file a second time, but the lexer broke, i.e. it scanned
where it shouldn't scan (don't know - strange things happend).

With lex the following happend:
While scanning a very large file, after some 100K, suddenly
the message "Input string too long, limit 200" appeared.
But the file definitely was alright. I used dbx to see the
string yytext grow larger and larger, but it contained only
tokens that _can_ be matched...

If you ever did have an simliar problem or anyway have some
kind of remark to this problem please let me know!!

Thanks
Nico Schmidt


 
 
 

1. lex/flex problem scanning a file many times

Does anyone have experience in using lex/flex to scan a file
more than one time? If so, what variables have to be reset
or which functions have to be called to make the scanner
work??

With flex I tried to use yyrestart() after opening the same
file a second time, but the lexer broke, i.e. it scanned
where it shouldn't scan (don't know - strange things happend).

With lex the following happend:
While scanning a very large file, after some 100K, suddenly
the message "Input string too long, limit 200" appeared.
But the file definitely was alright. I used dbx to see the
string yytext grow larger and larger, but it contained only
tokens that _can_ be matched...

If you ever did have an similar problem or anyway have some
kind of remark to this problem please let me know!!

Thanks
Nico Schmidt


2. /dev/cua1 clueless.

3. Lex problem (How do i scan a binary file?)

4. SLIP/DIP/TIA

5. No X programs work / Need flex or lex

6. Newbie question

7. Object-oriented lex(flex) and yacc(bison) for c++?

8. Linux Redhat login help

9. searching for lex, not flex...

10. lookinf for Flex.Lex and Bison/Yacc ...

11. Need lex not flex for linux

12. flex/lex/bison/yacc parser for C ?

13. Yacc/Lex vs Bison/Flex