预处理器指令管理工具 [英] Preprocessor Directives Management Tool

查看:79
本文介绍了预处理器指令管理工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部,


我正在寻找能够获取我的代码库的工具(这是一个充满预处理器指令的
)和吐出源代码是

" clean"任何预处理器指令基于我选择的选项

(可能通过某种用户输入屏幕)。


这样的工具是否存在?一个Visual Studio插件会更好。


FYI:我要求我的代码清除所有有条件编译的

代码。


谢谢,

Dan

解决方案

lagman写道:


全部,


我正在寻找能够获取我的代码库的工具(这是一个完整的b
预处理器指令)并吐出源代码

" clean"任何预处理器指令基于我选择的选项

(可能通过某种用户输入屏幕)。



大多数编译器都有选项输出预处理代码。 -E是

经常用于此。


-

Ian Collins


Ian Collins写道:


lagman写道:


>全部,

我正在寻找一种能够接受我的代码库(充满预处理器指令)并吐出源代码的工具,这些代码是干净的。任何预处理器指令基于我选择的选项
(可能通过某种用户输入屏幕)。



大多数编译器都有输出前的选项 - 处理代码。 -E是经常用于此的



...但这不是一个很好的工具,因为它将会b / b
扩展所有宏并替换#包含

包含来源的指令。


常见问题解答指向可能更好地解决

问题的一些工具。 (不能自己担保,但指针

可能值得一看。)


-
呃********* @ sun.com


< blockquote> Eric Sosman写道:


Ian Collins写道:


> lagman写道:


>>全部,

我正在寻找能够接受我的代码库的工具(
充满了预处理器指令)并吐出了干净的源代码。任何预处理程序指令基于我选择的选项
(可能通过某种用户输入屏幕)。


大多数编译器都有输出预处理代码的选项。 -E经常用于此。



......但这不是一个很好的工具,因为它将会b / b
扩展所有宏并替换#包含

包含来源的指令。



是不是#include一个预处理器指令?


OP要求提供一些可以吐出源代码的东西/ b $ b" clean"任何预处理程序指令''。


-

Ian Collins


All,

I''m looking for a tool that is able to take my code base (which is
full of preprocessor directives) and spit out source code that is
"clean" of any preprocessor directives based on the options I choose
(possibly via some kind of user input screen).

Does such a tool exist? A Visual Studio plugin would be even better.

FYI: I have requirements to rid my code of all conditionally compiled
code.

Thanks,
Dan

解决方案

lagman wrote:

All,

I''m looking for a tool that is able to take my code base (which is
full of preprocessor directives) and spit out source code that is
"clean" of any preprocessor directives based on the options I choose
(possibly via some kind of user input screen).

Most compilers have an options to output the pre-processes code. -E is
often used for this.

--
Ian Collins


Ian Collins wrote:

lagman wrote:

>All,

I''m looking for a tool that is able to take my code base (which is
full of preprocessor directives) and spit out source code that is
"clean" of any preprocessor directives based on the options I choose
(possibly via some kind of user input screen).

Most compilers have an options to output the pre-processes code. -E is
often used for this.

... but that''s not a good tool for the task, because it will
expand all the macros and replace #include directives with the
included source.

The FAQ has pointers to some tools that might address the
problem better. (Can''t vouch for them myself, but the pointers
are probably worth a look.)

--
Er*********@sun.com


Eric Sosman wrote:

Ian Collins wrote:

>lagman wrote:

>>All,

I''m looking for a tool that is able to take my code base (which is
full of preprocessor directives) and spit out source code that is
"clean" of any preprocessor directives based on the options I choose
(possibly via some kind of user input screen).

Most compilers have an options to output the pre-processes code. -E is
often used for this.


... but that''s not a good tool for the task, because it will
expand all the macros and replace #include directives with the
included source.

Isn''t #include a preprocessor directive?

The OP asked for something that would ''spit out source code that is
"clean" of any preprocessor directives''.

--
Ian Collins


这篇关于预处理器指令管理工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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