Class TokenAcceptor

  • All Implemented Interfaces:
    java.util.Iterator<org.antlr.runtime.Token>, ITokenAcceptor

    public class TokenAcceptor
    extends java.lang.Object
    implements ITokenAcceptor, java.util.Iterator<org.antlr.runtime.Token>
    Simple implementation of an ITokenAcceptor based on the assumption that the calls to accept and next will be alternating with only a few exceptions.
    • Constructor Summary

      Constructors 
      Constructor Description
      TokenAcceptor()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void accept​(org.antlr.runtime.Token token)  
      boolean hasNext()  
      org.antlr.runtime.Token next()  
      void remove()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Constructor Detail

      • TokenAcceptor

        public TokenAcceptor()
    • Method Detail

      • accept

        public void accept​(org.antlr.runtime.Token token)
        Specified by:
        accept in interface ITokenAcceptor
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<org.antlr.runtime.Token>
      • next

        public org.antlr.runtime.Token next()
        Specified by:
        next in interface java.util.Iterator<org.antlr.runtime.Token>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<org.antlr.runtime.Token>