[antlr-interest] mystery in printing order
idontwantanidwith2000init
idontwantanidwith2000init at yahoo.com
Fri Apr 16 01:51:35 PDT 2004
Hi,
I turned errorDefaultHandler off.
I wrote the following:
System.out.print("#");
reportError(exceptionVariable.toString());
consumeUntil(NEWLINE);
consume();
System.out.print("? please type an id =>");
t = idToken();
idToken is the rule we are tring to parse.
It will lead to recursion but this is not the issue.
The issue is the output order:
#? please type an id =>error: line 1:16: expecting ID, found 'moo'
While the expected output is:
#error: line 1:16: expecting ID, found 'moo'
? please type an id =>
It seems like System.out.print is quicker to print then reportError.
Is there threading invoved?
How can I make reportError output to be writethrough ?
BTW,
Could I read ANTLR code?
Tal.
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