DTS language enhancements

David Gibson david at gibson.dropbear.id.au
Tue Oct 7 15:17:25 EST 2008


On Tue, Oct 07, 2008 at 12:41:03PM +1100, David Gibson wrote:
> On Mon, Oct 06, 2008 at 12:06:01PM -0500, Scott Wood wrote:
> > On Fri, Oct 03, 2008 at 02:37:10PM +1000, David Gibson wrote:
[snip]
> > We could simplify the lexing, and eliminate the lexical restricitons on
> > when we can expect a property or node name, by letting the parser glue
> > together property/node names when in the appropriate context.  Doing
> > otherwise seems like a layering violation.
> 
> I've considered this in the past, and experimented.  We really don't
> want to go there; attempting to achieve parsing sanity when the
> propnodename isn't recognized as a token is just horrible.

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.

-- 
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



More information about the devicetree-discuss mailing list