code: public Formula parse(final InputStream inputStream) throws ParserException {
      if (inputStream == null) {
        return this.f.verum();
      }
      try {
        final CharStream input = CharStreams.fromStream(inputStream);
        this.lexer.setInputStream(input);
        final CommonTokenStream tokens = new CommonTokenStream(this.lexer);
        this.parser.setInputStream(tokens);
        return this.parser.getParsedFormula();
      } catch (final IOException e) {
        throw new ParserException("IO exception when parsing the formula", e);
      } catch (final ParseCancellationException e) {
        throw new ParserException("Parse cancellation exception when parsing the formula", e);
      } catch (final LexerException e) {
        throw new ParserException("Lexer exception when parsing the formula.", e);
      }
    }
docs: Parses and returns a given input stream.
  @param inputStream an input stream
  @return the {@link Formula} representation of this stream
  @throws ParserException if there was a problem with the input stream