I am looking for languages / libraries which allows searching over AST for given language using selectors (ie. “/function(int, int)” to find all functions with given signature or “namespace(name=xxx)/method(name=yyy*)” to find all methods starting with yyy in given namespace).
I know there is always possibility to convert AST to XML and use XPath / XQuery, but i’am looking for something built in or easily integrable with a language.
This is practical :https://live.gnome.org/GObjectIntrospection/
as well as the gcc plugin dehydra : https://developer.mozilla.org/en-US/docs/Dehydra
LLVM has a bunch of projects : http://llvm.org/ProjectsWithLLVM/
This is theoretical: http://www.complang.org/colm/ but could be interesting.
See also this thread, on the topic of using the OWL/Semantic web for querying:
http://lists.w3.org/Archives/Public/semantic-web/2012Aug/0077.html