final Token previousToken() throws IllegalStateException, NoSuchElementException {
  if (currentToken == null) {
    if (completed) {
      if (tokens.isEmpty()) {
        throw new NoSuchElementException("No more content");
      }
      return tokens.get(tokens.size() - 1);
    }
    throw new IllegalStateException("start() method must be called before consuming or matching");
  }
  if (tokenIterator.previousIndex() == 0) {
    throw new NoSuchElementException("No more content");
  }
  return tokens.get(tokenIterator.previousIndex() - 1);
}

final Token previousToken ( ) throws IllegalStateException , NoSuchElementException { if ( currentToken == null ) { if ( completed ) { if ( tokens . isEmpty ( ) ) { throw new NoSuchElementException ( "No more content" ) ; } return tokens . get ( tokens . size ( ) - 1 ) ; } throw new IllegalStateException ( "start() method must be called before consuming or matching" ) ; } if ( tokenIterator . previousIndex ( ) == 0 ) { throw new NoSuchElementException ( "No more content" ) ; } return tokens . get ( tokenIterator . previousIndex ( ) - 1 ) ; }
get the previous token . this does not modify the state .
