import includes_default from "../../../../lodash-es/includes.js";
var MISMATCHED_TOKEN_EXCEPTION = "MismatchedTokenException", NO_VIABLE_ALT_EXCEPTION = "NoViableAltException", EARLY_EXIT_EXCEPTION = "EarlyExitException", NOT_ALL_INPUT_PARSED_EXCEPTION = "NotAllInputParsedException", RECOGNITION_EXCEPTION_NAMES = [
	MISMATCHED_TOKEN_EXCEPTION,
	NO_VIABLE_ALT_EXCEPTION,
	EARLY_EXIT_EXCEPTION,
	NOT_ALL_INPUT_PARSED_EXCEPTION
];
Object.freeze(RECOGNITION_EXCEPTION_NAMES);
function isRecognitionException(l) {
	return includes_default(RECOGNITION_EXCEPTION_NAMES, l.name);
}
var RecognitionException = class extends Error {
	constructor(e, l) {
		/* istanbul ignore next - V8 workaround to remove constructor from stacktrace when typescript target is ES5 */
		super(e), this.token = l, this.resyncedTokens = [], Object.setPrototypeOf(this, new.target.prototype), Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
	}
}, MismatchedTokenException = class extends RecognitionException {
	constructor(e, u, d) {
		super(e, u), this.previousToken = d, this.name = MISMATCHED_TOKEN_EXCEPTION;
	}
}, NoViableAltException = class extends RecognitionException {
	constructor(e, l, d) {
		super(e, l), this.previousToken = d, this.name = NO_VIABLE_ALT_EXCEPTION;
	}
}, NotAllInputParsedException = class extends RecognitionException {
	constructor(e, l) {
		super(e, l), this.name = NOT_ALL_INPUT_PARSED_EXCEPTION;
	}
}, EarlyExitException = class extends RecognitionException {
	constructor(e, l, u) {
		super(e, l), this.previousToken = u, this.name = EARLY_EXIT_EXCEPTION;
	}
};
export { EarlyExitException, MismatchedTokenException, NoViableAltException, NotAllInputParsedException, isRecognitionException };
