Re: How to integrate external parser

"Eric M. Ludlam" <[email protected]>
Newsgroups gmane.emacs.cedet
Message-ID <[email protected]>
On 09/15/2014 07:53 AM, Tu Do wrote:
> Hi Eric,
>
> If I want to create external parser, for example based on Clang, and
> generate Semantic compatible tags for indexing an existing project,
> where should I start? What parts of Semantic should I have a look?

The easiest example parser to look at is exuberent ctags in 
cedet/semantic/ectags/parse.el and neighboring files.

This basically shells out, parses the output of ctags which is very 
regular, and converts them into tag form.  These tags only provide a 
line number though, so you have to convert to a character to create a 
marker.

In C/C++ it is used to get tags from files not yet parsed by the regular 
semantic parser, so there is a way to convert between the two.  See the 
db.el next to parse.el.

If you want to use clang as a full replacement, then you would more 
likely do it as a replacement, the way some of the other languages are 
supported.

Good Luck
Eric

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.