Andrew Myers writes:
> I've been looking for a way to use semantic with Common Lisp, I can't find
> any existing implementation of a common lisp grammar and am looking for
> documentation on how to create one that I could use with semantic. All the
> documentation that I find seems to be heavy on high level explanations and
> light on details though.
> The semantic manual doesn't seem to cover adding new languages.
The CEDET that ships with Emacs does not yet carry all the packages and
documentation for grammar development.
You'll have to get the CEDET development version, which you can checkout
with Bazaar (see http://sourceforge.net/scm/?type=bzr&group_id=17886)
bzr branch bzr://cedet.bzr.sourceforge.net/bzrroot/cedet/code/trunk
The complete Semantic documentation is in semantic/doc, describing the
general tag structures, the grammar framework as well as Bovine and
> These pages say that adding a wisent grammar is the easiest way to do this
> and I think would be simplest given the consistency of lisp syntax. I can't
> find a good description of how to do this though.
> This is the only wisent documentation I could find, it seems to be for
> generating python code?
That's another Wisent (see http://seehuhn.de/pages/wisent#sec:3.0.0). :-)
Wisent is the more flexible parser, but Bovine features a grammar
debugger which is pretty handy when writing a grammar from scratch.
However, I guess you won't have to write a complete grammar for CL. If
you take a look at semantic-el.el, which is the parser for Emacs Lisp
(including EIEIO, its CLOS-like object extension), you'll see that it
only generates a very minimal parse table and then uses functions to
generate tags. Maybe a CL parser could use a similar approach. The main
advantage is that in Emacs you can use up-list, forward-sexp, etc. to
easily navigate through the code structures, and you can also use stuff
like thing-at-point to identify, well, "things".