From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5980 invoked by alias); 27 Mar 2008 15:23:38 -0000 Received: (qmail 5969 invoked by uid 22791); 27 Mar 2008 15:23:37 -0000 X-Spam-Check-By: sourceware.org Received: from aussmtpmrkpc120.us.dell.com (HELO aussmtpmrkpc120.us.dell.com) (143.166.82.159) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 27 Mar 2008 15:23:10 +0000 X-IronPort-AV: E=Sophos;i="4.25,563,1199685600"; d="scan'208";a="337919885" Received: from unknown (HELO M31.equallogic.com) ([12.110.134.31]) by aussmtpmrkpc120.us.dell.com with SMTP; 27 Mar 2008 10:23:07 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18411.48081.90160.97179@pkoning-laptop.equallogic.com> Date: Thu, 27 Mar 2008 16:49:00 -0000 From: Paul Koning To: jimb@red-bean.com Cc: dje@google.com, tromey@redhat.com, bauerman@br.ibm.com, gdb@sourceware.org Subject: Re: repo to work on python scripting support References: <1205538908.6643.138.camel@localhost.localdomain> <1206369478.29533.15.camel@localhost.localdomain> <20080326180455.GA22644@caradoc.them.org> <8f2776cb0803261544u6e4c9f60u9f3fbde4095e5ec8@mail.gmail.com> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00264.txt.bz2 >>>>> "Jim" == Jim Blandy writes: Jim> What kind of functions for parsing Python does the Python API Jim> export? Is there anything that would, say, parse an expression Jim> as far as it can, and let us know where the expression ends? If Jim> so, we could use that for $(py ), and things Jim> like embedded quotes and parens would just work. I don't see anything to do this in http://docs.python.org/ext/ext.html There are APIs to pass in the Python text, as a string, or as a file -- but it appears that the text is expected to be valid Python code, not Python code optionally followed by something else. Lexically speaking Python is very simple; looking for the closing paren in the proposed syntax wouldn't be a big deal. paul