From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21004 invoked by alias); 9 Oct 2006 18:14:28 -0000 Received: (qmail 20994 invoked by uid 22791); 9 Oct 2006 18:14:28 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.palmsource.com (HELO mx2.palmsource.com) (12.7.175.14) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 09 Oct 2006 18:14:23 +0000 Received: from localhost (localhost [127.0.0.1]) by localhost.domain.tld (Postfix) with ESMTP id 71DFE26FEF; Mon, 9 Oct 2006 11:14:22 -0700 (PDT) Received: from mx2.palmsource.com ([127.0.0.1]) by localhost (mx2.palmsource.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07112-03-33; Mon, 9 Oct 2006 11:14:21 -0700 (PDT) Received: from ussunex01.palmsource.com (unknown [192.168.101.9]) by mx2.palmsource.com (Postfix) with ESMTP id 8C64F26FEA; Mon, 9 Oct 2006 11:14:21 -0700 (PDT) Received: from 192.168.92.75 ([192.168.92.75]) by ussunex01.palmsource.com ([192.168.101.9]) via Exchange Front-End Server owa.palmsource.com ([10.0.20.17]) with Microsoft Exchange Server HTTP-DAV ; Mon, 9 Oct 2006 18:14:22 +0000 Received: from svmsnyderlnx by owa.palmsource.com; 09 Oct 2006 11:14:20 -0700 Subject: Re: YACC/Lex From: Michael Snyder To: Rob Quill Cc: gdb@sourceware.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Mon, 09 Oct 2006 18:14:00 -0000 Message-Id: <1160417660.14535.33.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00043.txt.bz2 On Mon, 2006-10-09 at 12:44 +0100, Rob Quill wrote: > Hi, > > Is it ok to use code generated by YACC and/or Lex in GDB? If not, what > alternatives are there? First of all, the open source / gnu / fsf equivalents are byacc (bison), and flex. Bison and byacc are two independent implementations of a yacc equivalent. If I remember correctly, gdb will work with bison but prefers byacc. I'm not sure if it will work with yacc itself any more. If you cd to the gdb source directory and do "ls *.y", you will see that there are existing (b)yacc parsers for ada, c, java, fortran, pascal and modula-2, plus a few more. There's also a separate lexer for ada, ada-lex.l. Look at the makefile to see how these get built, and then if you want to pursue it further, look at language.c and language.h. Michael