Re: GDB/XMI (XML Machine Interface)

Bob Rossi
2004-08-23T00:33:45Z

On Sat, Aug 21, 2004 at 07:55:27PM -0700, Felix Lee wrote:
> Felix Lee <felix.1@canids.net>:
> > Bob Rossi <bob@brasko.net>:
> > > 1. Have to write a parser. (regex, recursive decent)
> > > BTW, I guarantee the parser will have to be updated with every
> > > release of GDB.
> > so far, I haven't found that xml is any less work than that, and
> > it usually feels like a lot more work, but I haven't used xml for
> > anything substantial yet, so it may just be unfamiliarity.
>
> here's some elaboration. this is what I think about xml parsers
> today. please correct me if I'm wrong.
>
> there are two types of xml parsers, stream-based and tree-based.
>
> using an xml stream parser is equivalent to writing a recursive
> descent parser. the stream parser basically just handles the
> 'tokenization' aspect of parsing xml (which is complicated by
> considerations like character encoding, etc.)

This is obtuse. Using the tree representation of an XML parser is
equivalent to using the tree representation of a recursive descent
parser.

You do not have to write the lexer, parser, tree representation or
lookup functions ( XPATH ) if you use XML.

You have to write the lexer ( flex ), parser ( bison ), tree
representation format, lookup features if you use a recursive descent
parser.

BTW, I am writing a recursive descent parser because everyone here seems
to hate XML. Does anyone have the bison rules already written out
(sharign would be *greatly* appreciated)? Or am I the first one?

Thanks,
Bob Rossi