treetop 1.4.5 → 1.4.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +44 -20
- data/lib/treetop/compiler/metagrammar.rb +126 -33
- data/lib/treetop/compiler/metagrammar.treetop +46 -42
- data/lib/treetop/compiler/node_classes/repetition.rb +39 -5
- data/lib/treetop/version.rb +1 -1
- data/spec/compiler/and_predicate_spec.rb +36 -0
- data/spec/compiler/anything_symbol_spec.rb +44 -0
- data/spec/compiler/character_class_spec.rb +276 -0
- data/spec/compiler/choice_spec.rb +80 -0
- data/spec/compiler/circular_compilation_spec.rb +30 -0
- data/spec/compiler/failure_propagation_functional_spec.rb +21 -0
- data/spec/compiler/grammar_compiler_spec.rb +91 -0
- data/spec/compiler/grammar_spec.rb +41 -0
- data/spec/compiler/multibyte_chars_spec.rb +38 -0
- data/spec/compiler/nonterminal_symbol_spec.rb +40 -0
- data/spec/compiler/not_predicate_spec.rb +38 -0
- data/spec/compiler/occurrence_range_spec.rb +191 -0
- data/spec/compiler/one_or_more_spec.rb +35 -0
- data/spec/compiler/optional_spec.rb +37 -0
- data/spec/compiler/parenthesized_expression_spec.rb +19 -0
- data/spec/compiler/parsing_rule_spec.rb +61 -0
- data/spec/compiler/repeated_subrule_spec.rb +29 -0
- data/spec/compiler/semantic_predicate_spec.rb +175 -0
- data/spec/compiler/sequence_spec.rb +115 -0
- data/spec/compiler/terminal_spec.rb +81 -0
- data/spec/compiler/terminal_symbol_spec.rb +37 -0
- data/spec/compiler/test_grammar.treetop +7 -0
- data/spec/compiler/test_grammar.tt +7 -0
- data/spec/compiler/test_grammar_do.treetop +7 -0
- data/spec/compiler/tt_compiler_spec.rb +215 -0
- data/spec/compiler/zero_or_more_spec.rb +56 -0
- data/spec/composition/a.treetop +11 -0
- data/spec/composition/b.treetop +11 -0
- data/spec/composition/c.treetop +10 -0
- data/spec/composition/d.treetop +10 -0
- data/spec/composition/f.treetop +17 -0
- data/spec/composition/grammar_composition_spec.rb +40 -0
- data/spec/composition/subfolder/e_includes_c.treetop +15 -0
- data/spec/ruby_extensions/string_spec.rb +32 -0
- data/spec/runtime/compiled_parser_spec.rb +101 -0
- data/spec/runtime/interval_skip_list/delete_spec.rb +147 -0
- data/spec/runtime/interval_skip_list/expire_range_spec.rb +349 -0
- data/spec/runtime/interval_skip_list/insert_and_delete_node.rb +385 -0
- data/spec/runtime/interval_skip_list/insert_spec.rb +660 -0
- data/spec/runtime/interval_skip_list/interval_skip_list_spec.graffle +6175 -0
- data/spec/runtime/interval_skip_list/interval_skip_list_spec.rb +58 -0
- data/spec/runtime/interval_skip_list/palindromic_fixture.rb +23 -0
- data/spec/runtime/interval_skip_list/palindromic_fixture_spec.rb +163 -0
- data/spec/runtime/interval_skip_list/spec_helper.rb +84 -0
- data/spec/runtime/syntax_node_spec.rb +77 -0
- data/spec/spec_helper.rb +110 -0
- data/treetop.gemspec +18 -0
- metadata +70 -9
data/treetop.gemspec
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require File.expand_path("../lib/treetop/version", __FILE__)
|
2
|
+
$gemspec = Gem::Specification.new do |s|
|
3
|
+
s.name = "treetop"
|
4
|
+
s.version = Treetop::VERSION::STRING
|
5
|
+
s.author = "Nathan Sobo"
|
6
|
+
s.email = "nathansobo@gmail.com"
|
7
|
+
s.homepage = "http://functionalform.blogspot.com"
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.summary = "A Ruby-based text parsing and interpretation DSL"
|
10
|
+
s.files = ["LICENSE", "README.md", "Rakefile", "treetop.gemspec", "{spec,lib,bin,doc,examples}/**/*"].map{|p| Dir[p]}.flatten
|
11
|
+
s.bindir = "bin"
|
12
|
+
s.executables = ["tt"]
|
13
|
+
s.require_path = "lib"
|
14
|
+
s.autorequire = "treetop"
|
15
|
+
s.has_rdoc = false
|
16
|
+
s.add_dependency "polyglot", ">= 0.3.1"
|
17
|
+
end
|
18
|
+
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: treetop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 4
|
8
|
+
- 7
|
9
|
+
version: 1.4.7
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Nathan Sobo
|
@@ -9,19 +14,24 @@ autorequire: treetop
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-
|
17
|
+
date: 2010-05-28 00:00:00 +10:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: polyglot
|
17
|
-
|
18
|
-
|
19
|
-
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
20
25
|
requirements:
|
21
26
|
- - ">="
|
22
27
|
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
- 3
|
31
|
+
- 1
|
23
32
|
version: 0.3.1
|
24
|
-
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
25
35
|
description:
|
26
36
|
email: nathansobo@gmail.com
|
27
37
|
executables:
|
@@ -34,6 +44,53 @@ files:
|
|
34
44
|
- LICENSE
|
35
45
|
- README.md
|
36
46
|
- Rakefile
|
47
|
+
- treetop.gemspec
|
48
|
+
- spec/compiler/and_predicate_spec.rb
|
49
|
+
- spec/compiler/anything_symbol_spec.rb
|
50
|
+
- spec/compiler/character_class_spec.rb
|
51
|
+
- spec/compiler/choice_spec.rb
|
52
|
+
- spec/compiler/circular_compilation_spec.rb
|
53
|
+
- spec/compiler/failure_propagation_functional_spec.rb
|
54
|
+
- spec/compiler/grammar_compiler_spec.rb
|
55
|
+
- spec/compiler/grammar_spec.rb
|
56
|
+
- spec/compiler/multibyte_chars_spec.rb
|
57
|
+
- spec/compiler/nonterminal_symbol_spec.rb
|
58
|
+
- spec/compiler/not_predicate_spec.rb
|
59
|
+
- spec/compiler/occurrence_range_spec.rb
|
60
|
+
- spec/compiler/one_or_more_spec.rb
|
61
|
+
- spec/compiler/optional_spec.rb
|
62
|
+
- spec/compiler/parenthesized_expression_spec.rb
|
63
|
+
- spec/compiler/parsing_rule_spec.rb
|
64
|
+
- spec/compiler/repeated_subrule_spec.rb
|
65
|
+
- spec/compiler/semantic_predicate_spec.rb
|
66
|
+
- spec/compiler/sequence_spec.rb
|
67
|
+
- spec/compiler/terminal_spec.rb
|
68
|
+
- spec/compiler/terminal_symbol_spec.rb
|
69
|
+
- spec/compiler/test_grammar.treetop
|
70
|
+
- spec/compiler/test_grammar.tt
|
71
|
+
- spec/compiler/test_grammar_do.treetop
|
72
|
+
- spec/compiler/tt_compiler_spec.rb
|
73
|
+
- spec/compiler/zero_or_more_spec.rb
|
74
|
+
- spec/composition/a.treetop
|
75
|
+
- spec/composition/b.treetop
|
76
|
+
- spec/composition/c.treetop
|
77
|
+
- spec/composition/d.treetop
|
78
|
+
- spec/composition/f.treetop
|
79
|
+
- spec/composition/grammar_composition_spec.rb
|
80
|
+
- spec/composition/subfolder/e_includes_c.treetop
|
81
|
+
- spec/ruby_extensions/string_spec.rb
|
82
|
+
- spec/runtime/compiled_parser_spec.rb
|
83
|
+
- spec/runtime/interval_skip_list/delete_spec.rb
|
84
|
+
- spec/runtime/interval_skip_list/expire_range_spec.rb
|
85
|
+
- spec/runtime/interval_skip_list/insert_and_delete_node.rb
|
86
|
+
- spec/runtime/interval_skip_list/insert_spec.rb
|
87
|
+
- spec/runtime/interval_skip_list/interval_skip_list_spec.graffle
|
88
|
+
- spec/runtime/interval_skip_list/interval_skip_list_spec.rb
|
89
|
+
- spec/runtime/interval_skip_list/palindromic_fixture.rb
|
90
|
+
- spec/runtime/interval_skip_list/palindromic_fixture_spec.rb
|
91
|
+
- spec/runtime/interval_skip_list/spec_helper.rb
|
92
|
+
- spec/runtime/syntax_node_spec.rb
|
93
|
+
- spec/spec_helper.rb
|
37
94
|
- lib/treetop/bootstrap_gen_1_metagrammar.rb
|
38
95
|
- lib/treetop/compiler/grammar_compiler.rb
|
39
96
|
- lib/treetop/compiler/lexical_address_space.rb
|
@@ -106,21 +163,25 @@ rdoc_options: []
|
|
106
163
|
require_paths:
|
107
164
|
- lib
|
108
165
|
required_ruby_version: !ruby/object:Gem::Requirement
|
166
|
+
none: false
|
109
167
|
requirements:
|
110
168
|
- - ">="
|
111
169
|
- !ruby/object:Gem::Version
|
170
|
+
segments:
|
171
|
+
- 0
|
112
172
|
version: "0"
|
113
|
-
version:
|
114
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
|
+
none: false
|
115
175
|
requirements:
|
116
176
|
- - ">="
|
117
177
|
- !ruby/object:Gem::Version
|
178
|
+
segments:
|
179
|
+
- 0
|
118
180
|
version: "0"
|
119
|
-
version:
|
120
181
|
requirements: []
|
121
182
|
|
122
183
|
rubyforge_project:
|
123
|
-
rubygems_version: 1.3.
|
184
|
+
rubygems_version: 1.3.7
|
124
185
|
signing_key:
|
125
186
|
specification_version: 3
|
126
187
|
summary: A Ruby-based text parsing and interpretation DSL
|