Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1a.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.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'string.': 0.05; 'literal': 0.09; 'pgp': 0.09; 'cc:addr:python-list': 0.11; 'nesting': 0.16; 'quoted': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'instance,': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'tim': 0.29; 'though.': 0.31; 'agreed': 0.32; 'something': 0.35; 'definition': 0.35; 'pm,': 0.38; 'worry': 0.60; 'more': 0.64; 'to:addr:gmail.com': 0.65 Date: Tue, 25 Nov 2014 19:20:57 -0600 From: Tim Daneliuk User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 Newsgroups: comp.lang.python To: Chris Angelico Subject: Re: Quotation Ugliness References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (ozzie.tundraware.com [75.145.138.73]); Tue, 25 Nov 2014 19:20:57 -0600 (CST) X-TundraWare-MailScanner-Information: Please contact the ISP for more information X-TundraWare-MailScanner-ID: sAQ1KvJI051392 X-TundraWare-MailScanner: Found to be clean X-TundraWare-MailScanner-From: tundra@tundraware.com X-Spam-Status: No Cc: "python-list@python.org" 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: , Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416964870 news.xs4all.nl 2829 [2001:888:2000:d::a6]:51023 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:81535 On 11/25/2014 06:44 PM, Chris Angelico wrote: > You may have issues with your definition of nesting, though. For > instance, what's it mean if you have double-quotes, then a hash? It means that the hash is quoted as part of the literal string. > then the only nesting you need worry about is /* and */, Agreed > hen you find any opener, you seek its corresponding closer, and then special-case /* to count any additional /* and look for a */ for each one */ . That's more or less where I was headed. I just wanted something less brute force :) -- ---------------------------------------------------------------------------- Tim Daneliuk tundra@tundraware.com PGP Key: http://www.tundraware.com/PGP/