import { END_OF_FILE as e } from "../parser.js";
//#region ../../node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js
var t = class {
	initLexerAdapter() {
		this.tokVector = [], this.tokVectorLength = 0, this.currIdx = -1;
	}
	set input(e) {
		if (this.selfAnalysisDone !== !0) throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");
		this.reset(), this.tokVector = e, this.tokVectorLength = e.length;
	}
	get input() {
		return this.tokVector;
	}
	SKIP_TOKEN() {
		return this.currIdx <= this.tokVectorLength - 2 ? (this.consumeToken(), this.LA_FAST(1)) : e;
	}
	LA_FAST(e) {
		let t = this.currIdx + e;
		return this.tokVector[t];
	}
	LA(t) {
		let n = this.currIdx + t;
		return n < 0 || this.tokVectorLength <= n ? e : this.tokVector[n];
	}
	consumeToken() {
		this.currIdx++;
	}
	exportLexerState() {
		return this.currIdx;
	}
	importLexerState(e) {
		this.currIdx = e;
	}
	resetLexerState() {
		this.currIdx = -1;
	}
	moveToTerminatedState() {
		this.currIdx = this.tokVectorLength - 1;
	}
	getLexerPosition() {
		return this.exportLexerState();
	}
};
//#endregion
export { t as LexerAdapter };
