* Formal grammar for DTS
@ 2015-02-28 15:22 Stefan Seefeld
[not found] ` <54F1DD4F.3080304-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Seefeld @ 2015-02-28 15:22 UTC (permalink / raw)
To: devicetree-spec-u79uwXL29TY76Z2rM5mHXA
Hello,
I would like to write a tool / library that allows me to
(programmatically) edit .dts files, with the ability to regenerate the
source files, preserving the original formatting (including comments and
other non-semantic content).
To that end I need a formal definition of the DTS grammar. While I have
found the dtc tool, all its source files (in particular the dtc-lexer.l
and dtc-parser.y files) are released under GPL, so it isn't entirely
clear whether I may use the grammar encoded in those and transcribe that
into my own (I'm writing my tool in Java, most likely using the JavaCC
parser generator tool).
So, is there another place where the grammar of Device Tree source files
is formally defined in ways that allows tools developers to use that ?
Any help and advice would be highly appreciated.
Thanks,
Stefan
--
Stefan Seefeld
CodeSourcery / Mentor Embedded
stefan-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe devicetree-spec" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread[parent not found: <54F1DD4F.3080304-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>]
* Re: Formal grammar for DTS [not found] ` <54F1DD4F.3080304-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org> @ 2015-03-02 4:54 ` David Gibson [not found] ` <20150302045403.GE29409-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: David Gibson @ 2015-03-02 4:54 UTC (permalink / raw) To: Stefan Seefeld; +Cc: devicetree-spec-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 1381 bytes --] On Sat, Feb 28, 2015 at 10:22:55AM -0500, Stefan Seefeld wrote: > Hello, > > I would like to write a tool / library that allows me to > (programmatically) edit .dts files, with the ability to regenerate the > source files, preserving the original formatting (including comments and > other non-semantic content). > > To that end I need a formal definition of the DTS grammar. While I have > found the dtc tool, all its source files (in particular the dtc-lexer.l > and dtc-parser.y files) are released under GPL, so it isn't entirely > clear whether I may use the grammar encoded in those and transcribe that > into my own (I'm writing my tool in Java, most likely using the JavaCC > parser generator tool). > > So, is there another place where the grammar of Device Tree source files > is formally defined in ways that allows tools developers to use that ? > Any help and advice would be highly appreciated. I'm not aware of any other presentation of the dts grammar than in the source files. IANAL, but fwiw, I wouldn't consider transcribing the grammar rules (without the semantic actions) into some other form to be a derived work triggering the GPL. -- 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 [-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20150302045403.GE29409-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>]
* Re: Formal grammar for DTS [not found] ` <20150302045403.GE29409-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org> @ 2015-03-02 15:42 ` Stefan Seefeld [not found] ` <54F484D4.8080501-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Stefan Seefeld @ 2015-03-02 15:42 UTC (permalink / raw) To: David Gibson; +Cc: devicetree-spec-u79uwXL29TY76Z2rM5mHXA David, On 01/03/15 11:54 PM, David Gibson wrote: > On Sat, Feb 28, 2015 at 10:22:55AM -0500, Stefan Seefeld wrote: >> Hello, >> >> I would like to write a tool / library that allows me to >> (programmatically) edit .dts files, with the ability to regenerate the >> source files, preserving the original formatting (including comments and >> other non-semantic content). >> >> To that end I need a formal definition of the DTS grammar. While I have >> found the dtc tool, all its source files (in particular the dtc-lexer.l >> and dtc-parser.y files) are released under GPL, so it isn't entirely >> clear whether I may use the grammar encoded in those and transcribe that >> into my own (I'm writing my tool in Java, most likely using the JavaCC >> parser generator tool). >> >> So, is there another place where the grammar of Device Tree source files >> is formally defined in ways that allows tools developers to use that ? >> Any help and advice would be highly appreciated. > > I'm not aware of any other presentation of the dts grammar than in the > source files. > > IANAL, but fwiw, I wouldn't consider transcribing the grammar rules > (without the semantic actions) into some other form to be a derived > work triggering the GPL. Yes, I agree. Still, it would be a little clearer if the grammar would be held in a separate file (not covered by GPL). Perhaps you could c&p just the BNF grammar into a text file ? Many thanks, Stefan -- Stefan Seefeld CodeSourcery / Mentor Embedded stefan-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org -- To unsubscribe from this list: send the line "unsubscribe devicetree-spec" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <54F484D4.8080501-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>]
* Re: Formal grammar for DTS [not found] ` <54F484D4.8080501-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org> @ 2015-03-03 12:22 ` Ian Campbell 0 siblings, 0 replies; 4+ messages in thread From: Ian Campbell @ 2015-03-03 12:22 UTC (permalink / raw) To: Stefan Seefeld; +Cc: David Gibson, devicetree-spec-u79uwXL29TY76Z2rM5mHXA On Mon, 2015-03-02 at 10:42 -0500, Stefan Seefeld wrote: > David, > > On 01/03/15 11:54 PM, David Gibson wrote: > > On Sat, Feb 28, 2015 at 10:22:55AM -0500, Stefan Seefeld wrote: > >> Hello, > >> > >> I would like to write a tool / library that allows me to > >> (programmatically) edit .dts files, with the ability to regenerate the > >> source files, preserving the original formatting (including comments and > >> other non-semantic content). > >> > >> To that end I need a formal definition of the DTS grammar. While I have > >> found the dtc tool, all its source files (in particular the dtc-lexer.l > >> and dtc-parser.y files) are released under GPL, so it isn't entirely > >> clear whether I may use the grammar encoded in those and transcribe that > >> into my own (I'm writing my tool in Java, most likely using the JavaCC > >> parser generator tool). > >> > >> So, is there another place where the grammar of Device Tree source files > >> is formally defined in ways that allows tools developers to use that ? > >> Any help and advice would be highly appreciated. > > > > I'm not aware of any other presentation of the dts grammar than in the > > source files. > > > > IANAL, but fwiw, I wouldn't consider transcribing the grammar rules > > (without the semantic actions) into some other form to be a derived > > work triggering the GPL. > > Yes, I agree. Still, it would be a little clearer if the grammar would > be held in a separate file (not covered by GPL). Perhaps you could c&p > just the BNF grammar into a text file ? Isn't the DTS syntax described by ePAPR "Appendix A Device Tree Source Format (version 1)"? having said that it's not terribly formal. Ian. -- To unsubscribe from this list: send the line "unsubscribe devicetree-spec" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-03 12:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-28 15:22 Formal grammar for DTS Stefan Seefeld
[not found] ` <54F1DD4F.3080304-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>
2015-03-02 4:54 ` David Gibson
[not found] ` <20150302045403.GE29409-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2015-03-02 15:42 ` Stefan Seefeld
[not found] ` <54F484D4.8080501-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>
2015-03-03 12:22 ` Ian Campbell
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.