[antlr-interest] A problem with EOF.
prashantdeva
prashantdeva at yahoo.com
Fri Nov 26 15:46:29 PST 2004
I am trying to give Antlr a null terminated string to parse using a
StringReader. Something like-
String text;
....
StringReader reader = new StringReader(text);
But now when the end of the string is reached, Antlr wants a EOF
instead of a null, so it throws an exception saying 'unexpected token
found : null'.
Is there any way i can Antlr to look for a null instead of EOF as the
terminating character so that it doesnt throw the exception everytime?
Of course i can catch the exception everytime, but i need to parse
VERY frequently and exceptions thrown can prove very expensive.
PRASHANT
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list