Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41633C433E0 for ; Fri, 5 Jun 2020 13:44:11 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 16DEE2070B for ; Fri, 5 Jun 2020 13:44:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LDFcko70" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16DEE2070B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EB58287610; Fri, 5 Jun 2020 13:44:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Gdw4yvhplPrw; Fri, 5 Jun 2020 13:44:10 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 903F486274; Fri, 5 Jun 2020 13:44:10 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8D58AC0888; Fri, 5 Jun 2020 13:44:10 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0F1B2C016E for ; Fri, 5 Jun 2020 13:44:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C88A3203AE for ; Fri, 5 Jun 2020 13:44:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iz71tRECM2RO for ; Fri, 5 Jun 2020 13:44:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by silver.osuosl.org (Postfix) with ESMTPS id 170B92038B for ; Fri, 5 Jun 2020 13:44:09 +0000 (UTC) Received: by mail-pj1-f66.google.com with SMTP id jz3so2609727pjb.0 for ; Fri, 05 Jun 2020 06:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hdwzt3tFXKWyJadRRPoBDmhsTEk2PAGDfRjvzOl8MPs=; b=LDFcko70pw8/n7/GUICQ8cEO8bGtODs3MymW1NmMFof3ALae60HxrqR4pFznTZ8XOR LJ9iawXn+bpnSqpv4lcgoJmEXrduRDrwm5xE2a+mwgshwoEC97nIuIaOZR1ytr/GdNvT dABd9pbFSsNXHEE6tbRylmalJQjRu4uOEdyJZo0zYdNwU4N1xzxpeNzpHIX+qkhGwyIR u3MA82ytEwHJccY3WUbhLsEtO2XiYsN9wHHoXvvfl8c9nTUKJaIqHHvMGBgqMP3tWVXe ixJki5rpFe93Zw03mrQzYi1GRNFA4V48zykB3wgXdCvbl2SX9ooH8D+3i/K9MzOv5Azc RBxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hdwzt3tFXKWyJadRRPoBDmhsTEk2PAGDfRjvzOl8MPs=; b=um8rRrXFt3dkaCKJWVVfyJPzAsyBYtNiGYNpYgRgQUsdsQub5ysktnpa9RWijm6K9L 2HTUoUrFcyO6X/o0UsFEyUyv/vX9VJnsih1JgFpXCDRvGMI7HccnoUc5YAnUtPJJovIH dhsqQBmzzTNahBa48jPCx5NwQBVXH52bXh703RVqSraRLNeNzLz+eeNrEnVVBwYvJCha F4Wxm7hJv7V9trMEeBciWbV5Pon3MOt0zoFbgJWz4ejwGAjpckGzudwvtRxyeYxsgllx 1eCnM5pqj3HTb6Xpxi5oNMr25pjG9Nb+M5vXPvy7KWb679rosXxhfUYWt+M9JY9EqGS4 ydjQ== X-Gm-Message-State: AOAM532/OrRCUQgs1+TnBQ/WkbZt8uvw2m1XVwW0zbMAbZhuGdGx98A9 nExL7gPdbcxrQ+elT2RvXVNFr6xIHPY= X-Google-Smtp-Source: ABdhPJzthzi5USsasNOBcEtOTn5iGPgWCSsrAKLGZUE8mnkT5SBcjxOgUHYe7jOF8Sm4SGwLQWJM8g== X-Received: by 2002:a17:902:9a02:: with SMTP id v2mr9718687plp.37.1591364648619; Fri, 05 Jun 2020 06:44:08 -0700 (PDT) Received: from localhost.localdomain ([1.38.221.125]) by smtp.gmail.com with ESMTPSA id w186sm7861353pff.83.2020.06.05.06.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 06:44:07 -0700 (PDT) From: Jaskaran Singh To: cocci@systeme.lip6.fr Date: Fri, 5 Jun 2020 19:13:10 +0530 Message-Id: <20200605134322.15307-3-jaskaransingh7654321@gmail.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200605134322.15307-1-jaskaransingh7654321@gmail.com> References: <20200605134322.15307-1-jaskaransingh7654321@gmail.com> MIME-Version: 1.0 Cc: julia.lawall@inria.fr, jaskaransingh7654321@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org Subject: [Linux-kernel-mentees] [PATCH v4 02/14] parsing_c: parsing_hacks: Label end attributes correctly X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" Due to certain conflicts in the grammar, a separate token (TMacroEndAttr) is required for attributes before a semicolon or an assignment operator. Prior to this, multiple end attributes were not labeled correctly, i.e., only the single attribute before the semicolon or assignment operator would be. Add a case to label multiple end attributes correctly. Signed-off-by: Jaskaran Singh --- parsing_c/parsing_hacks.ml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/parsing_c/parsing_hacks.ml b/parsing_c/parsing_hacks.ml index 0ee0c6c6..74c3ba60 100644 --- a/parsing_c/parsing_hacks.ml +++ b/parsing_c/parsing_hacks.ml @@ -2771,6 +2771,10 @@ let lookahead2 ~pass next before = msg_attribute s1; TMacroAttr (s1, i1) + | (TMacroAttr(s1,i1)::(TPtVirg(ii2)|TEq(ii2))::rest,_) + -> + TMacroEndAttr (s1, i1) + (* (* christia: here insert support for macros on top level *) | TIdent (s, ii) :: tl :: _, _ when can_be_on_top_level tl && LP.current_context () = InTopLevel -> -- 2.21.1 _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees