userdiff: update Ada patterns
- Allow extra space in "is new" and "is separate" - Fix bug in word regex for numbers Signed-off-by: Adrian Johnson <ajohnson@redneon.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Adrian Johnson committed
Feb 3, 2014 at 22:03 UTC
39a87a29ce364ed3337e535adce5973731ba2968
2 files changed
+3
-3
t/t4034/ada/expect
+1
-1
@@ -4,7 +4,7 @@
4
<BOLD>+++ b/post<RESET>
5
<CYAN>@@ -1,13 +1,13 @@<RESET>
6
Ada.Text_IO.Put_Line("Hello World<RED>!<RESET><GREEN>?<RESET>");
7
-1 1e<RED>-<RESET>10 16#FE12#E2 3.141_592 '<RED>x<RESET><GREEN>y<RESET>'
7
+1 <RED>1e-10<RESET><GREEN>1e10<RESET> 16#FE12#E2 3.141_592 '<RED>x<RESET><GREEN>y<RESET>'
8
<RED>a<RESET><GREEN>x<RESET>+<RED>b a<RESET><GREEN>y x<RESET>-<RED>b<RESET>
9
<RED>a<RESET><GREEN>y<RESET>
10
<GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>/<RED>b<RESET>
userdiff.c
+2
-2
@@ -15,13 +15,13 @@ static int drivers_alloc;
15
word_regex "|[^[:space:]]|[\xc0-\xff][\x80-\xbf]+" }
16
static struct userdiff_driver builtin_drivers[] = {
17
IPATTERN("ada",
18
- "!^(.*[ \t])?(is new|renames|is separate)([ \t].*)?$\n"
18
+ "!^(.*[ \t])?(is[ \t]+new|renames|is[ \t]+separate)([ \t].*)?$\n"
19
"!^[ \t]*with[ \t].*$\n"
20
"^[ \t]*((procedure|function)[ \t]+.*)$\n"
21
"^[ \t]*((package|protected|task)[ \t]+.*)$",
22
/* -- */
23
"[a-zA-Z][a-zA-Z0-9_]*"
24
- "|[0-9][-+0-9#_.eE]"
24
+ "|[-+]?[0-9][0-9#_.aAbBcCdDeEfF]*([eE][+-]?[0-9_]+)?"
25
"|=>|\\.\\.|\\*\\*|:=|/=|>=|<=|<<|>>|<>"),
26
IPATTERN("fortran",
27
"!^([C*]|[ \t]*!)\n"