code: public Formula parse(final String in) throws ParserException {
      if (in == null || in.isEmpty()) {
        return this.f.verum();
      }
      try {
        final CharStream input = CharStreams.fromString(in);
        this.lexer.setInputStream(input);
        final CommonTokenStream tokens = new CommonTokenStream(this.lexer);
        this.parser.setInputStream(tokens);
        return this.parser.getParsedFormula();
      } 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 string.
  @param in a string
  @return the {@link Formula} representation of this string
  @throws ParserException if the string was not a valid formula