Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Tim Daneliuk Newsgroups: comp.lang.python Subject: Re: Quotation Ugliness Date: Tue, 25 Nov 2014 19:20:57 -0600 Organization: A noiseless patient Spider Lines: 22 Message-ID: <54752AF9.70906@tundraware.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: mx02.eternal-september.org; posting-host="d887b3e675279b69468e57e74ea1dcb8"; logging-data="12685"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19G2W9vTOd1aZvo/s9aZFXzQR36ITnPSXs=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: Cancel-Lock: sha1:dWYVkLArNFmOP0kRxdP8RZPX6Vk= Xref: csiph.com comp.lang.python:81537 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/