From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17642 invoked by alias); 23 Aug 2004 00:33:45 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 17633 invoked from network); 23 Aug 2004 00:33:44 -0000 Received: from unknown (HELO lakermmtao11.cox.net) (68.230.240.28) by sourceware.org with SMTP; 23 Aug 2004 00:33:44 -0000 Received: from white ([68.9.64.121]) by lakermmtao11.cox.net (InterMail vM.6.01.03.02.01 201-2131-111-104-103-20040709) with ESMTP id <20040823003344.UPKD6461.lakermmtao11.cox.net@white>; Sun, 22 Aug 2004 20:33:44 -0400 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 1Bz2mN-0003hW-00; Sun, 22 Aug 2004 20:33:43 -0400 Date: Mon, 23 Aug 2004 00:33:00 -0000 From: Bob Rossi To: Felix Lee Cc: gdb@sources.redhat.com Subject: Re: GDB/XMI (XML Machine Interface) Message-ID: <20040823003343.GC14078@white> Mail-Followup-To: Felix Lee , gdb@sources.redhat.com References: <20040822025527.96F5D511B4A@stray.canids> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040822025527.96F5D511B4A@stray.canids> User-Agent: Mutt/1.3.28i X-SW-Source: 2004-08/txt/msg00281.txt.bz2 On Sat, Aug 21, 2004 at 07:55:27PM -0700, Felix Lee wrote: > Felix Lee : > > Bob Rossi : > > > 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