code: private static String parseExpecting(final Stage stage) {
          StringBuilder expected = new StringBuilder();
  
          for (String key : stage.getTransitionNames()) {
              expected.append(',').append(stage.getTransition(key).expects());
          }
  
          return expected.substring(1);
      }
docs: Utility method for error messages.
  
  @param stage
  the stage to ask for expected tokens.
  
  @return The list of expected tokens