From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 3644ABC40 for ; Tue, 26 Oct 2004 22:13:44 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i9QKDh6k019604 for ; Tue, 26 Oct 2004 22:13:44 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA17378 for ; Tue, 26 Oct 2004 22:13:43 +0200 (MET DST) Received: from nexus.stwing.upenn.edu (NEXUS.STWING.UPENN.EDU [165.123.132.61]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i9QKDfsm019597 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 26 Oct 2004 22:13:43 +0200 Received: from force.stwing.upenn.edu (force.stwing.upenn.edu [165.123.132.65]) by nexus.stwing.upenn.edu (8.12.10/8.12.9) with ESMTP id i9QKDeHA012272 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 26 Oct 2004 16:13:41 -0400 (EDT) Received: from force.stwing.upenn.edu (localhost [127.0.0.1]) by force.stwing.upenn.edu (8.12.10/8.12.9) with ESMTP id i9QKDdh4017131 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 26 Oct 2004 16:13:40 -0400 (EDT) Received: (from wlovas@localhost) by force.stwing.upenn.edu (8.12.10/8.12.9/Submit) id i9QKDdOP017094 for caml-list@inria.fr; Tue, 26 Oct 2004 16:13:39 -0400 (EDT) Date: Tue, 26 Oct 2004 16:13:39 -0400 From: William Lovas To: caml-list@inria.fr Subject: Re: [Caml-list] Arg parsing Message-ID: <20041026201338.GA29858@force.stwing.upenn.edu> Mail-Followup-To: caml-list@inria.fr References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i X-Miltered: at concorde with ID 417EAFF7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 417EAFF5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; lovas:01 wlovas:01 stwing:01 upenn:01 caml-list:01 parsing:01 wrote:01 ocaml:01 parsing:01 'print:01 module's:01 cheers:01 26,:98 ...:98 parse:02 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: Hi Thomas, On Tue, Oct 26, 2004 at 09:56:30PM +0200, Thomas Fischbacher wrote: > > I think it would be helpful if ocaml had an '--' arg that tells it to stop > its own arg parsing and pass the following args on to the program started, > as in: > > tf@ouija:~$ perl -e 'print @ARGV' -- one tooth ree > onetoothree You can do this with the standard Arg module. For example: Arg.parse [...; ("--", Arg.Rest anon_fun, " stop parsing options")] anon_fun usage_msg See the Arg module's documentation for details. cheers, William