Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Paul Hilfinger <hilfingr@gnat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Add language-dependent post-parser
Date: Fri, 02 Apr 2004 16:33:00 -0000	[thread overview]
Message-ID: <20040402163309.GA12915@nevyn.them.org> (raw)
In-Reply-To: <20040304113345.5DADDF2EDC@nile.gnat.com>

On Thu, Mar 04, 2004 at 06:33:45AM -0500, Paul Hilfinger wrote:
> 
> For Ada, we found it convenient to do a name-resolution pass after parsing and
> before evaluation of expressions.  The most convenient form on which to
> perform this resolution is the prefix form (that way, we can use the usual 
> type-computing machinery already included in expression evaluation).  
> Unfortunately, prefixification occurs after and separate from parsing.  
> The obvious thing to do was to add a function to the language vector for
> post-parsing.  For most languages, it does nothing.  The patch below
> does most of the work in inserting this hook, including the introduction
> of a parse-in-type-context function that provides a type context for 
> the post-parser.  In its current form, this patch is a NOP that merely
> provides the hooks.

Well, I think the issue of the post-parser pass is settled.  Now to
look at the patch.

> +extern struct expression* parse_expression_in_context (char*, struct type*);

Formatting - spaces before the '*'.  This recurs throughout the patch.

> +    /* Post-parser processing on prefixified expression, in context 
> +     * expecting a particular type.  */
> +    void (*la_post_parser) (struct expression **, struct type *);
> +

This comment doesn't make much sense to me.

> +/* As for parse_exp_1, except give preference to CONTEXT_TYPE as the
> +   type of the result value, if CONTEXT_TYPE is non-null, in languages
> +   where context can determine resolution. */

Formatting (two spaces after period), but again I'm more concerned that
I don't understand what this comment is trying to say.  Also, it
incorrectly suggests that parse_exp_in_context cares about the context
type, which it doesn't - there's no way of knowing what the
la_post_parser pass will do with it.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  parent reply	other threads:[~2004-04-02 16:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-19  0:09 Paul Hilfinger
2004-03-04 11:33 ` Paul Hilfinger
2004-03-19  0:09 ` Daniel Jacobowitz
2004-03-04 22:29   ` Daniel Jacobowitz
2004-03-05  8:15   ` Paul Hilfinger
2004-03-19  0:09     ` Paul Hilfinger
2004-04-02 16:33 ` Daniel Jacobowitz [this message]
2004-04-03 12:05   ` Paul Hilfinger
2004-04-07  9:32   ` Paul Hilfinger
2004-04-09 22:40     ` Daniel Jacobowitz
2004-04-10 22:12       ` Paul Hilfinger
2004-03-30  9:24 Paul Hilfinger
2004-03-30 14:27 ` Daniel Jacobowitz
2004-03-31  8:02   ` Paul Hilfinger
2004-03-31 15:30     ` Daniel Jacobowitz
2004-03-31 15:36       ` Daniel Jacobowitz
2004-03-31 16:49         ` Andrew Cagney
2004-03-31 16:58           ` Daniel Jacobowitz
2004-04-01 10:43             ` Paul Hilfinger
2004-04-02 16:25               ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040402163309.GA12915@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=hilfingr@gnat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox