This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

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


 > 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


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