Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <Michael.Snyder@palmsource.com>
To: Rob Quill <rob.quill@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: YACC/Lex
Date: Mon, 09 Oct 2006 18:14:00 -0000	[thread overview]
Message-ID: <1160417660.14535.33.camel@localhost.localdomain> (raw)
In-Reply-To: <baf6008d0610090444lec06d1eg71fa24705d5ab423@mail.gmail.com>

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


  parent reply	other threads:[~2006-10-09 18:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-09 11:45 YACC/Lex Rob Quill
2006-10-09 12:33 ` YACC/Lex Daniel Jacobowitz
2006-10-09 18:14 ` Michael Snyder [this message]
2006-10-09 20:09   ` YACC/Lex Rob Quill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1160417660.14535.33.camel@localhost.localdomain \
    --to=michael.snyder@palmsource.com \
    --cc=gdb@sourceware.org \
    --cc=rob.quill@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox