-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
59 lines (52 loc) · 1.87 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from distutils.core import setup
setup(
name="ssfsm",
packages = ['ssfsm'],
version="0.6.0",
author="Mario Wenzel",
author_email="[email protected]",
url="https://github.com/maweki/ssfsm",
description="ssfsm is a constructive library implementing deterministic finite state machines. The fun thing is, that it has a stupidly simple API.",
license="GPL 2.0",
classifiers=[
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.0",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: Education",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
"Topic :: Software Development :: Libraries :: Python Modules"
],
long_description=
"""
ssfsm is a constructive library implementing deterministic finite state machines
(currently only deterministic finite automaton - DFAs).
The fun thing is, that it has a stupidly simple API.Example::
# A DFA that accepts b*a(ab)*
import ssfsm
A = ssfsm.Machine()
A.One['a'] = A.Two
A.One['b'] = A.One
A.Two['ab'] = A.Two # a and b transition
A.Two = True # Set state Two to accepting
A().reset(A.One)
And transitions are done this way::
A('a') # a-Transition
A('ab') # a-Transition followed by b-Transition
bool(A) # is A in an accepting state
Some helpers to make construction even easier so the first example can be written as::
import ssfsm
A = ssfsm.Machine('One')
A().alphabet = 'ab'
A.One['b'] = A.One
A().polyfill(A.Two)
A.Two = True
See https://github.com/maweki/ssfsm for a full guide.
"""
)