public String toString() { return "..." + context(current) + "..."; }
public String toString() { return "..." + context(current) + "..."; }
char unicode() { if (current + 4 > text.length()) { throw new IllegalArgumentException("Unicode \\u escape at eof at pos ..." + context(current) + "..."); } String s = text.subSequence(current, current + 4).toString(); int n = Integer.parseInt(s, 16); return (char) n; }
char unicode() { if (current + 4 > text.length()) { throw new IllegalArgumentException("Unicode \\u escape at eof at pos ..." + context(current) + "..."); } String s = text.subSequence(current, current + 4).toString(); int n = Integer.parseInt(s, 16); return (char) n; }
public List<List<List<String>>> program() { program = new ArrayList<>(); ws(); if (!eof()) { program.add(pipeline()); while (peek() == ';' || peek() == '\n') { current++; List<List<String>> pipeline = pipeline(); program.add(pipeline); } } if (!eof()) { throw new RuntimeException("Program has trailing text: " + context(current)); } List<List<List<String>>> p = program; program = null; return p; }
public List<List<List<String>>> program() { program = new ArrayList<>(); ws(); if (!eof()) { program.add(pipeline()); while (peek() == ';' || peek() == '\n') { current++; List<List<String>> pipeline = pipeline(); program.add(pipeline); } } if (!eof()) { throw new RuntimeException("Program has trailing text: " + context(current)); } List<List<List<String>>> p = program; program = null; return p; }
CharSequence findVar() { int start = current; char c = peek(); if (c == '{') { next(); int end = find('}', '{'); return text.subSequence(start, end); } if (c == '(') { next(); int end = find(')', '('); return text.subSequence(start, end); } if (Character.isJavaIdentifierPart(c)) { while (c == '$') { c = next(); } while (!eof() && (Character.isJavaIdentifierPart(c) || c == '.') && c != '$') { next(); c = peek(); } return text.subSequence(start, current); } throw new IllegalArgumentException( "Reference to variable does not match syntax of a variable: " + context(start)); }
CharSequence findVar() { int start = current; char c = peek(); if (c == '{') { next(); int end = find('}', '{'); return text.subSequence(start, end); } if (c == '(') { next(); int end = find(')', '('); return text.subSequence(start, end); } if (Character.isJavaIdentifierPart(c)) { while (c == '$') { c = next(); } while (!eof() && (Character.isJavaIdentifierPart(c) || c == '.') && c != '$') { next(); c = peek(); } return text.subSequence(start, current); } throw new IllegalArgumentException( "Reference to variable does not match syntax of a variable: " + context(start)); }
if (eof()) { throw new RuntimeException("Eof found in the middle of a compound for '" + target + deeper + "', begins at " + context(start));
if (eof()) { throw new RuntimeException("Eof found in the middle of a compound for '" + target + deeper + "', begins at " + context(start));