From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Received: (qmail 19411 invoked from network); 9 Apr 2004 22:40:23 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 9 Apr 2004 22:40:23 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1BC3lW-0000Ec-2t; Fri, 09 Apr 2004 17:42:22 -0400 Date: Fri, 09 Apr 2004 22:40:00 -0000 From: Daniel Jacobowitz To: Paul Hilfinger Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Add language-dependent post-parser Message-ID: <20040409214221.GA851@nevyn.them.org> Mail-Followup-To: Paul Hilfinger , gdb-patches@sources.redhat.com References: <20040304113345.5DADDF2EDC@nile.gnat.com> <20040402163309.GA12915@nevyn.them.org> <20040407093235.B3165F2D8C@nile.gnat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040407093235.B3165F2D8C@nile.gnat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-04/txt/msg00224.txt.bz2 On Wed, Apr 07, 2004 at 05:32:35AM -0400, Paul Hilfinger wrote: > > Here is a second version of the post-parser patch I submitted before. > The Ada module will use the post-parser to do static overloaded name > resolution at translation time. The patch gives the current languages > a default nop post-parser. > > I think I have addresses Daniel's comments. In this revision, I have > simplified the interface to the post-parser and to > parse_expression_in_context so that instead of an expected type, they > just take a flag indicating whether the client expects a value (as > opposed to simply evaluating for side effects). > > At the moment, nothing uses this flag in the public sources. In ACT's > code (in a change I will propose later), we have modified the 'call' > command to use this flag, and our post-parser uses the void/non-void > context distinction to disambiguate between overloaded procedures > (void-returning functions) and value-returning functions. This sort > of limited, context-dependent disambiguation is not useful in C or > C++, but is useful in Ada. We do not implement Ada's full > context-dependent type resolution; for the debugger, that simply turns > out to be overkill. > > This better? Thanks; this is OK. > 2004-03-04 Paul N. Hilfinger > > * language.h (language_defn): Add new la_post_parser field. > * parser-defs.h (null_post_parser): New declaration (default for > la_post_parser). > > * parse.c (parse_exp_1): Move code to parse_exp_in_context and > insert call to that function. > (parse_exp_in_context): New function, including code formerly in > parse_exp_1. Calls language-dependent post-parser after > prefixification. > (parse_expression_in_context): New exported function. > (null_post_parser): New definition. > * expression.h (parse_expression_in_context): Add declaration. > > * p-lang.c (pascal_language_defn): Add trivial post-parser. > * c-lang.c (c_language_defn): Ditto. > (cplus_language_defn): Ditto. > (asm_language_defn): Ditto. > (minimal_language_defn): Ditto. > * f-lang.c (f_language_defn): Ditto. > * jv-lang.c (java_language_defn): Ditto. > * language.c (unknown_language_defn): Ditto. > (auto_language_defn): Ditto. > (local_language_defn): Ditto. > * m2-lang.c (m2_language_defn): Ditto. > * scm-lang.c (scm_language_defn): Ditto. > * obj-lang.c (objc_language_defn): Ditto. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer