private static Formula read ( final File file , final FormulaParser parser ) throws IOException , ParserException { try ( final BufferedReader br = new BufferedReader ( new FileReader ( file ) ) ) { final LinkedHashSet < Formula > ops = new LinkedHashSet <> ( ) ; while ( br . ready ( ) ) ops . add ( parser . parse ( br . readLine ( ) ) ) ; return parser . factory ( ) . and ( ops ) ; } }
Internal read function .