/** * Defines the given name as a macro. * * The String value is lexed into a token stream, which is * used as the macro expansion. * * @throws LexerException if the definition fails or is otherwise illegal. */ public void addMacro(@Nonnull String name, @Nonnull String value) throws LexerException { try { Macro m = new Macro(name); StringLexerSource s = new StringLexerSource(value); for (;;) { Token tok = s.token(); if (tok.getType() == EOF) break; m.addToken(tok); } addMacro(m); } catch (IOException e) { throw new LexerException(e); } }
if (matcher.matches()) { name = matcher.group(1); Macro macro = new Macro(new StringLexerSource(value), name); String argsStr = matcher.group(2); List<String> args = new ArrayList<String>();
if (matcher.matches()) { name = matcher.group(1); Macro macro = new Macro(new StringLexerSource(value), name); String argsStr = matcher.group(2); List<String> args = new ArrayList<String>();
/** * Defines the given name as a macro. * * The String value is lexed into a token stream, which is * used as the macro expansion. */ public void addMacro(String name, String value) throws LexerException { try { Macro m = new Macro(name); StringLexerSource s = new StringLexerSource(value); for (;;) { Token tok = s.token(); if (tok.getType() == EOF) break; m.addToken(tok); } addMacro(m); } catch (IOException e) { throw new LexerException(e); } }
/** * Defines the given name as a macro. * * The String value is lexed into a token stream, which is * used as the macro expansion. */ public void addMacro(String name, String value) throws LexerException { try { Macro m = new Macro(name); StringLexerSource s = new StringLexerSource(value); for (;;) { Token tok = s.token(); if (tok.getType() == EOF) break; m.addToken(tok); } addMacro(m); } catch (IOException e) { throw new LexerException(e); } }
Macro m = new Macro(getSource(), name); List<String> args;
Macro m = new Macro(getSource(), name); List<String> args;
Macro m = new Macro(getSource(), name); List<String> args;