/** * Handles a warning. * * If a PreprocessorListener is installed, it receives the * warning. Otherwise, an exception is thrown. * * @see #warning(int, int, String) */ protected void warning(@Nonnull Token tok, @Nonnull String msg) throws LexerException { warning(tok.getLine(), tok.getColumn(), msg); }
/** * Handles a warning. * * If a PreprocessorListener is installed, it receives the * warning. Otherwise, an exception is thrown. * * @see #warning(int, int, String) */ protected void warning(Token tok, String msg) throws LexerException { warning(tok.getLine(), tok.getColumn(), msg); }
/** * Handles a warning. * * If a PreprocessorListener is installed, it receives the * warning. Otherwise, an exception is thrown. * * @see #warning(int, int, String) */ protected void warning(Token tok, String msg) throws LexerException { warning(tok.getLine(), tok.getColumn(), msg); }
protected void pragma(@Nonnull Token name, @Nonnull List<Token> value) throws IOException, LexerException { if (getFeature(Feature.PRAGMA_ONCE)) { if ("once".equals(name.getText())) { pragma_once(name); return; } } warning(name, "Unknown #" + "pragma: " + name.getText()); }
private void error(Token pptok, boolean is_error) throws IOException, LexerException { StringBuilder buf = new StringBuilder(); buf.append('#').append(pptok.getText()).append(' '); /* Peculiar construction to ditch first whitespace. */ Token tok = source_token_nonwhite(); ERROR: for (;;) { switch (tok.getType()) { case NL: case EOF: break ERROR; default: buf.append(tok.getText()); break; } tok = source_token(); } if (is_error) error(pptok, buf.toString()); else warning(pptok, buf.toString()); }
private void error(@Nonnull Token pptok, boolean is_error) throws IOException, LexerException { StringBuilder buf = new StringBuilder(); buf.append('#').append(pptok.getText()).append(' '); /* Peculiar construction to ditch first whitespace. */ Token tok = source_token_nonwhite(); ERROR: for (;;) { switch (tok.getType()) { case NL: case EOF: break ERROR; default: buf.append(tok.getText()); break; } tok = source_token(); } if (is_error) error(pptok, buf.toString()); else warning(pptok, buf.toString()); }
private void error(Token pptok, boolean is_error) throws IOException, LexerException { StringBuilder buf = new StringBuilder(); buf.append('#').append(pptok.getText()).append(' '); /* Peculiar construction to ditch first whitespace. */ Token tok = source_token_nonwhite(); ERROR: for (;;) { switch (tok.getType()) { case NL: case EOF: break ERROR; default: buf.append(tok.getText()); break; } tok = source_token(); } if (is_error) error(pptok, buf.toString()); else warning(pptok, buf.toString()); }
break HEADER; default: warning(tok, "Unexpected token on #" + "include line"); return source_skipline(false);
break HEADER; default: warning(tok, "Unexpected token on #"+"include line"); return source_skipline(false);
break HEADER; default: warning(tok, "Unexpected token on #"+"include line"); return source_skipline(false);
case IDENTIFIER: if (warnings.contains(Warning.UNDEF)) warning(tok, "Undefined token '" + tok.getText() + "' encountered in conditional."); lhs = 0;
case IDENTIFIER: if (warnings.contains(Warning.UNDEF)) warning(tok, "Undefined token '" + tok.getText() + "' encountered in conditional."); lhs = 0;
case IDENTIFIER: if (warnings.contains(Warning.UNDEF)) warning(tok, "Undefined token '" + tok.getText() + "' encountered in conditional."); lhs = 0;