public List<List<String>> pipeline() { statements = new ArrayList<>(); statements.add(statement()); while (peek() == '|') { current++; ws(); if (!eof()) { statements.add(statement()); } else { statements.add(new ArrayList<>()); break; } } List<List<String>> s = statements; statements = null; return s; }
public List<List<String>> pipeline() { statements = new ArrayList<>(); statements.add(statement()); while (peek() == '|') { current++; ws(); if (!eof()) { statements.add(statement()); } else { statements.add(new ArrayList<>()); break; } } List<List<String>> s = statements; statements = null; return s; }
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; }
public List<String> statement() { statement = new ArrayList<>(); statement.add(value()); while (!eof()) { ws(); if (peek() == '|' || peek() == ';' || peek() == '\n') { break; } if (!eof()) { statement.add(messy()); } } List<String> s = statement; statement = null; return s; }
public List<String> statement() { statement = new ArrayList<>(); statement.add(value()); while (!eof()) { ws(); if (peek() == '|' || peek() == ';' || peek() == '\n') { break; } if (!eof()) { statement.add(messy()); } } List<String> s = statement; statement = null; return s; }
public String value() { ws();
public String value() { ws();