[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(no subject)
From: |
Iskarion |
Subject: |
(no subject) |
Date: |
Thu, 29 Sep 2005 11:14:05 +0200 (MEST) |
Hi,
I have created a tool for parsing buffers with flex. I just did the
following:
long STDCALL scanner(char* pBuffer)
{
YY_BUFFER_STATE handle = yy_scan_string(pBuffer);
long ret = yylex();
yy_delete_buffer(handle);
return ret;
}
Now to make it reentrant I use the -+ option and tried to make a workaround
for yy_scan_string:
long STDCALL scanner(std::istream* ist)
{
FlexLexer* lexer = new yyFlexLexer();
YY_BUFFER_STATE handle = lexer->yy_create_buffer((istream*)ist,100);
long ret = lexer->yylex();
lexer->yy_delete_buffer(handle);
return ret;
}
The problem is that the lexer->yylex(); does not return a value. I`m not
really sure wheter there is another function for yy_scan_string or not.
thx in advance
--
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
- (no subject), abdullah habakkuk, 2005/09/19
- (no subject),
Iskarion <=