【发布时间】:2018-03-22 02:59:06
【问题描述】:
我在Perl 中处理C 代码解析器。
目前我需要对代码进行预处理。 预处理的实现似乎需要做很多工作,所以我正在寻找一个可以对文件进行预处理的脚本或库。
我发现了以下可能性:
这两个都需要cpp,我的 Windows 机器上没有。还有其他选择吗?
【问题讨论】:
-
search.cpan.org/perldoc?Filter%3A%3Acpp 说
This source filter pipes the current source file through the C pre-processor (cpp) if it is available. -
Text::CPP说它需要A working C compiler。 -
@devnull 这是个问题...
-
为什么会有问题?如果不是编译器,谁会进行预处理?
-
@Alex - 预处理通常是通用的,因此您可以为此插入 gcc 而不是您的专有编译器。
标签: c perl preprocessor