Hi John, > this is something that's been eating away at me every time I've > resorted to using square-brackets as a logical grouping mechanism; > i.e., stuff like > > [[*upgrade* | *update*] *package*]
That's using [] to mean two different things so is clearly a bad idea. :-) > This could be interpreted in two different ways (expressed using BNF): > > <subcmd> := ("upgrade" | "update") <package> > Or > <subcmd> := ("upgrade" | "update" <package>) I think you're answering it yourself. Use () to group. Those familiar with grammars will understand it. The rest will probably guess. If it gets too complex then be happy to repeat some parts rather than factor. -- Cheers, Ralph.