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

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

public class DefaultLexerErrorForwarder<B extends LexerBuffer>
extends Object
implements LexerErrorForwarder<B>

This implementation that does nothing.

Author:
Julien Cervelle

Constructor Summary
DefaultLexerErrorForwarder()
           
 
Method Summary
static
<B extends LexerBuffer>
DefaultLexerErrorForwarder<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

DefaultLexerErrorForwarder

public DefaultLexerErrorForwarder()
Method Detail

forwardUnexpectedCharacter

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

Specified by:
forwardUnexpectedCharacter in interface LexerErrorForwarder<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: LexerErrorForwarder
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 LexerErrorForwarder<B extends LexerBuffer>
Parameters:
lexer - the buffer

defaultForwarder

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