code: public static RePairGrammar buildGrammar(String inputString) {
  
      RePairGrammar grammar = NewRepair.parse(inputString);
  
      return grammar;
  
    }
docs: Builds a grammar given a string of terminals delimeted by space.
  
  @param inputString the input string.
  @return the RePair grammar.