caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Use Arg module to read keyword followed by unspecified number of arguments
@ 2006-05-23 17:17 mulhern
  2006-05-23 17:29 ` [Caml-list] " Till Varoquaux
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: mulhern @ 2006-05-23 17:17 UTC (permalink / raw)
  To: caml-list

Hi!

I expect to be reading something like this:

-pred-files <arg1> <arg2> ... <argn> -key2 <arg> -extra-files <arg1>
<arg2> ... <argn> -key4

There may be 0 or more <args> 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 <arg1> -pred-files <arg2> ... -pred-files <argn> ......
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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-05-24 14:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-23 17:17 Use Arg module to read keyword followed by unspecified number of arguments mulhern
2006-05-23 17:29 ` [Caml-list] " Till Varoquaux
2006-05-23 17:49 ` Oliver Bandel
2006-05-23 17:55 ` Oliver Bandel
2006-05-23 19:21 ` Michael Wohlwend
2006-05-23 19:50   ` Till Varoquaux
2006-05-23 19:57     ` Michael Wohlwend
2006-05-24 14:03 ` Richard Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).