emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CEDET merge question


From: David Engster
Subject: Re: CEDET merge question
Date: Sun, 06 Sep 2009 23:11:06 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

Ken Raeburn <address@hidden> writes:
> On Sep 6, 2009, at 11:37, Richard Stallman wrote:
>> Is it possible to use Bison itself rather than implement the
>> same functionality differently?  Or perhaps add an option
>> to Bison to output its data in whatever format is convenient?
>
> Guile is also using a translation/reimplementation of Bison in Scheme.
> I haven't looked at the CEDET code, but Guile's version wants  the
> grammar input using Scheme (s-expression) syntax.

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.

But there's really not that much additional framework associated with
Bison/Bovine. In the 'bovine' subdirectory, there are the actual grammar
files (like c.by, erlang.by, etc.), and the major- and debugging-modes
(bovine-grammar.el, bovine-debug.el). I think they are really only
needed for developing and testing grammars.

The file semantic-bovine.el contains the parsing core and is
crucial. Then, there are files which deal with language-specific issues,
for example semantic-c.el, semantic-erlang.el, semantic-java.el,
etc.. These files contain overrides and helper functions to deal with
stuff which usually differs between languages, like smart completion,
local variables, namespaces and scoping issues, special preprocessor
macros, etc. These files are only crucial for parsing the named
language.

The file semantic-gcc.el sets up stuff like system include paths for
C/C++ by looking at the local gcc installation; it's very helpful for
people using gcc.

The files semantic-skel.el and skeleton.by are just there to get people
started developing their own grammars and overrides; I think they can be
safely dropped.

As mentioned in my previous mail, the files semantic-<LANG>-by.el result
from the compilation of the *.by files and could probably just be
provided 'as is' in Emacs, without the additional grammar developing
framework (this also implies that files could not just get synced from
CEDET CVS to Emacs, but would need a compilation step in between). I
can't speak for Eric here, of course. Maybe there's some not-so-obvious
dependency, or another good reason to include the full grammar
framework.

Regards,
David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]