rlsm 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -0
- data/Manifest.txt +15 -0
- data/README.txt +68 -0
- data/Rakefile +13 -0
- data/bin/rlsm +0 -0
- data/lib/data/monoids.db +0 -0
- data/lib/rlsm/dfa.rb +696 -0
- data/lib/rlsm/exceptions.rb +39 -0
- data/lib/rlsm/mgen.rb +138 -0
- data/lib/rlsm/monkey_patching.rb +126 -0
- data/lib/rlsm/monoid.rb +544 -0
- data/lib/rlsm/monoid_db.rb +123 -0
- data/lib/rlsm/regexp.rb +593 -0
- data/lib/rlsm.rb +39 -0
- data/test/test_rlsm.rb +0 -0
- metadata +90 -0
data/History.txt
ADDED
data/Manifest.txt
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
History.txt
|
2
|
+
Manifest.txt
|
3
|
+
README.txt
|
4
|
+
Rakefile
|
5
|
+
bin/rlsm
|
6
|
+
lib/rlsm.rb
|
7
|
+
lib/data/monoids.db
|
8
|
+
lib/rlsm/monoid.rb
|
9
|
+
lib/rlsm/dfa.rb
|
10
|
+
lib/rlsm/regexp.rb
|
11
|
+
lib/rlsm/monoid_db.rb
|
12
|
+
lib/rlsm/mgen.rb
|
13
|
+
lib/rlsm/monkey_patching.rb
|
14
|
+
lib/rlsm/exceptions.rb
|
15
|
+
test/test_rlsm.rb
|
data/README.txt
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
= rlsm
|
2
|
+
|
3
|
+
http://www.github.com/asmodis/rlsm
|
4
|
+
|
5
|
+
== DESCRIPTION:
|
6
|
+
|
7
|
+
This is a ruby implementation of three concepts:
|
8
|
+
- Deterministic Finite Automata (DFA)
|
9
|
+
- Regular Expressions (in the sense of theoretical computer sience)
|
10
|
+
- Monoids (an algebraic construct)
|
11
|
+
|
12
|
+
|
13
|
+
== FEATURES/PROBLEMS:
|
14
|
+
|
15
|
+
It is possible to convert
|
16
|
+
Monoid -> DFA
|
17
|
+
DFA -> RegExp
|
18
|
+
RegExp -> DFA
|
19
|
+
DFA -> Monoid
|
20
|
+
|
21
|
+
Also it is possible to ask a monoid for some properties.
|
22
|
+
|
23
|
+
== SYNOPSIS:
|
24
|
+
|
25
|
+
require 'rlsm'
|
26
|
+
|
27
|
+
m = RLSM::Monoid.new '012 112 212'
|
28
|
+
m.syntactic? # => true
|
29
|
+
m.isomorph_to?(m) # => true
|
30
|
+
m.commutative? # => false
|
31
|
+
|
32
|
+
== REQUIREMENTS:
|
33
|
+
|
34
|
+
Depends on
|
35
|
+
- sqlite3-ruby
|
36
|
+
|
37
|
+
== INSTALL:
|
38
|
+
|
39
|
+
Hopefully a
|
40
|
+
|
41
|
+
sudo gem install rlsm
|
42
|
+
|
43
|
+
is sufficent.
|
44
|
+
|
45
|
+
== LICENSE:
|
46
|
+
|
47
|
+
(The MIT License)
|
48
|
+
|
49
|
+
Copyright (c) 2008 Gunther Diemant <g.diemant@gmx.net>
|
50
|
+
|
51
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
52
|
+
a copy of this software and associated documentation files (the
|
53
|
+
'Software'), to deal in the Software without restriction, including
|
54
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
55
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
56
|
+
permit persons to whom the Software is furnished to do so, subject to
|
57
|
+
the following conditions:
|
58
|
+
|
59
|
+
The above copyright notice and this permission notice shall be
|
60
|
+
included in all copies or substantial portions of the Software.
|
61
|
+
|
62
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
63
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
64
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
65
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
66
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
67
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
68
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'hoe'
|
5
|
+
require './lib/rlsm.rb'
|
6
|
+
|
7
|
+
Hoe.new('rlsm', RLSM::VERSION) do |p|
|
8
|
+
#p.rubyforge_name = 'rlsm' # if different than lowercase project name
|
9
|
+
p.developer('asmodis', 'g.diemant@gmx.net')
|
10
|
+
p.extra_deps = ['sqlite3-ruby']
|
11
|
+
end
|
12
|
+
|
13
|
+
# vim: syntax=Ruby
|
data/bin/rlsm
ADDED
File without changes
|
data/lib/data/monoids.db
ADDED
Binary file
|