Hi Lubos,

Thanks for the quick response.

Is there a tutorial or guide on how to write a custom analyser for OpenGrok?

As we have a custom DSL, it is not supported by exuberant-ctags as you rightly 
pointed out. Given this, what would you recommend as the best way to add 
definitions to our analyser?

Thanks in advance for your help.

Regards,

Priyesh

From: Lubos Kosco [mailto:[email protected]]
Sent: 08 March 2011 12:57
To: Shah,P,Priyesh,DMK6 R
Cc: [email protected]
Subject: Re: [opengrok-dev] Extending OpenGrok

On 8.3.2011 13:48, [email protected]<mailto:[email protected]> wrote:
Hi,

Hello



We've successfully installed OpenGrok where I work.

We store our network models into a subversion repository. These are in xml 
format and use a custom DSL.

We would now like to improve the search capabilities against our subversion 
repository. Looking through the OpenGrok documentation and source, it seems 
that I need to write a custom lexer using JFlex and a custom analyser that 
understands our custom DSL. Is this correct?

yes, if DSL is some kind of programming language and has a grammar (I however 
doubt exuberant ctags supports it(http://ctags.sourceforge.net/languages.html), 
so you will mainly gain highlighting and better tokenization, if it's plain 
text, it should be processed already and it seems that xmlanalyser converts it)


Also, do I need to rebuild OpenGrok with our custom analyser or can it be 
picked up at runtime?

yes, you need to rebuild it, since there is a common class which holds known 
analyzers and their extensions/magic strings

check one of the analyser commits(e.g. perl / python):
http://www.norbye.org/hg/opengrok/trunk/index.cgi/rev/1f4fbc44363b
or http://www.norbye.org/hg/opengrok/trunk/index.cgi/rev/c87ac1c398d8

obviously if this "DSL" analyser of yours is usable to outside folks, please 
make this patch available upstream (file a bug with opengrok, get an OCA # and 
once it passes reviews it will be integrated)

so far it seems it will be just extended xml analyser, but it might be more

xing the fingers
L



Thanks in advance for your help.

Regards,

Priyesh






_______________________________________________

opengrok-dev mailing list

[email protected]<mailto:[email protected]>

http://mail.opensolaris.org/mailman/listinfo/opengrok-dev

_______________________________________________
opengrok-dev mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opengrok-dev

Reply via email to