org.eclipse.gmt.umlx.cst.parser
Class ErrorStringHandler

java.lang.Object
  extended by org.eclipse.gmt.umlx.cst.parser.AbstractErrorHandler
      extended by org.eclipse.gmt.umlx.cst.parser.ErrorStringHandler
All Implemented Interfaces:
lpg.lpgjavaruntime.ParseErrorCodes, ErrorHandler, LexerErrorHandler, ParserErrorHandler, SemanticErrorHandler

public class ErrorStringHandler
extends AbstractErrorHandler


Nested Class Summary
 class ErrorStringHandler.ErrorStringException
           
 
Field Summary
 
Fields inherited from interface org.eclipse.gmt.umlx.cst.parser.ErrorHandler
errorMessages
 
Fields inherited from interface lpg.lpgjavaruntime.ParseErrorCodes
BEFORE_CODE, DELETION_CODE, EOF_CODE, ERROR_CODE, errorMsgText, INSERTION_CODE, INVALID_CODE, INVALID_TOKEN_CODE, LEX_ERROR_CODE, MERGE_CODE, MISPLACED_CODE, SCOPE_CODE, SECONDARY_CODE, SUBSTITUTION_CODE
 
Constructor Summary
ErrorStringHandler(AbstractParser parser)
           
 
Method Summary
 void flush(org.eclipse.core.runtime.IProgressMonitor monitor)
          Flush all errors to their recipient.
 int getErrorCount()
           
 java.lang.String getErrorString()
           
 void lexerError(int errorCode, int leftToken, int rightToken)
          Dumps the error code and token info.
 void parserError(int errorCode, int leftToken, int rightToken, java.lang.String tokenText)
           
 void semanticError(java.lang.String rule, java.lang.String errorMessage, int startOffset, int endOffset)
           
 
Methods inherited from class org.eclipse.gmt.umlx.cst.parser.AbstractErrorHandler
formatClass, formatEClassName, formatName, formatPath, formatPath, formatString, formatType, getErrorReportLineOffset, getParser, getPrsStream, setErrorReportLineOffset, setParser
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorStringHandler

public ErrorStringHandler(AbstractParser parser)
Method Detail

flush

public void flush(org.eclipse.core.runtime.IProgressMonitor monitor)
Description copied from interface: ErrorHandler
Flush all errors to their recipient. This method allows handlers to batch up error reports into a single composite report or transaction.

Specified by:
flush in interface ErrorHandler
Overrides:
flush in class AbstractErrorHandler

getErrorCount

public int getErrorCount()

getErrorString

public java.lang.String getErrorString()

lexerError

public void lexerError(int errorCode,
                       int leftToken,
                       int rightToken)
Dumps the error code and token info.

Parameters:
leftToken - token index
rightToken - token index

parserError

public void parserError(int errorCode,
                        int leftToken,
                        int rightToken,
                        java.lang.String tokenText)

semanticError

public void semanticError(java.lang.String rule,
                          java.lang.String errorMessage,
                          int startOffset,
                          int endOffset)