This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [5.1/mi] SYNTAX CHANGE? - List ``[ ]'' vs ``{ }''


Fernando Nasser wrote:
> 
> Andrew,
> 
> I strongly object to the use of "[]".  This will add another special
> character and make things more difficult.

This is interesting :-)

>From memory, the proposal came about because a person implementing a
parser found that they needed contextual information (expect a list of
breakpoints) when translating the MI output into an internal structure. 
The intention of the syntax change (differentiate between lists and
tupples) was to make things easier - the basic structure could be
reconstructed without the need for that context.

An existing parser would just tread ``[ ]'' like ``{ }''.  I don't see a
need for any other special characters.

> The output like {"1","2","4"} can easily be considered as a list value
> by the parser.  The parser will need to have some description of the
> expected result, even if in a lose way so it should still be able to
> identify that this is a list value and not a list of values.

My memory of the reasoning behind the change was to remove the need for
the parser to have this knowledge.

> The {bp="1",bp="2",bp="4"} result should not be generated.  As we
> currently have to share the output producing code with the CLI, we end
> up generating things like this.  But I guess we should fix the source of
> such anachronisms instead of changing the output format because of it.

Do you think that the syntax should be tightened so that the above isn't
allowed?

> It may be better to leave the output as is for 5.1 and see what the
> parser implementers say.  If they complain, we can discuss the best
> alternative and patch both the branch and the trunk.  As you said, it is
> a simple change to the mi-out code.

I'd really like this resolved before MI is permenantly enabled.  Once it
is enabled, things like the syntax will become impossible to change.

In the end I guess the question is, is the world be made up of just
lists and atoms or lists, tupples and atoms.  The answer probably
depends on which list like language you were taught :-)

	enjoy,
		Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]