From: Adrian Johnson Date: Mon, 3 Feb 2014 11:33:16 +0000 (+1030) Subject: userdiff: update Ada patterns X-Git-Tag: v1.9.0-rc3~2^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/39a87a29ce364ed3337e535adce5973731ba2968 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 Signed-off-by: Junio C Hamano --- diff --git a/t/t4034/ada/expect b/t/t4034/ada/expect index be2376e904..a682d288b2 100644 --- a/t/t4034/ada/expect +++ b/t/t4034/ada/expect @@ -4,7 +4,7 @@ +++ b/post @@ -1,13 +1,13 @@ Ada.Text_IO.Put_Line("Hello World!?"); -1 1e-10 16#FE12#E2 3.141_592 'xy' +1 1e-101e10 16#FE12#E2 3.141_592 'xy' ax+b ay x-b ay x*b ay x/b diff --git a/userdiff.c b/userdiff.c index ea43a0306f..10b61ec37d 100644 --- a/userdiff.c +++ b/userdiff.c @@ -15,13 +15,13 @@ static int drivers_alloc; word_regex "|[^[:space:]]|[\xc0-\xff][\x80-\xbf]+" } static struct userdiff_driver builtin_drivers[] = { IPATTERN("ada", - "!^(.*[ \t])?(is new|renames|is separate)([ \t].*)?$\n" + "!^(.*[ \t])?(is[ \t]+new|renames|is[ \t]+separate)([ \t].*)?$\n" "!^[ \t]*with[ \t].*$\n" "^[ \t]*((procedure|function)[ \t]+.*)$\n" "^[ \t]*((package|protected|task)[ \t]+.*)$", /* -- */ "[a-zA-Z][a-zA-Z0-9_]*" - "|[0-9][-+0-9#_.eE]" + "|[-+]?[0-9][0-9#_.aAbBcCdDeEfF]*([eE][+-]?[0-9_]+)?" "|=>|\\.\\.|\\*\\*|:=|/=|>=|<=|<<|>>|<>"), IPATTERN("fortran", "!^([C*]|[ \t]*!)\n"