1 package net.sourceforge.pmd.parsers;
2
3 import net.sourceforge.pmd.ast.JavaCharStream;
4 import net.sourceforge.pmd.ast.JavaParser;
5 import net.sourceforge.pmd.ast.ParseException;
6
7 import java.io.Reader;
8
9 /***
10 * Adapter for the JavaParser, using Java 1.4 grammar.
11 *
12 * @author Pieter_Van_Raemdonck - Application Engineers NV/SA - www.ae.be
13 */
14 public class Java14Parser implements Parser {
15
16 public Object parse(Reader source) throws ParseException {
17 return new JavaParser(new JavaCharStream(source)).CompilationUnit();
18 }
19
20 }