Package org.apache.groovy.parser.antlr4
Class Antlr4ParserPlugin
java.lang.Object
org.apache.groovy.parser.antlr4.Antlr4ParserPlugin
- All Implemented Interfaces:
ParserPlugin
A parser plugin for the new parser.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildAST(SourceUnit sourceUnit, ClassLoader classLoader, Reduction cst) Builds the AST from a previously parsed CST.parseCST(SourceUnit sourceUnit, Reader reader) Parses source text into a concrete syntax tree.
-
Constructor Details
-
Antlr4ParserPlugin
public Antlr4ParserPlugin()
-
-
Method Details
-
parseCST
Description copied from interface:ParserPluginParses source text into a concrete syntax tree.- Specified by:
parseCSTin interfaceParserPlugin- Parameters:
sourceUnit- the source being parsedreader- the source reader- Returns:
- the parsed CST
-
buildAST
Description copied from interface:ParserPluginBuilds the AST from a previously parsed CST.- Specified by:
buildASTin interfaceParserPlugin- Parameters:
sourceUnit- the source being compiledclassLoader- the class loader to use during AST creationcst- the parsed CST- Returns:
- the resulting module node
-