Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <ghost@cs.msu.su>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: Eli Zaretskii <eliz@gnu.org>,
	 drow@false.org,  gdb-patches@sources.redhat.com
Subject: Re: [mi] -list-features
Date: Fri, 31 Aug 2007 09:44:00 -0000	[thread overview]
Message-ID: <200708311344.06331.ghost@cs.msu.su> (raw)
In-Reply-To: <18135.57423.236858.201458@kahikatea.snap.net.nz>

On Friday 31 August 2007 13:33:03 Nick Roberts wrote:
>  > > 		Example output:
>  > > 
>  > > 			^done,result=["feature1","feature2"]
>  > 
>  > This is much better, IMO; now it's perfectly clear what front ends
>  > should expect.
> 
> Actually, I think that the output syntax means it should be something like:
> 
> ^done,result=[name="feature1",name="feature2"]

From MI grammar:

	result-record →
        	  [ token ] "^" result-class ( "," result )* nl

	result-class →
          "done" | "running" | "connected" | "error" | "exit"

	result →
        	 variable "=" value

Given 

	^done,result=["feature1","feature2"]

"done" is result class, and

	result=["feature1","feature2"]

is the 'result' nonterminal -- where 'result' is the name and

	["feature1","feature2"]

is the value. Now back to grammar:

	value → const | tuple | list

	list → "[]" | "[" value ( "," value )* "]" | "[" result ( "," result )* "]"
	

So clearly, 

	["feature1","feature2"]

is a valid list and the output I gave is also valid. What you wrote:

	^done,result=[name="feature1",name="feature2"]

is also permitted by the current grammar, but I don't see any possible
meaning in the "name=". 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=value1,name2=value2,....}

and the names are required for tuples. Are you sure you haven't confused tuples
and lists?

- Volodya


  reply	other threads:[~2007-08-31  9:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-28 17:12 Vladimir Prus
2007-08-28 17:15 ` Daniel Jacobowitz
2007-08-28 17:47   ` Vladimir Prus
2007-08-29 17:55     ` Eli Zaretskii
2007-08-31  7:06       ` Vladimir Prus
2007-08-31  7:27         ` Nick Roberts
2007-08-31  7:38           ` Vladimir Prus
2007-08-31  9:00             ` Nick Roberts
2007-08-31  8:50         ` Eli Zaretskii
2007-08-31  9:00           ` Vladimir Prus
2007-08-31  9:18             ` Eli Zaretskii
2007-08-31  9:33               ` Nick Roberts
2007-08-31  9:44                 ` Vladimir Prus [this message]
2007-08-31 10:02                   ` Nick Roberts
2007-08-31 10:13                     ` Vladimir Prus
2007-08-31 20:12                       ` Nick Roberts
2007-08-31 10:19               ` Vladimir Prus
2007-08-31 18:08                 ` Eli Zaretskii
2007-09-07 20:26               ` Vladimir Prus
2007-09-08  7:24                 ` Eli Zaretskii
2007-09-16 14:23                   ` Vladimir Prus
2007-09-16 14:38                     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200708311344.06331.ghost@cs.msu.su \
    --to=ghost@cs.msu.su \
    --cc=drow@false.org \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=nickrob@snap.net.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox