code: def parse_sat(s, varname='x'):
      
      lexer = iter(SATLexer(s))
  
      try:
          ast = _sat(lexer, varname)
      except lex.RunError as exc:
          fstr = ("{0.args[0]}: "
                  "(line: {0.lineno}, offset: {0.offset}, text: {0.text})")
          raise Error(fstr.format(exc))
  
      # Check for end of buffer
      _expect_token(lexer, {EndToken})
  
      return ast
docs: Parse an input string in DIMACS SAT format,
      and return an expression.