Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.albasani.net!news.stack.nl!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.031 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'pgp': 0.09; '-tkc': 0.16; 'simplifies': 0.16; 'to:addr:python.list': 0.16; 'to:addr:tim.thechases.com': 0.16; 'to:name:tim chase': 0.16; 'wrote:': 0.18; 'stack': 0.19; 'meant': 0.20; 'seems': 0.21; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'initial': 0.24; 'header :In-Reply-To:1': 0.27; 'to:2**1': 0.27; 'tim': 0.29; 'chase': 0.31; 'problem': 0.35; "can't": 0.35; 'something': 0.35; 'handle': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'that,': 0.38; 'to:addr:python.org': 0.39; 'more': 0.64; 'charset:windows-1252': 0.65; 'state.': 0.95 Date: Wed, 26 Nov 2014 00:01:29 -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: Tim Chase , python-list@python.org Subject: Re: Quotation Ugliness References: <54752AF9.70906@tundraware.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; 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]); Wed, 26 Nov 2014 00:01:30 -0600 (CST) X-TundraWare-MailScanner-Information: Please contact the ISP for more information X-TundraWare-MailScanner-ID: sAQ61Ux0060796 X-TundraWare-MailScanner: Found to be clean X-TundraWare-MailScanner-From: tundra@tundraware.com X-Spam-Status: No 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: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416981702 news.xs4all.nl 2974 [2001:888:2000:d::a6]:53422 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:81544 On 11/25/2014 07:44 PM, Tim Chase wrote: > On 2014-11-25 19:20, Tim Daneliuk wrote: >>> 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 :) > > This seems to directly conflict with your initial request that > >> These may be nested. > > If they can't be nested, then it simplifies the problem immensely. > > -tkc What I meant was that, to handle nesting, the brute force approach is just to just to use a stack to maintain state. -- ---------------------------------------------------------------------------- Tim Daneliuk tundra@tundraware.com PGP Key: http://www.tundraware.com/PGP/