KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > pmd > parsers > Parser


1 package net.sourceforge.pmd.parsers;
2
3 import net.sourceforge.pmd.ast.ParseException;
4
5 import java.io.Reader JavaDoc;
6 import java.util.Map JavaDoc;
7
8 /**
9  * Common interface for calling tree-building parsers or source files.
10  *
11  * @author Pieter_Van_Raemdonck - Application Engineers NV/SA - www.ae.be
12  */

13 public interface Parser {
14
15     /**
16      * Parse source code and return the root node of the AST.
17      *
18      * @param source Reader that provides the source code of a compilation unit
19      * @return the root node of the AST that is built from the source code
20      * @throws ParseException In case the source code could not be parsed, probably
21      * due to syntactical errors.
22      */

23     Object JavaDoc parse(Reader JavaDoc source) throws ParseException;
24
25     Map JavaDoc getExcludeMap();
26
27     void setExcludeMarker(String JavaDoc marker);
28
29 }
30
Popular Tags