Git fork

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>

authored by

Adrian Johnson and committed by
Junio C Hamano
39a87a29 2f93541d

+3 -3
+1 -1
t/t4034/ada/expect
··· 4 4 <BOLD>+++ b/post<RESET> 5 5 <CYAN>@@ -1,13 +1,13 @@<RESET> 6 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 8 <RED>a<RESET><GREEN>x<RESET>+<RED>b a<RESET><GREEN>y x<RESET>-<RED>b<RESET> 9 9 <RED>a<RESET><GREEN>y<RESET> 10 10 <GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>/<RED>b<RESET>
+2 -2
userdiff.c
··· 15 15 word_regex "|[^[:space:]]|[\xc0-\xff][\x80-\xbf]+" } 16 16 static struct userdiff_driver builtin_drivers[] = { 17 17 IPATTERN("ada", 18 - "!^(.*[ \t])?(is new|renames|is separate)([ \t].*)?$\n" 18 + "!^(.*[ \t])?(is[ \t]+new|renames|is[ \t]+separate)([ \t].*)?$\n" 19 19 "!^[ \t]*with[ \t].*$\n" 20 20 "^[ \t]*((procedure|function)[ \t]+.*)$\n" 21 21 "^[ \t]*((package|protected|task)[ \t]+.*)$", 22 22 /* -- */ 23 23 "[a-zA-Z][a-zA-Z0-9_]*" 24 - "|[0-9][-+0-9#_.eE]" 24 + "|[-+]?[0-9][0-9#_.aAbBcCdDeEfF]*([eE][+-]?[0-9_]+)?" 25 25 "|=>|\\.\\.|\\*\\*|:=|/=|>=|<=|<<|>>|<>"), 26 26 IPATTERN("fortran", 27 27 "!^([C*]|[ \t]*!)\n"