fr.umlv.tatoo.runtime.tools
Class AbstractToolsProcessor<B extends LexerBuffer,R,T,N,P>

java.lang.Object
  extended by fr.umlv.tatoo.runtime.tools.AbstractToolsProcessor<B,R,T,N,P>
Type Parameters:
R - type of rule.
T - type of terminal.
N - type of non terminal.
P - type of production.
All Implemented Interfaces:
ErrorRecoveryListener<T,N>, ParserListener<T,N,P>

public abstract class AbstractToolsProcessor<B extends LexerBuffer,R,T,N,P>
extends Object
implements ParserListener<T,N,P>, ErrorRecoveryListener<T,N>

Abstract base class for all processors produced by the Tatoo Java backend.

Author:
Remi Forax

Nested Class Summary
static class AbstractToolsProcessor.BufferOperation
          Possible operations when a token is recognized.
 
Constructor Summary
protected AbstractToolsProcessor()
          Default constructor that does nothing.
 
Method Summary
abstract  LexerListener<R,B> createLexerListener(SimpleParser<? super T> parser)
          Creates a lexer listener that forwards recognized rule to the parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.umlv.tatoo.runtime.parser.ParserListener
accept, reduce, shift
 
Methods inherited from interface fr.umlv.tatoo.runtime.parser.ErrorRecoveryListener
popNonTerminalOnError, popTerminalOnError
 

Constructor Detail

AbstractToolsProcessor

protected AbstractToolsProcessor()
Default constructor that does nothing.

Method Detail

createLexerListener

public abstract LexerListener<R,B> createLexerListener(SimpleParser<? super T> parser)
Creates a lexer listener that forwards recognized rule to the parser.

Parameters:
parser - a parser
Returns:
a lexer listener.