automaton-tools-0.1.8
توضیحات
some algorithm implementations for automaton and regular expressions
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | automaton-tools-0.1.8 |
| نام | automaton-tools |
| نسخه کتابخانه | 0.1.8 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | oneengineer |
| ایمیل نویسنده | oneengineer@gmail.com |
| آدرس صفحه اصلی | https://github.com/oneengineer/automaton_tools |
| آدرس اینترنتی | https://pypi.org/project/automaton-tools/ |
| مجوز | - |
# Introduction
This is a simple regular expression program.
It implements NFA to DFA, DFA minimization and automaton visualization.
To enable plotting feature, you may need to install `graphviz`
# Usage
```
from automaton_tools import DFA as MyDFA
myinput = "abc12.+qs{2,}(yui){1,2}?"
dfa = MyDFA.fromRegex(myinput)
# check whether the string matches the pattern from the beginning or not
ismatch = dfa.match("yuiyui")
# plot the transition graph
dfa.drawGraph("dfa")
# it will generate dfa.png file
```
## Known bug
It cannot handle `.` or `\w` properly.
Because they are considered as a special kind of characters.
نیازمندی
| مقدار | نام |
|---|---|
| - | antlr4-python3-runtime |
نحوه نصب
نصب پکیج whl automaton-tools-0.1.8:
pip install automaton-tools-0.1.8.whl
نصب پکیج tar.gz automaton-tools-0.1.8:
pip install automaton-tools-0.1.8.tar.gz