[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RFC: new changeresyntax builtin
From: |
Gary V. Vaughan |
Subject: |
RFC: new changeresyntax builtin |
Date: |
Wed, 05 Jul 2006 17:45:28 +0100 |
User-agent: |
Thunderbird 1.5.0.2 (X11/20060519) |
I'm thinking of removing epatsubst, eregexp and erenamesyms in HEAD, in
favour of a more flexible and scalable changeresyntax builtin as an
analogue to re_set_syntax in the GNU regex C API.
Rather than implement the full 2 dozen or so RE_CONTEXT_INDEP_ANCHORS
and friends along with a mini-parser to OR together all the relevant
bits, I think just the high level settings might be sufficient, with
the added clarity of being a set of mutually exclusive options.
With that in place, one could do:
changeresyntax(`GNU_AWK')
or:
changeresyntax(`POSIX_EXTENDED')
and to reset to the default (m4-1.4.x patsubst/regexp syntax):
changeresyntax(`EMACS')
or:
changeresyntax()
If a bogus operand is given:
changeresyntax(`meh')
=> stdin:1: m4: ERROR: unknown argument to built-in `changeresyntax';
use one of: AWK, ED, EGREP, EMACS, GNU_AWK, GREP, POSIX_AWK, POSIX_BASIC,
POSIX_EGREP, POSIX_EXTENDED, SED.
This replaces 3 builtins with one more powerful builtin, an obvious
win to my mind :-) Can anyone see a downside to this change?
Cheers,
Gary.
--
Gary V. Vaughan ())_. address@hidden,gnu.org}
Research Scientist ( '/ http://blog.azazil.net
GNU Hacker / )= http://trac.azazil.net/projects/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
signature.asc
Description: OpenPGP digital signature
- RFC: new changeresyntax builtin,
Gary V. Vaughan <=