From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6037 invoked from network); 24 Apr 2003 17:48:54 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 24 Apr 2003 17:48:54 -0000 Received: (qmail 5689 invoked by alias); 24 Apr 2003 17:48:48 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18469 Received: (qmail 5669 invoked from network); 24 Apr 2003 17:48:48 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 24 Apr 2003 17:48:48 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [195.92.195.172] by sunsite.dk (MessageWall 1.0.8) with SMTP; 24 Apr 2003 17:48:47 -0000 Received: from modem-68.blue-angel.dialup.pol.co.uk ([62.136.234.68] helo=pwstephenson.fsnet.co.uk) by cmailg2.svr.pol.co.uk with esmtp (Exim 4.14) id 198kpw-00035H-GQ for zsh-workers@sunsite.dk; Thu, 24 Apr 2003 18:48:44 +0100 Received: by pwstephenson.fsnet.co.uk (Postfix, from userid 501) id 423C61B76A; Thu, 24 Apr 2003 17:53:29 +0100 (BST) Received: from pwstephenson.fsnet.co.uk (localhost [127.0.0.1]) by pwstephenson.fsnet.co.uk (Postfix) with ESMTP id D8DDA1B769 for ; Thu, 24 Apr 2003 17:53:29 +0100 (BST) To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Remainder of compsys.yo Date: Thu, 24 Apr 2003 17:53:24 +0100 From: Peter Stephenson Message-Id: <20030424165329.423C61B76A@pwstephenson.fsnet.co.uk> I've finished rewriting compsys.yo from _description onwards; as before, it's a lot of large scale changes and the diffs aren't very helpful (about 1000 lines), so I've simply committed it (old version 1.166, new version 1.168 since I spotted a typo). The _regex_arguments entry was unfortunately too difficult to fathom entirely. I have rewritten it to omit mention of state machines, which is unnecessary implementation detail; all the user sees is a pattern syntax with no visibility of states beyond the notion of the current pattern. However, I've come a cropper at this bit: COMMENT(I think I've got this wrong, but I can't think what else it could mean. Actually, it still doesn't mean very much.)\ A special procedure is applied if no test succeeds but the remaining command line string contains no null character (implying the remaining word is the one for which completions are to be generated). The completion target is restricted to the remaining word and any var(action)s for the corresponding patterns are executed. In this case, nothing is stripped from the command line string. The order of evaluation of the var(action)s can be determined by the tt(tag-order) style; the various formats supported by tt(_alternative) can be used in var(action). The var(descr) is used for setting up the array parameter tt(expl). which used to be further down (inside the syntax for the first pattern, although it applied to the syntax as a whole) and say this: If no test succeeds and the remaining command line string contains no null character, the completion target is restricted to the remainder of the command line string and var(action)s for the target are executed. In this case, nothing is actually removed from the command line string so that any previous or neighbouring state may also have var(actions)s. var(actions)s evaluation are ordered by the tt(tag-order) style and specified var(tag) by tt(_alternative). So, the various formats supported by tt(_alternative) can be used in var(action). var(descr) is used for setting up the array parameter tt(expl). If anybody can shed further light on it, please do. In particular, I don't understand which actions are being executed if no test succeeds. I'm also not sure whether the reference to _alternative and tag-order apply more widely than this particular case (i.e. whether there should really be a paragraph break in the old text after the fifth line). -- Peter Stephenson Work: pws@csr.com Web: http://www.pwstephenson.fsnet.co.uk