From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32394 invoked by alias); 31 Aug 2007 09:44:25 -0000 Received: (qmail 32384 invoked by uid 22791); 31 Aug 2007 09:44:25 -0000 X-Spam-Check-By: sourceware.org Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 31 Aug 2007 09:44:22 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1IR334-000258-VN for gdb-patches@sources.redhat.com; Fri, 31 Aug 2007 13:44:19 +0400 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1IR32t-00024d-Ru; Fri, 31 Aug 2007 13:44:07 +0400 From: Vladimir Prus To: Nick Roberts Subject: Re: [mi] -list-features Date: Fri, 31 Aug 2007 09:44:00 -0000 User-Agent: KMail/1.9.6 Cc: Eli Zaretskii , drow@false.org, gdb-patches@sources.redhat.com References: <18135.57423.236858.201458@kahikatea.snap.net.nz> In-Reply-To: <18135.57423.236858.201458@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200708311344.06331.ghost@cs.msu.su> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00549.txt.bz2 On Friday 31 August 2007 13:33:03 Nick Roberts wrote: > > > Example output: > > >=20 > > > ^done,result=3D["feature1","feature2"] > >=20 > > This is much better, IMO; now it's perfectly clear what front ends > > should expect. >=20 > Actually, I think that the output syntax means it should be something lik= e: >=20 > ^done,result=3D[name=3D"feature1",name=3D"feature2"] =46rom MI grammar: result-record =E2=86=92 [ token ] "^" result-class ( "," result )* nl result-class =E2=86=92 "done" | "running" | "connected" | "error" | "exit" result =E2=86=92 variable "=3D" value Given=20 ^done,result=3D["feature1","feature2"] "done" is result class, and result=3D["feature1","feature2"] is the 'result' nonterminal -- where 'result' is the name and ["feature1","feature2"] is the value. Now back to grammar: value =E2=86=92 const | tuple | list list =E2=86=92 "[]" | "[" value ( "," value )* "]" | "[" result ( "," resu= lt )* "]" =09 So clearly,=20 ["feature1","feature2"] is a valid list and the output I gave is also valid. What you wrote: ^done,result=3D[name=3D"feature1",name=3D"feature2"] is also permitted by the current grammar, but I don't see any possible meaning in the "name=3D". I believe using variable names inside lists is old usage, and new commands should not do that. In contrast, tuples are in the form: {name1=3Dvalue1,name2=3Dvalue2,....} and the names are required for tuples. Are you sure you haven't confused tu= ples and lists? - Volodya