all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Eric M. Ludlam" <eric@siege-engine.com>
To: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re[2]: CEDET, DL & parsing thoughts (was Release plans)
Date: Sat, 30 Aug 2008 05:04:05 -0400	[thread overview]
Message-ID: <200808300904.m7U945JI029267@projectile.siege-engine.com> (raw)
In-Reply-To: <48B8AF53.8040501@gmail.com> (lennart.borgman@gmail.com)

>>> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> seems to think that:
>Eric M. Ludlam wrote:
>> This is in effect what is in CEDET/Semantic now but without the DL.  I
>> had made a replacement for flex, but more Emacs Lisp centric, and
>> David Ponce ported bison into Emacs Lisp directly.  This bison port
>> supports incremental parsing, full parsing, reparsing, and is quite
>> fast, though not nearly as fast as actual flex/bison/c code.
>> 
>> I would assume the concepts in David Ponce's wisent parser generator
>> could be back-ported into Bison if desired.
>
>So (if I understand currectly from the little I know about this), a bit
>sadly, if there were sutiable flex and bison dlls these could be used
>instead (if Davids specials were backported too) and would be quite a
>bit faster.

I can imagine how it *might* be done, though to be honest, it may be
that having "eval" actions in the real bison generated parser might be
all it takes to slow it down.  I would not claim this as an area of
expertise.

>This does not relate to the general question of loading dll:s. This is a
>special case that I suppose Richard would approve. (I have no idea, but
>I guess there are no flex and bison dlls availabe, or are there?)

It would work like this:

1) lex/grammar file -> flex & bison -> c-files
2) compile flex-bison output + generic interface -> dl
3) load dl, bind generated parser commands to fcns
4) bind those fcns to generic CEDET/Semantic calls
5) Semantic infrastructure calls into the dll for parsing goodness.

>However for new languages all this requires also writing language
>specific bison grammars. Is this perhaps be a big job that just a few
>person have insight in how to do?

My goal was to build a tool that would make it easy for anyone to
write a parser that would feed into an infrastructure that provides
the complex specialy functionality.

This is true now for what is in CEDET.  There are already 6 grammars
that work pretty well that enthusiasts of a particular language have
written.  (Erlang, python, csharp, javascript, 2 php parsers, and
ruby.)

>> When I started, I really wanted to have a single generic parsing
>> infrastructure that could do indentation, coloring, and tagging.
>
>nxml-mode does that, but on its own of course.

It is my understanding that only nxml, and that new javascript mode do
this, making the undertaking a statistically less likely occurance in
the current infrastructure.

>> Once CEDET is merged into Emacs, I hope to examine some of the speed
>> issues with others who know more what Emacs' internals are like.  (As
>> an FYI, all of CEDET's papers should now be in order for this.)
>
>Great. Then we can hope for that it is easy to get started using CEDET.

I agree.
Eric

-- 
          Eric Ludlam:                       eric@siege-engine.com
   Siege: www.siege-engine.com          Emacs: http://cedet.sourceforge.net




  reply	other threads:[~2008-08-30  9:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-30  1:53 CEDET, DL & parsing thoughts (was Re: Release plans) Eric M. Ludlam
2008-08-30  2:24 ` Lennart Borgman (gmail)
2008-08-30  9:04   ` Eric M. Ludlam [this message]
2008-09-02 14:13     ` CEDET, DL & parsing thoughts (was " Richard M. Stallman
2008-09-02 14:39       ` CEDET, DL & parsing thoughts joakim
2008-09-02 20:01         ` Re[2]: " Eric M. Ludlam
2008-09-03  2:41           ` Richard M. Stallman

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=200808300904.m7U945JI029267@projectile.siege-engine.com \
    --to=eric@siege-engine.com \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@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.
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.