Thread: [Doxygen-develop] Mixed language-project with c-comments and matlab-comments
Brought to you by:
dimitri
From: <Eck...@t-...> - 2013-05-06 17:47:53
|
Hello Everybody. For my nassi-shneiderman generator for doxygen (https://sourceforge.net/projects/moritz/) I'm working on an interface for the programming-language matlab.For a first demo-release I created some example-sources which I want to use together with my already existing c-based description of the general function of Moritz to create with doxygen a documentation. This means I have some txt-files with c-comment blocks (where I have defined *.txt as FILE_PATERNS). This c-comment-blocks contain doxygen group- and page-definitions which are traditionally used from me as description of the language independent parts of the documentation. In addition I have some files which contain comment-blocks in the programming-language for what I want to add examples. For python this works very good, since doxygen is already able to understand python-files as well as c-files. But since doxygen does not know matlab, I have to use a perl-filter for those files. The perl-filter itself works well as long as I only use my matlab-files. But I'm not able to configure doxygen to use this filter for matlab-files only and to use its own build-in c-parser for all other files. If I use INPUT_FILTER = "perl ./folder/subfolder/m2cpp.pl" all matlab-files will be parsed correctly but the files with the c-comments will be ignored. If I use FILTER_PATTERNS = "*.m=perl ./folder/subfolder/m2cpp.pl" doxygen tells me that the perl-script can not be opened. The c-comment files will be analysed but not the matlab-files. I had the idea to use INPUT_FILTER = "perl ./folder/subfolder/m2cpp.pl" together with FILTER_PATTERNS = "*.txt=????? to use the perl-fileter as default-filter and to deactivate it for the txt-files which contain the c-comment blocks. But I don't know what to use instead for the question-marks to ensure that no filter will be used but the doxygen-parser directly. Is someone able to help me? With many thanks, Eckard Klotz. |
From: <Eck...@t-...> - 2013-05-10 10:52:50
Attachments:
M2CPP.PL
|
Hello Developers. After some additional tests and referring the archive again I'm sure that the configuration of FILTER_PATTERNS is not working or its usage is not documented completely. Even if I use FILTER_PATTERNS = *.m=./folder/subfolder/m2cpp.pl the c-comment files will be analysed but not the matlab-files. Doxygen gives me the warning that the perl-script "./folder/subfolder/m2cpp.pl can not be opened. Note, the double-quote " is part of the doxygen warning message and there is no double-quote at the end of the message. Once a realized that, I tried to insert in the wizard-input as filter-pattern *.m=./folder/subfolder/m2cpp.pl" (note the double-quote at the end) This results in the DOXYFILE the line: FILTER_PATTERNS = "*.m=./folder/subfolder/m2cpp.pl\"" And last but not least it works now. Since I don't use the filter as INPUT_FILTER all c-like files will be analysed like expected, while all m-files will be preprocessed with the filter. Again an additional double-quote with backslash is needed at the end of the filter-definition: FILTER_PATTERNS = "pattern=filter\"" in the doxygen-wizard the input is : pattern=filter" Please decide if this is the wanted behaviour (then it may be useful to extend the documentation) or if this is a bug in the part to call the perl-script. If you think this is a problem of the used perl-script I have added, please help me with some information and I will discuss this in the associated forum of matlab. I use doxygen 1.8.3.1 on Windows XP SP3 Best regards, Eckard Klotz. > Hello Everybody. > > For my nassi-shneiderman generator for doxygen > (https://sourceforge.net/projects/moritz/) I'm working on an interface > for the programming-language matlab.For a first demo-release I created > some example-sources which I want to use together with my already > existing c-based description of the general function of Moritz to > create with doxygen a documentation. This means I have some txt-files > with c-comment blocks (where I have defined *.txt as FILE_PATERNS). > This c-comment-blocks contain doxygen group- and page-definitions > which are traditionally used from me as description of the language > independent parts of the documentation. In addition I have some files > which contain comment-blocks in the programming-language for what I > want to add examples. For python this works very good, since doxygen > is already able to understand python-files as well as c-files. But > since doxygen does not know matlab, I have to use a perl-filter for > those files. The perl-filter itself works well as long as I only use > my matlab-files. But I'm not able to configure doxygen to use this > filter for matlab-files only and to use its own build-in c-parser for > all other files. > > If I use > INPUT_FILTER = "perl ./folder/subfolder/m2cpp.pl" > all matlab-files will be parsed correctly but the files with the > c-comments will be ignored. > > If I use > FILTER_PATTERNS = "*.m=perl ./folder/subfolder/m2cpp.pl" > doxygen tells me that the perl-script can not be opened. The c-comment > files will be analysed but not the matlab-files. > > I had the idea to use > INPUT_FILTER = "perl ./folder/subfolder/m2cpp.pl" > together with > FILTER_PATTERNS = "*.txt=????? to use the perl-fileter as > default-filter and to deactivate it for the txt-files which contain > the c-comment blocks. But I don't know what to use instead for the > question-marks to ensure that no filter will be used but the > doxygen-parser directly. > > Is someone able to help me? > > With many thanks, > Eckard Klotz. > > |
From: Dimitri v. H. <do...@gm...> - 2013-05-10 11:24:27
|
Hi Eckard, On May 10, 2013, at 10:54 , Eck...@t-... (Eckard Klotz) wrote: > Hello Developers. > > After some additional tests and referring the archive again I'm sure that the configuration of FILTER_PATTERNS is not working or its usage is not documented completely. > > Even if I use > FILTER_PATTERNS = *.m=./folder/subfolder/m2cpp.pl > the c-comment files will be analysed but not the matlab-files. > > Doxygen gives me the warning that the perl-script "./folder/subfolder/m2cpp.pl can not be opened. > Note, the double-quote " is part of the doxygen warning message and there is no double-quote at the end of the message. > > Once a realized that, I tried to insert in the wizard-input as filter-pattern > *.m=./folder/subfolder/m2cpp.pl" (note the double-quote at the end) > This results in the DOXYFILE the line: > FILTER_PATTERNS = "*.m=./folder/subfolder/m2cpp.pl\"" > > > And last but not least it works now. Since I don't use the filter as INPUT_FILTER all c-like files will be analysed like expected, while all m-files will be preprocessed with the filter. > > Again an additional double-quote with backslash is needed at the end of the filter-definition: > FILTER_PATTERNS = "pattern=filter\"" > in the doxygen-wizard the input is : pattern=filter" > > Please decide if this is the wanted behaviour (then it may be useful to extend the documentation) or if this is a bug in the part to call the perl-script. > If you think this is a problem of the used perl-script I have added, please help me with some information and I will discuss this in the associated forum of matlab. A pair of quotes should only be needed in case the path contains spaces. You should not need to add a dummy " or \" in the configuration file. Can you file a bug report with a self-contained example that allows me to reproduce the problem? Regards, Dimitri |
From: <Eck...@t-...> - 2013-06-17 17:42:48
|
Hello Dimitri In the meanwhile I updated my doxygen-installation to 1.8.4 and tried out the behaviour of the configuration of the FILTER_PATTERNS. It is still the same like described in the bug-report [Bug 700148] FILTER_PATTERNS is working with additional " at the end. It doesn't matter if the filter is a script where I have to mention the script-interpretor also ( first example with a perl based filter for matlab) or if the filter is a independent exe-file only ( second example with an exe-fileter for pascal). You mention that the use of a batch-script is the solution. Is it possible for you to use both examples I added to my bug-report for creating examples how to use both filters with a windows bath-file? Will this batch-file also be usable for INPUT_FILTER? Best regards, Eckard Klotz. |
From: <Eck...@t-...> - 2013-07-03 16:30:08
|
Hello Dimitri. Thank you for your effort. I already posted a replay to your bug-comment at https://bugzilla.gnome.org/show_bug.cgi?id=700148 I hope that the attached zip-archive is helpful for you. In the meanwhile I have an additional lesson learned associated to perl-filter. In my company we tried to use the perl-version that comes along with matlab. But this was not working since the windows PATH variable contained not the perl-directory (due to the kind of matlab-installation). Thus we configured the PERL_PATH available on the external-tab of the doxywizard with its installation path, unfortunately with the same result. Yesterday I tried out in the doxywizard *.m=C:folder\subfolder\perl m2cpp.pl" where C:folder\subfolder\ stands for the installation folder of perl. This call of perl works. I assume that the configuration of PERL_PATH will be used only, if doxygen wants to use perl directly . If the user calls perl by using an other kind of configuration (in this situation as filter-interpretor) doxygen is not recognizing that perl should be called and tries just to start the defined command. Once you understand that, this behaviour is OK. But it may be a good idea to add some additional lines in the description of PERL_PATH to explain this to reduce the confusion of the user. I hope the fact that I stress this filter-things is not to much annoying for you. But I hope you remember that I'm the developer of a tool that is able to create nassi shneidermann diagrams and since some weeks uml activity diagrams to be used together with doxygen. Driven by my own needs I try to support not only C/Cpp and Python but Matlab and Pascal also. Thus for me it is very important how to use doxygen with this languages also. Best regards, Eckard. |