code: public ParsedPolicy parse(File file) throws Exception {
          if (file == null || !file.exists()) {
              if (debug) {
                  if (file == null) {
                      ProGradePolicyDebugger.log("Given File is null");
                  } else {
                      if (!file.exists()) {
                          ProGradePolicyDebugger.log("Policy file " + file.getCanonicalPath() + " doesn't exists.");
                      }
                  }
              }
              throw new Exception("ER007: File with policy doesn't exists!");
          }
  
          if (debug) {
              ProGradePolicyDebugger.log("Parsing policy " + file.getCanonicalPath());
          }
  
          final InputStreamReader reader = new InputStreamReader(new FileInputStream(file), "UTF-8");
          try {
              return parse(reader);
          } finally {
              reader.close();
          }
      }
docs: Parse content of text policy file to ParsedPolicy object which represent this policy.
  
  @param file text file with policy file
  @return parsed policy file which is represented by ParsedPolicy
  @throws throw Exception when any problem occurred during parsing file (file doesn't exist, incompatible policy file etc.)