code: public static TsurgeonPattern parseOperation(String operationString) {
      try {
        TsurgeonParser parser =
          new TsurgeonParser(new StringReader(operationString + "\n"));
        return new TsurgeonPatternRoot(new TsurgeonPattern[] {parser.Root()} );
      } catch(ParseException e) {
        throw new TsurgeonParseException("Error parsing Tsurgeon expression: " +
                                         operationString, e);
      } catch(TokenMgrError e) {
        throw new TsurgeonParseException("Error parsing Tsurgeon expression: " +
                                         operationString, e);
      }
    }
docs: Parses an operation string into a {@link TsurgeonPattern}.  Throws an {@link TsurgeonParseException} if
  the operation string is ill-formed.
  <p>
  Example of use:
  <p>
  <tt>
  TsurgeonPattern p = Tsurgeon.parseOperation("prune ed");
  </tt>
  @param operationString The operation to perform, as a text string
  @return the operation pattern.