Class AntlrBaseParser<N extends AntlrNode<N>,R extends BaseAntlrInnerNode<N> & RootNode>
java.lang.Object
net.sourceforge.pmd.lang.ast.impl.antlr4.AntlrBaseParser<N,R>
- Type Parameters:
N- Supertype of all nodes for the language, eg SwiftNodeR- Type of the root node
- All Implemented Interfaces:
Parser
public abstract class AntlrBaseParser<N extends AntlrNode<N>,R extends BaseAntlrInnerNode<N> & RootNode>
extends Object
implements Parser
Generic Antlr parser adapter for all Antlr parsers. This wraps a parser
generated by antlr, soo
AntlrGeneratedParserBase.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.sourceforge.pmd.lang.ast.Parser
Parser.ParserTask -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract org.antlr.v4.runtime.LexergetLexer(org.antlr.v4.runtime.CharStream source) parse(Parser.ParserTask task) Parses an entire tree for this language.protected abstract Rparse(org.antlr.v4.runtime.Lexer parser, Parser.ParserTask task)
-
Constructor Details
-
AntlrBaseParser
public AntlrBaseParser()
-
-
Method Details
-
parse
Description copied from interface:ParserParses an entire tree for this language. This may perform some semantic analysis, like name resolution.- Specified by:
parsein interfaceParser- Parameters:
task- Description of the parsing task- Returns:
- The root of the tree corresponding to the source code.
- Throws:
ParseException
-
parse
-
getLexer
protected abstract org.antlr.v4.runtime.Lexer getLexer(org.antlr.v4.runtime.CharStream source)
-