fr.umlv.tatoo.runtime.parser
Class DefaultParserWarningReporter<T,N,P,V>

java.lang.Object
  extended by fr.umlv.tatoo.runtime.parser.DefaultParserWarningReporter<T,N,P,V>
Type Parameters:
T - type of terminals.
N - type of non-terminals.
P - type of productions.
V - type of versions.
All Implemented Interfaces:
ParserWarningReporter<T,N,P,V>

public class DefaultParserWarningReporter<T,N,P,V>
extends Object
implements ParserWarningReporter<T,N,P,V>

Author:
Remi

Constructor Summary
DefaultParserWarningReporter()
           
 
Method Summary
static
<T> String
formatMessage(SimpleParser<T> parser, String message, T terminal)
          Default way to create a message from arguments
 void handleWarning(Parser<T,N,P,V> parser, T terminal, String message)
          Log error recovery message info to user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultParserWarningReporter

public DefaultParserWarningReporter()
Method Detail

formatMessage

public static <T> String formatMessage(SimpleParser<T> parser,
                                       String message,
                                       T terminal)
Default way to create a message from arguments

Type Parameters:
T - terminals type
Parameters:
parser - the parser
message - the message to include in the output
terminal - the terminal that caused this message
Returns:
the full formatted message

handleWarning

public void handleWarning(Parser<T,N,P,V> parser,
                          T terminal,
                          String message)
Description copied from interface: ParserWarningReporter
Log error recovery message info to user

Specified by:
handleWarning in interface ParserWarningReporter<T,N,P,V>
message - the message to display