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.
> http://www.gnu.org/software/emacs/manual/html_mono/semantic.html
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)
by doing
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
Wisent.
> 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.
> http://www.emacswiki.org/emacs/HowToSetUpSemanticBovinatorForANewLanguage
> http://cedet.sourceforge.net/addlang.shtml
>
> This is the only wisent documentation I could find, it seems to be for
> generating python code?
> http://seehuhn.de/pages/wisent
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".
-David

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.
http://www.gnu.org/software/emacs/manual/html_mono/semantic.html
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.
http://www.emacswiki.org/emacs/HowToSetUpSemanticBovinatorForANewLanguagehttp://cedet.sourceforge.net/addlang.shtml
This is the only wisent documentation I could find, it seems to be for
generating python code?
http://seehuhn.de/pages/wisent
I've downloaded the emacs source code and am trying to find understandable
examples there but I wanted to ask if anyone has already done this or can
point me to good documentation on how to do this.
Thanks!