From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from vm593.rz.uni-osnabrueck.de (vm593.rz.uni-osnabrueck.de [131.173.17.199]) by sourceware.org (Postfix) with ESMTPS id ABE6C382FE5C for ; Thu, 9 Jun 2022 18:23:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ABE6C382FE5C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=uni-osnabrueck.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=uni-osnabrueck.de Received: from vm278.rz.uni-osnabrueck.de (vm278.rz.uni-osnabrueck.de [IPv6:2001:638:508:100::83ad:112b]) by vm593.rz.uni-osnabrueck.de (Postfix) with ESMTP id 28BBD202AC4; Thu, 9 Jun 2022 20:23:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by vm278.rz.uni-osnabrueck.de (Postfix) with ESMTP id D5E66211806; Thu, 9 Jun 2022 20:23:42 +0200 (CEST) From: "Julian Lohuis" In-Reply-To: <46d3-62a23500-6a7-643fe980@26385808> Content-Type: text/plain; charset="utf-8" X-Forward: 94.31.82.188 Date: Thu, 09 Jun 2022 20:23:42 +0200 To: gcc-help@gcc.gnu.org, "Julian Lohuis (Julian Lohuis)" MIME-Version: 1.0 Message-ID: Subject: dynamically parse c++-code-snippets from a plugin and skipping included files User-Agent: SOGoMail 5.5.1 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2022 18:23:46 -0000 Hello, I am writing a plugin for the latest gcc (12.1). The plugin needs to dynamically parse c++-code-snippets to tree objects= so they can be inserted at a later stage during compilation. Is there a way to call into the existing parser to generate a tree from= a const char*, source=5Frange or anything similar? Secondly can I make gcc ignore a file after the PLUGIN=5FINCLUDE=5FFILE= -event of that file is called? Thanks, Julian Lohuis On Thursday, June 09, 2022 19:58 CEST, "Julian Lohuis" wrote: >