From: Kenneth Adam Miller <kennethadammiller@gmail.com>
To: caml users <caml-list@inria.fr>
Subject: [Caml-list] cmdliner difficulties
Date: Fri, 27 Jul 2018 11:10:40 -0700 [thread overview]
Message-ID: <CAK7rcp8RF4OnHDPs7p1b_jZo4Q2sV8kTXc+AAPbMNN1HXtq4eg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]
Hello,
I have a task where I need to have command liner allow a sequence of
various different types compose a certain way without having to write a
small language for what belongs on the command line.
Basically, I am trying to color a graph with different operations on the
command line in such a way that different colors can be specified as the
target of results of set operations against names of sets. For example:
--color Red=(Feature1 MINUS Feature2)
There are a predefined set of colors and features, and some operations that
can be performed. However, because it's a grammar just like any language,
there might be arbitrarily deep expressions, and because the command line
won't have me constructing this in a straight forward way without writing a
dedicated type parser, which might not be so clean.
There are operations: difference, union, intersection, and cut. These can
recur, and there are predefined list of colors that can be the targets of
these results, which are calculated from sources that are features. In
addition, the specification of colorings can be multiple, as in --color ...
--color ...
Can anybody see where they would overcome some of these difficulties?
[-- Attachment #2: Type: text/html, Size: 1345 bytes --]
next reply other threads:[~2018-07-27 18:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-27 18:10 Kenneth Adam Miller [this message]
2018-07-27 19:34 ` Gabriel Scherer
2018-07-28 17:54 ` Андрей Бергман
2018-07-28 20:16 ` Kenneth Adam Miller
2018-07-29 0:26 ` Martin DeMello
2018-07-29 6:33 ` Gabriel Scherer
2018-07-29 6:59 ` Viet Le
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAK7rcp8RF4OnHDPs7p1b_jZo4Q2sV8kTXc+AAPbMNN1HXtq4eg@mail.gmail.com \
--to=kennethadammiller@gmail.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox