public class PythonParser extends AbstractParser
parserOptions
Constructor and Description |
---|
PythonParser(ParserOptions parserOptions)
Creates a new Python Parser.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canParse()
Indicates if this parser can actual parse, or if it can only tokenize.
|
TokenManager |
createTokenManager(Reader source) |
Map<Integer,String> |
getSuppressMap() |
Node |
parse(String fileName,
Reader source)
Parse source code and return the root node of the AST.
|
getParserOptions, getTokenManager
public PythonParser(ParserOptions parserOptions)
parserOptions
- the optionspublic TokenManager createTokenManager(Reader source)
createTokenManager
in class AbstractParser
public boolean canParse()
Parser
public Node parse(String fileName, Reader source) throws ParseException
Parser
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.Copyright © 2002–2017 InfoEther. All rights reserved.