Package org.freud.analysed.javasource.parser

Examples of org.freud.analysed.javasource.parser.JavaLexer


        Document root = parseJavaSourceToDocument(reader);
        return new JavaSourceJdom(root, identifier);
    }

    private static Document parseJavaSourceToDocument(final Reader javaSourceReader) throws RecognitionException, IOException {
        JavaParser parser = new JavaParser(new CommonTokenStream(new JavaLexer(new ANTLRReaderStream(javaSourceReader))));
        final JdomTreeAdaptor treeAdaptor = new JdomTreeAdaptor(JAVA_SOURCE_ROOT_ELEMENT_NAME, JAVA_SOURCE_TOKEN_TYPES);
        parser.setTreeAdaptor(treeAdaptor);
        parser.compilationUnit();
        return treeAdaptor.getDocument();
    }
View Full Code Here

TOP

Related Classes of org.freud.analysed.javasource.parser.JavaLexer

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.