[英]Need inputs for making a tool to insert preformatted comments in C/C++ source/header file
I am trying to develop a tool that inserts comments in C/C++ source files in pre-defined formats.我正在尝试开发一种工具,以预定义格式在 C/C++ 源文件中插入注释。
The comments could be:评论可能是:
Following points are required to be taken mind:需要注意以下几点:
Some desirable but non important features:一些可取但不重要的特性:
Please suggest open-source / free libraries / logic to aid in this.请建议开源/免费库/逻辑来帮助解决这个问题。
I guess you 've got two choices:我猜你有两个选择:
Generate the whole c/c++ code and headers from a template or scripting language and use this one to insert the preformated comments.从模板或脚本语言生成整个 c/c++ 代码和标头,并使用它来插入预先格式化的注释。 This is of course not an option if you still got a lot of code.如果您仍然有很多代码,这当然不是一个选择。
Or you need a tool to parse the code into sth.或者你需要一个工具来将代码解析成某事。 you can further use.你可以进一步使用。 You could try doxygen to generate html, xml or some other format.您可以尝试使用 doxygen 生成 html、xml 或其他格式。 Problem would still be, how to get the generated documentation back into your sources...问题仍然是,如何将生成的文档返回到您的源中......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.