You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Bastian H <ar...@googlemail.com> on 2012/03/26 12:19:38 UTC

Indexing Source Code

Hi,

I like to index my Source Code - the most is Cobol, Asembler and Java -
with Solr.

I don't know where to start... I think I need to parse it to get XML for
Solr. Do I need Tinka? Is there any Parser I could use?

I want to index functions, variables and function calls as well as
commentaries.

Can somebody show me to a starting point?

Thanks
Bastian

Re: Re: Indexing Source Code

Posted by Ar...@googlemail.com.
I can't find better examples at the moment... I hope they are sufficient to  
describe what I need.

''' Code
000025 01 RETURN-CODES.
000026 05 RTC00 PIC X(2) VALUE '00'.
000027 05 RTC01 PIC X(2) VALUE '01'.
000028 05 RTC04 PIC X(2) VALUE '04'.
000029 05 RTC08 PIC X(2) VALUE '08'.
''' /Code

This is a variable (field/array) in Cobol. I use it in some
(sub)programs. No I need to Reengener it because I need more return
Codes or I want to get rid of the Return Codes because I have another
solution. I want to find all appearance of this variable.

- List of variables used by a program.


''' Code
005915 CALL 'Unit01221' RETURN-CODE
''' /Code

Unit00221 is the subprogram I call.
The Main Program is Unit00200 - the last 2 Numbers > 0 says it is a
subprogram.

- I want to get a list of the subprograms the mainporgram uses.
- I give the name of a Subprogram, and get a list where it is used (can be  
in more then one main program).

- When possible I give the name of the Main and get a (nested) list of used  
subprograms, subsubprograms...

Thanks,
Bastian

Am schrieb Marcelo Carvalho Fernandes <mc...@gmail.com>:
> Hi Bastian,





> Can you please tell us what kind of search you imagine doing with some  
> (use


> case) examples?





> Marcelo





> On Monday, March 26, 2012, Bastian H arbeit.bastian@googlemail.com> wrote:


> > Hi,


> >


> > I like to index my Source Code - the most is Cobol, Asembler and Java -


> > with Solr.


> >


> > I don't know where to start... I think I need to parse it to get XML for


> > Solr. Do I need Tinka? Is there any Parser I could use?


> >


> > I want to index functions, variables and function calls as well as


> > commentaries.


> >


> > Can somebody show me to a starting point?


> >


> > Thanks


> > Bastian


> >





> --


> ----


> Marcelo Carvalho Fernandes


> +55 21 8272-7970


> +55 21 2205-2786




Re: Indexing Source Code

Posted by Marcelo Carvalho Fernandes <mc...@gmail.com>.
Hi Bastian,

Can you please tell us what kind of search you imagine doing with some (use
case) examples?

Marcelo

On Monday, March 26, 2012, Bastian H <ar...@googlemail.com> wrote:
> Hi,
>
> I like to index my Source Code - the most is Cobol, Asembler and Java -
> with Solr.
>
> I don't know where to start... I think I need to parse it to get XML for
> Solr. Do I need Tinka? Is there any Parser I could use?
>
> I want to index functions, variables and function calls as well as
> commentaries.
>
> Can somebody show me to a starting point?
>
> Thanks
> Bastian
>

-- 
----
Marcelo Carvalho Fernandes
+55 21 8272-7970
+55 21 2205-2786