Class ParenGroupIterator

  • All Implemented Interfaces:

    public class ParenGroupIterator
    extends java.lang.Object
    implements java.util.Iterator<Instance>
    Iterator that takes a Reader, breaks up the input into top-level parenthesized expressions. For example, in the input (a (a b) c) f (d e), there are two top-level expressions '(a (a b) c)' and '(d e)'. Text that is not within parentheses is ignored. Created: Thu Feb 26 13:45:43 2004
    $Id:,v 1.1 2007/10/22 21:37:49 mccallum Exp $
    Charles Sutton
    • Constructor Summary

      Constructor Description
      ParenGroupIterator​( input)  
      ParenGroupIterator​( input, char openParen, char closeParen)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      Instance 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

    • Constructor Detail

      • ParenGroupIterator

        public ParenGroupIterator​( input)
      • ParenGroupIterator

        public ParenGroupIterator​( input,
                                  char openParen,
                                  char closeParen)
    • Method Detail

      • next

        public Instance next()
        Specified by:
        next in interface java.util.Iterator<Instance>
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<Instance>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<Instance>