- org.apache.groovy.parser.antlr4.AbstractParser
-
- All Implemented Interfaces and Traits:
- SyntaxErrorReportable
public abstract class AbstractParser
extends Parser
Because antlr4 does not support generating parser with specified interface,
we have to create a super class for it and implement the interface.
-
-
Inherited fields
Fields inherited from class |
Fields |
class Parser |
EOF |
class Recognizer |
EOF |
-
Methods Summary
Methods
Type Params |
Return Type |
Name and description |
|
PositionInfo |
genPositionInfo(int offset)
|
|
void |
require(boolean condition, String msg, boolean toAttachPositionInfo)
|
|
void |
require(boolean condition, String msg)
|
|
void |
require(boolean condition, String msg, int offset, boolean toAttachPositionInfo)
|
|
void |
require(boolean condition, String msg, int offset)
|
|
void |
throwSyntaxError(String msg, int offset, boolean toAttachPositionInfo)
|
-
Inherited Methods Summary
Inherited Methods
Methods inherited from class |
Name |
class Parser |
getContext, reset, getInputStream, getInputStream, match, setInputStream, setErrorHandler, setProfile, consume, getCurrentToken, getTokenFactory, matchWildcard, setTrimParseTree, getTrimParseTree, getParseInfo, precpred, addParseListener, getDFAStrings, isMatchedEOF, dumpDFA, enterOuterAlt, isExpectedToken, exitRule, getRuleIndex, getRuleContext, createErrorNode, enterRule, inContext, setContext, getSourceName, isTrace, setTrace, getErrorHandler, getExpectedTokensWithinCurrentRule, getPrecedence, getErrorListenerDispatch, getErrorListenerDispatch, unrollRecursionContexts, getParseListeners, getATNWithBypassAlts, pushNewRecursionContext, getNumberOfSyntaxErrors, getRuleInvocationStack, getRuleInvocationStack, compileParseTreePattern, compileParseTreePattern, enterRecursionRule, enterRecursionRule, getInvokingContext, enterLeftFactoredRule, getBuildParseTree, getExpectedTokens, setBuildParseTree, removeParseListener, notifyErrorListeners, notifyErrorListeners, removeParseListeners, createTerminalNode, getState, action, setState, setInterpreter, sempred, addErrorListener, getTokenType, getRuleNames, getTokenTypeMap, getRuleIndexMap, getSerializedATN, getATN, getErrorHeader, getInterpreter, getVocabulary, getTokenNames, getTokenErrorDisplay, getGrammarFileName, removeErrorListeners, removeErrorListener, getErrorListeners, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
class Recognizer |
getState, getInputStream, action, setState, setInterpreter, sempred, addErrorListener, getTokenType, getParseInfo, getRuleNames, getTokenTypeMap, getRuleIndexMap, getSerializedATN, getATN, getErrorHeader, precpred, getInterpreter, getVocabulary, getTokenNames, getTokenErrorDisplay, getGrammarFileName, removeErrorListeners, removeErrorListener, getErrorListeners, getErrorListenerDispatch, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
-
-
Method Detail
-
public void require(boolean condition, String msg, boolean toAttachPositionInfo)
-
public void require(boolean condition, String msg)
-
public void require(boolean condition, String msg, int offset, boolean toAttachPositionInfo)
-
public void require(boolean condition, String msg, int offset)
-
public void throwSyntaxError(String msg, int offset, boolean toAttachPositionInfo)
Copyright © 2003-2018 The Apache Software Foundation. All rights reserved.