[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: another convert-ly problem
From: |
darius |
Subject: |
Re: another convert-ly problem |
Date: |
Sat, 27 Mar 2004 22:33:01 +0100 |
User-agent: |
Internet Messaging Program (IMP) 3.2 |
>
> Yes it would, but how would you parse a balanced parenthesis
> expression using regular expressions?
>
In theory, it can't be done, as balancing requires context-free
beyond regular grammars. In practice though, specially given the scope
(convert.ly is not meant to be used zillions of times, and if it is
acceptable if it fails in 0.1 % of the cases) one can cheat, and
write the regexps to recognize balanced expressions, up to, say,
7 or 8 levels.
Or is this too crude ?
D.
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/