Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Sergio Durigan Junior <sergiodj@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC 2/8] C language
Date: Mon, 16 Jan 2012 19:29:00 -0000	[thread overview]
Message-ID: <m3k44rplst.fsf@fleche.redhat.com> (raw)
In-Reply-To: <m362gc7pxq.fsf@gmail.com> (Sergio Durigan Junior's message of	"Sun, 15 Jan 2012 16:58:57 -0200")

>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> 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.

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.

Sergio> -			{ write_exp_elt_opcode (BINOP_COMMA); }
Sergio> +			{ write_exp_elt_opcode (ps, BINOP_COMMA); }

All the mechanical changes are ok.  Thanks for taking this on.

Tom


  reply	other threads:[~2012-01-16 19:29 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-15 18:51 [RFC 0/8] Beginning to remove globals from parser-defs.h Sergio Durigan Junior
2012-01-15 18:56 ` [RFC 1/8] Language independent bits Sergio Durigan Junior
2012-01-15 21:08   ` Jan Kratochvil
2012-01-15 21:17     ` Sergio Durigan Junior
2012-01-15 22:03       ` Jan Kratochvil
2012-01-16 12:32         ` Sergio Durigan Junior
2012-01-16 20:40     ` Tom Tromey
2012-01-16 19:39       ` Sergio Durigan Junior
2012-01-16 19:40         ` Jan Kratochvil
2012-01-16 20:27         ` Tom Tromey
2012-01-17 16:44     ` Doug Evans
2012-01-17 16:54       ` Jan Kratochvil
2012-01-15 19:01 ` [RFC 2/8] C language Sergio Durigan Junior
2012-01-16 19:29   ` Tom Tromey [this message]
2012-01-16 19:55     ` Sergio Durigan Junior
2012-01-18 11:38     ` Sergio Durigan Junior
2012-01-18 16:50       ` Tom Tromey
2012-01-15 19:04 ` [RFC 3/8] Ada language Sergio Durigan Junior
2012-01-15 19:05 ` [RFC 4/8] Fortran language Sergio Durigan Junior
2012-01-15 19:06 ` [RFC 5/8] Java language Sergio Durigan Junior
2012-01-15 19:07 ` [RFC 6/8] Modula-2 language Sergio Durigan Junior
2012-01-17 10:21   ` Gaius Mulley
2012-01-15 19:10 ` [RFC 7/8] Objective-C language Sergio Durigan Junior
2012-01-15 20:34 ` [RFC 8/8] Pascal language Sergio Durigan Junior
2012-01-16 19:29   ` Tom Tromey
2012-01-16 19:29 ` [RFC 0/8] Beginning to remove globals from parser-defs.h Tom Tromey

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=m3k44rplst.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sergiodj@redhat.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