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]
Other format: [Raw text]

GDB/MI Output Syntax


Hi,

Along with the newline changes, there are 2 other changes that I propose
to the grammar. They are,

async-record   ==> exec-async-output | status-async-output | notify-async-output
exec-async-output    ==> [ token ] "*" async-output
status-async-output  ==> [ token ] "+" async-output
notify-async-output  ==> [ token ] "=" async-output]

to 

   async-record ==> [token] async-record-kind async-output
   async-record-kind ==> "*" | "+" | "="

however, if you really would like to keep the *-async-output rules, we
could do

   async-record ==> [token] async-record-kind async-output
   async-record-kind ==> exec-async-output | status-async-output | notify-async-output
   exec-async-output    ==> "*"
   status-async-output  ==> "+"
   notify-async-output  ==> "=" 

The second change is identical but refers to the rules of
   stream-record ==> console-stream-output | target-stream-output | log-stream-output
   console-stream-output ==> "~" c-string
   target-stream-output ==> "@" c-string
   log-stream-output ==> "&" c-string

to
   stream-record => stream-record-kind c-string
   stream-record-kind => "~" | "@" | "&"

The reason it would be helpful to modify the grammar in this way is that
it leads to a more elegant form when trying to build an intermediate
representation. At the parse level of 'stream-record' or 'async-record'
you have all of the information necessary in order to populate a
structure with data. Otherwise, the information is a few levels down
stream.

Does this sound reasonable? and again, should I post a new grammar with
the new lines moved to the 'output' production and with the changes I
have above?

Thanks,
Bob Rossi


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