Class EventFilter<N,D>

java.lang.Object
eu.bandm.tools.xantlr.runtime.EventFilter<N,D>
All Implemented Interfaces:
EventGenerator<N,D>

public class EventFilter<N,D> extends Object implements EventGenerator<N,D>
Trivial implementation of EventGenerator which throws away all events. Used for initialization whenever a X_LLkParser is created. Should be replaced by something else (e.g. a SAXEventGenerator by calling parser.X_LLkParser.setEventGenerator(EventGenerator). Can be useful for deriving own event genertaors which only need to implement a subset of the interface methods (what java calls "Adapter" !-)
  • Constructor Details

    • EventFilter

      public EventFilter()
  • Method Details

    • suppress

      public void suppress()
      Specified by:
      suppress in interface EventGenerator<N,D>
    • allow

      public void allow() throws antlr.SemanticException
      Specified by:
      allow in interface EventGenerator<N,D>
      Throws:
      antlr.SemanticException
    • startElement

      public void startElement(N name) throws antlr.SemanticException
      Specified by:
      startElement in interface EventGenerator<N,D>
      Throws:
      antlr.SemanticException
    • endElement

      public void endElement(N name) throws antlr.SemanticException
      Specified by:
      endElement in interface EventGenerator<N,D>
      Throws:
      antlr.SemanticException
    • characters

      public void characters(String text) throws antlr.SemanticException
      Specified by:
      characters in interface EventGenerator<N,D>
      Throws:
      antlr.SemanticException
    • warning

      public void warning(String message) throws antlr.SemanticException
      Specified by:
      warning in interface EventGenerator<N,D>
      Throws:
      antlr.SemanticException
    • error

      public void error(String message) throws antlr.SemanticException
      Specified by:
      error in interface EventGenerator<N,D>
      Throws:
      antlr.SemanticException
    • fatalError

      public void fatalError(String message) throws antlr.SemanticException
      Specified by:
      fatalError in interface EventGenerator<N,D>
      Throws:
      antlr.SemanticException
    • getLocation

      public Location<D> getLocation()
      Specified by:
      getLocation in interface EventGenerator<N,D>
    • getLocation

      public Location<D> getLocation(antlr.RecognitionException e)
      Specified by:
      getLocation in interface EventGenerator<N,D>