2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.yang.parser.impl;
10 import org.antlr.v4.runtime.BaseErrorListener;
11 import org.antlr.v4.runtime.RecognitionException;
12 import org.antlr.v4.runtime.Recognizer;
13 import org.slf4j.Logger;
14 import org.slf4j.LoggerFactory;
16 final class YangErrorListener extends BaseErrorListener {
17 private final static Logger logger = LoggerFactory.getLogger(YangErrorListener.class);
20 public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine,
21 String msg, RecognitionException e) {
22 logger.warn("line " + line + ":" + charPositionInLine + " " + msg);