All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Stefan Monnier <monnier-CRDzTM1onBSWkKpYnGOUKg@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: How to parse delete-property annotations
Date: Mon, 05 Oct 2015 16:52:42 -0700	[thread overview]
Message-ID: <56130D4A.40602@gmail.com> (raw)
In-Reply-To: <jwvzj05s842.fsf-monnier+INBOX-mXXj517/zsQ@public.gmane.org>

On 9/29/2015 5:54 AM, Stefan Monnier wrote:
> [ In the context of Emacs's dts-mode (http://elpa.gnu.org/packages/dts-mode). ]
> 
> I recently came across the following piece of DTS code:
> 
>    &usbphy {
>         /* Unset otg detect pins as we force dr_mode */
>         /delete-property/ usb0_id_det-gpio;
>         /delete-property/ usb0_vbus_det-gpio;
>    };
> 
> and was wondering how dts-mode should understand this.  `dts-mode'
> doesn't try to understand the actual *meaning* of such code, but it does
> try to understand the syntax (i.e. how the abstract-syntax-tree would
> look like).
> 
> Is "/delete-property/" is special syntax in itself, or is it a special
> case of a more general syntax (like "/.../ blabla;")?  Where exactly is
> it allowed to appear?
> Could someone point me to some documentation explaining/describing this syntax?
> 
> 
>         Stefan

The best documentation that I know of for this is the lexer
source at:

   https://git.kernel.org/cgit/utils/dtc/dtc.git/tree/dtc-lexer.l

The lexer detects tokens for "/delete-property/" and "/delete-node/"
at lines 128 - 140.

-Frank
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-10-05 23:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 12:54 How to parse delete-property annotations Stefan Monnier
     [not found] ` <jwvzj05s842.fsf-monnier+INBOX-mXXj517/zsQ@public.gmane.org>
2015-10-05 23:52   ` Frank Rowand [this message]
     [not found]     ` <56130D4A.40602-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-06  1:00       ` Stefan Monnier

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=56130D4A.40602@gmail.com \
    --to=frowand.list-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=monnier-CRDzTM1onBSWkKpYnGOUKg@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.