[PATCH] First revision of the dynamic ASTMatcher library
Samuel Benzaquen
sbenza at google.com
Tue Apr 23 12:33:18 PDT 2013
Hi klimek,
First revision of the dynamic ASTMatcher library.
This library supports all the features of the compile-time based ASTMatcher library, but allows the user to specify and construct the matchers at runtime.
It contains the following modules:
- A variant type, to be used by the matcher factory.
- A registry, where the matchers are indexed by name and have a factory method with a generic signature.
- A simple matcher expression parser, that can be used to convert a matcher expression string into actual matchers that can be used with the AST at runtime.
Many features where omitted from this first revision to simplify this code review. The main ideas are still represented in this change and it already has support working use cases.
Things that are missing:
- Support for polymorphic matchers. These requires supporting code in the registry, the marshallers and the variant type.
- Support for numbers, char and bool arguments to the matchers. This requires supporting code in the parser and the variant type.
- A command line program putting everything together and providing an already functional tool.
http://llvm-reviews.chandlerc.com/D714
Files:
include/clang/ASTMatchers/ASTMatchersInternal.h
include/clang/ASTMatchers/Dynamic/VariantValue.h
include/clang/ASTMatchers/Dynamic/Registry.h
include/clang/ASTMatchers/Dynamic/Parser.h
unittests/ASTMatchers/CMakeLists.txt
unittests/ASTMatchers/Makefile
unittests/ASTMatchers/Dynamic/RegistryTest.cpp
unittests/ASTMatchers/Dynamic/Makefile
unittests/ASTMatchers/Dynamic/CMakeLists.txt
unittests/ASTMatchers/Dynamic/ParserTest.cpp
unittests/ASTMatchers/Dynamic/VariantValueTest.cpp
lib/ASTMatchers/CMakeLists.txt
lib/ASTMatchers/Makefile
lib/ASTMatchers/Dynamic/Makefile
lib/ASTMatchers/Dynamic/Parser.cpp
lib/ASTMatchers/Dynamic/CMakeLists.txt
lib/ASTMatchers/Dynamic/VariantValue.cpp
lib/ASTMatchers/Dynamic/Marshallers.h
lib/ASTMatchers/Dynamic/Registry.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D714.1.patch
Type: text/x-patch
Size: 49235 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130423/15331237/attachment.bin>
More information about the cfe-commits
mailing list