treetop 1.4.9 → 1.4.10
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +26 -9
- data/doc/semantic_interpretation.markdown +2 -2
- data/doc/site/semantic_interpretation.html +2 -2
- data/doc/site/syntactic_recognition.html +12 -5
- data/doc/syntactic_recognition.markdown +12 -3
- data/lib/treetop/compiler/metagrammar.rb +153 -62
- data/lib/treetop/compiler/metagrammar.treetop +10 -2
- data/lib/treetop/compiler/node_classes/grammar.rb +2 -2
- data/lib/treetop/compiler/node_classes/terminal.rb +2 -2
- data/lib/treetop/version.rb +1 -1
- data/spec/compiler/multibyte_chars_spec.rb +7 -6
- data/spec/compiler/namespace_spec.rb +42 -0
- data/spec/compiler/occurrence_range_spec.rb +0 -2
- data/spec/runtime/interval_skip_list/delete_spec.rb +2 -2
- data/spec/runtime/interval_skip_list/expire_range_spec.rb +3 -3
- data/spec/runtime/interval_skip_list/{insert_and_delete_node.rb → insert_and_delete_node_spec.rb} +13 -13
- data/spec/runtime/interval_skip_list/insert_spec.rb +2 -2
- data/spec/runtime/interval_skip_list/palindromic_fixture.rb +25 -13
- data/spec/runtime/interval_skip_list/palindromic_fixture_spec.rb +2 -2
- data/spec/runtime/interval_skip_list/spec_helper.rb +9 -2
- data/spec/spec_helper.rb +16 -12
- data/treetop.gemspec +184 -16
- metadata +195 -92
- data/lib/treetop/runtime/terminal_parse_failure_debug.rb +0 -21
@@ -2,7 +2,7 @@ module Treetop
|
|
2
2
|
module Compiler
|
3
3
|
grammar Metagrammar
|
4
4
|
rule treetop_file
|
5
|
-
requires:(space? require_statement)* prefix:space? module_or_grammar
|
5
|
+
requires:(space? require_statement)* prefix:space? module_or_grammar suffix:space? {
|
6
6
|
def compile
|
7
7
|
requires.text_value + prefix.text_value + module_or_grammar.compile + suffix.text_value
|
8
8
|
end
|
@@ -13,11 +13,19 @@ module Treetop
|
|
13
13
|
prefix:space? "require" [ \t]+ [^\n\r]+ [\n\r]
|
14
14
|
end
|
15
15
|
|
16
|
+
rule module_or_grammar
|
17
|
+
module_declaration / grammar
|
18
|
+
end
|
19
|
+
|
16
20
|
rule module_declaration
|
17
|
-
prefix:('module' space [A-Z] alphanumeric_char* space) module_contents:(module_declaration / grammar) suffix:(space 'end') {
|
21
|
+
prefix:('module' space name:([A-Z] alphanumeric_char* ('::' [A-Z] alphanumeric_char*)*) space) module_contents:(module_declaration / grammar) suffix:(space 'end') {
|
18
22
|
def compile
|
19
23
|
prefix.text_value + module_contents.compile + suffix.text_value
|
20
24
|
end
|
25
|
+
|
26
|
+
def parser_name
|
27
|
+
prefix.name.text_value+'::'+module_contents.parser_name
|
28
|
+
end
|
21
29
|
}
|
22
30
|
end
|
23
31
|
|
data/lib/treetop/version.rb
CHANGED
@@ -4,21 +4,23 @@
|
|
4
4
|
require 'spec_helper'
|
5
5
|
|
6
6
|
module MultibyteCharsSpec
|
7
|
-
describe "an anything symbol" do
|
7
|
+
describe "an anything symbol", :multibyte => true do
|
8
8
|
testing_expression '.'
|
9
9
|
it "matches an UTF-8 character" do
|
10
10
|
parse_multibyte("ø").should_not be_nil
|
11
11
|
end
|
12
12
|
end
|
13
|
-
|
14
|
-
describe "A character class containing UTF-8 characters" do
|
13
|
+
|
14
|
+
describe "A character class containing UTF-8 characters", :multibyte => true do
|
15
15
|
testing_expression "[æøå]"
|
16
16
|
it "recognizes the UTF-8 characters" do
|
17
17
|
parse_multibyte("ø").should_not be_nil
|
18
18
|
end
|
19
19
|
end
|
20
|
-
|
21
|
-
describe "a character class repetition containing UTF-8 characters mixed with other expressions"
|
20
|
+
|
21
|
+
describe( "a character class repetition containing UTF-8 characters mixed with other expressions",
|
22
|
+
:multibyte => true
|
23
|
+
) do
|
22
24
|
testing_expression '[æøå]+ "a"'
|
23
25
|
it "lazily instantiates a node for the character" do
|
24
26
|
result = parse_multibyte('æøåa')
|
@@ -34,5 +36,4 @@ module MultibyteCharsSpec
|
|
34
36
|
result.elements[1].text_value == "a"
|
35
37
|
end
|
36
38
|
end
|
37
|
-
|
38
39
|
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module NamespaceSpec
|
4
|
+
|
5
|
+
describe "a grammar" do
|
6
|
+
class_eval("module Foo; end")
|
7
|
+
testing_grammar %{
|
8
|
+
module Foo::Bar
|
9
|
+
module Baz
|
10
|
+
grammar Bat
|
11
|
+
rule foo
|
12
|
+
bar / baz
|
13
|
+
end
|
14
|
+
|
15
|
+
rule bar
|
16
|
+
'bar' 'bar'
|
17
|
+
end
|
18
|
+
|
19
|
+
rule baz
|
20
|
+
'baz' 'baz'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
}
|
26
|
+
|
27
|
+
it "parses matching input" do
|
28
|
+
parse('barbar').should_not be_nil
|
29
|
+
parse('bazbaz').should_not be_nil
|
30
|
+
end
|
31
|
+
|
32
|
+
it "mixes in included modules" do
|
33
|
+
foo = self.class.const_get(:Foo)
|
34
|
+
bar = foo.const_get(:Bar)
|
35
|
+
baz = bar.const_get(:Baz)
|
36
|
+
baz.class.should == Module
|
37
|
+
bat = baz.const_get(:Bat)
|
38
|
+
bat.class.should == Module
|
39
|
+
baz.const_get(:BatParser).class.should == Class
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -4,8 +4,8 @@ class IntervalSkipList
|
|
4
4
|
public :insert_node, :delete_node, :head, :nodes
|
5
5
|
end
|
6
6
|
|
7
|
-
describe IntervalSkipList do
|
8
|
-
|
7
|
+
describe IntervalSkipList, :palindromic => true do
|
8
|
+
include PalindromicFixtureSharedContext
|
9
9
|
|
10
10
|
describe " when :c is deleted" do
|
11
11
|
before do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'runtime/interval_skip_list/spec_helper'
|
2
2
|
|
3
|
-
describe IntervalSkipList do
|
4
|
-
|
3
|
+
describe IntervalSkipList, :palindromic => true do
|
4
|
+
include PalindromicFixtureSharedContext
|
5
5
|
|
6
6
|
describe "#overlapping" do
|
7
7
|
it "returns intervals :d, :e, :f, and :g for 7..9" do
|
@@ -137,7 +137,7 @@ describe IntervalSkipList do
|
|
137
137
|
end
|
138
138
|
|
139
139
|
describe "when 4..4 is expired with a length change of 2" do
|
140
|
-
before do
|
140
|
+
before do
|
141
141
|
list.expire(4..4, 2)
|
142
142
|
end
|
143
143
|
|
data/spec/runtime/interval_skip_list/{insert_and_delete_node.rb → insert_and_delete_node_spec.rb}
RENAMED
@@ -1,18 +1,18 @@
|
|
1
|
-
require
|
1
|
+
require 'runtime/interval_skip_list/spec_helper'
|
2
2
|
|
3
|
-
|
3
|
+
shared_examples_for "it is non-empty" do
|
4
4
|
specify "#empty? returns false" do
|
5
5
|
list.should_not be_empty
|
6
6
|
end
|
7
7
|
end
|
8
8
|
|
9
|
-
|
9
|
+
shared_examples_for "#nodes is an array of the three inserted nodes in key order" do
|
10
10
|
specify "#nodes is an array of the three inserted nodes in key order" do
|
11
11
|
list.nodes.should == inserted_nodes.sort_by(&:key)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
-
|
15
|
+
shared_examples_for "it has nil forward pointers" do
|
16
16
|
it "has nil forward pointers" do
|
17
17
|
inserted_node.forward.each do |next_pointer|
|
18
18
|
next_pointer.should be_nil
|
@@ -22,7 +22,7 @@ end
|
|
22
22
|
|
23
23
|
describe IntervalSkipList do
|
24
24
|
attr_reader :list
|
25
|
-
|
25
|
+
|
26
26
|
before do
|
27
27
|
@list = IntervalSkipList.new
|
28
28
|
end
|
@@ -55,14 +55,14 @@ describe IntervalSkipList do
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
-
describe " when 1 has been inserted" do
|
58
|
+
describe " when 1 has been inserted", :deterministic => true do
|
59
59
|
attr_reader :inserted_node, :inserted_nodes
|
60
60
|
|
61
61
|
def expected_node_heights
|
62
62
|
[1]
|
63
63
|
end
|
64
64
|
|
65
|
-
|
65
|
+
include NextNodeHeightIsDeterministicSharedContext
|
66
66
|
|
67
67
|
before do
|
68
68
|
@inserted_node = list.insert_node(1)
|
@@ -115,14 +115,14 @@ describe IntervalSkipList do
|
|
115
115
|
end
|
116
116
|
end
|
117
117
|
|
118
|
-
describe " when 1 and 3 have been inserted in order" do
|
118
|
+
describe " when 1 and 3 have been inserted in order", :deterministic => true do
|
119
119
|
attr_reader :inserted_nodes
|
120
120
|
|
121
121
|
def expected_node_heights
|
122
122
|
[1, 2]
|
123
123
|
end
|
124
124
|
|
125
|
-
|
125
|
+
include NextNodeHeightIsDeterministicSharedContext
|
126
126
|
|
127
127
|
before do
|
128
128
|
@inserted_nodes = []
|
@@ -212,14 +212,14 @@ describe IntervalSkipList do
|
|
212
212
|
end
|
213
213
|
end
|
214
214
|
|
215
|
-
describe " when 1, 3 and 7 have been inserted in order" do
|
215
|
+
describe " when 1, 3 and 7 have been inserted in order", :deterministic => true do
|
216
216
|
attr_reader :inserted_nodes
|
217
217
|
|
218
218
|
def expected_node_heights
|
219
219
|
[1, 2, 1]
|
220
220
|
end
|
221
221
|
|
222
|
-
|
222
|
+
include NextNodeHeightIsDeterministicSharedContext
|
223
223
|
|
224
224
|
before do
|
225
225
|
@inserted_nodes = []
|
@@ -309,14 +309,14 @@ describe IntervalSkipList do
|
|
309
309
|
end
|
310
310
|
end
|
311
311
|
|
312
|
-
describe " when 7, 1 and 3 have been inserted in order" do
|
312
|
+
describe " when 7, 1 and 3 have been inserted in order", :deterministic => true do
|
313
313
|
attr_reader :inserted_nodes
|
314
314
|
|
315
315
|
def expected_node_heights
|
316
316
|
[1, 1, 2]
|
317
317
|
end
|
318
318
|
|
319
|
-
|
319
|
+
include NextNodeHeightIsDeterministicSharedContext
|
320
320
|
|
321
321
|
before do
|
322
322
|
@inserted_nodes = []
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'runtime/interval_skip_list/spec_helper'
|
2
2
|
|
3
|
-
describe IntervalSkipList, " when #next_node_height returns 1, 3, 2, 3, 1 in order" do
|
3
|
+
describe IntervalSkipList, " when #next_node_height returns 1, 3, 2, 3, 1 in order", :deterministic => true do
|
4
4
|
include IntervalSkipListSpecHelper
|
5
5
|
attr_reader :list, :node
|
6
6
|
|
@@ -8,7 +8,7 @@ describe IntervalSkipList, " when #next_node_height returns 1, 3, 2, 3, 1 in ord
|
|
8
8
|
@list = IntervalSkipList.new
|
9
9
|
end
|
10
10
|
|
11
|
-
|
11
|
+
include NextNodeHeightIsDeterministicSharedContext
|
12
12
|
|
13
13
|
def expected_node_heights
|
14
14
|
[1, 3, 2, 3, 1]
|
@@ -1,23 +1,35 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
module PalindromicFixtureSharedContext
|
2
|
+
extend RSpec::Core::SharedContext
|
3
3
|
include IntervalSkipListSpecHelper
|
4
4
|
|
5
|
-
|
5
|
+
attr_reader :list, :node
|
6
|
+
|
7
|
+
def construct_interval_skip_list
|
6
8
|
@list = IntervalSkipList.new
|
7
9
|
end
|
8
10
|
|
9
|
-
it_should_behave_like "#next_node_height is deterministic"
|
10
11
|
def expected_node_heights
|
11
12
|
[3, 2, 1, 3, 1, 2, 3]
|
12
13
|
end
|
13
14
|
|
14
|
-
|
15
|
-
list.insert(1..3, :a)
|
16
|
-
list.insert(1..5, :b)
|
17
|
-
list.insert(1..7, :c)
|
18
|
-
list.insert(1..9, :d)
|
19
|
-
list.insert(1..11, :e)
|
20
|
-
list.insert(1..13, :f)
|
21
|
-
list.insert(5..13, :g)
|
15
|
+
def populate_interval_skip_list
|
16
|
+
@list.insert(1..3, :a)
|
17
|
+
@list.insert(1..5, :b)
|
18
|
+
@list.insert(1..7, :c)
|
19
|
+
@list.insert(1..9, :d)
|
20
|
+
@list.insert(1..11, :e)
|
21
|
+
@list.insert(1..13, :f)
|
22
|
+
@list.insert(5..13, :g)
|
23
|
+
end
|
24
|
+
|
25
|
+
def make_it_determinisitic
|
26
|
+
extend NextNodeHeightIsDeterministicSharedContext # use the method without getting the filter
|
27
|
+
next_node_height_is_deterministic
|
28
|
+
end
|
29
|
+
|
30
|
+
before :each do
|
31
|
+
construct_interval_skip_list
|
32
|
+
make_it_determinisitic
|
33
|
+
populate_interval_skip_list
|
22
34
|
end
|
23
|
-
end
|
35
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'runtime/interval_skip_list/spec_helper'
|
2
2
|
|
3
|
-
describe "The palindromic fixture" do
|
4
|
-
|
3
|
+
describe "The palindromic fixture", :palindromic => true do
|
4
|
+
include PalindromicFixtureSharedContext
|
5
5
|
|
6
6
|
describe " #nodes" do
|
7
7
|
describe "[0]" do
|
@@ -4,8 +4,15 @@ class IntervalSkipList
|
|
4
4
|
public :insert_node, :delete_node, :nodes, :head, :next_node_height
|
5
5
|
end
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
module NextNodeHeightIsDeterministicSharedContext
|
8
|
+
extend RSpec::Core::SharedContext
|
9
|
+
|
10
|
+
before :each do
|
11
|
+
next_node_height_is_deterministic
|
12
|
+
end
|
13
|
+
|
14
|
+
# @todo we call this in one place other than here. cleanup?
|
15
|
+
def next_node_height_is_deterministic
|
9
16
|
node_heights = expected_node_heights.dup
|
10
17
|
stub(list).next_node_height { node_heights.shift }
|
11
18
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,19 +1,15 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'benchmark'
|
3
|
-
require '
|
3
|
+
require 'rspec'
|
4
4
|
require 'polyglot'
|
5
5
|
|
6
6
|
$LOAD_PATH.unshift File.expand_path('../../lib')
|
7
7
|
require 'treetop'
|
8
8
|
include Treetop
|
9
9
|
|
10
|
-
Spec::Runner.configure do |config|
|
11
|
-
config.mock_with :rr
|
12
|
-
end
|
13
|
-
|
14
10
|
module Treetop
|
15
|
-
|
16
|
-
|
11
|
+
module ExampleGroupInstanceMethods
|
12
|
+
module ClassMethods
|
17
13
|
attr_accessor :parser_class_under_test
|
18
14
|
|
19
15
|
def testing_expression(expression_under_test)
|
@@ -27,10 +23,10 @@ module Treetop
|
|
27
23
|
end
|
28
24
|
|
29
25
|
def testing_grammar(grammar_under_test)
|
30
|
-
grammar_node = parse_with_metagrammar(grammar_under_test.strip, :
|
26
|
+
grammar_node = parse_with_metagrammar(grammar_under_test.strip, :module_or_grammar)
|
31
27
|
parser_code = grammar_node.compile
|
32
28
|
class_eval(parser_code)
|
33
|
-
self.parser_class_under_test =
|
29
|
+
self.parser_class_under_test = class_eval(grammar_node.parser_name)
|
34
30
|
end
|
35
31
|
|
36
32
|
def parse_with_metagrammar(input, root)
|
@@ -65,6 +61,11 @@ module Treetop
|
|
65
61
|
|
66
62
|
def parse_multibyte(input, options = {})
|
67
63
|
require 'active_support/all'
|
64
|
+
|
65
|
+
if RUBY_VERSION !~ /^1.9/ && 'NONE' == $KCODE then $KCODE = 'UTF8' end
|
66
|
+
# rspec 1.3 used to do something similar (set it to 'u') that we need
|
67
|
+
# for activerecord multibyte wrapper to kick in (1.8 only? @todo)
|
68
|
+
|
68
69
|
parse(input.mb_chars, options)
|
69
70
|
end
|
70
71
|
|
@@ -95,12 +96,15 @@ module Treetop
|
|
95
96
|
yield
|
96
97
|
end
|
97
98
|
end
|
98
|
-
|
99
|
-
Spec::Example::ExampleGroupFactory.register(:compiler, self)
|
100
|
-
Spec::Example::ExampleGroupFactory.register(:runtime, self)
|
101
99
|
end
|
102
100
|
end
|
103
101
|
|
102
|
+
RSpec.configure do |c|
|
103
|
+
c.mock_with :rr
|
104
|
+
c.extend Treetop::ExampleGroupInstanceMethods::ClassMethods
|
105
|
+
c.include Treetop::ExampleGroupInstanceMethods
|
106
|
+
end
|
107
|
+
|
104
108
|
class Symbol
|
105
109
|
def to_proc
|
106
110
|
lambda do |x|
|
data/treetop.gemspec
CHANGED
@@ -1,18 +1,186 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
s.
|
8
|
-
s.
|
9
|
-
|
10
|
-
s.
|
11
|
-
s.
|
12
|
-
s.
|
13
|
-
s.
|
14
|
-
s.
|
15
|
-
s.
|
16
|
-
s.
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{treetop}
|
8
|
+
s.version = "1.4.10"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = [%q{Nathan Sobo}]
|
12
|
+
s.autorequire = %q{treetop}
|
13
|
+
s.date = %q{2011-07-27}
|
14
|
+
s.email = %q{cliffordheath@gmail.com}
|
15
|
+
s.executables = [%q{tt}]
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"LICENSE",
|
18
|
+
"README.md"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
"LICENSE",
|
22
|
+
"README.md",
|
23
|
+
"Rakefile",
|
24
|
+
"bin/tt",
|
25
|
+
"doc/contributing_and_planned_features.markdown",
|
26
|
+
"doc/grammar_composition.markdown",
|
27
|
+
"doc/index.markdown",
|
28
|
+
"doc/pitfalls_and_advanced_techniques.markdown",
|
29
|
+
"doc/semantic_interpretation.markdown",
|
30
|
+
"doc/site.rb",
|
31
|
+
"doc/site/contribute.html",
|
32
|
+
"doc/site/images/bottom_background.png",
|
33
|
+
"doc/site/images/middle_background.png",
|
34
|
+
"doc/site/images/paren_language_output.png",
|
35
|
+
"doc/site/images/pivotal.gif",
|
36
|
+
"doc/site/images/top_background.png",
|
37
|
+
"doc/site/index.html",
|
38
|
+
"doc/site/pitfalls_and_advanced_techniques.html",
|
39
|
+
"doc/site/robots.txt",
|
40
|
+
"doc/site/screen.css",
|
41
|
+
"doc/site/semantic_interpretation.html",
|
42
|
+
"doc/site/syntactic_recognition.html",
|
43
|
+
"doc/site/using_in_ruby.html",
|
44
|
+
"doc/sitegen.rb",
|
45
|
+
"doc/syntactic_recognition.markdown",
|
46
|
+
"doc/using_in_ruby.markdown",
|
47
|
+
"examples/lambda_calculus/arithmetic.rb",
|
48
|
+
"examples/lambda_calculus/arithmetic.treetop",
|
49
|
+
"examples/lambda_calculus/arithmetic_node_classes.rb",
|
50
|
+
"examples/lambda_calculus/arithmetic_test.rb",
|
51
|
+
"examples/lambda_calculus/lambda_calculus",
|
52
|
+
"examples/lambda_calculus/lambda_calculus.rb",
|
53
|
+
"examples/lambda_calculus/lambda_calculus.treetop",
|
54
|
+
"examples/lambda_calculus/lambda_calculus_node_classes.rb",
|
55
|
+
"examples/lambda_calculus/lambda_calculus_test.rb",
|
56
|
+
"examples/lambda_calculus/test_helper.rb",
|
57
|
+
"lib/treetop.rb",
|
58
|
+
"lib/treetop/bootstrap_gen_1_metagrammar.rb",
|
59
|
+
"lib/treetop/compiler.rb",
|
60
|
+
"lib/treetop/compiler/grammar_compiler.rb",
|
61
|
+
"lib/treetop/compiler/lexical_address_space.rb",
|
62
|
+
"lib/treetop/compiler/metagrammar.rb",
|
63
|
+
"lib/treetop/compiler/metagrammar.treetop",
|
64
|
+
"lib/treetop/compiler/node_classes.rb",
|
65
|
+
"lib/treetop/compiler/node_classes/anything_symbol.rb",
|
66
|
+
"lib/treetop/compiler/node_classes/atomic_expression.rb",
|
67
|
+
"lib/treetop/compiler/node_classes/character_class.rb",
|
68
|
+
"lib/treetop/compiler/node_classes/choice.rb",
|
69
|
+
"lib/treetop/compiler/node_classes/declaration_sequence.rb",
|
70
|
+
"lib/treetop/compiler/node_classes/grammar.rb",
|
71
|
+
"lib/treetop/compiler/node_classes/inline_module.rb",
|
72
|
+
"lib/treetop/compiler/node_classes/nonterminal.rb",
|
73
|
+
"lib/treetop/compiler/node_classes/optional.rb",
|
74
|
+
"lib/treetop/compiler/node_classes/parenthesized_expression.rb",
|
75
|
+
"lib/treetop/compiler/node_classes/parsing_expression.rb",
|
76
|
+
"lib/treetop/compiler/node_classes/parsing_rule.rb",
|
77
|
+
"lib/treetop/compiler/node_classes/predicate.rb",
|
78
|
+
"lib/treetop/compiler/node_classes/predicate_block.rb",
|
79
|
+
"lib/treetop/compiler/node_classes/repetition.rb",
|
80
|
+
"lib/treetop/compiler/node_classes/sequence.rb",
|
81
|
+
"lib/treetop/compiler/node_classes/terminal.rb",
|
82
|
+
"lib/treetop/compiler/node_classes/transient_prefix.rb",
|
83
|
+
"lib/treetop/compiler/node_classes/treetop_file.rb",
|
84
|
+
"lib/treetop/compiler/ruby_builder.rb",
|
85
|
+
"lib/treetop/polyglot.rb",
|
86
|
+
"lib/treetop/ruby_extensions.rb",
|
87
|
+
"lib/treetop/ruby_extensions/string.rb",
|
88
|
+
"lib/treetop/runtime.rb",
|
89
|
+
"lib/treetop/runtime/compiled_parser.rb",
|
90
|
+
"lib/treetop/runtime/interval_skip_list.rb",
|
91
|
+
"lib/treetop/runtime/interval_skip_list/head_node.rb",
|
92
|
+
"lib/treetop/runtime/interval_skip_list/interval_skip_list.rb",
|
93
|
+
"lib/treetop/runtime/interval_skip_list/node.rb",
|
94
|
+
"lib/treetop/runtime/syntax_node.rb",
|
95
|
+
"lib/treetop/runtime/terminal_parse_failure.rb",
|
96
|
+
"lib/treetop/runtime/terminal_syntax_node.rb",
|
97
|
+
"lib/treetop/version.rb",
|
98
|
+
"spec/compiler/and_predicate_spec.rb",
|
99
|
+
"spec/compiler/anything_symbol_spec.rb",
|
100
|
+
"spec/compiler/character_class_spec.rb",
|
101
|
+
"spec/compiler/choice_spec.rb",
|
102
|
+
"spec/compiler/circular_compilation_spec.rb",
|
103
|
+
"spec/compiler/failure_propagation_functional_spec.rb",
|
104
|
+
"spec/compiler/grammar_compiler_spec.rb",
|
105
|
+
"spec/compiler/grammar_spec.rb",
|
106
|
+
"spec/compiler/multibyte_chars_spec.rb",
|
107
|
+
"spec/compiler/namespace_spec.rb",
|
108
|
+
"spec/compiler/nonterminal_symbol_spec.rb",
|
109
|
+
"spec/compiler/not_predicate_spec.rb",
|
110
|
+
"spec/compiler/occurrence_range_spec.rb",
|
111
|
+
"spec/compiler/one_or_more_spec.rb",
|
112
|
+
"spec/compiler/optional_spec.rb",
|
113
|
+
"spec/compiler/parenthesized_expression_spec.rb",
|
114
|
+
"spec/compiler/parsing_rule_spec.rb",
|
115
|
+
"spec/compiler/repeated_subrule_spec.rb",
|
116
|
+
"spec/compiler/semantic_predicate_spec.rb",
|
117
|
+
"spec/compiler/sequence_spec.rb",
|
118
|
+
"spec/compiler/terminal_spec.rb",
|
119
|
+
"spec/compiler/terminal_symbol_spec.rb",
|
120
|
+
"spec/compiler/test_grammar.treetop",
|
121
|
+
"spec/compiler/test_grammar.tt",
|
122
|
+
"spec/compiler/test_grammar_do.treetop",
|
123
|
+
"spec/compiler/tt_compiler_spec.rb",
|
124
|
+
"spec/compiler/zero_or_more_spec.rb",
|
125
|
+
"spec/composition/a.treetop",
|
126
|
+
"spec/composition/b.treetop",
|
127
|
+
"spec/composition/c.treetop",
|
128
|
+
"spec/composition/d.treetop",
|
129
|
+
"spec/composition/f.treetop",
|
130
|
+
"spec/composition/grammar_composition_spec.rb",
|
131
|
+
"spec/composition/subfolder/e_includes_c.treetop",
|
132
|
+
"spec/ruby_extensions/string_spec.rb",
|
133
|
+
"spec/runtime/compiled_parser_spec.rb",
|
134
|
+
"spec/runtime/interval_skip_list/delete_spec.rb",
|
135
|
+
"spec/runtime/interval_skip_list/expire_range_spec.rb",
|
136
|
+
"spec/runtime/interval_skip_list/insert_and_delete_node_spec.rb",
|
137
|
+
"spec/runtime/interval_skip_list/insert_spec.rb",
|
138
|
+
"spec/runtime/interval_skip_list/interval_skip_list_spec.graffle",
|
139
|
+
"spec/runtime/interval_skip_list/interval_skip_list_spec.rb",
|
140
|
+
"spec/runtime/interval_skip_list/palindromic_fixture.rb",
|
141
|
+
"spec/runtime/interval_skip_list/palindromic_fixture_spec.rb",
|
142
|
+
"spec/runtime/interval_skip_list/spec_helper.rb",
|
143
|
+
"spec/runtime/syntax_node_spec.rb",
|
144
|
+
"spec/spec_helper.rb",
|
145
|
+
"treetop.gemspec"
|
146
|
+
]
|
147
|
+
s.homepage = %q{http://functionalform.blogspot.com}
|
148
|
+
s.licenses = [%q{MIT}]
|
149
|
+
s.require_paths = [%q{lib}]
|
150
|
+
s.rubygems_version = %q{1.8.5}
|
151
|
+
s.summary = %q{A Ruby-based text parsing and interpretation DSL}
|
152
|
+
|
153
|
+
if s.respond_to? :specification_version then
|
154
|
+
s.specification_version = 3
|
155
|
+
|
156
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
157
|
+
s.add_runtime_dependency(%q<polyglot>, [">= 0"])
|
158
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
159
|
+
s.add_development_dependency(%q<activesupport>, [">= 0"])
|
160
|
+
s.add_development_dependency(%q<i18n>, ["~> 0.5.0"])
|
161
|
+
s.add_development_dependency(%q<rr>, ["~> 0.10.2"])
|
162
|
+
s.add_development_dependency(%q<rspec>, [">= 2.0.0"])
|
163
|
+
s.add_development_dependency(%q<rake>, [">= 0"])
|
164
|
+
s.add_runtime_dependency(%q<polyglot>, [">= 0.3.1"])
|
165
|
+
else
|
166
|
+
s.add_dependency(%q<polyglot>, [">= 0"])
|
167
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
168
|
+
s.add_dependency(%q<activesupport>, [">= 0"])
|
169
|
+
s.add_dependency(%q<i18n>, ["~> 0.5.0"])
|
170
|
+
s.add_dependency(%q<rr>, ["~> 0.10.2"])
|
171
|
+
s.add_dependency(%q<rspec>, [">= 2.0.0"])
|
172
|
+
s.add_dependency(%q<rake>, [">= 0"])
|
173
|
+
s.add_dependency(%q<polyglot>, [">= 0.3.1"])
|
174
|
+
end
|
175
|
+
else
|
176
|
+
s.add_dependency(%q<polyglot>, [">= 0"])
|
177
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
178
|
+
s.add_dependency(%q<activesupport>, [">= 0"])
|
179
|
+
s.add_dependency(%q<i18n>, ["~> 0.5.0"])
|
180
|
+
s.add_dependency(%q<rr>, ["~> 0.10.2"])
|
181
|
+
s.add_dependency(%q<rspec>, [">= 2.0.0"])
|
182
|
+
s.add_dependency(%q<rake>, [">= 0"])
|
183
|
+
s.add_dependency(%q<polyglot>, [">= 0.3.1"])
|
184
|
+
end
|
17
185
|
end
|
18
186
|
|