From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12767 invoked by alias); 12 Dec 2006 20:45:31 -0000 Received: (qmail 12753 invoked by uid 22791); 12 Dec 2006 20:45:29 -0000 X-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 12 Dec 2006 20:45:22 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id kBCKjKZ5022762; Tue, 12 Dec 2006 15:45:20 -0500 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id kBCKjEAe004774; Tue, 12 Dec 2006 15:45:14 -0500 Received: from touchme.toronto.redhat.com (IDENT:postfix@touchme.toronto.redhat.com [172.16.14.9]) by pobox.toronto.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id kBCKjDEO000621; Tue, 12 Dec 2006 15:45:13 -0500 Received: from ton.toronto.redhat.com (ton.toronto.redhat.com [172.16.14.15]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 9439D8001D7; Tue, 12 Dec 2006 15:45:13 -0500 (EST) Received: from ton.toronto.redhat.com (localhost.localdomain [127.0.0.1]) by ton.toronto.redhat.com (8.13.1/8.13.1) with ESMTP id kBCKjC21022386; Tue, 12 Dec 2006 15:45:12 -0500 Received: (from fche@localhost) by ton.toronto.redhat.com (8.13.1/8.13.1/Submit) id kBCKj6pQ022379; Tue, 12 Dec 2006 15:45:06 -0500 X-Authentication-Warning: ton.toronto.redhat.com: fche set sender to fche@redhat.com using -f To: "Stone, Joshua I" Cc: "Mike Mason" , "Robb Romans" , "SystemTap" Subject: Re: Language Reference, updated References: From: fche@redhat.com (Frank Ch. Eigler) Date: Tue, 12 Dec 2006 22:19:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q4/txt/msg00659.txt.bz2 josh wrote: > The semicolon is necessary because it's optional. :-/ [...] > > Said with less tongue-in-cheek: There are certain grammatical > ambiguities that are due to the fact that the language has no statement > separator. Yes. (Or, alternately, because it has both prefix and postfix operators.) > [...] The spacing indicates what I want to happen, but the actual > parsing will produce this: > probe foo { > (a) = ((b)++) > c > } > Surprise! [...] We could have a "DWIM" post-parse pass, which would emit warnings if suspicious line spans occur in expression statements. > You might conclude that it's best to always include a semicolon as a > statement separator, but even that can backfire. [if () foo; else bar; ] > This will give you "parse error: expected statement" [...] I'm ambivalent about how problematic this is. Awk and tcl, for example are newline sensitive (";" is a separator for multiple statements on a single line). We all know how python feels. IIRC dtrace takes the C route. - FChE