code: public void checkForUnprocessedDirectives() throws ParseException {
          List<LineNumberAndDirective> remaining = new LinkedList<>();
          remaining.addAll(bufferedKeyWordDirectives);
          remaining.addAll(bufferedStepDirectives);
          if (!remaining.isEmpty()) {
              LineNumberAndDirective exampleError = remaining.get(0);
              throw new ParseException("Invalid trailing directive [" + exampleError.getDirective() + "]", exampleError.getLine());
          }
      }
docs: this catches for any unprocessed directives at the end of parsing