Tuesday, April 12, 2016

Re: RFE: support POSIX standard and developing RE's

Christian Brabandt wrote:
There is https://github.com/vim/vim/issues/99  You might want to check, if this works for you.    
----
    If vim supported posix extended RE's, then, like, say grep,
it could also support Perl RE's, from the PCRE library.  Perl supports
the "/x" to ignore whitespace for readability.  I.e. the author was saying
they wanted to implement some flavor of PCRE's, but really wanted the "/x"
feature, which would have been alot easier to do from Vim's current
feature set.

    If Vim could _at least_ support extended 'RE's, and if it was done
in a modular fashion, then it seems adding other 'RE' engines would be
easier.  Note, I don't know about current benchmarks, but PCRE was the
fastest 'RE' engine out of any of the standard 'RE' engines as well, by
far, the most expressive.  Perl even bent over backwards to implement
Python-RE specific features to make it easy to port Python-RE's along
with all the POSIX RE's.

-----------------------------------------------------------------
BPJ wrote:
There is https://github.com/vim/vim/issues/99
You might want to check, if this works for you.

If I'm not mistaken that's "extended" as in /x,  a different sense from "extended" as in ERE.

i would like to have "extended as in /x" FWIW.
If vim could include the PCRE engine (then you'd have this automatically).
And you are right "/x" is not the same as POSIX extended RE's, but is the
same as PCRE's "/x" switch.



No comments:

Post a Comment