bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

suggested fixes for dfa.c


From: Aharon Robbins
Subject: suggested fixes for dfa.c
Date: Fri, 29 Apr 2011 12:33:23 +0300
User-agent: Heirloom mailx 12.4 7/29/08

Hi.

Upon comparing grep's dfa.c to the development gawk, I suggest the
following fixes.

1. Remove the #ifdef GAWK - upcoming gawk supports \s and \S
2. Move add_utf8_anychar into the MBS_SUPPORT #ifdef.  This latter has
   been reported on the list before - I thought it'd been checked in even.
   :-)

Thanks,

Arnold
-------------------------
--- dfa.c       2011-04-29 12:26:39.000000000 +0300
+++ /home/arnold/Gnu/gawk/gawk.git/dfa.c        2011-04-29 12:28:46.000000000 
+0300
@@ -1336,7 +1369,6 @@
           laststart = 0;
           return lasttok = CSET + charclass_index(ccl);
 
-#ifndef GAWK
         case 's':
         case 'S':
           if (!backslash || (syntax_bits & RE_NO_GNU_OPS))
@@ -1349,7 +1381,6 @@
             notset(ccl);
           laststart = 0;
           return lasttok = CSET + charclass_index(ccl);
-#endif
 
         case 'w':
         case 'W':
@@ -1487,7 +1518,6 @@
       addtok(CAT);
     }
 }
-#endif
 
 static void
 add_utf8_anychar (void)
@@ -1537,6 +1567,7 @@
       addtok (OR);
     }
 }
+#endif
 
 /* The grammar understood by the parser is as follows.
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]