Hi, All,

On my project, I have a parser for parsing different statements again and
again. In order to save a little time on initialization, I would like to
reuse the LEXER and PARSER objects created the first time, something like
this:

if (bInitialized)
{
    reinitialize();
}
else
{
   initialize();
   bInitialized = true;
}

The problem now is how to write reinitialize() safely. I have no idea on
which fields of LEXER or PARSER objects must be reset to which status. Then
my current code works most of the time, but it encounters NULL pointer
occasionally(I am sure the grammar file is good because if I don't reuse the
LEXER and PARSER objects, everything goes fine).

Anybody could give me some ideas?

Thanks in advance.

-- 
===========================
Regards
Ronghui Yu

--

You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to