Path: csiph.com!usenet.pasdenom.info!gegeweb.org!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: Wed, 26 Nov 2014 00:01:29 -0600 Organization: A noiseless patient Spider Lines: 26 Message-ID: <54756CB9.5030607@tundraware.com> References: <54752AF9.70906@tundraware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: mx02.eternal-september.org; posting-host="d887b3e675279b69468e57e74ea1dcb8"; logging-data="23337"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Kybsqr9ub/4CfK9kmDcaeVIlCpVv4ocU=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: Cancel-Lock: sha1:h8sEehYTcqTNof+liyrrZ7Lokqc= Xref: csiph.com comp.lang.python:81546 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/