From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [PATCH V2 2/2] dtc: cpp co-existence: add support for #line directives Date: Thu, 27 Sep 2012 09:53:01 -0600 Message-ID: <5064765D.7090005@wwwdotorg.org> References: <1348676285-1777-1-git-send-email-swarren@wwwdotorg.org> <1348676285-1777-2-git-send-email-swarren@wwwdotorg.org> <20120927070746.GL31993@truffula.fritz.box> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120927070746.GL31993-W9XWwYn+TF0XU02nzanrWNbf9cGiqdzd@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: David Gibson Cc: Stephen Warren , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org List-Id: devicetree@vger.kernel.org On 09/27/2012 01:07 AM, David Gibson wrote: > On Wed, Sep 26, 2012 at 10:18:05AM -0600, Stephen Warren wrote: >> From: Stephen Warren >> >> Line control directives of the following formats are supported: >> #line LINE "FILE" >> # LINE "FILE" [FLAGS] >> >> This allows dtc to consume the output of pre-processors, and to provide >> error messages that refer to the original filename, including taking >> into account any #include directives that the pre-processor may have >> performed. >> >> Signed-off-by: Stephen Warren > > Nice. Two small changes I'd like to see: > >> +<*>^"#"(line{WS}|" "){WS}*[0-9]+{WS}+{STRING}({WS}+[0-9]+)? { > > I think this can be done slightly more cleanly as: > ^"#"(line)?{WS}+[0-9]+{WS}+{STRING}({WS}+[0-9]+)? Did you mean to ommit the <*> from the beginning there? I'm not sure what the difference is between no start state tag and what I assume is a wildcard tag. Other than that, it looks like that should work; I'll try it out.