Updated documentation in BailErrorStrategy

This commit is contained in:
Sam Harwell 2012-08-21 13:16:28 -05:00
parent 4508f96ce4
commit a51f1e7055
1 changed files with 6 additions and 5 deletions

View File

@ -30,13 +30,14 @@
package org.antlr.v4.runtime;
/** Bail out of parser at first syntax error. Do this to use it:
* myparser.setErrorHandler(new BailErrorStrategy<Token>());
* <p/>
* {@code myparser.setErrorHandler(new BailErrorStrategy());}
*/
public class BailErrorStrategy extends DefaultErrorStrategy {
/** Instead of recovering from exception e, Re-throw wrote it wrapped
* in a generic RuntimeException so it is not caught by the
* rule function catches. Exception e is the "cause" of the
* RuntimeException.
/** Instead of recovering from exception {@code e}, re-throw it wrapped
* in a generic {@link RuntimeException} so it is not caught by the
* rule function catches. Use {@link RuntimeException#getCause()} to get the
* original {@link RecognitionException}.
*/
@Override
public void recover(Parser recognizer, RecognitionException e) {