private Token source_token_nonwhite() throws IOException, LexerException { Token tok; do { tok = source_token(); } while (isWhite(tok)); return tok; }
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(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 Token source_token_nonwhite() throws IOException, LexerException { Token tok; do { tok = source_token(); } while (isWhite(tok)); return tok; }
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 Token source_token_nonwhite() throws IOException, LexerException { Token tok; do { tok = source_token(); } while (isWhite(tok)); return tok; }
List<String> args; tok = source_token(); if (tok.getType() == '(') { tok = source_token_nonwhite(); break; tok = source_token();
private Token expanded_token() throws IOException, LexerException { for (;;) { Token tok = source_token(); // System.out.println("Source token is " + tok); if (tok.getType() == IDENTIFIER) { Macro m = macros.get(tok.getText()); if (m == null) return tok; if (source.isExpanding(m)) return tok; if (macro(m, tok)) continue; } return tok; } }
List<String> args; tok = source_token(); if (tok.getType() == '(') { tok = source_token_nonwhite(); break; tok = source_token();
private Token expanded_token() throws IOException, LexerException { for (;;) { Token tok = source_token(); // System.out.println("Source token is " + tok); if (tok.getType() == IDENTIFIER) { Macro m = macros.get(tok.getText()); if (m == null) return tok; if (source.isExpanding(m)) return tok; if (macro(m, tok)) continue; } return tok; } }
List<String> args; tok = source_token(); if (tok.getType() == '(') { tok = source_token_nonwhite(); break; tok = source_token();
@Nonnull private Token expanded_token() throws IOException, LexerException { for (;;) { Token tok = source_token(); // System.out.println("Source token is " + tok); if (tok.getType() == IDENTIFIER) { Macro m = getMacro(tok.getText()); if (m == null) return tok; if (source.isExpanding(m)) return tok; if (macro(m, tok)) continue; } return tok; } }
tok = source_token(); tok = source_token();
Token tok = source_token(); switch (tok.getType()) { case EOF: VALUE: for (;;) { tok = source_token(); switch (tok.getType()) { case EOF:
tok = source_token(); tok = source_token();
OPEN: for (;;) { tok = source_token(); tok = source_token();
tok = source_token(); tok = source_token();
tok = source_token(); tok = source_token();
tok = source_token(); } finally { tok = source_token();