[antlr-interest] ANTLR v3.1.1 released
Randall R Schulz
rschulz at sonic.net
Tue Oct 21 12:08:48 PDT 2008
On Tuesday 21 October 2008 11:52, Randall R Schulz wrote:
> On Tuesday 21 October 2008 11:44, Terence Parr wrote:
> > ...
> >
> > It's hard to see a code trace that could given an error (not
> > warning) that wouldn't be trapped here. Hmm...ok, let me know if
> > you find a future issue.
> >
> > Ter
>
> From the 3.1.1 source:
>
> -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
> public static ErrorState getErrorState() {
> ErrorState ec = (ErrorState)threadToErrorStateMap.get(Thread.currentThread()); if ( ec==null ) {
> ec = new ErrorState();
> threadToErrorStateMap.put(Thread.currentThread(), ec);
> }
> return ec;
> }
>
> public static int getNumErrors() {
> return getErrorState().errors;
> }
> -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
>
>
> Perhaps its some kind of thread issue / mix-up?
I see something called "two-threaded DFA conversion" and a class called
NFAConversionThread. Maybe the errors are getting reported on a thread
other than the one you check when wrapping up?
Randall Schulz
More information about the antlr-interest
mailing list