[bf28d8]: README.md  Maximize  Restore  History

Download this file

83 lines (68 with data), 3.5 kB

Alternative regular expressions for Scintilla

This is a fork of Scintilla to include other regular expression engines.
You can switch among:

  • PCRE: stable backtracking library
  • [RE2]{RE2]: fast, non-backtracking NFA library
  • TRE: library with approximate (fuzzy) matching
  • ICU: Unicode library
  • Boost.Regex: library that the C++ standard has been based on
  • std::regex: C++ standard library

The built-in regular expression implementation is used by default.

enu RegexImplProperty=SC_REGEX_
val SC_REGEX_DEFAULT=0
val SC_REGEX_PCRE=1
val SC_REGEX_RE2=2
val SC_REGEX_TRE=3
val SC_REGEX_ICU=4
val SC_REGEX_BOOST=5
val SC_REGEX_STD=6
# Set the implementation of regular expressions to be used.
set void SetRegexImpl=4027(int regexImpl,)
# Get the implementation of regular expressions that is used.
get int GetRegexImpl=4028(,)

How to build it

The project is available in the folder vcbuild. Necessary files are built to the
target directory of the solution you added the project to. The original batches
zipsrc and delbin have been updated.

I recommend you placing sources of SciTE next to Scintilla's and the regular
expression libraries and build all using the MS VS solution (.sln file) from SciTE.
You should clone them this way (to the same directory):

hg clone -b regex http://hg.code.sf.net/u/prantl/scintilla scintilla
hg clone -b regex http://hg.code.sf.net/u/prantl/scite scite
hg clone -b vcbuild https://bitbucket.org/prantlf/pcre pcre
hg clone -b vcbuild https://bitbucket.org/prantlf/re2 re2
git clone -b vcbuild https://github.com/prantlf/tre.git tre

If you choose different name than scintilla you'll have to update the solution for
building SciTE. The branch vcbuild contains the vanilla Scintilla with the MS VS
project and no other changes. (Other branches contain additional changes.) Se also the
README.md in the SciTE repository for the building instructions.

Before you start building you'll have to download and compile ICU and Boost. Go to the
parent directory of the folder where you cloned the sources listed above:

  1. Unpack icu4c-49_1_2-src.zip.
  2. Enter the icu\source directory and add MS VS and Cygwin to PATH.
  3. bash runConfigureICU Cygwin/MSVC --disable-shared --enable-static
    --enable-release --disable-debug
  4. make
  5. mv bin/ ../bin; mv lib/ ../lib
  6. bash runConfigureICU Cygwin/MSVC --disable-shared --enable-static
    --disable-release --enable-debug
  7. make
  8. mv bin/ ../bin; mv lib/ ../lib

  9. Unpack boost_1_49_0.7z.

  10. Enter the boost_1_49_0 directory and add MSVC to PATH.
  11. bootstrap
  12. b2 toolset=msvc --with-regex -sICU_PATH=..\icu
    define=U_STATIC_IMPLEMENTATION=1 link=static

See README to learn how to build and use the original Scintilla. You can build this
branch the traditional way too.