How do I throw a ParseException instead of a TokenMgrError?
If you don’t want any TokenMgrErrors being thrown, try putting a regular expression production at the very end of your .jj file that will match any character: < * > TOKEN : { < UNEXPECTED_CHAR : ~[] > } However, this may not do the trick. In particular, if you use MORE, it may be hard to avoid TokenMgrErrors altogether. It is best to make a policy of catching TokenMgrErrors as well as ParseExceptions, whenever you call an entry point to the parser.