fr.umlv.tatoo.runtime.lexer
Class DefaultErrorForwarder<B extends LexerBuffer>

java.lang.Object
  extended by fr.umlv.tatoo.runtime.lexer.DefaultErrorForwarder<B>
All Implemented Interfaces:
ErrorForwarder<B>

public class DefaultErrorForwarder<B extends LexerBuffer>
extends Object
implements ErrorForwarder<B>

This implementation that does nothing.

Author:
Julien Cervelle

Constructor Summary
DefaultErrorForwarder()
           
 
Method Summary
static
<B extends LexerBuffer>
DefaultErrorForwarder<B>
defaultForwarder()
           
 ForwardReturn forwardUnexpectedCharacter(Lexer<B> lexer)
          Forwards unexpected character found during the lexing process.
 void forwardUnexpectedEndOfFile(Lexer<B> lexer)
          Forwards unexpected end of file during the lexing process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultErrorForwarder

public DefaultErrorForwarder()
Method Detail

forwardUnexpectedCharacter

public ForwardReturn forwardUnexpectedCharacter(Lexer<B> lexer)
Description copied from interface: ErrorForwarder
Forwards unexpected character found during the lexing process.

Specified by:
forwardUnexpectedCharacter in interface ErrorForwarder<B extends LexerBuffer>
Parameters:
lexer - the buffer that push the character
Returns:
false if lexer must discard input

forwardUnexpectedEndOfFile

public void forwardUnexpectedEndOfFile(Lexer<B> lexer)
Description copied from interface: ErrorForwarder
Forwards unexpected end of file during the lexing process. If it returns, lexer considers that error is recovered and exits without exception nor warning.

Specified by:
forwardUnexpectedEndOfFile in interface ErrorForwarder<B extends LexerBuffer>
Parameters:
lexer - the buffer

defaultForwarder

public static <B extends LexerBuffer> DefaultErrorForwarder<B> defaultForwarder()