Thread (1 message) 1 message, 1 author, 2008-10-03

Re: [PATCH 8/9 V3] Add documentation for the new DTS language.

From: Scott Wood <hidden>
Date: 2008-10-03 15:27:01

Possibly related (same subject, not in this thread)

On Fri, Oct 03, 2008 at 12:24:24PM +1000, David Gibson wrote:
quoted
And if you want the number of somethings to be easily tweakable, you may  
need to do #include/#ifdef recursion.
Yes, we'd certainly need some sort of iteration operator in the
expressions for this sort of thing.
OK, but now we're talking about something more complex than running it
through CPP with some character conversion.

A more powerful macro language is certainly an option, though I have a
personal preference for the semantic approach.
quoted
quoted
If anything I think it's more powerful, because the macro
boundaries can be anywhere, not only at the edges of particular
semantic constructs.
Is that useful outside the International Obfuscated DTC Contest?
Maybe.  I can see uses for both this style:
	mynodename@12345 NODE_CONTENTS_MACRO(x,y,z);
and this style:
	NODE_MACRO(p,q,r);
where the macro generates the name as well.

Both are trivially possible with macros, but would need different
types of definition with a runtime system, which increases complexity.
You can do this in the proposed language by either defining a function
that takes the node name/unit address as a parameter, or by defining a
function that returns a set of properties.

-Scott
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help