From d206e058e9f71d7f79bd995bceb1624f1b5cb546 Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Wed, 6 Oct 1999 01:13:21 +0000 Subject: make egrep == grep -E. Bugfixes Accept a patch from Paul to make egrep == grep -E. added new tests * NEWS: egrep is now equivalent to `grep -E'. The lower bound of an interval is not optional. You can specify a matcher multiple types without error. -u and -U are now allowed on non-DOS hosts, and have no effect. * doc/grep.texi: Likewise. * doc/grep.1: Likewise. Fix some troff bugs that prevented `groff' from rendering the page. * src/egrepmat.c, src/fgrepmat.c, src/grepmat.c (default_matcher): Remove. (matcher): Add. * src/grep.h (default_matcher): Remove. (matcher): Now exported from ?grepmat.c, not grep.c. * src/dfa.c (lex): If { would start an invalid interval specification, * src/grep.c (short_options): New constant. (long_options, main): -u and -U are now supported on Unix, with no effect. (matcher): Removed; now defined by ?grepmat.c. (install_matcher): Renamed from setmatcher. (setmatcher): New function. (usage): Report new, more uniform option scheme. (main): Do not initialize matcher; ?grepmat.c now does this. Rely on setmatcher to catch matcher conflicts. Default matcher is "grep". * src/search.c (matchers): Remove "posix-egrep" matcher; no longer needed. (Ecompile): Likewise. The egrep matcher now has POSIX behavior. * tests/bre.tests: grep '\{' is no longer an error. Fix test for interval too large, and enable it. * tests/ere.tests: grep -E {1 is no longer an error Likewise for a{1, a{1a, a{1a}, a{1,x}. --- tests/bre.tests | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/bre.tests') diff --git a/tests/bre.tests b/tests/bre.tests index a896377e..1ed159da 100644 --- a/tests/bre.tests +++ b/tests/bre.tests @@ -17,7 +17,7 @@ 2@\(\{1\}a\)@BADRPT@TO CORRECT 0@^*@* 2@^\{1\}@BADRPT@TO CORRECT -2@\{@BADRPT +0@\{@{ 1@a\(b*\)c\1d@abbcbd 1@a\(b*\)c\1d@abbcbbbd 1@^\(.\)\1@abc @@ -46,7 +46,7 @@ 2@a\{,\}@BADBR 2@a\{1,x\}@BADBR 2@a\{1,x@EBRACE -2@a\{300\}@BADBR@TO CORRECT +2@a\{32768\}@BADBR 2@a\{1,0\}@BADBR 0@ab\{0,0\}c@abcac 0@ab\{0,1\}c@abcac -- cgit v1.2.1