From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2556 invoked from network); 21 Jul 2001 01:16:15 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Jul 2001 01:16:15 -0000 Received: (qmail 28171 invoked by alias); 21 Jul 2001 01:16:09 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15437 Received: (qmail 28160 invoked from network); 21 Jul 2001 01:16:08 -0000 Message-ID: <20010721011604.81202.qmail@web10401.mail.yahoo.com> Date: Fri, 20 Jul 2001 18:16:04 -0700 (PDT) From: Felix Rosencrantz Subject: Re: Generating completion functions from XML To: zsh-workers MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >Btw. have you noticed Bart's _arg_compile function? I hadn't looked at Bart's _arg_compile function. It does look interesting. It covers things that I would like to see in an intermediate file format. XML is sort of interesting to me for the intermediate format for all the reasons that people are hyping it these days. It might not be the way to go, but it's worth a try. I do agree that XML is not overly easy to edit (I haven't looked at psgml.el). Though, I like the possibility of actually placing documentation in appropriate points in the descriptive file, and the ability for it to be modified more programmatically. Also, I don't really expect XML to represent all completion functions. Though for many simple ones, I think XML could be a good format. I'll take a first stab at coming up with some sort of grammar. I've only created a couple small grammars for some small projects. I know though that it can take some effort to design a good schema. I'd like to see an XML format that can represent any _arguments call. So that it would be possible to have some sort of equivalent version in XML. I'd also like to be able to represent/generate a function that contains multiple _argument calls based on $service, and then can also handle $state (e.g. the _zip function). >But it's not simple to define, really. Especially if you think about >commands like _cvs which does *a lot* besides calling _arguments, >things that are best described with the shell code needed to do them, I >think. With a _cvs-like command I'd like to be able to represent in XML what amounts to the hierarchical call to _arguments. I realize there is a lot of specialized code to handle actions. I don't really see a way to automate action generation or to represent actions other than in zsh script. (Though there is an XML version of java code, javaml...) I think if the XML format made it simple to share flags between the various sub-commands, since it is common for the same flag to be shared among sub-commands, it would help with the creation of such completion functions. >I'll try to make helpful comments when you start describing the >language you have in mind. That would be very much appreciated. I'll try to come up with something over the next week. -FR __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/