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]

Re: MI rules


On Wed, Sep 22, 2004 at 03:38:45PM +0200, Fabian Cenedese wrote:
> Hi
> 
> I know that somebody is writing parser rules for the MI output. How have
> others written their MI parsers if not with rules? Pure string handling/
> comparing etc.? Or are there already some (older) rules which could be
> used for flex/bison?

I currently have a set of rules that parse an MI output command. This
includes the flex file, the bison file and an extra source file that
populates an in memory data structure representing the MI output
command.

The rules from the documentation had to change only slightly to conform
to what GDB is actually outputting. The problem is, I haven't tested the 
parser extensively. The reason for this is because I am waiting to here 
from the GDB developers how to interpret the data semantically once it 
is acquired. I believe that every MI output command needs to have a
header describing what type of MI output command is being transmitted.
With this knowledge, the front end would understand exactly what
information it needs to grab from the parse tree. Otherwise, the front
end gets confusing at best.

BTW, I took a look at the eclipse MI parser, from what I can tell, it
uses a hybrid MI/CLI approach, and simply parses the MI command with
string compares. As far as I can tell, this method will be very buggy
and confusing in the long run.

Thanks,
Bob Rossi


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