From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14835 invoked by alias); 16 Jan 2012 19:40:30 -0000 Received: (qmail 14826 invoked by uid 22791); 16 Jan 2012 19:40:28 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Jan 2012 19:40:16 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0GJeGb4021782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 16 Jan 2012 14:40:16 -0500 Received: from psique ([10.3.112.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q0GJe8tb024201; Mon, 16 Jan 2012 14:40:13 -0500 From: Sergio Durigan Junior To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFC 2/8] C language References: X-URL: http://www.redhat.com Date: Mon, 16 Jan 2012 19:55:00 -0000 In-Reply-To: (Tom Tromey's message of "Mon, 16 Jan 2012 11:03:14 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00574.txt.bz2 On Monday, January 16 2012, Tom Tromey wrote: >>>>>> "Sergio" == Sergio Durigan Junior writes: > > Sergio> Here and in all the .y files, I had to add an argument to the parser and > Sergio> the lexer functions, which is a `struct parser_state *ps'. > > I think 'ps' is too short a name for something used all over the file. Right. I was thinking about `pstate' then. I had an initial version of the patch with this name, but I decided to shorten it because of reformatting burden. > Sergio> +%parse-param {struct parser_state *ps} > Sergio> +%lex-param {struct parser_state *ps} > > This means we would require bison. > > I don't really mind us requiring bison, but I think it is a bigger issue > and would need a separate patch - and at least configury changes. > > Another approach would be to temporarily make a "local global" in the .y > file, then set this local global in the entry point to the parser. > > This does not solve the whole problem, but it does make things somewhat > more modular, as a first step. Ok, thanks for pointing that out. I will make the requested changes then.