C解析器的源代码 [英] source code for C parser

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

问题描述

我想开发一个c程序解析器.在哪里可以找到信息及其源代码?代码必须为lex或c或c ++ ...

I want to develop a c program parser. Where I can find information and the source code for it? The code must be in lex or c or c++...

推荐答案


您可以在 ^ ]下载 Boost库 [
Hi,
You will find a C++ written mini-c C parser sample at <Boost>\boost_1_45_0\libs\spirit\example\qi\mini_c in Boost Spirit[^] after downloading the Boost Library[^].
cheers,
AR


Google.

您的主题作为搜索词 进行的快速搜索给出了很多示例.好的,您将必须决定要执行的操作到底是什么,但这就是研究的本质.请注意术语:re 搜索 .含义是您尝试自己进行一些 搜索 ...
Google.

A quick search with your subject as the search term gave loads of examples. Ok, you will have to decide which does exactly what you want, but that is the nature of research. Note the term: research. The implication is that you try to do some of the research yourself...


govindray写道:
govindray wrote:

我想开发一个ac程序解析器.

I want to develop a c program parser.


意图不错,但要注意:任务并不简单.


Nice intention, but be aware: the task is not simple.

govindray写道:
govindray wrote:

在哪里可以找到信息及其源代码?

Where I can find information and the source code for it?


这与前一个高尚的句子形成鲜明对比.您是开发人员,对不对?因此,研究(几乎每本语法分析教科书都显示了如何进行C语言语法子集的(至少是最少的)语法分析),然后尝试开发自己的语法分析器.
:)


This is in sharp contrast with the former, noble sentence. You''re a developer, right? Hence study (almost every parsing textbook, shows how to do some - at least minimal - parsing of a C language grammar subset) and then try to develop your own parser.
:)


这篇关于C解析器的源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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