From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id T6msIHyZm2od4SsAWB0awg (envelope-from ) for ; Sat, 05 Sep 2026 00:24:28 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=fqb6Rw2W; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 48C9F1E09E; Sat, 05 Sep 2026 00:24:28 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D6F701E091 for ; Sat, 05 Sep 2026 00:24:26 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 52F9C4BB58FC for ; Sat, 5 Sep 2026 04:24:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 52F9C4BB58FC Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=fqb6Rw2W Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 326A74BB58DE for ; Sat, 5 Sep 2026 04:24:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 326A74BB58DE Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 326A74BB58DE Authentication-Results: sourceware.org; arc=none smtp.remote-ip=132.207.4.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788582243; cv=none; b=FGj6sditQUTraOm0a7ekIYh4q9cHnJEd/EjIafSdF3E2jGj9/LZ15nms1K86K1LI3WFzJl08nKJ2z7wu89Y5Az/MPUY1F0GxMdeOGKHQkJnFnNYpPBizMfRSK16aS5rHiSiBz6mwwK76innimiM9VQaLvOrPLGWaS65xu7fO91k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788582243; c=relaxed/simple; bh=arZl7cMwwNpnP2pdmCbMftTAdOgs9s+plmnmdKfkbBQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=xj05zpeuFC5us3VoexNJIO7qSPYZRZWxeiOh0VEwln8OUAC2Bk3lc1gWmrQGzFoEZrOJB+Tc8woor0p6aQc80e3vQ92wRUImc1SXjbKFmgLYOfuh0kxhdREqxEdV3aEpivnObFRWVDz0Fvjo8gGynlzKtKeV5trusAtnCP411HM= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=fqb6Rw2W DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 326A74BB58DE Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 6854NuQB081206 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 5 Sep 2026 00:24:01 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 6854NuQB081206 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=oct2025; t=1788582241; bh=85ereC5lnUnXs7s74Z91f4bBdCt7+GtENrEQT+xsGNU=; h=From:To:Cc:Subject:Date:From; b=fqb6Rw2Wkfs8oSZBEHgEEvBjxH+/8k+wwb3q14B/ZNy6gsQhQMzx8JmLva7NyPR8O ql34N5+FdFXO/squPs6I/mqNOaZ7C/OR1CAJZghBGdbjXtanWLzbat8Cao/sVfxR2Q ksnbwRodigfTlW6Bf2DcqrqsHqa5I6n5BjNXlc6N0QcNmnZyqbiAoVahF1MoFanKE9 FU9zgSdhctHd02k/q8sjjQiZrrUAGjbx5I6blB1IIbY/xD1kib5iM/WF9FJpIu+fAq oVERwDRvZuk0CEyBz9SjTOfRzXxPDCgDhamrsbltoOAnWk+yVqW2VEQaLoNpZCsg+q gpfNms0oIlhPg== Received: by simark.ca (Postfix) id 244871E091; Sat, 05 Sep 2026 00:23:54 -0400 (EDT) From: simon.marchi@polymtl.ca To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH v2 00/19] Move C++ support code out of .y files Date: Sat, 5 Sep 2026 00:23:03 -0400 Message-ID: <20260905042353.1702204-1-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Sat, 5 Sep 2026 04:23:56 +0000 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org From: Simon Marchi Hi, This is v2 of this series: https://inbox.sourceware.org/gdb-patches/20260904170338.1643894-1-simon.marchi@polymtl.ca The new version addresses the comments from Kevin. - Patch 3 is new, to remove the YY_NULL to YY_NULLPTR substitution. - Patch 13, previously 12, update comment to refer to ada-exp-parser.c instead of ada-exp-parser.y. - Patch 19 is new, to wire up "set debug parser" with the Modula-2 and Pascal parsers, so that m2_yydebug and pascal_yydebug are used. Simon Marchi (19): gdb/ada-exp-parser: remove name_info struct gdb: replace parse_type macros with functions gdb: suffix flex/bison output files with -gen.c gdb: remove YY_NULL to YY_NULLPTR substitution gdb: move parser output post-processing to a script gdb: let the parser and lexer generators prefix their symbols gdb: separate cp-name-parser's symbol prefix with an underscore gdb: make $(YACC) and $(FLEX) generate headers gdb: add check for stale build generated files gdb: move cp-name-parser.y's support code to cp-name-parser.c gdb: rename LANG-exp.y to LANG-exp-parser.y gdb: move c-exp-parser.y's support code to c-exp-parser.c gdb: move ada-exp-parser.y's support code to ada-exp-parser.c gdb: move d-exp-parser.y's support code to d-exp-parser.c gdb: move f-exp-parser.y's support code to f-exp-parser.c gdb: move go-exp-parser.y's support code to go-exp-parser.c gdb: move m2-exp-parser.y's support code to m2-exp-parser.c gdb: move p-exp-parser.y's support code to p-exp-parser.c gdb: honor "set debug parser" in the Modula-2 and Pascal parsers gdb/.gitignore | 27 +- gdb/Makefile.in | 194 +- gdb/ada-exp-parser.c | 1351 +++++++++++ gdb/ada-exp-parser.h | 427 ++++ gdb/ada-exp-parser.y | 845 +++++++ gdb/ada-exp.h | 2 +- gdb/ada-exp.y | 2019 ---------------- gdb/ada-lang.c | 1 + gdb/ada-lang.h | 2 - gdb/ada-lex.l | 431 +--- gdb/c-exp-parser.c | 1696 ++++++++++++++ gdb/c-exp-parser.h | 182 ++ gdb/c-exp-parser.y | 1858 +++++++++++++++ gdb/c-exp.y | 3626 ----------------------------- gdb/c-lang.h | 6 - gdb/cp-name-parser.c | 1050 +++++++++ gdb/cp-name-parser.h | 130 ++ gdb/cp-name-parser.y | 1120 +-------- gdb/cp-support.c | 4 +- gdb/{d-exp.y => d-exp-parser.c} | 738 +----- gdb/d-exp-parser.h | 83 + gdb/d-exp-parser.y | 600 +++++ gdb/d-lang.c | 1 + gdb/d-lang.h | 4 - gdb/{f-exp.y => f-exp-parser.c} | 982 +------- gdb/f-exp-parser.h | 102 + gdb/f-exp-parser.y | 766 ++++++ gdb/f-lang.c | 9 + gdb/{go-exp.y => go-exp-parser.c} | 736 +----- gdb/go-exp-parser.h | 59 + gdb/go-exp-parser.y | 603 +++++ gdb/go-lang.c | 9 + gdb/language.c | 1 + gdb/m2-exp-parser.c | 491 ++++ gdb/m2-exp-parser.h | 67 + gdb/{m2-exp.y => m2-exp-parser.y} | 467 +--- gdb/m2-lang.c | 9 + gdb/macroexp.c | 6 +- gdb/{p-exp.y => p-exp-parser.c} | 930 +------- gdb/p-exp-parser.h | 84 + gdb/p-exp-parser.y | 752 ++++++ gdb/p-lang.c | 9 + gdb/parser-defs.h | 8 + gdb/post-process-parser-output.sh | 66 + gdb/yy-remap.h | 96 - 45 files changed, 11794 insertions(+), 10855 deletions(-) create mode 100644 gdb/ada-exp-parser.c create mode 100644 gdb/ada-exp-parser.h create mode 100644 gdb/ada-exp-parser.y delete mode 100644 gdb/ada-exp.y create mode 100644 gdb/c-exp-parser.c create mode 100644 gdb/c-exp-parser.h create mode 100644 gdb/c-exp-parser.y delete mode 100644 gdb/c-exp.y create mode 100644 gdb/cp-name-parser.c create mode 100644 gdb/cp-name-parser.h rename gdb/{d-exp.y => d-exp-parser.c} (58%) create mode 100644 gdb/d-exp-parser.h create mode 100644 gdb/d-exp-parser.y rename gdb/{f-exp.y => f-exp-parser.c} (53%) create mode 100644 gdb/f-exp-parser.h create mode 100644 gdb/f-exp-parser.y rename gdb/{go-exp.y => go-exp-parser.c} (59%) create mode 100644 gdb/go-exp-parser.h create mode 100644 gdb/go-exp-parser.y create mode 100644 gdb/m2-exp-parser.c create mode 100644 gdb/m2-exp-parser.h rename gdb/{m2-exp.y => m2-exp-parser.y} (53%) rename gdb/{p-exp.y => p-exp-parser.c} (50%) create mode 100644 gdb/p-exp-parser.h create mode 100644 gdb/p-exp-parser.y create mode 100755 gdb/post-process-parser-output.sh delete mode 100644 gdb/yy-remap.h base-commit: 002e6fb956c0be93efc91a8c16077eb3d4259dfc -- 2.55.0