[antlr-interest] C runtime API doc out of date (with question) [solved]

Evan Driscoll driscoll at cs.wisc.edu
Wed Dec 2 14:56:27 PST 2009


Evan Driscoll wrote:
> I solved that one, but I'm getting another compile error when I try to
> build it for my grammar:
>   if (psr->pParser->rec->errorCount > 0) {
> produces
>   'errorCount' : is not a member of 'ANTLR3_BASE_RECOGNIZER_struct'
> 
> I did some searching and came across this thread:
> http://www.antlr.org/pipermail/antlr-interest/2009-September/035916.html
> but that only had the resolution to the token source, not the error count.
> 
> I downloaded the examples like was suggested in Jim Idle's reply, but I
> looked in a couple directories with example code and didn't see any that
> actually checked for errors.

Okay, sorry about all the messages I'm sending out, but I took another
look. The treeparser example has errorCode used correctly. The correct
incantation is:
  psr->pParser->rec->state->errorCount

Evan



More information about the antlr-interest mailing list