Re: [PATCH:doc] GDB/MI attribute names

Nick Roberts
2009-09-25T22:32:00Z

> I have already suggested:
>
> string ==>
> """ ( letter | digit | "_" ) * """
>
> This at least uses a terminology that is already used in the
> manual.

This could drag on and I guess the above is adequate for the case under
discussion but I don't understand the existing syntax. I can guess what it
means but why are there three pairs of double quotes? When inserted into info
it all gets enclosed in further single quotes. The usual meaning of `string'
gets re-defined and * means 0 or more, so the empty string would be valid.
Also we probably don't want a field name to start with a digit. Current names
don't use digits at all and my initial proposal was not to include them in the
specification.

I don't see this combination of grouping and alternatives elsewhere
and in BNF maybe it should look something like:

<fieldchar> ::== <letter> | <digit> | "_"
<variable> ::== <letter> <fieldchar> +

--
Nick http://users.snap.net.nz/~nickrob