question: 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 ) ; }
target:  Get the previous token. This does not modify the state.