/// <summary> /// Parses an operation string into a /// <see cref="TsurgeonPattern"/> /// . Throws an /// <see cref="TsurgeonParseException"/> /// if /// the operation string is ill-formed. /// <p> /// Example of use: /// <p> /// <tt> /// TsurgeonPattern p = Tsurgeon.parseOperation("prune ed"); /// </tt> /// </summary> /// <param name="operationString">The operation to perform, as a text string</param> /// <returns>the operation pattern.</returns> public static TsurgeonPattern ParseOperation(string operationString) { try { TsurgeonParser parser = new TsurgeonParser(new StringReader(operationString + '\n')); return(parser.Root()); } catch (Exception e) { throw new TsurgeonParseException("Error parsing Tsurgeon expression: " + operationString, e); } }
public SimpleNode(TsurgeonParser p, int i) : this(i) { parser = p; }