From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: [PATCH v2 3/3] dtc: Support character literals in bytestrings Date: Thu, 8 Sep 2011 23:01:09 +1000 Message-ID: <20110908130109.GW30278@yookeroo.fritz.box> References: <1315437340-1661-1-git-send-email-robotboy@chromium.org> <1315437340-1661-4-git-send-email-robotboy@chromium.org> <20110908035149.GO30278@yookeroo.fritz.box> <20110908070716.GC15955@ponder.secretlab.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20110908070716.GC15955-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Grant Likely Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org List-Id: devicetree@vger.kernel.org On Thu, Sep 08, 2011 at 12:07:16AM -0700, Grant Likely wrote: > On Thu, Sep 08, 2011 at 01:51:49PM +1000, David Gibson wrote: > > On Wed, Sep 07, 2011 at 04:15:40PM -0700, Anton Staaf wrote: > > > With this patch the following property assignment: > > > > > > property = ['a' 2b '\r']; > > > > > > is equivalent to: > > > > > > property = [61 2b 0d]; > > > > So, I still have some reservations about this syntax. > > > > It occurred to me: do you actually need to intermix character and > > hexbyte values that much? Could I suggest an alternate sytax as: > > > > property = 'a', [2b], 'r'; > > > > The new character literals sufficiently distinct not to cause problems > > here, and it maintains the , == bytestring append behaviour we already > > have. > > > > Thoughts? > > Does it matter much? I'm happy with either. Is there a downside to > the first syntax? Well.. probably not. I'm just nervous about adding anything in the lexically weird bytestring context. -- 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