[cfe-dev] What is a "predicate" in the AST matcher?
Yafei Liu via cfe-dev
cfe-dev at lists.llvm.org
Thu Jul 2 23:50:01 PDT 2020
Thanks Artem!
On Fri, Jul 3, 2020 at 2:22 PM Artem Dergachev <noqnoqneo at gmail.com> wrote:
> The word "predicate" here is used in its mathematical sense:
> https://en.wikipedia.org/wiki/Predicate_(mathematical_logic)
>
> All this really means is that each individual matcher is a function that
> accept an AST node and return either true ("matches") or false ("doesn't
> match").
>
> On 7/2/20 11:03 PM, Yafei Liu via cfe-dev wrote:
>
> For example in this sentence:
> AST matchers are predicates on nodes in the AST.
> Or this:
> LibASTMatchers provides a domain specific language to create predicates on
> Clang’s AST.
>
> Can someone help to explain what predicates are?
>
> _______________________________________________
> cfe-dev mailing listcfe-dev at lists.llvm.orghttps://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200703/5ca662b2/attachment.html>
More information about the cfe-dev
mailing list