def Parse(query):
 parser = CreateParser(query)
 try:
  return parser.query()
 except Exception as e:
  msg = ("%s in query '%s'" % (e.message, query))
  raise QueryException(msg)

def Parse ( query ) : parser = CreateParser ( query ) try : return parser . query ( ) except Exception as e : msg = ( "%s in query '%s'" % ( e . message , query ) ) raise QueryException ( msg )
parses an expression and returns the antlr tree .