@Override public String toString() { StringBuilder buf = new StringBuilder(); Source s = getSource(); while (s != null) { buf.append(" -> ").append(String.valueOf(s)).append("\n"); s = s.getParent(); } Map<String, Macro> macros = new TreeMap<String, Macro>(getMacros()); for (Macro macro : macros.values()) { buf.append("#").append("macro ").append(macro).append("\n"); } return buf.toString(); }
public String toString() { StringBuilder buf = new StringBuilder(); Source s = getSource(); while (s != null) { buf.append(" -> ").append(String.valueOf(s)).append("\n"); s = s.getParent(); } Map<String,Macro> macros = getMacros(); List<String> keys = new ArrayList<String>( macros.keySet() ); Collections.sort(keys); Iterator<String> mt = keys.iterator(); while (mt.hasNext()) { String key = mt.next(); Macro macro = macros.get(key); buf.append("#").append("macro ").append(macro).append("\n"); } return buf.toString(); }
public String toString() { StringBuilder buf = new StringBuilder(); Source s = getSource(); while (s != null) { buf.append(" -> ").append(String.valueOf(s)).append("\n"); s = s.getParent(); } Map<String,Macro> macros = getMacros(); List<String> keys = new ArrayList<String>( macros.keySet() ); Collections.sort(keys); Iterator<String> mt = keys.iterator(); while (mt.hasNext()) { String key = mt.next(); Macro macro = macros.get(key); buf.append("#").append("macro ").append(macro).append("\n"); } return buf.toString(); }
/** * Returns an NL or an EOF token. * * The metadata on the token will be correct, which is better * than generating a new one. * * This method can, as of recent patches, return a P_LINE token. */ private Token source_skipline(boolean white) throws IOException, LexerException { // (new Exception("skipping line")).printStackTrace(System.out); Source s = getSource(); Token tok = s.skipline(white); /* XXX Refactor with source_token() */ if (tok.getType() == EOF && s.isAutopop()) { // System.out.println("Autopop " + s); Token mark = pop_source(true); if (mark != null) return mark; } return tok; }
Source s = getSource(); if (s == null) { Token t = next_source();
/** * Returns an NL or an EOF token. * * The metadata on the token will be correct, which is better * than generating a new one. * * This method can, as of recent patches, return a P_LINE token. */ private Token source_skipline(boolean white) throws IOException, LexerException { // (new Exception("skipping line")).printStackTrace(System.out); Source s = getSource(); Token tok = s.skipline(white); /* XXX Refactor with source_token() */ if (tok.getType() == EOF && s.isAutopop()) { // System.out.println("Autopop " + s); pop_source(); Source t = getSource(); if (getFeature(Feature.LINEMARKERS) && s.isNumbered() && t != null) { /* We actually want 'did the nested source * contain a newline token', which isNumbered() * approximates. This is not perfect, but works. */ return line_token(t.getLine() + 1, t.getName(), " 2"); } } return tok; }
/** * Returns an NL or an EOF token. * * The metadata on the token will be correct, which is better * than generating a new one. * * This method can, as of recent patches, return a P_LINE token. */ private Token source_skipline(boolean white) throws IOException, LexerException { // (new Exception("skipping line")).printStackTrace(System.out); Source s = getSource(); Token tok = s.skipline(white); /* XXX Refactor with source_token() */ if (tok.getType() == EOF && s.isAutopop()) { // System.out.println("Autopop " + s); pop_source(); Source t = getSource(); if (getFeature(Feature.LINEMARKERS) && s.isNumbered() && t != null) { /* We actually want 'did the nested source * contain a newline token', which isNumbered() * approximates. This is not perfect, but works. */ return line_token(t.getLine() + 1, t.getName(), " 2"); } } return tok; }
Source s = pp.getSource(); while (s != null) { System.err.println(" -> " + s);
Source s = pp.getSource(); while (s != null) { System.err.println(" -> " + s);
listener.handleSourceChange(this.source, SourceChangeEvent.RESUME); Source t = getSource(); if (getFeature(Feature.LINEMARKERS) && s.isNumbered()
Source s = pp.getSource(); while (s != null) { buf.append(" -> ").append(s).append("\n");
String name = getSource().getName(); if (name == null) name = "<no file>";
String name = getSource().getName(); if (name == null) name = "<no file>";
} else if (m == __FILE__) { StringBuilder buf = new StringBuilder("\""); String name = getSource().getName(); if (name == null) name = "<no file>";
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;
Token tok; if (!isActive()) { Source s = getSource(); if (s == null) { Token t = next_source();