public class PrintStreamDiagnosticListener extends Object implements TAFParseDiagnosticListener
Constructor and Description |
---|
PrintStreamDiagnosticListener(PrintStream ps) |
Modifier and Type | Method and Description |
---|---|
void |
error(int line,
int col,
String msgFmt,
Object... args)
Called when a non-fatal error is encountered during parsing.
|
static TAFParseDiagnosticListener |
getStderrDiagnosticListener() |
void |
warning(int line,
int col,
String msgFmt,
Object... args)
Called when a warning is raised during parsing.
|
public PrintStreamDiagnosticListener(PrintStream ps)
public static TAFParseDiagnosticListener getStderrDiagnosticListener()
public void error(int line, int col, String msgFmt, Object... args)
TAFParseDiagnosticListener
A non-fatal error could be, for example, the usage of an input symbol that was not declared in the alphabet. In this case, the respective transition is simply ignored.
error
in interface TAFParseDiagnosticListener
line
- the line where the error occurredcol
- the column where the error occurredmsgFmt
- a format string of the message (see MessageFormat
)args
- the arguments of the messagepublic void warning(int line, int col, String msgFmt, Object... args)
TAFParseDiagnosticListener
A warning could be raised when, for example, an unrecognized option is used for a state.
warning
in interface TAFParseDiagnosticListener
line
- the line where the warning was raisedcol
- the column where the warning was raisedmsgFmt
- a format string of the message (see MessageFormat
)args
- the arguments of the messageCopyright © 2020. All rights reserved.