构建与a的解析器 [英] building a parser with clang

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

问题描述

我需要使用clang构建一个AST,我发现的唯一教程是模糊的,两年过时了。

I need to build an AST using clang and the only tutorials that I found are vague and two years out of date. Could anybody point me to an example?

推荐答案

有几个教程可以演示如何使用 Preprocessor 类以及如何构建AST:

There are several tutorial available that demonstrate the use of the Preprocessor class and how to build an AST:

  • A CLang tutorial (a bit outdated but with a lot of explanation)
  • A recent update of this tutorial along with code samples.

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

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