edu.cs.ai.kreator.parser
Class ExtendedParser

java.lang.Object
  extended by org.antlr.runtime.BaseRecognizer
      extended by org.antlr.runtime.Parser
          extended by edu.cs.ai.kreator.parser.ExtendedParser
Direct Known Subclasses:
GroundAtomParser

public class ExtendedParser
extends org.antlr.runtime.Parser

This class encapsulates some methods that be overwritten by the ANTLR parsers to provide proper error handling.

Author:
Marc Finthammer

Field Summary
static org.apache.log4j.Logger LOG
           
 
Fields inherited from class org.antlr.runtime.Parser
input
 
Fields inherited from class org.antlr.runtime.BaseRecognizer
_fsp, backtracking, DEFAULT_TOKEN_CHANNEL, errorRecovery, failed, following, HIDDEN, INITIAL_FOLLOW_STACK_SIZE, lastErrorIndex, MEMO_RULE_FAILED, MEMO_RULE_FAILED_I, MEMO_RULE_UNKNOWN, NEXT_TOKEN_RULE_NAME, ruleMemo
 
Constructor Summary
ExtendedParser(org.antlr.runtime.TokenStream input)
           
 
Method Summary
 void emitErrorMessage(java.lang.String msg)
           
protected  void mismatch(org.antlr.runtime.IntStream input, int ttype, org.antlr.runtime.BitSet follow)
           
 void recoverFromMismatchedSet(org.antlr.runtime.IntStream input, org.antlr.runtime.RecognitionException e, org.antlr.runtime.BitSet follow)
           
 void reportError(org.antlr.runtime.RecognitionException re)
           
 
Methods inherited from class org.antlr.runtime.Parser
getTokenStream, reset, setTokenStream, traceIn, traceOut
 
Methods inherited from class org.antlr.runtime.BaseRecognizer
alreadyParsedRule, beginResync, combineFollows, computeContextSensitiveRuleFOLLOW, computeErrorRecoverySet, consumeUntil, consumeUntil, displayRecognitionError, endResync, getBacktrackingLevel, getErrorHeader, getErrorMessage, getGrammarFileName, getRuleInvocationStack, getRuleInvocationStack, getRuleMemoization, getRuleMemoizationCacheSize, getTokenErrorDisplay, getTokenNames, match, matchAny, memoize, pushFollow, recover, recoverFromMismatchedElement, recoverFromMismatchedToken, toStrings, traceIn, traceOut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.log4j.Logger LOG
Constructor Detail

ExtendedParser

public ExtendedParser(org.antlr.runtime.TokenStream input)
Method Detail

mismatch

protected void mismatch(org.antlr.runtime.IntStream input,
                        int ttype,
                        org.antlr.runtime.BitSet follow)
                 throws org.antlr.runtime.RecognitionException
Overrides:
mismatch in class org.antlr.runtime.BaseRecognizer
Throws:
org.antlr.runtime.RecognitionException

recoverFromMismatchedSet

public void recoverFromMismatchedSet(org.antlr.runtime.IntStream input,
                                     org.antlr.runtime.RecognitionException e,
                                     org.antlr.runtime.BitSet follow)
                              throws org.antlr.runtime.RecognitionException
Overrides:
recoverFromMismatchedSet in class org.antlr.runtime.BaseRecognizer
Throws:
org.antlr.runtime.RecognitionException

emitErrorMessage

public void emitErrorMessage(java.lang.String msg)
Overrides:
emitErrorMessage in class org.antlr.runtime.BaseRecognizer

reportError

public void reportError(org.antlr.runtime.RecognitionException re)
Overrides:
reportError in class org.antlr.runtime.BaseRecognizer