@Override /* pp */ void init(Preprocessor pp) { super.init(pp); this.digraphs = pp.getFeature(Feature.DIGRAPHS); this.reader.init(pp, this); }
protected void warning(int line, int column, String msg) throws LexerException { if (werror) error(line, column, msg); else if (listener != null) listener.handleWarning(this, line, column, msg); else throw new LexerException("Warning at " + line + ":" + column + ": " + msg); }
/* pp */ void init(Preprocessor pp, LexerSource s) { this.listener = pp.getListener(); this.source = s; setTrigraphs(pp.getFeature(Feature.TRIGRAPHS), pp.getWarning(Warning.TRIGRAPHS)); }
/** * Adds input for the Preprocessor. * * @see #addInput(Source) */ public void addInput(File file) throws IOException { addInput(new FileLexerSource(file)); }
protected void warning(String msg) throws LexerException { if (source != null) source.warning(msg); else throw new LexerException(msg); }
protected void error(int line, int column, String msg) throws LexerException { if (listener != null) listener.handleError(this, line, column, msg); else throw new LexerException("Error at " + line + ":" + column + ": " + msg); }
@Override public Token token() throws IOException, LexerException { throw new LexerException("Cannot read from " + getName()); } @Override
/* pp */ void init(Preprocessor pp, LexerSource s) { this.listener = pp.getListener(); this.source = s; setTrigraphs(pp.getFeature(Feature.TRIGRAPHS), pp.getWarning(Warning.TRIGRAPHS)); }
protected void warning(int line, int column, String msg) throws LexerException { if (werror) error(line, column, msg); else if (listener != null) listener.handleWarning(this, line, column, msg); else throw new LexerException("Warning at " + line + ":" + column + ": " + msg); }
/** * Adds input for the Preprocessor. * * @see #addInput(Source) */ public void addInput(File file) throws IOException { addInput(new FileLexerSource(file)); }
@Override /* pp */ void init(Preprocessor pp) { super.init(pp); this.digraphs = pp.getFeature(Feature.DIGRAPHS); this.reader.init(pp, this); }
protected void warning(int line, int column, String msg) throws LexerException { if (werror) error(line, column, msg); else if (listener != null) listener.handleWarning(this, line, column, msg); else throw new LexerException("Warning at " + line + ":" + column + ": " + msg); }
@Override /* pp */ void init(Preprocessor pp) { super.init(pp); this.digraphs = pp.getFeature(Feature.DIGRAPHS); this.reader.init(pp, this); }