[antlr-interest] What exactly does 'follow set' mean?
Ric Klaren
ric.klaren at gmail.com
Tue Apr 19 11:39:20 PDT 2005
shmuel siegel wrote:
> I assume that you mean codeGenBitsetTestThreshold as that is actually
> accepted. It only solves one of my problems; it makes the normal parsing
> readable. But it doesn't let me know what consume is doing during error
> recovery. I would still like an option for expanding the bitset into
> readable entities. Inline comments would be fine.
Turn on C++ mode for one run. C++ mode dumps the follow set contents in
comments. Antlr's default error recovery does a consumeUntil the first
token in the follow set (with defaultErrorHandler = true)
You can customize the error handling per rule. Doing inserts like you
ask in a previous post is tricky though (it depends on the presence of
syntactic predicates in you grammar wether this is doable or not).
Cheers,
Ric
More information about the antlr-interest
mailing list