|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.antlr.runtime.BaseRecognizer org.antlr.runtime.Parser com.legstar.cobol.CobolStructureParser com.legstar.cobol.CobolStructureParserImpl
public class CobolStructureParserImpl
Overrides some of the ANTLR generated parser methods so that the resulting java class behaves like other LegStar classes, particularly for logging purposes.
This code could be imbedded in the parser grammar as well but its harder to debug using ANTLRWorks because this code might have dependencies on jars which are not naturally in ANTLRWorks classpath.
Nested Class Summary |
---|
Field Summary |
---|
Fields inherited from class org.antlr.runtime.Parser |
---|
input |
Fields inherited from class org.antlr.runtime.BaseRecognizer |
---|
DEFAULT_TOKEN_CHANNEL, HIDDEN, INITIAL_FOLLOW_STACK_SIZE, MEMO_RULE_FAILED, MEMO_RULE_UNKNOWN, NEXT_TOKEN_RULE_NAME, state |
Constructor Summary | |
---|---|
CobolStructureParserImpl(org.antlr.runtime.TokenStream input,
RecognizerErrorHandler errorHandler)
Construct from a token stream. |
|
CobolStructureParserImpl(org.antlr.runtime.TokenStream input,
org.antlr.runtime.RecognizerSharedState state,
RecognizerErrorHandler errorHandler)
Construct from a token stream and a shared state. |
Method Summary | |
---|---|
void |
emitErrorMessage(String msg)
|
RecognizerErrorHandler |
getErrorHandler()
|
String |
getErrorMessage(org.antlr.runtime.RecognitionException e,
String[] tokenNames)
|
Methods inherited from class org.antlr.runtime.Parser |
---|
getCurrentInputSymbol, getMissingSymbol, getSourceName, getTokenStream, reset, setTokenStream, traceIn, traceOut |
Methods inherited from class org.antlr.runtime.BaseRecognizer |
---|
alreadyParsedRule, beginResync, combineFollows, computeContextSensitiveRuleFOLLOW, computeErrorRecoverySet, consumeUntil, consumeUntil, displayRecognitionError, endResync, failed, getBacktrackingLevel, getErrorHeader, getNumberOfSyntaxErrors, getRuleInvocationStack, getRuleInvocationStack, getRuleMemoization, getRuleMemoizationCacheSize, getTokenErrorDisplay, match, matchAny, memoize, mismatchIsMissingToken, mismatchIsUnwantedToken, pushFollow, recover, recoverFromMismatchedSet, recoverFromMismatchedToken, reportError, setBacktrackingLevel, toStrings, traceIn, traceOut |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CobolStructureParserImpl(org.antlr.runtime.TokenStream input, RecognizerErrorHandler errorHandler)
input
- the token streamerrorHandler
- handles error messagespublic CobolStructureParserImpl(org.antlr.runtime.TokenStream input, org.antlr.runtime.RecognizerSharedState state, RecognizerErrorHandler errorHandler)
input
- the token streamstate
- the shared stateerrorHandler
- handles error messagesMethod Detail |
---|
public String getErrorMessage(org.antlr.runtime.RecognitionException e, String[] tokenNames)
getErrorMessage
in class org.antlr.runtime.BaseRecognizer
public void emitErrorMessage(String msg)
emitErrorMessage
in class org.antlr.runtime.BaseRecognizer
public RecognizerErrorHandler getErrorHandler()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |