> One possible way of resolving this particular ambiguity is to let the
> command line parser impose the syntax rule that if an option takes an
> argument, there must be an "=" sign between the option name and the
> argument.  This would mean that "--foo = bar" is always an option
> with an argument, whereas "--foo bar" is always an option and a
> parameter.

This is a style rule that I don't think should be enforced. Both command line styles are in use and the purpose of a generic command line parser should be supporting any "normal" parameter format.