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


_______________________________________________
Help-flex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-flex

Reply via email to