AbstractParserpublic interface Parser
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
canParse() |
Indicates if this parser can actual parse, or if it can only tokenize.
|
ParserOptions |
getParserOptions() |
Get the ParserOptions used by this Parser.
|
java.util.Map<java.lang.Integer,java.lang.String> |
getSuppressMap() |
|
TokenManager |
getTokenManager(java.lang.String fileName,
java.io.Reader source) |
Get a TokenManager for the given source.
|
Node |
parse(java.lang.String fileName,
java.io.Reader source) |
Parse source code and return the root node of the AST.
|
ParserOptions getParserOptions()
TokenManager getTokenManager(java.lang.String fileName, java.io.Reader source)
fileName - The file name being parsed (may be null).source - Reader that provides the source code to tokenize.boolean canParse()
Node parse(java.lang.String fileName, java.io.Reader source) throws ParseException
fileName - The file name being parsed (may be null).source - Reader that provides the source code of a compilation unitParseException - In case the source code could not be parsed, probably due to
syntactical errors.java.util.Map<java.lang.Integer,java.lang.String> getSuppressMap()
Copyright © 2002–2018 PMD. All rights reserved.