Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'string': 0.09; 'already.': 0.09; 'atom': 0.09; 'false.': 0.09; 'statements': 0.09; 'strings.': 0.09; 'subject:Why': 0.09; 'trees': 0.09; 'way:': 0.09; 'wrote': 0.14; '"is': 0.16; '"some': 0.16; '*formal*': 0.16; 'definitions,': 0.16; 'denote': 0.16; 'discussion.': 0.16; 'expression,': 0.16; 'expression.': 0.16; 'hierarchy': 0.16; 'hierarchy,': 0.16; 'indirectly': 0.16; 'informal': 0.16; 'merely': 0.16; 'node,': 0.16; 'quoted': 0.16; 'subject: \n ': 0.16; 'subject:comment': 0.16; 'subject:quoted': 0.16; 'subject:simple': 0.16; 'subject:triple': 0.16; 'symbols': 0.16; 'language': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'pointed': 0.19; 'thu,': 0.19; '(the': 0.22; '>>>': 0.22; 'otherwise,': 0.22; "aren't": 0.24; 'parse': 0.24; 'string,': 0.24; '(or': 0.24; 'question': 0.24; 'source': 0.25; 'first,': 0.26; 'posts': 0.26; 'suggested': 0.26; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'point': 0.28; 'chris': 0.29; 'possibility': 0.29; 'topic': 0.29; 'statement': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'gives': 0.31; "skip:' 10": 0.31; 'that.': 0.31; 'you?': 0.31; '(maybe': 0.31; '>>>>': 0.31; 'dated': 0.31; 'fine,': 0.31; 'go.': 0.31; 'post.': 0.31; 'produces': 0.31; 'second,': 0.31; 'class': 0.32; "we're": 0.32; 'another': 0.32; 'actual': 0.34; 'anywhere': 0.35; 'except': 0.35; 'offered': 0.35; 'definition': 0.35; 'no,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'described': 0.36; 'false': 0.36; 'impression': 0.36; 'opposed': 0.36; 'sequence': 0.36; 'shows': 0.36; 'useful': 0.36; 'subject:?': 0.36; 'should': 0.36; 'being': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'according': 0.40; 'ian': 0.60; 'simple': 0.61; "you're": 0.61; 'back': 0.62; 'complete': 0.62; 'term': 0.63; 'such': 0.63; 'therefore,': 0.64; 'more': 0.64; 'talking': 0.65; 'thomas': 0.65; 'within': 0.65; 'note:': 0.66; 'here': 0.66; 'subject:. ': 0.67; 'between': 0.67; 'mar': 0.68; 'production': 0.68; 'nobody': 0.68; 'offer.': 0.74; 'theoretical': 0.74; 'goal': 0.75; '*no': 0.84; '2015': 0.84; 'actually,': 0.84; 'agreement,': 0.84; 'claim.': 0.84; 'clearer': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=M11iGqY8JpB9SzrECj5w5vLHqBkcneV+4p1+tg3zaXQ=; b=DhQRklmGyA9d1+mqPedORMHItFqW7dyAas85gPz9vQvoaV8DPBDcsmJMJAHFCqOox6 FrShoqWDjDl5uKxaK6ivr4HZDFo4KqMXYI9COO3YlPSHjIZ84+BnYJV+akZu0sJcgHhQ ObmULmL103h9ha8LhFRoxZopHsDO7xTL7TUxIzeM1nj000D/0XTZb+siFgcDV+qryeua cGvztc6Xpb3eBdm3UDLTD2WjKzGJROBHu0JEFPNyzIYS6GWadKrFpZ2R91vKZDF7q2K6 9hi6kte9IcI05Ml701jeAScY4MjdKGNlbk6bOAWB+R715CUiEBHBnKc3oUR3qLNIZ9qC iaJw== X-Received: by 10.50.20.233 with SMTP id q9mr24641742ige.9.1428020553722; Thu, 02 Apr 2015 17:22:33 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1905422.ubGH1B8UfE@PointedEars.de> References: <3533816.ZYnZ2OzjCs@PointedEars.de> <3971951.908YQu3oQO@PointedEars.de> <1504323.jUKfeKbQsP@PointedEars.de> <2362875.FIK8ImHTJA@PointedEars.de> <1823599.Pr2V0MPR6q@PointedEars.de> <9781856.5cutuNVPEq@PointedEars.de> <3894022.plrvF2nHWu@PointedEars.de> <1905422.ubGH1B8UfE@PointedEars.de> From: Ian Kelly Date: Thu, 2 Apr 2015 18:21:53 -0600 Subject: Re: A simple single line, triple-quoted comment is giving syntax error. Why? To: Python Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 92 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1428020556 news.xs4all.nl 2872 [2001:888:2000:d::a6]:41503 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:88467 On Thu, Apr 2, 2015 at 3:31 PM, Thomas 'PointedEars' Lahn wrote: > Ian Kelly wrote: > >> [=E2=80=A6] Thomas 'PointedEars' Lahn [=E2=80=A6] wrote: >>> Ian Kelly wrote: >>>> Within a grammar, the question of "is an X a Y" is nonsensical in >>>> isolation. It can only be answered in relation to a parse tree. >>>> Consider the simple grammar: >>>> >>>> S -> A | B >>>> A -> x >>>> B -> x >>>> >>>> Is x an A? It depends. >>> >>> No, by the definition 2 below, that we all accepted implicitly up to th= is >>> point, x is *definitely* an A. >> >> What gives you the impression that I ever accepted it? > > ,- > | > | What the grammar that you quoted from shows is that STRING+ is an > | expression. > > There is *no way* for you to make that statement if you did not accept > definition (2). Actually, there is a very simple way: I was being sloppily imprecise when I wrote that. First, I was speaking only in reference to the class of parse trees with more than one STRING, as that was the topic under discussion. I should have been clearer about that. Second, I never should have used the term "STRING+" there (or anywhere else in this discussion), as that merely clouded the point I was trying to offer. What I *meant* was that the complete sequence of produced STRINGs -- as opposed to any individual STRING -- is an expression, and I inappropriately used "STRING+" to denote that. (Maybe that is the point you were trying to make when you were talking about EBNF before.) >> This question of whether "x is an A" is informal and not a topic of form= al >> language theory so far as I'm aware. Can you cite some source for it? > > No, because I was formalizing the ad-hoc definition by Chris Angelico in > . That URI is not useful to me as I don't use a newsreader. Is that the message dated Sun, 22 Mar 2015 14:36:48 +1100? I don't see any suggestion of this definition in that post. t>>> Now, according to these definitions, in the offered grammar x is *both= * >>> an A and a B. Because what matters is _not_ the practical result of >>> production chains (the actual parse tree), but the certainty of the >>> theoretical possibility of it. >> >> This strikes me as being a lot like arguing, "some kites are toys, and >> some kites are birds; therefore, all kites are both toys and birds." > > False analogy again. We are discussing *in theory* a *formal* grammar. = Its > goal symbols have *no meaning* except what can be produced from them. We're discussing a formal grammar as if it described a classification hierarchy, which gives meaning to statements like "A STRING is an expr". Otherwise, that statement is meaningless and can be neither true nor false. So I think that the analogy between one such hierarchy and another is apt. >> You're really going to make me spell it out, aren't you? Fine, here you >> go. >> >> single_input -> [=E2=80=A6] -> expr -> [=E2=80=A6] -> atom -> STRING STR= ING >> >> Note: the derivation contains exactly one expr node, which indirectly >> produces both STRINGs. Neither STRING in this derivation is >> individually produced from the expr. > > So you have proven that which nobody ever doubted nor requested, but I > pointed out already. As I tried to point out several posts back when I suggested that we were in agreement, and which you flatly denied. > What you have still not proven is what you claimed: > the parse tree. Because you misunderstood my claim.