How to support a new language???

Enno Bartels <[email protected]>
Newsgroups gmane.text.doxygen.devel
Message-ID <[email protected]>
Hi 

I would like to kick off  to support a new 
language in doxygen, like ADA (.adb, .ads)or Matlab (.pro)

So this it the way it should be done - is that right?!

1. So the first thing is to write a new parser and
    adapt the "Makefile.in"
   1.1. src/adacode.h
   1.2. src/adacode.l    ->   Makefile (flex)   ->   src/adacode.cpp     
 
   1.3. src/adascanner.h
   1.4. src/adascanner.l    ->   Makefile (flex)   ->    src/adascanner.cpp

    OR for matlab

   1.1. src/matlabcode.h
   1.2. src/matlabcode.l    ->   Makefile (flex)   ->   src/matlabcode.cpp     
 
   1.3. src/matlabscanner.h
   1.4. src/matlabscanner.l    ->   Makefile (flex)   ->    src/matlabscanner.cpp


   Question: 
       a.) What does the "XXXscanner.l" and 
            what the "XXXcode.l" program
            module?

       b.) What does they need for a start version? 

       c.) 


2. Register the new parser to the right extension
     File:  src/doxygen.cpp     Line: 7765

    2.1. Doxygen::parserManager->registerParser(".adb",new AdaLanguageScanner);
    2.2. Doxygen::parserManager->registerParser(".ads",new AdaLanguageScanner);

    or with matlab:

    2.1. Doxygen::parserManager->registerParser("pro",new MatlabLanguageScanner);

 3. Write some test case of ada or Matlab code
     3.1. First test with only a main
     3.2. Second test with hello world
     3.3. etc.

So is this the right way to do this ?

Any comments requested!!


Thanks for listening
Enno


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
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.