Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'syntax': 0.04; '(even': 0.05; 'subject:Python': 0.06; 'compiler': 0.07; 'front-end': 0.07; 'parser': 0.07; 'defines': 0.09; 'executable': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; 'language,': 0.12; 'above?': 0.16; 'cc:name:python list': 0.16; 'code?': 0.16; 'janssen': 0.16; 'or)': 0.16; 'program?': 0.16; 'quoted': 0.16; 'relates': 0.16; 'to:addr:pearwood.info': 0.16; "to:name:steven d'aprano": 0.16; 'language': 0.16; '(not': 0.18; 'machine': 0.22; '>>>': 0.22; 'cc:addr:python.org': 0.22; 'certainly': 0.24; 'specifies': 0.24; 'stephen': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'to:2**1': 0.27; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; '(which': 0.31; 'code': 0.31; 'claiming': 0.31; "d'aprano": 0.31; 'keywords,': 0.31; 'steven': 0.31; 'subject:end': 0.31; 'says': 0.33; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'science,': 0.36; 'anything': 0.39; 'does': 0.39; 'how': 0.40; 'even': 0.60; 'read': 0.60; 'dave': 0.60; 'face': 0.64; 'love': 0.65; 'here': 0.66; 'other.': 0.75; 'exclusive': 0.81; 'inclusive': 0.84; 'relate': 0.84; 'this...': 0.84; 'washington.': 0.84; 'angel': 0.91; 'taught': 0.96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=DGWVMWT1BSU4Ey8lZSMH/bCvnjKUT3vHjP91nM3Mu6I=; b=g4hRMqvwMHePnT0FdMSuARlzYbBJbTcaPmCsH/a6HZoL+3zMqZE5ENr7IcNnbgnyxL PYcafoYTKKbMgImpRF+FtTM2q1ozUWKP0hqFzB1Ourwgaaod3dGJhxCDGtmzZQPz/qQr ox7zBmEka0BkPnJ1hKEWPWZ+mzfsn6Hh4McRDSmthe2ye007Nr7XgUzEx1S4TTxkpYJM cdjiojyKi4MD2kDNdq0MSqJvGlfwdNGuiNiXv2PJV3afvSxO6b4pnJd38RqtoQRczP1B cIt4NaL/ksT7IGg+sEOXHEOI9mywBbVbb9LMx0XXj+1O+FJAbO1miHmAv+9W5lL9TV63 bshg== MIME-Version: 1.0 X-Received: by 10.180.13.174 with SMTP id i14mr15206683wic.49.1382454261947; Tue, 22 Oct 2013 08:04:21 -0700 (PDT) In-Reply-To: References: <4012031f-5334-4be8-a673-e0d8c8917fb2@googlegroups.com> <5a4e0ec9-c977-4a86-83b0-9f4c55a82e37@googlegroups.com> <54f8eb09-7a2e-4306-86f2-7ae118fa8055@googlegroups.com> Date: Tue, 22 Oct 2013 08:04:21 -0700 Subject: Re: Python Front-end to GCC From: Mark Janssen To: Dave Angel , "Steven D'Aprano" Content-Type: text/plain; charset=ISO-8859-1 Cc: Python List X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1382454270 news.xs4all.nl 15890 [2001:888:2000:d::a6]:49057 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:57263 I love it. Watch this... [context] >>> A language specification in BNF is just syntax. It doesn't say anything >>> about semantics. So how could this be used to produce executable C code >>> for a program? BNF is used to produce parsers. But a parser isn't >>> sufficient. >> >> A C program is just syntax also. How does the compiler generate >> executable machine code? Extrapolate into a Python front-end to C. [Dave Angel responds:] > Did you even read the paragraph you quoted above? The BNF specification > does NOT completely describe a language, it only defines its syntax. [Steven D'Aprano responds:] > Like every other language, C programs are certainly not *just* syntax. > Here is some syntax: > > &foo bar^ := Now, I don't know where y'all were taught Computer Science, but BNF specifies not only syntax (which would be the *tokens* of a language), but also its *grammar*; how syntax relates to linguistic categories like keywords, and tokens relate to each other. Dave is claiming that BNF only defines the syntax of a language, but then Stephen goes on to supply some syntax that a BNF specification of the language would not allow (even though Steven calls it "syntax" which is what BNF in Dave's claim parses). So which of you is confused? I ask that in the inclusive (not exclusive OR) sense.... ;^) <-- face says "both". Mark Janssen Tacoma, Washington.