fr.umlv.tatoo.runtime.lexer
Class DefaultErrorHandler
java.lang.Object
fr.umlv.tatoo.runtime.lexer.DefaultErrorHandler
- All Implemented Interfaces:
- ErrorHandler<ErrorContextBuffer<?>>
public class DefaultErrorHandler
- extends Object
- implements ErrorHandler<ErrorContextBuffer<?>>
A DefaultErrorHandler retreive the error context from the
buffer and throws an exception containing the string representation of this
context.
- Version:
- $Revision$
- Author:
- Gilles Roussel
|
Method Summary |
void |
handleError(ErrorContextBuffer<?> buffer)
Handles an error occurring during the lexing process throwing a exception
containing a string representation of the error context. |
void |
handleUnexpectedEndOfFile()
Handles unexpected end of file during the lexing process throw. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultErrorHandler
public DefaultErrorHandler()
handleError
public void handleError(ErrorContextBuffer<?> buffer)
- Handles an error occurring during the lexing process throwing a exception
containing a string representation of the error context.
- Specified by:
handleError in interface ErrorHandler<ErrorContextBuffer<?>>
- Parameters:
buffer - a buffer that should implement the interface ErrorContextBuffer
- Throws:
LexingException - that contains a string representation of the error context- See Also:
ErrorContextBuffer
handleUnexpectedEndOfFile
public void handleUnexpectedEndOfFile()
- Handles unexpected end of file during the lexing process throw.
- Specified by:
handleUnexpectedEndOfFile in interface ErrorHandler<ErrorContextBuffer<?>>