From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: [2/5] dtc: Use flex's YY_USER_ACTION feature to avoid code duplication Date: Fri, 3 Oct 2008 11:05:31 +1000 Message-ID: <20081003010531.GE3002@yookeroo.seuss> References: <20081002140427.GD11662@yookeroo.seuss> <20081002140512.GE11662@yookeroo.seuss> <20081002140556.GF11662@yookeroo.seuss> <1222964727.9242.10.camel@ld0161-tx32> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1222964727.9242.10.camel@ld0161-tx32> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-mnsaURCQ41sdnm+yROfE0A@public.gmane.org Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-mnsaURCQ41sdnm+yROfE0A@public.gmane.org To: Jon Loeliger Cc: devicetree-discuss List-Id: devicetree@vger.kernel.org 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 > > > > --- > > 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? -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson