All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Loeliger <jdl-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
Cc: devicetree-discuss
	<devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
Subject: Re: [2/5] dtc: Use flex's YY_USER_ACTION feature to avoid code	duplication
Date: Fri, 03 Oct 2008 09:17:53 -0500	[thread overview]
Message-ID: <48E62991.6010102@freescale.com> (raw)
In-Reply-To: <20081003010531.GE3002-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>

David Gibson wrote:
> On Thu, Oct 02, 2008 at 11:25:27AM -0500, Jon Loeliger wrote:
>> On Fri, 2008-10-03 at 00:05 +1000, David Gibson wrote:
>>> Current, every lexer rule starts with some boiler plate to update the
>>> yylloc value for use by the parser.  One of the rules, even mistakenly
>>> has a redundant allocation to one of the members.
>>>
>>> This patch uses the flex YY_USER_ACTION macro hook, which is executed
>>> before every rule to avoid this duplication.
>>>
>>> Signed-off-by: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
>>>
>>> ---
>> This, and the xstrdup() change are both excellent suggestions.
> 
> Ok, so lets apply them, clearing a bit more muck out of the way to
> focus on the new language stuff.
> 
> But does this imply you don't like the rest of the series?
> 

Dave,

You need to interpret less and quit trying to out-guess people.
I for one just don't like it.

Here's what I'm doing right now.

First, I buy the YY_USER_ACTION patch entirely.  I've refactored
it to apply to my branch to verify that it works with my code as well.

So I am going to apply it to the *current* master branch and
rebase my stuff on to it to bring it forward through my patches.
Then, as you say, we'll clear some muck.

Second, I buy the desire for strdup() -> xstrdup().  However, I
am not going to put xstrdup() into srcpos.c.  No way, not no how.
So I am going to introduce utiil.[ch] or so.  And to get it into
the convert tool, I am first going to refactor the Makfile.

Finally, I've not entirely read through and understood some of
the parts of the rest of your series yet.  There are definitely
parts that I'd like to pick up, and yet there are parts that I
am not sure about yet.  I need to re-read and understand it more.

In the meantime, I'm going to make further progress on cleaning
up "the muck".

Thanks,
jdl

  parent reply	other threads:[~2008-10-03 14:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-02 14:04 [0/5] dtc: srcpos, input handling cleanups David Gibson
     [not found] ` <20081002140427.GD11662-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2008-10-02 14:05   ` [1/5] dtc: Implement and use an xstrdup() function David Gibson
     [not found]     ` <20081002140512.GE11662-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2008-10-02 14:05       ` [2/5] dtc: Use flex's YY_USER_ACTION feature to avoid code duplication David Gibson
     [not found]         ` <20081002140556.GF11662-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2008-10-02 14:06           ` [3/5] dtc: Cleanup yyerrorf() function David Gibson
     [not found]             ` <20081002140652.GG11662-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2008-10-02 14:07               ` [4/5] dtc: Cleanup yylloc type and handling David Gibson
     [not found]                 ` <20081002140753.GH11662-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2008-10-02 14:09                   ` [5/5] dtc: Clean up source file management David Gibson
2008-10-03 19:24                   ` [4/5] dtc: Cleanup yylloc type and handling Jon Loeliger
     [not found]                     ` <E1KlqGI-0006JF-6p-CYoMK+44s/E@public.gmane.org>
2008-10-04  2:25                       ` David Gibson
2008-10-03 19:22               ` [3/5] dtc: Cleanup yyerrorf() function Jon Loeliger
     [not found]                 ` <E1KlqEb-0006Io-Sc-CYoMK+44s/E@public.gmane.org>
2008-10-04  2:56                   ` David Gibson
2008-10-02 16:25           ` [2/5] dtc: Use flex's YY_USER_ACTION feature to avoid code duplication Jon Loeliger
2008-10-03  1:05             ` David Gibson
     [not found]               ` <20081003010531.GE3002-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2008-10-03 14:17                 ` Jon Loeliger [this message]
     [not found]                   ` <48E62991.6010102-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2008-10-04  4:13                     ` David Gibson
2008-10-03 17:16           ` Jon Loeliger
2008-10-03 17:17       ` [1/5] dtc: Implement and use an xstrdup() function Jon Loeliger
     [not found]         ` <E1KloHP-0005pb-R8-CYoMK+44s/E@public.gmane.org>
2008-10-04  2:49           ` David Gibson

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=48E62991.6010102@freescale.com \
    --to=jdl-kzfg59tc24xl57midrcfdg@public.gmane.org \
    --cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
    --cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.