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

bool.LexerAdapter Maven / Gradle / Ivy

There is a newer version: 1.0.20
Show newest version
package bool;

import java.io.IOException;

class LexerAdapter implements Parser.Lexer {
    private final Lexer lexer;

    public LexerAdapter(Lexer lexer) {
        this.lexer = lexer;
    }

    @Override
    public Expr getLVal() {
        return new Var(lexer.yytext());
    }

    @Override
    public int yylex() throws IOException {
        return lexer.yylex();
    }

    @Override
    public void yyerror(String s) {
        throw new SyntaxError(s, lexer.getYyline() + 1, lexer.getYycolumn() + 1);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy