Re: [PATCH 2/2] dtc: cpp co-existence: add support for #line directives
From: David Gibson <hidden>
Date: 2012-09-26 04:34:59
On Mon, Sep 24, 2012 at 04:51:17PM -0600, Stephen Warren wrote:
From: Stephen Warren <redacted>
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.I like the idea of handling line directives, whichever way we go with the other cpp-related proposals. The fact that these are distinguished from a propnodename beginning with # only by the following digits is more subtle than I'd ideally like, but I think it's wirth it. The only thing I would like to see change is to only recognize line directives at the beginning of the line (in fact, preferably in column 0 only). Unfortunately that is going to mean some mucky flex work, including a new start state, I expect. -- 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