Search in sources :

Example 1 with SyntaxError

use of abs.frontend.parser.SyntaxError in project abstools by abstools.

the class SyntaxErrorCollector method syntaxError.

@Override
public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) {
    SyntaxError err = new SyntaxError(msg, line, charPositionInLine + 1);
    err.setFile(filename);
    parserErrors.add(err);
    // super.syntaxError(recognizer, offendingSymbol, line, charPositionInLine, msg, e);
    if (raiseExceptions) {
        throw new ParseException(err);
    }
}
Also used : SyntaxError(abs.frontend.parser.SyntaxError) ParseException(abs.frontend.parser.ParseException)

Aggregations

ParseException (abs.frontend.parser.ParseException)1 SyntaxError (abs.frontend.parser.SyntaxError)1