ai.vespa.schemals.parser.rankingexpression.InvalidToken Maven / Gradle / Ivy
/* Generated by: CongoCC Parser Generator. InvalidToken.java */
package ai.vespa.schemals.parser.rankingexpression;
/**
* Token subclass to represent lexically invalid input
*/
public class InvalidToken extends Token implements ParsingProblem {
public InvalidToken(RankingExpressionParserLexer tokenSource, int beginOffset, int endOffset) {
super(TokenType.INVALID, tokenSource, beginOffset, endOffset);
this.setDirty(true);
}
private ParseException cause;
private String errorMessage;
void setCause(ParseException cause) {
this.cause = cause;
}
public ParseException getCause() {
return cause;
}
public String getErrorMessage() {
if (errorMessage != null) return errorMessage;
return "lexically invalid input";
// REVISIT
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy