Or instead of a python script you could write a tool that uses ASTMatchers to find the matchers in the header and the recently introduced documentation comment support to extract documentation :) http://llvm-reviews.chandlerc.com/D23