pobs
Interface PErrorHandler

All Known Implementing Classes:
PDefaultErrorHandler

public interface PErrorHandler

Author:
Franz-Josef Elmer

Method Summary
 java.lang.String createErrorMessage(PScanner input)
          Creates a human readable error message using the specified input to get reasonable error positions (like line number and column number).
 long getErrorPosition()
          Gets the actual error position.
 void notify(long position, PParser parser)
          Notifies the error handler that an error occured for the specified parser at the specified parsing position.
 

Method Detail

notify

public void notify(long position,
                   PParser parser)
Notifies the error handler that an error occured for the specified parser at the specified parsing position. This method might be called several times even if complete parsing is successful.

Parameters:
position - Parsing position.
parser - Parser which recognized a missmatch.

getErrorPosition

public long getErrorPosition()
Gets the actual error position.

Returns:
actual parsing position where the error occured.

createErrorMessage

public java.lang.String createErrorMessage(PScanner input)
Creates a human readable error message using the specified input to get reasonable error positions (like line number and column number).

Parameters:
input - Input source of parsing.
Returns:
error message.