> Perhaps something as simple as adding a catch-all token. When the parser
> encounters something goofy, it will match the last token (and not throw an
> Error), but since it isn't expecting a <CATCHALL> token,
> you'll get a nice ParseException.
>
> <*> TOKEN : {
> < WHATEVER_TOKEN_DEFS_YOU_WANT: "blah" > |
> < CATCHALL: ~[] >
> }
Yes, this is the standard JavaCC trick for preventing the
TokenMgrError from being thrown, and it works just fine (then the
error becomes a ParseException which can be caught.)
However, I'd prefer to just fix the damn thing.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>