[Linux-kernel-mentees] [Cocci] [PATCH 1/2] parsing_c: Align C AST and Cocci AST for const pointer variants

Jaskaran Singh jaskaransingh7654321 at gmail.com
Sat Feb 8 12:41:17 UTC 2020


On Sat, 2020-02-08 at 09:30 +0100, Markus Elfring wrote:
> > For a pointer, the C parser constructed an AST dissimilar from that
> > of the Cocci AST. This caused failures in matching with certain
> > pointer types. For example, for the following case:
> > 
> > char *1 const *2 id;
> > 
> > The C AST constructed would be:
> > const Pointer1 -> Pointer2 -> char
> > 
> > The Cocci AST constructed would be:
> > Pointer2 -> const Pointer1 -> char
> 
> Which software development tools support to check such information?
> 

A little collection of scripts/tools I've written[1], and the
invaluable OCaml debugger :)

Cheers,
Jaskaran.

[1]http://github.com/jajajasalu2/cocci-type-test-suite

> Regards,
> Markus



More information about the Linux-kernel-mentees mailing list