All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ai.vespa.schemals.parser.rankingexpression.InvalidToken Maven / Gradle / Ivy

There is a newer version: 8.441.21
Show newest version
/* 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