Re: [PATCH v2] userdiff: update Ada patterns

2014-02-05 Thread Jeff King
On Wed, Feb 05, 2014 at 09:17:47AM -0800, Junio C Hamano wrote: > Adrian Johnson writes: > > >>> - "|[0-9][-+0-9#_.eE]" > >>> + "|[-+]?[0-9][0-9#_.aAbBcCdDeEfF]*([eE][+-]?[0-9_]+)?" > >> > >> This would match a lot wider than what I read you said you wanted to > >> match in your previous mess

Re: [PATCH v2] userdiff: update Ada patterns

2014-02-05 Thread Junio C Hamano
Adrian Johnson writes: >>> -"|[0-9][-+0-9#_.eE]" >>> +"|[-+]?[0-9][0-9#_.aAbBcCdDeEfF]*([eE][+-]?[0-9_]+)?" >> >> This would match a lot wider than what I read you said you wanted to >> match in your previous message. Does "-04##4_3_2Ee-9" count as a >> number, for example, or can we ju

Re: [PATCH v2] userdiff: update Ada patterns

2014-02-05 Thread Adrian Johnson
On 04/02/14 06:30, Junio C Hamano wrote: > Adrian Johnson writes: > >> - Allow extra space in "is new" and "is separate" >> - Fix bug in word regex for numbers >> >> Signed-off-by: Adrian Johnson >> --- >> t/t4034/ada/expect | 2 +- >> userdiff.c | 4 ++-- >> 2 files changed, 3 insertio

Re: [PATCH v2] userdiff: update Ada patterns

2014-02-03 Thread Junio C Hamano
"George Spelvin" writes: > Another point is that Ada doesn't actually include leading + or - > signs in the syntax for "number", but rather makes them unary operators. > This means that spaces are allowed, and whether you want to include them > in the "number" pattern is a judgement call. I tend

Re: [PATCH v2] userdiff: update Ada patterns

2014-02-03 Thread Junio C Hamano
Adrian Johnson writes: > - Allow extra space in "is new" and "is separate" > - Fix bug in word regex for numbers > > Signed-off-by: Adrian Johnson > --- > t/t4034/ada/expect | 2 +- > userdiff.c | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/t/t4034/ada/ex

Re: [PATCH v2] userdiff: update Ada patterns

2014-02-03 Thread George Spelvin
Looking at the grammar at http://www.adahome.com/rm95/rm9x-P.html and http://www.adaic.org/resources/add_content/standards/05rm/html/RM-2-4.html I see the following restrictions apply: - A number must begin and end with a digit. There must be at least one digit on either side of each underscore

[PATCH v2] userdiff: update Ada patterns

2014-02-03 Thread Adrian Johnson
- Allow extra space in "is new" and "is separate" - Fix bug in word regex for numbers Signed-off-by: Adrian Johnson --- t/t4034/ada/expect | 2 +- userdiff.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t4034/ada/expect b/t/t4034/ada/expect index be2376e..a6