From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 6991CBB83 for ; Tue, 23 May 2006 19:55:36 +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 k4NHtaAo031133 for ; Tue, 23 May 2006 19:55:36 +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 TAA09066 for ; Tue, 23 May 2006 19:55:35 +0200 (MET DST) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k4NHtYQr031127 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 23 May 2006 19:55:35 +0200 X-Envelope-From: oliver@first.in-berlin.de X-Envelope-To: Received: from first.in-berlin.de (e178020207.adsl.alicedsl.de [85.178.20.207]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id k4NHtX9N025313 for ; Tue, 23 May 2006 19:55:34 +0200 Received: by first.in-berlin.de (Postfix, from userid 501) id 325E9291F03; Tue, 23 May 2006 19:55:37 +0200 (CEST) Date: Tue, 23 May 2006 19:55:37 +0200 From: Oliver Bandel To: caml-list@inria.fr Subject: Re: [Caml-list] Use Arg module to read keyword followed by unspecified number of arguments Message-ID: <20060523175537.GA648@first.in-berlin.de> References: <54f15b6e0605231017o5f23fd07q7f7b1c5cab38cf0b@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54f15b6e0605231017o5f23fd07q7f7b1c5cab38cf0b@mail.gmail.com> User-Agent: Mutt/1.5.6i X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 X-Miltered: at concorde with ID 44734C98.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 44734C96.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; bandel:01 in-berlin:01 unspecified:01 argv:01 23,:98 2006:98 wrote:01 caml-list:01 arbitrary:01 oliver:01 oliver:01 parse:02 module:03 sys:03 arg:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 On Tue, May 23, 2006 at 12:17:18PM -0500, mulhern wrote: > Hi! > > I expect to be reading something like this: > > -pred-files ... -key2 -extra-files > ... -key4 > > There may be 0 or more specified after -pred-files and after > -extra-files. I need to treat the args differently depending on what > keyword they are associated with. You could maybe change what args you want to have. If one arglist with arbitrary number of args would be sufficient, you could do it with anonymous args, as I stated in my last mail. If this does not work, you maybe should parse Sys.argv by your own. Ciao, Oliver