pegarus 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/pegarus/ast/grammar.rb +4 -4
- data/lib/pegarus/machine/instructions.rb +3 -1
- data/lib/pegarus/version.rb +1 -1
- data/spec/rbx/tags/matching/evaluator/character_tags.txt +2 -0
- data/spec/rbx/tags/matching/evaluator/choice_tags.txt +2 -0
- data/spec/rbx/tags/matching/evaluator/concatenation_tags.txt +1 -0
- data/spec/rbx/tags/matching/evaluator/if_tags.txt +1 -0
- data/spec/rbx/tags/matching/evaluator/unless_tags.txt +1 -0
- data/spec/rbx/tags/matching/machine/any_tags.txt +3 -0
- data/spec/rbx/tags/matching/machine/character_tags.txt +3 -0
- data/spec/rbx/tags/matching/machine/choice_tags.txt +3 -0
- data/spec/rbx/tags/matching/machine/concatenation_tags.txt +3 -0
- data/spec/rbx/tags/matching/machine/if_tags.txt +3 -0
- data/spec/rbx/tags/matching/machine/unless_tags.txt +3 -0
- data/spec/rbx/tags/matching/rubinius/any_tags.txt +1 -0
- data/spec/rbx/tags/matching/rubinius/character_tags.txt +2 -0
- data/spec/rbx/tags/matching/rubinius/choice_tags.txt +2 -0
- data/spec/rbx/tags/matching/rubinius/concatenation_tags.txt +1 -0
- data/spec/rbx/tags/matching/rubinius/if_tags.txt +1 -0
- data/spec/rbx/tags/matching/rubinius/unless_tags.txt +1 -0
- data/spec/ruby/tags/matching/evaluator/character_tags.txt +2 -0
- data/spec/ruby/tags/matching/evaluator/choice_tags.txt +2 -0
- data/spec/ruby/tags/matching/evaluator/concatenation_tags.txt +1 -0
- data/spec/ruby/tags/matching/evaluator/if_tags.txt +1 -0
- data/spec/ruby/tags/matching/evaluator/unless_tags.txt +1 -0
- data/spec/ruby/tags/matching/machine/any_tags.txt +3 -0
- data/spec/ruby/tags/matching/machine/character_tags.txt +3 -0
- data/spec/ruby/tags/matching/machine/choice_tags.txt +3 -0
- data/spec/ruby/tags/matching/machine/concatenation_tags.txt +3 -0
- data/spec/ruby/tags/matching/machine/if_tags.txt +3 -0
- data/spec/ruby/tags/matching/machine/unless_tags.txt +3 -0
- metadata +30 -2
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ BASE_DIR = File.expand_path('../', __FILE__)
|
|
6
6
|
RUBY = ENV["RUBY"] || "rbx"
|
7
7
|
|
8
8
|
def spec(target)
|
9
|
-
sh("mspec -t #{target} -T -I#{BASE_DIR} spec") { |ok, res| }
|
9
|
+
sh("mspec ci -t #{target} -T -I#{BASE_DIR} spec") { |ok, res| }
|
10
10
|
end
|
11
11
|
|
12
12
|
desc "Run the specs with $RUBY or 'rbx' (default)"
|
data/lib/pegarus/ast/grammar.rb
CHANGED
@@ -25,9 +25,9 @@ module Pegarus
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
def set_variable(name,
|
28
|
+
def set_variable(name, pattern)
|
29
29
|
variable = get_variable name
|
30
|
-
variable.pattern =
|
30
|
+
variable.pattern = pattern
|
31
31
|
variable
|
32
32
|
end
|
33
33
|
|
@@ -46,8 +46,8 @@ module Pegarus
|
|
46
46
|
def method_missing(sym, *args)
|
47
47
|
name = sym.to_s
|
48
48
|
|
49
|
-
if name[-1] == ?=
|
50
|
-
set_variable name[0..-2],
|
49
|
+
if name[-1] == ?= and args.size == 1
|
50
|
+
set_variable name[0..-2], args.first
|
51
51
|
else
|
52
52
|
get_variable name
|
53
53
|
end
|
data/lib/pegarus/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
fails:Concatenation#match returns the index of the character following the matched substring
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:If#match returns the index of the character following the matched substring
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:Unless#match returns the index of the character following the matched substring
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:Any#match returns the index of the character following the matched substring
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:Concatenation#match returns the index of the character following the matched substring
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:If#match returns the index of the character following the matched substring
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:Unless#match returns the index of the character following the matched substring
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:Concatenation#match returns the index of the character following the matched substring
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:If#match returns the index of the character following the matched substring
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:Unless#match returns the index of the character following the matched substring
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 2
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.2.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Brian Ford
|
@@ -71,6 +71,34 @@ files:
|
|
71
71
|
- lib/pegarus/rubinius.rb
|
72
72
|
- lib/pegarus/version.rb
|
73
73
|
- lib/pegarus.rb
|
74
|
+
- spec/rbx/tags/matching/evaluator/character_tags.txt
|
75
|
+
- spec/rbx/tags/matching/evaluator/choice_tags.txt
|
76
|
+
- spec/rbx/tags/matching/evaluator/concatenation_tags.txt
|
77
|
+
- spec/rbx/tags/matching/evaluator/if_tags.txt
|
78
|
+
- spec/rbx/tags/matching/evaluator/unless_tags.txt
|
79
|
+
- spec/rbx/tags/matching/machine/any_tags.txt
|
80
|
+
- spec/rbx/tags/matching/machine/character_tags.txt
|
81
|
+
- spec/rbx/tags/matching/machine/choice_tags.txt
|
82
|
+
- spec/rbx/tags/matching/machine/concatenation_tags.txt
|
83
|
+
- spec/rbx/tags/matching/machine/if_tags.txt
|
84
|
+
- spec/rbx/tags/matching/machine/unless_tags.txt
|
85
|
+
- spec/rbx/tags/matching/rubinius/any_tags.txt
|
86
|
+
- spec/rbx/tags/matching/rubinius/character_tags.txt
|
87
|
+
- spec/rbx/tags/matching/rubinius/choice_tags.txt
|
88
|
+
- spec/rbx/tags/matching/rubinius/concatenation_tags.txt
|
89
|
+
- spec/rbx/tags/matching/rubinius/if_tags.txt
|
90
|
+
- spec/rbx/tags/matching/rubinius/unless_tags.txt
|
91
|
+
- spec/ruby/tags/matching/evaluator/character_tags.txt
|
92
|
+
- spec/ruby/tags/matching/evaluator/choice_tags.txt
|
93
|
+
- spec/ruby/tags/matching/evaluator/concatenation_tags.txt
|
94
|
+
- spec/ruby/tags/matching/evaluator/if_tags.txt
|
95
|
+
- spec/ruby/tags/matching/evaluator/unless_tags.txt
|
96
|
+
- spec/ruby/tags/matching/machine/any_tags.txt
|
97
|
+
- spec/ruby/tags/matching/machine/character_tags.txt
|
98
|
+
- spec/ruby/tags/matching/machine/choice_tags.txt
|
99
|
+
- spec/ruby/tags/matching/machine/concatenation_tags.txt
|
100
|
+
- spec/ruby/tags/matching/machine/if_tags.txt
|
101
|
+
- spec/ruby/tags/matching/machine/unless_tags.txt
|
74
102
|
- spec/ast/choice_spec.rb
|
75
103
|
- spec/ast/concatenation_spec.rb
|
76
104
|
- spec/ast/difference_spec.rb
|