From: andrew cooke <and...@acooke.org>
Date: Tue, 7 Feb 2012 20:09:31 -0300
Local: Tues, Feb 7 2012 6:09 pm
Subject: Re: [LEPL] Re: Nesting and +
thanks + glad it works, andrew On Tue, Feb 07, 2012 at 10:05:53PM -0600, Jelle Herold wrote:
> On 02/07/2012 02:36 PM, andrew cooke wrote: > >ok, i don't know for sure, but just looking at that raises the following huge > >red flag: > >[...] > So just for the record, should anyone be wondering, here is a parser > Cheers! > #! /usr/bin/env python > from lepl import * > class Comment(Node): pass > start = Literal('(*') > # a word is any number of symbols not '(*' or '*)' > nested_comment = Delayed() > parser = nested_comment[1:].get_parse() > print parser("(*bar(*foo(*toz*)meh*)*)")[0] > -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||