linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Jaskaran Singh <jaskaransingh7654321@gmail.com>
Cc: linux-kernel-mentees@lists.linuxfoundation.org, cocci@systeme.lip6.fr
Subject: Re: [Linux-kernel-mentees] [PATCH 03/32] parsing_cocci: parser: Parse cast attributes
Date: Sun, 3 May 2020 21:26:07 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.2005032125380.2533@hadrien> (raw)
In-Reply-To: <20200428170228.7002-4-jaskaransingh7654321@gmail.com>



On Tue, 28 Apr 2020, Jaskaran Singh wrote:

> Cast attributes are added to the SmPL ASTs. Parse these attributes in
> the SmPL parser and place them in the SmPL AST. The added production
> only supports attributes after the type and before the expression.

It would be good to say that on matching the attributes will be searched
for anywhere, if that is the case.

julia

>
> Signed-off-by: Jaskaran Singh <jaskaransingh7654321@gmail.com>
> ---
>  parsing_cocci/parser_cocci_menhir.mly | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/parsing_cocci/parser_cocci_menhir.mly b/parsing_cocci/parser_cocci_menhir.mly
> index db5661bd..38b0e039 100644
> --- a/parsing_cocci/parser_cocci_menhir.mly
> +++ b/parsing_cocci/parser_cocci_menhir.mly
> @@ -2176,11 +2176,12 @@ arith_expr_bis:
>
>  cast_expr(r,pe):
>      unary_expr(r,pe)                      { $1 }
> -  | lp=TOPar t=ctype rp=TCPar e=cast_expr(r,pe)
> -      { Ast0.wrap(Ast0.Cast (P.clt2mcode "(" lp, t,
> +  | lp=TOPar t=ctype ar=attr_list rp=TCPar e=cast_expr(r,pe)
> +      { Ast0.wrap(Ast0.Cast (P.clt2mcode "(" lp, t, ar,
>                               P.clt2mcode ")" rp, e)) }
> -  | lp=TOPar t=ctype d=direct_abstract_d rp=TCPar e=cast_expr(r,pe)
> -      { Ast0.wrap(Ast0.Cast (P.clt2mcode "(" lp, d t,
> +  | lp=TOPar t=ctype d=direct_abstract_d ar=attr_list rp=TCPar
> +    e=cast_expr(r,pe)
> +      { Ast0.wrap(Ast0.Cast (P.clt2mcode "(" lp, d t, ar,
>  			     P.clt2mcode ")" rp, e)) }
>
>  unary_expr(r,pe):
> --
> 2.21.1
>
>
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

  reply	other threads:[~2020-05-03 19:26 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 17:01 [Linux-kernel-mentees] [PATCH 00/32] cocci: Add cast attributes to C and SmPL ASTs Jaskaran Singh
2020-04-28 17:01 ` [Linux-kernel-mentees] [PATCH 01/32] parsing_c: parser: Pass attribute list from type_name Jaskaran Singh
2020-05-03 19:23   ` Julia Lawall
2020-05-04  9:06     ` Jaskaran Singh
2020-05-04  9:17       ` Julia Lawall
2020-05-04  9:20         ` Jaskaran Singh
2020-05-04 13:18           ` Julia Lawall
2020-04-28 17:01 ` [Linux-kernel-mentees] [PATCH 02/32] parsing_cocci: ast0_cocci: Add cast attributes Jaskaran Singh
2020-04-28 17:01 ` [Linux-kernel-mentees] [PATCH 03/32] parsing_cocci: parser: Parse " Jaskaran Singh
2020-05-03 19:26   ` Julia Lawall [this message]
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 04/32] parsing_cocci: visitor_ast0: Visit " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 05/32] parsing_cocci: unparse_ast0: Reflect " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 06/32] parsing_cocci: index: Reflect Cast attributes Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 07/32] parsing_cocci: iso_pattern: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 08/32] parsing_cocci: type_infer: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 09/32] parsing_cocci: arity: " Jaskaran Singh
2020-05-03 19:28   ` Julia Lawall
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 10/32] parsing_cocci: check_meta: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 11/32] parsing_cocci: compute_lines: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 12/32] parsing_cocci: context_neg: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 13/32] parsing_cocci: single_statement: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 14/32] parsing_cocci: ast_cocci: Add cast attributes Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 15/32] parsing_cocci: visitor_ast: Visit " Jaskaran Singh
2020-05-03 19:29   ` Julia Lawall
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 16/32] parsing_cocci: pretty_print_cocci: Print " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 17/32] parsing_cocci: ast0toast: Reflect Cast attributes Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 18/32] parsing_cocci: disjdistr: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 19/32] parsing_cocci: unify_ast: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 20/32] parsing_c: ast_c: Add " Jaskaran Singh
2020-05-03 19:31   ` Julia Lawall
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 21/32] parsing_c: parser: Parse " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 22/32] parsing_c: pretty_print_c: Reflect " Jaskaran Singh
2020-05-03 19:32   ` Julia Lawall
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 23/32] parsing_c: type_annoter_c: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 24/32] parsing_c: unparse_cocci: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 25/32] parsing_c: visitor_c: Visit " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 26/32] engine: check_exhaustive_pattern: Reflect " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 27/32] engine: cocci_vs_c: Match " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 28/32] ocaml: coccilib: Reflect " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 29/32] tools: spgen: Reflect Cast attrs Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 30/32] tests: Add test case to check cast attribute allminus Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 31/32] tests: Add test case to remove cast attributes Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] [PATCH 32/32] tests: Add test case to detect " Jaskaran Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.2005032125380.2533@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=cocci@systeme.lip6.fr \
    --cc=jaskaransingh7654321@gmail.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).