Class Antlr3ErrorLog

java.lang.Object
org.antlr.mojo.antlr3.Antlr3ErrorLog
All Implemented Interfaces:
ANTLRErrorListener

public class Antlr3ErrorLog extends Object implements 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
    Modifier and Type
    Field
    Description
    private org.apache.maven.plugin.logging.Log
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Antlr3ErrorLog(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 Type
    Method
    Description
    void
    error(Message message)
    Sends an error message from ANTLR analysis to the Maven Log sink.
    void
    error(ToolMessage toolMessage)
    Sends an error message from the ANTLR tool to the Maven Log sink.
    void
    info(String message)
    Sends an informational message to the Maven log sink.
    void
    warning(Message message)
    Sends a warning message to the Maven log sink.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public void info(String message)
      Sends an informational message to the Maven log sink.
      Specified by:
      info in interface ANTLRErrorListener
      Parameters:
      message - The message to send to Maven
    • error

      public void error(Message message)
      Sends an error message from ANTLR analysis to the Maven Log sink.
      Specified by:
      error in interface ANTLRErrorListener
      Parameters:
      message - The message to send to Maven.
    • warning

      public void warning(Message message)
      Sends a warning message to the Maven log sink.
      Specified by:
      warning in interface ANTLRErrorListener
      Parameters:
      message -
    • error

      public void error(ToolMessage toolMessage)
      Sends an error message from the ANTLR tool to the Maven Log sink.
      Specified by:
      error in interface ANTLRErrorListener
      Parameters:
      toolMessage -