Package uk.co.badgersinfoil.metaas.impl.parser.javadoc

Examples of uk.co.badgersinfoil.metaas.impl.parser.javadoc.JavadocParser


    return null;
  }

  private static LinkedListTree parseDescription(String description) {
    try {
      JavadocParser parser = parserOn(description);
      LinkedListTree desc = (LinkedListTree)parser.description().getTree();
      LinkedListToken after = (LinkedListToken)parser.getTokenStream().LT(1);
      if (!isEOF(after)) {
        throw new SyntaxException("trailing content after description: "+ActionScriptFactory.str(after.getText()));
      }
      trimEOF(desc);
      return desc;
View Full Code Here


    }
  }

  private static LinkedListTree parse(String body) {
    try {
      JavadocParser parser = parserOn(body);
      LinkedListTree result = (LinkedListTree)parser.comment_body().getTree();
      trimEOF(result);
      return result;
    } catch (IOException e) {
      throw new SyntaxException(e);
    } catch (RecognitionException e) {
View Full Code Here

    }
  }

  public static LinkedListTree parseParaTag(String text) {
    try {
      JavadocParser parser = parserOn(text);
      LinkedListTree result = (LinkedListTree)parser.paragraph_tag().getTree();
      trimEOF(result);
      return result;
    } catch (IOException e) {
      throw new SyntaxException(e);
    } catch (MismatchedTokenException e) {
View Full Code Here

    StringReader in = new StringReader(text);
    ANTLRReaderStream cs = new ANTLRReaderStream(in);
    JavadocLexer lexer = new JavadocLexer(cs);
    LinkedListTokenSource source = new LinkedListTokenSource(lexer);
    LinkedListTokenStream stream = new LinkedListTokenStream(source);
    JavadocParser parser = new JavadocParser(stream);
    parser.setTreeAdaptor(TREE_ADAPTOR);
    return parser;
  }
View Full Code Here

TOP

Related Classes of uk.co.badgersinfoil.metaas.impl.parser.javadoc.JavadocParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.