[Python-Dev] Re: Decorators: vertical bar syntax (original) (raw)
David Eppstein eppstein at ics.uci.edu
Tue Aug 10 09:15:35 CEST 2004
- Previous message: [Python-Dev] Re: Decorators: vertical bar syntax
- Next message: [Python-Dev] Re: Decorators: vertical bar syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In article <cf9qla$aer$1 at sea.gmane.org>, "Fredrik Lundh" <fredrik at pythonware.com> wrote:
> I think quoted string recognition in Python is still regular, not > context-free. Anyway, the syntax highlighters in editors that I've used > don't seem to have a problem with it.
shouldn't a simple parenthesis counter suffice? you have to count parens in many cases anyway (e.g. to find function bodies).
I think it would suffice (with some care to ignore parens in comments and strings, and assuming there aren't any mismatches), but counting is not something you can do in a regexp.
-- David Eppstein Computer Science Dept., Univ. of California, Irvine http://www.ics.uci.edu/~eppstein/
- Previous message: [Python-Dev] Re: Decorators: vertical bar syntax
- Next message: [Python-Dev] Re: Decorators: vertical bar syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]