DTS language enhancements

Scott Wood scottwood at freescale.com
Wed Oct 8 03:46:41 EST 2008


David Gibson wrote:
> Oh, just remembered the more precise reason why this is the case.  By
> the time we get to the parser, whitespace and comments have
> disappeared entirely, which means they'd be ignored *in the midst* of
> node property names under this proposal, which is just not nice.
> 
> It's technically possible to recognize whitespace at the parser level
> instead, but it makes the grammar hideous.

Ah, right, that'd be unpleasant.  I think it could be done with a little 
less ugliness than fully recognizing whitespace in the parser (have the 
lexer set a flag on relevant tokens if the previous character was 
whitespace or a comment, and have the parser rule that glues the 
propnodename together check the flag and raise an error if set), but 
that's still uglier than the propnodename-after-opening-brace approach.

-Scott



More information about the devicetree-discuss mailing list