From: Kumar Gala <kumar.gala-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Devicetree Compiler
<devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Supporting aliases in PATHREFs
Date: Wed, 20 May 2020 11:04:54 -0500 [thread overview]
Message-ID: <8D778C5A-59DB-4649-B5BF-6918603876A1@linaro.org> (raw)
We currently have support for referring to a path via:
&{/foo/bar}
{
…
};
Was looking at supporting aliases in that as well, so you could have:
aliases {
aname = &{/foo/bar};
};
&{aname}
{
…
};
As I look at making the changes to support this, had a few questions:
1. So we use DT_PATH_REF in the lexer for this, or introduce something like DT_ALIAS_REF?
2. On the yacc side, looks like there is get_node_by_ref() and add_orphan_node() would need changing to distinguish a PATH, ALIAS, and LABEL reference as right now they utilize the ref starting with “/“ to distinguish between PATH & LABEL references. Would passing a 3rd parameter that is some ENUM type be the way to go here?
3. Are there any other places I should look to fix things so aliases can be used similar to a path?
I’m not super familiar with lex/yacc so looking for guidance.
thanks
- k
next reply other threads:[~2020-05-20 16:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-20 16:04 Kumar Gala [this message]
[not found] ` <8D778C5A-59DB-4649-B5BF-6918603876A1-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2020-05-21 1:18 ` Supporting aliases in PATHREFs 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=8D778C5A-59DB-4649-B5BF-6918603876A1@linaro.org \
--to=kumar.gala-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).