From: "Eric M. Ludlam" <eric@siege-engine.com>
To: rms@gnu.org
Cc: cyd@stupidchicken.com, raeburn@raeburn.org,
David Engster <deng@randomsample.de>,
emacs-devel@gnu.org
Subject: Re: CEDET merge question
Date: Sat, 12 Sep 2009 08:49:40 -0400 [thread overview]
Message-ID: <1252759780.4770.76.camel@projectile.siege-engine.com> (raw)
In-Reply-To: <E1MkeLY-0001Z7-Uq@fencepost.gnu.org>
On Mon, 2009-09-07 at 09:33 -0400, Richard Stallman wrote:
> CEDET uses Bison grammars which are extended through "Optional Lambda
> Expressions" (OLE). They produce the actual tags, which are the basic
> objects resulting from the parsing stage. I don't think this can be
> easily replaced by Bison itself or Guile.
>
> Why is it hard to add these to Bison?
> It can handle embedded C code, so why not embedded Lisp code?
> It should be straightforward to make such changes.
I don't know how bison works, but I would assume that bison parses basic
C code (thus replacing $1 with some other piece of code.) In the same
way, it would need to be taught about Emacs Lisp, Scheme, or any other
language someone might want.
Bison also outputs the code needed for traversing the generated parser
table. When creating more than one parser in one application (ie - any
scripting language case) this would be detrimental since it is basically
the same code for every parser, which is wasteful.
That said, I do think that it is possible, and maybe even desirable to
do such a thing. The end result, however, would involve rather extreme
changes to bison, and possibly flex if flex is also used.
As others have pointed out, there are newer parser technologies
available too such as PEG. How much of that is fad vs fabulous, I don't
really know. What I do know is that the CEDET tools don't care much
about the specifics of the parser. The parser tools it does have are to
make it easy to create new parsers so Emacs can support a large number
of languages.
A very similar question to "why not make bison support Emacs Lisp
output", is "why not have gcc support tagging output".
If gcc supported a tagging output format with the details needed for
CEDET to get its job done, it could just call out to gcc instead of
parsing it in Emacs. CEDET would then magically support a lot more
languages.
There are a huge number of tools out there trying to do what gcc does,
like ctags, etags, ectags, cscope, gnu global, doxygen, and idutils.
What's worse is that none of them work well.
Of course, an Emacs Lisp parser can do lots of other things besides
create tags. That's just what it is currently used for.
Eric
next prev parent reply other threads:[~2009-09-12 12:49 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-05 16:28 CEDET merge question Chong Yidong
2009-09-05 17:22 ` David Engster
2009-09-05 20:53 ` Chong Yidong
2009-09-05 23:08 ` David Engster
2009-09-06 15:37 ` Richard Stallman
2009-09-06 17:46 ` Ken Raeburn
2009-09-06 21:11 ` David Engster
2009-09-06 22:26 ` Ken Raeburn
2009-09-07 13:33 ` Richard Stallman
2009-09-12 12:49 ` Eric M. Ludlam [this message]
2009-09-12 13:37 ` Miles Bader
2009-09-13 16:39 ` Richard Stallman
2009-09-14 11:22 ` tomas
2009-09-14 12:15 ` Miles Bader
2009-09-14 20:04 ` tomas
2009-09-12 16:34 ` David Engster
2009-09-13 16:39 ` Richard Stallman
2009-09-13 17:38 ` Eric M. Ludlam
2009-09-14 18:28 ` Richard Stallman
2009-09-13 16:40 ` Richard Stallman
2009-09-07 13:34 ` Richard Stallman
2009-09-08 8:11 ` joakim
2009-09-08 9:07 ` Lennart Borgman
2009-09-08 9:09 ` Lennart Borgman
2009-09-08 14:41 ` Chong Yidong
2009-09-08 15:10 ` joakim
2009-09-08 17:18 ` Chong Yidong
2009-09-08 21:21 ` Romain Francoise
2009-09-08 22:27 ` Chong Yidong
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=1252759780.4770.76.camel@projectile.siege-engine.com \
--to=eric@siege-engine.com \
--cc=cyd@stupidchicken.com \
--cc=deng@randomsample.de \
--cc=emacs-devel@gnu.org \
--cc=raeburn@raeburn.org \
--cc=rms@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.