From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11375 invoked by alias); 22 Sep 2004 13:48:05 -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 11335 invoked from network); 22 Sep 2004 13:48:03 -0000 Received: from unknown (HELO lakermmtao01.cox.net) (68.230.240.38) by sourceware.org with SMTP; 22 Sep 2004 13:48:03 -0000 Received: from white ([68.9.64.121]) by lakermmtao01.cox.net (InterMail vM.6.01.03.04 201-2131-111-106-20040729) with ESMTP id <20040922134803.DEKJ28365.lakermmtao01.cox.net@white>; Wed, 22 Sep 2004 09:48:03 -0400 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 1CA7TW-0006p7-00; Wed, 22 Sep 2004 09:48:02 -0400 Date: Wed, 22 Sep 2004 13:48:00 -0000 From: Bob Rossi To: Fabian Cenedese Cc: gdb@sources.redhat.com Subject: Re: MI rules Message-ID: <20040922134802.GA26132@white> Mail-Followup-To: Fabian Cenedese , gdb@sources.redhat.com References: <5.2.0.9.1.20040922153212.01d6bb38@NT_SERVER> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.2.0.9.1.20040922153212.01d6bb38@NT_SERVER> User-Agent: Mutt/1.3.28i X-SW-Source: 2004-09/txt/msg00176.txt.bz2 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