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

io.protostuff.compiler.parser.ParseErrorLogger Maven / Gradle / Ivy

There is a newer version: 3.1.40
Show newest version
package io.protostuff.compiler.parser;

import org.antlr.v4.runtime.BaseErrorListener;
import org.antlr.v4.runtime.RecognitionException;
import org.antlr.v4.runtime.Recognizer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author Kostiantyn Shchepanovskyi
 */
public class ParseErrorLogger extends BaseErrorListener {

    private static final Logger LOGGER = LoggerFactory.getLogger(ParseErrorLogger.class);

    @Override
    public void syntaxError(Recognizer recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) {
        LOGGER.error("Can not parse line {}:{} - {}", line, charPositionInLine, msg);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy