Epsilon is a scanner generator.
It converts a sequence of regular expressions into a deterministic finite automaton. The DFA accepts input that matches any of these expressions. Each expression is associated with a token. The generated scanner applies the DFA repeatedly to input text to return a sequence of tokens.
Scanners may be generated for a variety of target languages, including
- Dot (for visualisations)
- Python
Epsilon is currently under heavy development. It is usable, but probably contains bugs. Please log any issues you find.
You need Python 3.6 or later.
Epsilon uses Setuptools.
To build and install:
python3 setup.py build
python3 setup.py install
You may wish to install under your user account instead
python3 setup.py install --user
Please see the epsilon manual.
Contributions are very welcome. Please feel free to submit pull requests.
We use SemVer for versioning. For the versions available, see the tags on this repository.
See the list of authors and contributors who participated in this project.
Unless noted otherwise, this project is licensed under the GPL-3.0 license.
Some files, as marked, are licensed under the UNICODE, INC. LICENSE AGREEMENT.
The DFA construction method is an application of Brzozowski derivatives.
Epsilon was inspired by and directly based on the paper Owens, S., Reppy, J. and Turon, A., 2009. Regular-expression derivatives re-examined. Journal of Functional Programming, 19(2), pp.173-190 .