Doxygen过滤器格式? [英] Doxygen filter format?

查看:181
本文介绍了Doxygen过滤器格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

和我的团队一起创建我们需要记录的软件。我已经找到了doxygen这似乎是一个很好的方案来做到这一点。尽管我们的编程语言不受支持(RAPID)。

昨天我问了一个关于这个问题。艾伯特非常善于向正确的方向提供线索。过滤器应该是取代预处理器的正确方法。

但是我没有提供RAPID代码的语法:
http://futurecnc.code.arc.cmu.edu/wp/wp -content / uploads / 2011/12 / RAPID-Reference-Manual-Instructions.pdf

我找到了关于从doxygen网站创建过滤器的帮助指南。我还发现一个由伯特·乔丹为perl创建的示例过滤器:

https://www.stack.nl/~dimitri/doxygen/helpers.html



一些问题:


  1. 过滤器是正确的选择,还是需要预处理器?

  2. 过滤器正在做什么?

  3. Doxygen有一个词法扫描器,必须使用什么样的格式才能将快速代码转换为支持的语言?

我希望我现在给出一个明确的描述:)

编辑:我在寻找关于如何创建实际的过滤器。
有没有人知道这方面的一个好的来源?

解决方案

帮手部分下的doxygen网站上的语言。



我为我的一个项目使用了一个doxygen过滤器(这里没有列出)。过滤器非常简单,可能是一个很好的例子。此过滤器位于 Anvils github



<从本质上讲,它只是一个130行的sed脚本,将bash转换为doxygen可以解析的准C语言。您可以编写您自己的sed脚本RAPID。

您应该将它添加到您的Doxyfile:

<$ p $告诉doxygen处理sh扩展名为C文件的文件
EXTENSION_MAPPING = sh = C

#告诉doxygen通过下面的sed脚本运行sh文件
FILTER_PATTERNS = * .sh = MY_PATH / doxygen-bash.sed

还有一个python例如通过助手页面这里



要理解的主要部分是过滤器可以是任何你喜欢写的东西。 Python,sed,shell等。Doxygen只是调用你的过滤器,通过它运行代码,你的过滤器应该输出一个语言Doxygen可以解析。

With my team we create software we need to document. I have found doxygen which seems a nice program to do this. Although our programming language is not supported (RAPID).

Yesterday I have asked a question about this. Albert was kind enough to provide a clue in the right direction. A filter should be the right way to go in stead of an preprocessor.

But I did not provide the syntax of the RAPID code which can be found here : http://futurecnc.code.arc.cmu.edu/wp/wp-content/uploads/2011/12/RAPID-Reference-Manual-Instructions.pdf

I found the help guide about creating filters from the doxygen website. Also i have found an example filter created by Bert Jordan for perl :
https://www.stack.nl/~dimitri/doxygen/helpers.html

Some questions :

  1. Is a filter the right way to go, or is a preprocessor needed ?
  2. What is the filter exactly doing ?
  3. Doxygen has an lexical scanner, what kind of format must be used for the filter to convert the rapid code to a supported language?

I hope, I have given an clear discription now :)

edit : I'm searching for information about how to create the actual filter. Does anybody know a good source for this ?

解决方案

There are some examples on filters for other languages at the doxygen site under the helpers section.

I have used an doxygen filter (which is not listed there) for Bash for one of my projects. The filter is pretty simple and might be a good example. This filter is available at Anvils github.

In essence it is just a ~130 line sed script converting bash to quasi-C which doxygen can parse. You could write your own sed script for RAPID.

You should add it to your Doxyfile with:

# Tell doxygen to handle files with sh extension as C files
EXTENSION_MAPPING = sh=C

# Tell doxygen to run sh files through the below sed script
FILTER_PATTERNS        = *.sh=MY_PATH/doxygen-bash.sed

There is also a python example via the helpers page here.

The main part to understand is that the filter can be anything you like to write. Python, sed, shell, etc. Doxygen just calls your filter, runs the code through it and your filter should output a language Doxygen can parse.

这篇关于Doxygen过滤器格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆