This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] ada: Accept escaped '(' in a regular expression '()' group
- From: Samuel Tardieu <sam at rfc1149 dot net>
- To: Arnaud Charlet <charlet at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Emmanuel Briot <briot at adacore dot com>
- Date: Fri, 25 Jul 2008 12:37:26 +0200
- Subject: Re: [PATCH] ada: Accept escaped '(' in a regular expression '()' group
- References: <20080723212247.21C458103@dawn.rfc1149.net> <20080725094549.GA40189@adacore.com>
On 25/07, Arnaud Charlet wrote:
| There is indeed a bug in GNAT.Regexp, and your fix is good.
| However, it seems a bit inefficient because it requires an array the
| size of the string, which I think is unnecessary.
| We only need to check whether the last opening parenthesis was the
| previous character. Nested parenthesis are automatically handled (if
| the one inside is not empty, then the outer one cannot be empty either)
|
| I propose the following patch instead:
Looks fine with me. Arnaud, will you take care of it?