code: public boolean finish() {
          if (!parse(finishSpace())) return false;
  
          switch(stateStack.current()) {
              case PARSE_ERROR:
              case LEXICAL_ERROR:
              case HANDLER_CANCEL:
              case HANDLER_EXCEPTION:
                  throw new AssertionError("exception should be thrown directly from parse()");
              case GOT_VALUE:
              case PARSE_COMPLETE:
                  return true;
              default:
                  return flags.contains(ALLOW_PARTIAL_VALUES) || parseError("premature EOF");
          }
      }
docs: Processes the last token.
  
  <p>If the JSON data portions given to {@link #parse(Bytes)} method
  by now since the previous {@link #reset()} call, or call of this method,
  or parser construction don't comprise one or several complete JSON entities, and
  {@link net.openhft.saxophone.json.JsonParserOption#ALLOW_PARTIAL_VALUES} is not set,
  {@link net.openhft.saxophone.ParseException} is thrown.
  
  @return {@code true} if parsing successfully finished, {@code false}, if the handler
  of the last token cancelled parsing
  @throws net.openhft.saxophone.ParseException if the given JSON is malformed (exact meaning of
  "malformed" depends on parser's {@link JsonParserBuilder#options() options}),
  or if the handler of the last token, if it was actually processed during this call,
  have thrown a checked exception,
  or if {@link net.openhft.saxophone.json.handler.IntegerHandler} is provided,
  the last token is an integer and it is out of primitive {@code long} range:
  greater than {@code Long.MAX_VALUE} or lesser than {@code Long.MIN_VALUE}
  @throws IllegalStateException if parsing was cancelled or any exception was thrown
  in {@link #parse(Bytes)} call after
  the previous {@link #reset()} call or parser construction