All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Loeliger <jdl-CYoMK+44s/E@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: devicetree-discuss
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>
Subject: Re: Some slightly random musings on device tree expression syntax
Date: Mon, 12 Mar 2012 08:53:05 -0500	[thread overview]
Message-ID: <E1S75gQ-0005WK-0D@jdl.com> (raw)
In-Reply-To: <4F580005.403-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>

> I was thinking some more about how to expand the device tree syntax to
> allow expressions.

Excellent!

> I wondered if we should use a concept/syntax more
> inspired by template processors. Playing with jinja2 and gpp led me
> towards (...) being an inline expression syntax that can calculate
> integers or strings and get replaced by the string representation of the
> expression, and ! at the start of a line introducing a statement
> context. So, below are my somewhat wandering thoughts on the matter.
> However, the idea still raises a lot of questions that'd need to be
> resolved.
> 
> I note a few things:
> 
> * Using the (...) syntax to indicate which parts of the file should be
> evaluated and the substituted solves the issue that David had with Jon's
> proposal re: how do you know when a node name is literal text vs.
> concatenated to some expression.

So the M4 solution then.

> * As an aside, I wonder if we couldn't transparently allow <1 2 3> or
> <1, 2, 3> for cell list syntax, thus not requiring the brackets in
> previously proposed <(1 + 0) (1 + 1) (4 - 1)> syntax, but rather <1 + 0,
> 1 + 1, 4 - 1>?

That's the sort of direction I advocated earlier.

jdl

  parent reply	other threads:[~2012-03-12 13:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-08  0:40 Some slightly random musings on device tree expression syntax Stephen Warren
     [not found] ` <4F580005.403-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-03-12 13:53   ` Jon Loeliger [this message]
     [not found]     ` <E1S75gQ-0005WK-0D-CYoMK+44s/E@public.gmane.org>
2012-03-12 23:57       ` David Gibson
2012-03-13  4:46   ` David Gibson
     [not found]     ` <20120313044631.GJ24916-MK4v0fQdeXQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
2012-03-13 19:56       ` Stephen Warren
     [not found]         ` <4F5FA653.90802-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-03-14 14:42           ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1S75gQ-0005WK-0D@jdl.com \
    --to=jdl-cyomk+44s/e@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.