[2/5] dtc: Use flex's YY_USER_ACTION feature to avoid code	duplication
    Jon Loeliger 
    jdl at freescale.com
       
    Fri Oct  3 02:25:27 EST 2008
    
    
  
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 at gibson.dropbear.id.au>
> 
> ---
This, and the xstrdup() change are both excellent suggestions.
jdl
    
    
More information about the devicetree-discuss
mailing list