code: @Override
      protected void parseTransition(StreamTokenizer streamTokenizer) throws FSMParseException, IOException {
          try {
              // check we read a state number
              if (streamTokenizer.nextToken() != StreamTokenizer.TT_WORD) {
                  throw new FSMParseException(EXPECT_NUMBER, streamTokenizer);
              }
  
              // read the source state index
              int from = Integer.parseInt(streamTokenizer.sval);
  
              // check such a state exists
              if (!getStates().isEmpty() && !getStates().contains(from)) {
                  throw new FSMParseException(String.format(NO_SUCH_STATE, from), streamTokenizer);
              }
  
              // check we read a state number
              if (streamTokenizer.nextToken() != StreamTokenizer.TT_WORD) {
                  throw new FSMParseException(EXPECT_NUMBER, streamTokenizer);
              }
  
              // read the target state index
              int to = Integer.parseInt(streamTokenizer.sval);
  
              // check such a state exists
              if (!getStates().isEmpty() && !getStates().contains(to)) {
                  throw new FSMParseException(String.format(NO_SUCH_STATE, to), streamTokenizer);
              }
  
              // check we will read an edge label
              if (streamTokenizer.nextToken() != '"') {
                  throw new FSMParseException(EXPECT_STRING, streamTokenizer);
              }
  
              // read the letter
              final String letter = streamTokenizer.sval;
  
              // create a transition
              final boolean isNew = transitionsFSM.put(from, Pair.of(letter, to));
  
              // test for non-determinism
              if (!isNew) {
                  throw new FSMParseException(String.format(NON_DETERMINISM_DETECTED, from), streamTokenizer);
              }
          } catch (NumberFormatException | NoSuchElementException e) {
              throw new FSMParseException(e, streamTokenizer);
          }
      }
docs: Parse a transition.
  
  @throws FSMParseException
  when the FSM source is invalid.
  @throws IOException
  see {@link StreamTokenizer#nextToken()}.