From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27414 invoked by alias); 31 Mar 2004 08:02:48 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 27347 invoked from network); 31 Mar 2004 08:02:46 -0000 Received: from unknown (HELO nile.gnat.com) (205.232.38.5) by sources.redhat.com with SMTP; 31 Mar 2004 08:02:46 -0000 Received: from localhost (localhost [127.0.0.1]) by nile.gnat.com (Postfix) with ESMTP id 37CECF2D60; Wed, 31 Mar 2004 03:02:46 -0500 (EST) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 13851-01; Wed, 31 Mar 2004 03:02:45 -0500 (EST) Received: by nile.gnat.com (Postfix, from userid 1345) id C139FF2B8B; Wed, 31 Mar 2004 03:02:45 -0500 (EST) From: Paul Hilfinger To: drow@false.org Cc: gdb-patches@sources.redhat.com In-reply-to: <20040330142656.GA18340@nevyn.them.org> (message from Daniel Jacobowitz on Tue, 30 Mar 2004 09:26:57 -0500) Subject: Re: [RFA] Add language-dependent post-parser References: <20040330092413.2E716F281D@nile.gnat.com> <20040330142656.GA18340@nevyn.them.org> Message-Id: <20040331080245.C139FF2B8B@nile.gnat.com> Date: Wed, 31 Mar 2004 08:02:00 -0000 X-Virus-Scanned: by amavisd-new at nile.gnat.com X-SW-Source: 2004-03/txt/msg00753.txt.bz2 Daniel, > I don't see why you can't do it, for instance, here: > simple_exp : simple_exp '(' arglist ')' > { > write_exp_elt_opcode (OP_FUNCALL); > write_exp_elt_longcst ($3); > /* check arguments */ > write_exp_elt_opcode (OP_FUNCALL); > } > ; > You'd have to wiggle the expression machinery to give you back the > expression node for the function name, probably by making the > write_exp_* functions return a pointer. But that's less intrusive and > more efficient than adding a second pass. Yes, that's exactly how I'd LIKE to do it. And I would, but for one miserable little fact: the expression at this point is in POSTFIX form. So, for example, I can't use evaluate_type or the evaluate_exp member of exp_descriptor, both of which work on PREFIX form. Paul Hilfinger