From c9f00995484a7a58a4463442584268a8e295b4f4 Mon Sep 17 00:00:00 2001 From: Stephen Kennedy Date: Thu, 24 Oct 2013 12:05:25 +0100 Subject: [PATCH] Add update notice & markdown --- README.txt | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/README.txt b/README.txt index 551874d..34eda5d 100644 --- a/README.txt +++ b/README.txt @@ -1,16 +1,35 @@ +UPDATE Oct-2013: +============= + +Originally we had chose python as the main language for this project because it was a natural fit +for text processing. However, we eventually reached a point where the simplified output wasn't +powerful enough to handle all the nuances of templates and specialization. Since then, we have +ported our scripts to C++ so that they can access the Clang AST directly. + +The C++ version is noticably faster and allows full clang AST access. This python version allows +rapid iteration and is more suitable for experimentation. + + + +Clang-extract +============= + + Clang-extract uses clang to parse your header files and then prints out a description of what it parsed. This project was described in a talk a GDC 2012 http://www.gdcvault.com/play/1015586/ (subscription required) It was funded by Havok and is used as the basis of its reflection system. -Building: +Building +-------- * Either in your environment or in the Makefile, set LLVM_DIR to the folder containing a prebuilt LLVM and Clang. * make -Test: +Test +-------- To run clang-extract on a small test: * make test @@ -24,11 +43,13 @@ def parse(text): return output -Invoking: +Invoking +-------- Run clang-extract --help to see command line options. -Notes: +Notes +-------- clang-extract internally creates a file which includes all the input files specified on the command line. You may need to add "-I ." to find the input files. The -A option is useful to pass through annotations which are stored in the output file.