code: public static Tree parse(String characters, SelectedRule selectedRule) throws Exception
      {
          if (characters == null) throw new IllegalArgumentException("Characters cannot be null");
          if (selectedRule == null) throw new IllegalArgumentException("SelectedRule cannot be null, please use rule()");
          if (AunitRuntime.getLexerFactory() == null) throw new IllegalStateException("Lexer factory not set by configuration");
          if (AunitRuntime.getParserFactory() == null) throw new IllegalStateException("Parser factory not set by configuration");
  
          Lexer lexer = AunitRuntime.getLexerFactory().generate(new ANTLRStringStream(characters));
          Parser parser = AunitRuntime.getParserFactory().generate(new CommonTokenStream(lexer));
  
          RuleReturnScope rs = selectedRule.invoke(parser);
  
          ParserWrapper wrapper = (ParserWrapper)parser;
          if (wrapper.isFailOnError() && !wrapper.getErrors().isEmpty())
          {
              throw new ParserException(wrapper.getErrors());
          }
  
          return (Tree)rs.getTree();
      }
docs: Parse a set of characters and return an instance of {@link Tree}.
  This tree can then be fed into <code>Assert.assertTree(...)</code>.
  <p/>
  This method will throw an exception if there was an error parsing.  It
  will also throw {@link ParserException} if the parsing failed and the
  test has indicated that the parser should fail on error; see
  {@link ParserOption#failOnError(boolean)}.
  
  @param characters   the characters to be parsed
  @param selectedRule the starting rule
  @return the tree that results from a successful parse
  @throws Exception if there is an error parsing the characters
  @see #rule(String, com.toolazydogs.aunit.Work.ArgumentBuilder)