Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!novso.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '(at': 0.04; 'source,': 0.04; 'syntax': 0.04; 'tree': 0.05; 'subject:Python': 0.06; '*is*': 0.09; 'run,': 0.09; 'language,': 0.12; 'ast': 0.16; 'disciplined': 0.16; 'janssen': 0.16; 'lexer': 0.16; 'mark,': 0.16; 'sorry:': 0.16; 'to:name:python list': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'discussion': 0.18; '>>>': 0.22; 'header:User-Agent:1': 0.23; "aren't": 0.24; 'specify': 0.24; 'guys': 0.24; "i've": 0.25; 'compiled': 0.26; 'least': 0.26; 'world,': 0.26; 'gets': 0.27; 'header:In-Reply- To:1': 0.27; 'to:2**1': 0.27; 'tried': 0.27; 'topic': 0.29; 'specified': 0.30; "i'm": 0.30; 'gcc': 0.31; 'subject:end': 0.31; 'yourself.': 0.31; 'actual': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'done': 0.36; 'expressed': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'explain': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'either': 0.39; 'how': 0.40; 'easy': 0.60; 'skip:* 10': 0.61; "you've": 0.63; 'such': 0.63; 'to:addr:gmail.com': 0.65; 'details': 0.65; 'world': 0.66; 'around,': 0.84; 'boom.': 0.84; 'forward.': 0.84; 'light.': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=PitvoDgLuMKPwb8kXnbgJsfqNFdxkEe8VaTWXQto4ek=; b=0fgF2kqD7nXf6S4IODdNZjJg9fSq/DMUPXaj0vsZzm8OCBipc1hjSCVdEVkTDLiyyI 776J2fxoknIh8idu+AIi0FOkwTmq7YRcZXXEozlcg2BWvPg0MErjyqHknElXJhNCLfgh ha77NPY98UQfjTnSkqy2lMdrtxi8I7rmTtTy36cUHJfJD0yQry8ULEULqh0/kY7bauJx mGvNT//ovT9cdGzOUNjn5TGVY1jNeUIgNQFjBsKmD7ZQq6IE0sAKxzDNkfcaBJmO9ups jGAmX1v1r3E17QvIAwYy8hnVe5I36IFyk+r97LCkS1G1PnrP47m0FE/l4/OgEYW1lCZF pcGg== X-Received: by 10.224.12.145 with SMTP id x17mr4270453qax.110.1382467253010; Tue, 22 Oct 2013 11:40:53 -0700 (PDT) Sender: Ned Batchelder Date: Tue, 22 Oct 2013 14:40:49 -0400 From: Ned Batchelder User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Mark Janssen , Python List Subject: Re: Python Front-end to GCC References: <4012031f-5334-4be8-a673-e0d8c8917fb2@googlegroups.com> <5a4e0ec9-c977-4a86-83b0-9f4c55a82e37@googlegroups.com> <54f8eb09-7a2e-4306-86f2-7ae118fa8055@googlegroups.com> <52669DC3.5010601@nedbatchelder.com> <5266C0E4.7060309@mrabarnett.plus.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1382467261 news.xs4all.nl 15887 [2001:888:2000:d::a6]:55255 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:57296 On 10/22/13 2:22 PM, Mark Janssen wrote: >>> Okay. The purpose of BNF (at least as I envision it) is to >>> produce/specify a *context-free* "grammar". A lexer parses the tokens >>> specified in the BNF into an Abstract Syntax Tree. If one can produce >>> such a tree for any given source, the language, in theory, can be >>> compiled by GCC into an executable. >>> >>> Boom. >>> >> But you still need to specify the semantics. > In my world, like writing pseudo-code or flow-charts, the AST *is* the > semantics. What world are you guys from? Mark, you started this by describing a program that compiled to C. Now you say you are in the world of pseudo-code and flow-charts. Which is it? In the world where actual programs get compiled and run, you need to have semantics, and they aren't expressed in an AST or a BNF. I think you think that an AST is enough, but it isn't. I'm also not sure what you actually think because we don't stay on a topic long enough to get into the details that would shed light. It's fun to feel like you are right, and it's easy if you change the topic when the going gets tough. You've done this a number of times. I've tried to be polite, and I've tried to be helpful, but I'm sorry: either you don't understand a lot of the terms you are throwing around, or you aren't disciplined enough to focus on a topic long enough to explain yourself. Either way, I don't know how else to move the discussion forward. --Ned.