fr.umlv.tatoo.runtime.parser
Class DefaultParserWarningReporter<T,N,P,V>
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultParserWarningReporter
public DefaultParserWarningReporter()
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 parsermessage
- the message to include in the outputterminal
- 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