C预处理程序库 [英] C preprocessor library

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

问题描述

我的任务是为 C 程序开发源代码分析工具,并且需要在分析之前对代码进行预处理。我想知道什么是最好的库。我需要轻巧,轻便的东西。

I have a task of developing source analysis tool for C programs, and I need to pre-process code before the analysis itself. I was wondering what is the best library for this. I need something light-weight and portable.

推荐答案

与其发布自己的产品,不如使用 cpp gcc 套件的一部分: http://gcc.gnu.org/onlinedocs/gcc-4.6.1/cpp/

Instead of rolling out your own, why not use cpp that's part of the gcc suite: http://gcc.gnu.org/onlinedocs/gcc-4.6.1/cpp/

CPP(1)                                GNU                               CPP(1)

NAME
       cpp - The C Preprocessor

SYNOPSIS
       cpp [-Dmacro[=defn]...] [-Umacro]
           [-Idir...] [-iquotedir...]
           [-Wwarn...]
           [-M|-MM] [-MG] [-MF filename]
           [-MP] [-MQ target...]
           [-MT target...]
           [-P] [-fno-working-directory]
           [-x language] [-std=standard]
           infile outfile

       Only the most useful options are listed here; see below for the
       remainder.

DESCRIPTION
       The C preprocessor, often known as cpp, is a macro processor that is
       used automatically by the C compiler to transform your program before
       compilation.  It is called a macro processor because it allows you to
       define macros, which are brief abbreviations for longer constructs.

这篇关于C预处理程序库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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