Skip to content

alezapor/regexbackref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A regex matcher that supports backreferences. A backreference makes regular expressions much more powerful formalism for defining not only regular languages. Three algorithms were implemented: the first one uses an LBA approach, the other two are based on memory automata described here by Marcus L. Schmid.

workflow

Prerequisutes

  • You must have CMake version 3.10 or later installed.
  • Boost System and Test Libraries are also needed to run tests.

Build

Go to the directory of the CMake source code tree and create a build directory.

mkdir build
cd build
cmake ..
cmake --build .

Run

Try to use the newly built matcher this way: matcher <algorithm> <regex> <text>
Selecting the algorithm:
0 = simpleTM
1 = simpleMemory
2 = avdMemory

Example with backreferences

matcher 1 "X{a*+b*}X*" "aabbbb" 

Tests

To run some final tests use ctest -C Debug from the binary directory.

About

A regex matcher supporting backreferences

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published