Skip to content

Evil generation of regular expression test string

License

Notifications You must be signed in to change notification settings

PurdueDualityLab/egret

 
 

Repository files navigation

EGRET

Evil generation of regular expression test strings

Licensing and copying information:

This software is distributed under the GNU General Public License version 3. See the file LICENSE included in this distribution for a copy of this license. If the file is not present, see http://www.gnu.org/licenses/

Dependencies:

EGRET requires Python 3.4 or later (due to using re.fullmatch). Python 2.x versions will not work.

Setup directions:

  1. Execute: cd src

  2. You may need to modify these Makefile variables:
    CXX := g++
    PYTHON := python3
    EXT_PATH := build/lib.linux-x86_64-3.4
    EXT_LIB := egret_ext.cpython-34m.so

The latter two variables refer to the location and name of a library that is created. The library contains C++ code but is used as a Python module. The precise name of the path and library may vary. To find out the name, simply make the project once and then analyze the build subdirectory that is created.

  1. Execute: make

  2. Execute: cd ..

  3. You should see the library (the egret_ext.cpython-34m.so or similar file) in this directory.

Running:

Simply run python3 egret.py. It will prompt for a regular expression and then generate test strings.

The script also some command line options. To see a list, execute: python3 egret.py -h

Acknowledgments:

A portion of EGRET was derived from a RE->NFA converter developed by Eli Bendersky.

Contact Information:

Eric Larson elarson@seattleu.edu

About

Evil generation of regular expression test string

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 83.1%
  • Python 9.7%
  • HTML 3.7%
  • Starlark 2.8%
  • Makefile 0.7%