org.anarres.cpp
Class PreprocessorListener
java.lang.Object
org.anarres.cpp.PreprocessorListener
public class PreprocessorListener
- extends Object
A handler for preprocessor events, primarily errors and warnings.
If no PreprocessorListener is installed in a Preprocessor, all
error and warning events will throw an exception. Installing a
listener allows more intelligent handling of these events.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PreprocessorListener
public PreprocessorListener()
clear
public void clear()
getErrors
public int getErrors()
getWarnings
public int getWarnings()
print
protected void print(String msg)
handleWarning
public void handleWarning(Source source,
int line,
int column,
String msg)
throws LexerException
- Handles a warning.
The behaviour of this method is defined by the
implementation. It may simply record the error message, or
it may throw an exception.
- Throws:
LexerException
handleError
public void handleError(Source source,
int line,
int column,
String msg)
throws LexerException
- Handles an error.
The behaviour of this method is defined by the
implementation. It may simply record the error message, or
it may throw an exception.
- Throws:
LexerException
handleSourceChange
public void handleSourceChange(Source source,
String event)
Copyright © 2007 Shevek, Anarres. All Rights Reserved.