From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39505 invoked by alias); 24 Jan 2016 20:03:52 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 39480 invoked by uid 89); 24 Jan 2016 20:03:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=D*be, productive, gotchas, enjoy X-HELO: mail-ig0-f178.google.com Received: from mail-ig0-f178.google.com (HELO mail-ig0-f178.google.com) (209.85.213.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 24 Jan 2016 20:03:50 +0000 Received: by mail-ig0-f178.google.com with SMTP id z14so22767235igp.1 for ; Sun, 24 Jan 2016 12:03:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=jAuCbCt6AWZ//wiZdwZhUIajF1Phkh/Au+Y9fXd7jW0=; b=I9MDEJLEDOeJ0tGDcL+WtBfIoORNN9UQrb1yVdjBVRpmSQW3mnjvf+6EjGXsfTBvJ8 sCWXp7c+hAU/i31/rXHw+pHsbDZsHPcI2aVTJVSMxE5c7Nxg9FmsqRx8hWeweb7RDePB sChzzDBQ7qhBaEZxK+pYq3BRELcOxTkZeBrxhsaGo/yKRFgqXyqXq9g2SRBuCMATnXV3 4pBxeVv5ywfFF8Bjw+tzWY2zKjIuB0LIXLwnCbKszZXjeUzp40yzlRbUBcoEOCOjrX3w dnj+dpZZcmgJYzrfR6LsaajplYvEBkMgtmCCj/CACGgu0WK7NJyMY3otRVL6NXJ3il4f mL3A== X-Gm-Message-State: AG10YOSiwwmLoDwWNckYGHdgmpVmVv+55o1LUsm0iFMEqmy8PAVTMQ9OHIIz+gFsUCuOJsuEO297C/PUd+sFBmHB X-Received: by 10.50.128.45 with SMTP id nl13mr14303164igb.3.1453665828408; Sun, 24 Jan 2016 12:03:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.41.225 with HTTP; Sun, 24 Jan 2016 12:03:08 -0800 (PST) In-Reply-To: <1453499357.2097.18.camel@skynet.be> References: <001a1143804e6a9e8f0529ce089a@google.com> <1453499357.2097.18.camel@skynet.be> From: Doug Evans Date: Sun, 24 Jan 2016 20:03:00 -0000 Message-ID: Subject: Re: RFC: block of commands To: Philippe Waroquiers Cc: gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00608.txt.bz2 On Fri, Jan 22, 2016 at 1:49 PM, Philippe Waroquiers wrote: > > > I think that effectively, the principles you suggest below > should allow to make a reasonable syntax, and no backward > incompatibility. > So basically: > * trailing } is mandatory > * inside a block of commands, { } and ; must be escaped > * a command block is limited to be on a single line > I guess multiple lines will be ok if each line is terminated > by a \. > > The above principles should also allow to extend if/while/... > to have 'one line' if/while/... > > I also think that 'one line if' will allow to do things such as: > > thread apply all if $ebp -$esp > 1000000 { echo big frame in this thread } > > (today, trying to use an 'if' in thread apply gives a quite strange > behaviour : the rest of the 'if' command is read during each execution > for each thread, which is not very user friendly :). > > I will work based on the above idea, and resubmit a draft patch > but that will for sure have to wait after FOSDEM, which > will already consume the night and week-end free time :). > > Thanks for the comments/help/nice suggestions > Hi. Sounds like a plan, but in an effort to make your time as productive as I can I would suggest first trying to come up with syntax that the community can accept. Among the questions we need to answer: - when/how to escape { } ; (what I gave was a strawman, I didn't dig deep into whether there are any gotchas) - what to do with { } in expressions, e.g., "if ({1,2,3})[2] == 3 { echo foo }" - ??? P.S. Hope you enjoy FOSDEM!