[tools/update_ups.p6] factor out some repetition into sub
[tools/update_ops.p6] introduce grammar for ops
[tools/update_ops.p6] integrate two grammars