|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.antlr.runtime.BaseRecognizer
org.antlr.runtime.tree.TreeParser
com.legstar.cobol.CobolStructureEmitter
com.legstar.cobol.CobolStructureEmitterImpl
public class CobolStructureEmitterImpl
Overrides some of the ANTLR generated lexer methods so that the resulting java class behaves like other LegStar classes, particularly for logging purposes.
This code could be imbedded in the lexer 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 |
---|
Nested classes/interfaces inherited from class com.legstar.cobol.CobolStructureEmitter |
---|
CobolStructureEmitter.data_entry_scope |
Field Summary |
---|
Fields inherited from class org.antlr.runtime.tree.TreeParser |
---|
DOWN, input, UP |
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 | |
---|---|
CobolStructureEmitterImpl(org.antlr.runtime.tree.TreeNodeStream input,
RecognizerErrorHandler errorHandler)
Construct from a tree nodes stream. |
|
CobolStructureEmitterImpl(org.antlr.runtime.tree.TreeNodeStream input,
org.antlr.runtime.RecognizerSharedState state,
RecognizerErrorHandler errorHandler)
Construct from a tree nodes 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.tree.TreeParser |
---|
getCurrentInputSymbol, getErrorHeader, getMissingSymbol, getSourceName, getTreeNodeStream, matchAny, recoverFromMismatchedToken, reset, setTreeNodeStream, traceIn, traceOut |
Methods inherited from class org.antlr.runtime.BaseRecognizer |
---|
alreadyParsedRule, beginResync, combineFollows, computeContextSensitiveRuleFOLLOW, computeErrorRecoverySet, consumeUntil, consumeUntil, displayRecognitionError, endResync, failed, getBacktrackingLevel, getNumberOfSyntaxErrors, getRuleInvocationStack, getRuleInvocationStack, getRuleMemoization, getRuleMemoizationCacheSize, getTokenErrorDisplay, match, memoize, mismatchIsMissingToken, mismatchIsUnwantedToken, pushFollow, recover, recoverFromMismatchedSet, 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 CobolStructureEmitterImpl(org.antlr.runtime.tree.TreeNodeStream input, RecognizerErrorHandler errorHandler)
input
- the tree nodes streamerrorHandler
- handles error messagespublic CobolStructureEmitterImpl(org.antlr.runtime.tree.TreeNodeStream input, org.antlr.runtime.RecognizerSharedState state, RecognizerErrorHandler errorHandler)
input
- the tree nodes streamstate
- the shared stateerrorHandler
- handles error messagesMethod Detail |
---|
public String getErrorMessage(org.antlr.runtime.RecognitionException e, String[] tokenNames)
getErrorMessage
in class org.antlr.runtime.tree.TreeParser
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 |