Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '(at': 0.04; 'source,': 0.04; 'syntax': 0.04; 'tree': 0.05; 'subject:Python': 0.06; '*is*': 0.09; 'language,': 0.12; 'ast': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'janssen': 0.16; 'lexer': 0.16; 'message- id:@mrabarnett.plus.com': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; ':-)': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'saying': 0.22; 'header:User-Agent:1': 0.23; 'specify': 0.24; 'guys': 0.24; 'compiled': 0.26; 'least': 0.26; 'world,': 0.26; 'certain': 0.27; 'header:In-Reply-To:1': 0.27; 'specified': 0.30; 'gcc': 0.31; 'subject:end': 0.31; 'operations': 0.35; 'received:84': 0.35; 'but': 0.35; 'there': 0.35; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'world.': 0.61; 'skip:* 10': 0.61; "you're": 0.61; 'real': 0.63; 'such': 0.63; 'world': 0.66; 'header:Reply-To:1': 0.67; 'reply-to:no real name:2**0': 0.71; 'boom.': 0.84; 'reply-to:addr:python.org': 0.84 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=PIY2p5aC c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=05MOGALpfCEA:10 a=ihvODaAuJD4A:10 a=OUOv7kDek9cA:10 a=8nJEP1OIZ-IA:10 a=EBOSESyhAAAA:8 a=8AHkEIZyAAAA:8 a=pJCV8e6cc5sA:10 a=m1wG1k1r-fwP04zWVhMA:9 a=wPNLvfGTeEIA:10 X-AUTH: mrabarnett:2500 Date: Tue, 22 Oct 2013 19:47:01 +0100 From: MRAB User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: python-list@python.org 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 Reply-To: python-list@python.org 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1382467622 news.xs4all.nl 15982 [2001:888:2000:d::a6]:35286 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:57298 On 22/10/2013 19:22, 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? > The real world. :-) So what you're saying is that you generate an AST where there are certain pre-defined operations (primitives?) available?