Package org.antlr.mojo.antlr3
Class Antlr3ErrorLog
java.lang.Object
org.antlr.mojo.antlr3.Antlr3ErrorLog
- All Implemented Interfaces:
ANTLRErrorListener
The Maven plexus container gives us a Log logging provider
which we can use to install an error listener for the ANTLR
tool to report errors by.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAntlr3ErrorLog(org.apache.maven.plugin.logging.Log log) Instantiate an ANTLR ErrorListner that communicates any messages it receives to the Maven error sink. -
Method Summary
Modifier and TypeMethodDescriptionvoidSends an error message from ANTLR analysis to the Maven Log sink.voiderror(ToolMessage toolMessage) Sends an error message from the ANTLR tool to the Maven Log sink.voidSends an informational message to the Maven log sink.voidSends a warning message to the Maven log sink.
-
Field Details
-
log
private org.apache.maven.plugin.logging.Log log
-
-
Constructor Details
-
Antlr3ErrorLog
public Antlr3ErrorLog(org.apache.maven.plugin.logging.Log log) Instantiate an ANTLR ErrorListner that communicates any messages it receives to the Maven error sink.- Parameters:
log- The Maven Error Log
-
-
Method Details
-
info
Sends an informational message to the Maven log sink.- Specified by:
infoin interfaceANTLRErrorListener- Parameters:
message- The message to send to Maven
-
error
Sends an error message from ANTLR analysis to the Maven Log sink.- Specified by:
errorin interfaceANTLRErrorListener- Parameters:
message- The message to send to Maven.
-
warning
Sends a warning message to the Maven log sink.- Specified by:
warningin interfaceANTLRErrorListener- Parameters:
message-
-
error
Sends an error message from the ANTLR tool to the Maven Log sink.- Specified by:
errorin interfaceANTLRErrorListener- Parameters:
toolMessage-
-