Class JjtreeParserAdapter<R extends RootNode>
- java.lang.Object
-
- net.sourceforge.pmd.lang.ast.impl.javacc.JjtreeParserAdapter<R>
-
- Type Parameters:
R
- Type of the root node of this language
- All Implemented Interfaces:
Parser
public abstract class JjtreeParserAdapter<R extends RootNode> extends Object implements Parser
Base implementation of theParser
interface for JavaCC language implementations. This wraps a parser generated by JavaCC, it's not meant as a base class for the generated parser.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.sourceforge.pmd.lang.ast.Parser
Parser.ParserTask
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JjtreeParserAdapter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description R
parse(Parser.ParserTask task)
Parses an entire tree for this language.protected abstract R
parseImpl(CharStream cs, Parser.ParserTask task)
protected abstract JavaccTokenDocument.TokenDocumentBehavior
tokenBehavior()
String
toString()
-
-
-
Method Detail
-
tokenBehavior
protected abstract JavaccTokenDocument.TokenDocumentBehavior tokenBehavior()
-
parse
public final R parse(Parser.ParserTask task) throws ParseException
Description copied from interface:Parser
Parses an entire tree for this language. This may perform some semantic analysis, like name resolution.- Specified by:
parse
in interfaceParser
- Parameters:
task
- Description of the parsing task- Returns:
- The root of the tree corresponding to the source code.
- Throws:
ParseException
-
parseImpl
protected abstract R parseImpl(CharStream cs, Parser.ParserTask task) throws ParseException
- Throws:
ParseException
-
-