I am encountering a problem running the Rows.g4 example from The Definitive ANTLR 4 reference.
Specifically, I am getting a NullReferenceException on (line 82) of RowParser.cs:
_errHandler.Sync(this);
_errHandler is an instance of DefaultErrorStrategy and the NullReferenceException is occurring somewhere in the Sync method.
Has any encountered this before?
Thanks,
Shea
I found a solution (but don't understand the innards of the DefaultErrorStrategy class so I'm not sure why it fixes the problem). You must insert:
_interp = new ParserATNSimulator(this, _ATN);
into the RowsParser constructor defined in Rows.g4
Regards,
Shea