emacs-devel
[Top][All Lists]
Advanced

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

Re: IDE


From: David Engster
Subject: Re: IDE
Date: Fri, 23 Oct 2015 16:55:06 +0200
User-agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.5 (gnu/linux)

Evgeniy Dushistov writes:
> On Wed, Oct 21, 2015 at 06:52:55PM -0400, Eric Ludlam wrote:
>> 
>> Semantic doesn't demand it's parsers be in wisent, or even in Emacs at all.
>> If you have a nice Ruby grammar in Ruby, and you can convert it's internal
>> data into lisp-like syntax, pulling it into the Semantic system is pretty
>> easy.  What you would loose is dynamic reparsing without having to save,
>> thus it may be a bit quirky.
>> 
>
> Is any documentation about this:
> - format of data that Semantic understand

See chapter 1 in the Semantic AppDev manual:

  http://www.randomsample.de/cedetdocs/semantic-appdev/

Running M-x bovinate in a C file will already give you a good impression.

> - which hooks should be used to give this information to semantic, so
> it can use it to colorization, completition, tags navigation etc ?

Hooks are not well suited for this task, since you want to extend or
override functionality depending on the current major-mode. For this,
the mode-local package is used, so one should get familiar with it
first. The most important functions to override are listed in the
Semantic AppDev manual (see for instance chapters 7 and 12). It is also
good to look into a Semantic backend for a language which you know
reasonably well to see how it is done. Last not least, you can ask on
cedet-devel.

> So I think it would be good integrate
> rtags(https://github.com/Andersbakken/rtags) (or some another existing
> daemon) for such complex language as c++ and cedet.

AFAIK, rtags solely uses libclang, which does not give you direct access
to the AST, so I wouldn't know how rtags could be used to export the
semantic tags of the current buffer. You could hook rtags into Semantic
purely for the end-user features, like completion/references.

This is also why I will use libtooling for C++, which lets you walk the
AST.

-David



reply via email to

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