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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id CFCEBBB83 for ; Tue, 23 May 2006 19:17:18 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k4NHHIJv022428 for ; Tue, 23 May 2006 19:17:18 +0200 Received: by ug-out-1314.google.com with SMTP id j3so1479555ugf for ; Tue, 23 May 2006 10:17:18 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=E1REfjOJsgdetZjVXYBlWwCsMfTCHe1EotP5CzaRPg3NXq8X+8zZQ0vxflkmjyAcS8aW9y6bbHoPRhYaKCk1yob7zyEszfLHSPBNUcpYSrDF/jZOvjmKPcokT6keAWvFDHn432HXZxkt+ZGVDOh/zAJM4Qnxy26K3zCNVcb559U= Received: by 10.66.255.7 with SMTP id c7mr4780121ugi; Tue, 23 May 2006 10:17:18 -0700 (PDT) Received: by 10.67.28.12 with HTTP; Tue, 23 May 2006 10:17:18 -0700 (PDT) Message-ID: <54f15b6e0605231017o5f23fd07q7f7b1c5cab38cf0b@mail.gmail.com> Date: Tue, 23 May 2006 12:17:18 -0500 From: mulhern To: caml-list@yquem.inria.fr Subject: Use Arg module to read keyword followed by unspecified number of arguments MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-j-chkmail-Score: MSGID : 4473439E.000 on nez-perce : j-chkmail score : X : 0/20 1 X-Miltered: at nez-perce with ID 4473439E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; unspecified:01 ......:98 module:03 module:03 arg:03 arg:03 ugly:03 generated:05 generated:05 problem:05 args:05 args:05 arguments:07 differently:07 anybody:07 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 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. I can think of about 10 ways to do this using the Arg module, but they're all ugly and all different. Does anybody have an attractive solution to this problem or is aware of the accepted way to handle this situation? An example in some existing code would be good enough. I do not consider changing the call to -pred-files -pred-files ... -pred-files ...... an option at this time, principally because the call is automatically generated and I'ld like it to stay in line with the other automatically generated calls in the same distribution. Thanks! -mulhern