A compiler for a regex coprocessor
Very simple!
- clone this repo
- run
pip install -r requirements.txt
to fetch required packages - run re2compiler.py
to feed regular expression you can use several options:
- using cli input (by not providing a file neither specifying
-data
) - using a file
- using the
-data
argument - programmatically by recalling compile from another python script as in example.py
import re2compiler
data = '(a|b)*'
output = re2compiler.compile(data=data)
print(output)
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.