Class Antlr4ParserPlugin

java.lang.Object
org.apache.groovy.parser.antlr4.Antlr4ParserPlugin
All Implemented Interfaces:
ParserPlugin

public class Antlr4ParserPlugin extends Object implements ParserPlugin
A parser plugin for the new parser.
  • Constructor Details

    • Antlr4ParserPlugin

      public Antlr4ParserPlugin()
  • Method Details

    • parseCST

      public Reduction parseCST(SourceUnit sourceUnit, Reader reader)
      Description copied from interface: ParserPlugin
      Parses source text into a concrete syntax tree.
      Specified by:
      parseCST in interface ParserPlugin
      Parameters:
      sourceUnit - the source being parsed
      reader - the source reader
      Returns:
      the parsed CST
    • buildAST

      public ModuleNode buildAST(SourceUnit sourceUnit, ClassLoader classLoader, Reduction cst)
      Description copied from interface: ParserPlugin
      Builds the AST from a previously parsed CST.
      Specified by:
      buildAST in interface ParserPlugin
      Parameters:
      sourceUnit - the source being compiled
      classLoader - the class loader to use during AST creation
      cst - the parsed CST
      Returns:
      the resulting module node