manifold-lang/manifold-core — pull request #26 by mtrberzi (2014-10-07 19:39:16+00:00)
Title: integrate service interfaces with Commons-CLI argument handling

I'm trying to write an "engine" module that calls frontends and backends. Unfortunately, handling command line options is proving very difficult if the engine has no knowledge of which options take arguments and which do not. This is because an argument can be ambiguous with a filename; for example, in the command line `... --foo bar.txt baz.txt`, if the option `--foo` takes an argument, then `bar.txt` is its argument; if `--foo` does not take an argument, then `bar.txt` is an extra parameter (a filename not associated with any option).

This PR modifies the service interfaces for `Frontend` and `Backend` to allow frontends and backends to specify explicitly which options they support and to be invoked with a parsed command line resulting from those options.