code: public static Pipeline parse(List<String> scriptLines,
              String parentFilePath, List<String> replacementVars)
              throws ParseException, IOException {
          if (replacementVars == null)
              replacementVars = new ArrayList<String>();
  
          // parse
          Pipeline pipeline = parseAndDispatch(scriptLines, new Pipeline(),
                  parentFilePath, replacementVars);
  
          // verify pipeline not empty
          if (pipeline.crd == null)
              LOG.warn("no CollectionReader defined in this pipeline");
          // throw new ParseException(
          // "no collection reader defined in this pipeline script", -1);
          if (pipeline.aeds.isEmpty())
              throw new ParseException(
                      "no analysis engines defined in this pipeline script, at least define one",
                      -1);
  
          return pipeline;
      }
docs: Parses lines from a pipeline script.
  
  @param scriptLines
  the lines of a pipeline script to parse
  @param parentFilePath
  the path to the parent File, used for resolving includes
  @param replacementVars
  the variables to replace in the original pipeline script. The
  first variable gets inserted in place of all $1, the second in
  place of $2, etc.
  @return the parsed {@link Pipeline}