treetop 1.4.5 → 1.4.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/README.md +44 -20
  2. data/lib/treetop/compiler/metagrammar.rb +126 -33
  3. data/lib/treetop/compiler/metagrammar.treetop +46 -42
  4. data/lib/treetop/compiler/node_classes/repetition.rb +39 -5
  5. data/lib/treetop/version.rb +1 -1
  6. data/spec/compiler/and_predicate_spec.rb +36 -0
  7. data/spec/compiler/anything_symbol_spec.rb +44 -0
  8. data/spec/compiler/character_class_spec.rb +276 -0
  9. data/spec/compiler/choice_spec.rb +80 -0
  10. data/spec/compiler/circular_compilation_spec.rb +30 -0
  11. data/spec/compiler/failure_propagation_functional_spec.rb +21 -0
  12. data/spec/compiler/grammar_compiler_spec.rb +91 -0
  13. data/spec/compiler/grammar_spec.rb +41 -0
  14. data/spec/compiler/multibyte_chars_spec.rb +38 -0
  15. data/spec/compiler/nonterminal_symbol_spec.rb +40 -0
  16. data/spec/compiler/not_predicate_spec.rb +38 -0
  17. data/spec/compiler/occurrence_range_spec.rb +191 -0
  18. data/spec/compiler/one_or_more_spec.rb +35 -0
  19. data/spec/compiler/optional_spec.rb +37 -0
  20. data/spec/compiler/parenthesized_expression_spec.rb +19 -0
  21. data/spec/compiler/parsing_rule_spec.rb +61 -0
  22. data/spec/compiler/repeated_subrule_spec.rb +29 -0
  23. data/spec/compiler/semantic_predicate_spec.rb +175 -0
  24. data/spec/compiler/sequence_spec.rb +115 -0
  25. data/spec/compiler/terminal_spec.rb +81 -0
  26. data/spec/compiler/terminal_symbol_spec.rb +37 -0
  27. data/spec/compiler/test_grammar.treetop +7 -0
  28. data/spec/compiler/test_grammar.tt +7 -0
  29. data/spec/compiler/test_grammar_do.treetop +7 -0
  30. data/spec/compiler/tt_compiler_spec.rb +215 -0
  31. data/spec/compiler/zero_or_more_spec.rb +56 -0
  32. data/spec/composition/a.treetop +11 -0
  33. data/spec/composition/b.treetop +11 -0
  34. data/spec/composition/c.treetop +10 -0
  35. data/spec/composition/d.treetop +10 -0
  36. data/spec/composition/f.treetop +17 -0
  37. data/spec/composition/grammar_composition_spec.rb +40 -0
  38. data/spec/composition/subfolder/e_includes_c.treetop +15 -0
  39. data/spec/ruby_extensions/string_spec.rb +32 -0
  40. data/spec/runtime/compiled_parser_spec.rb +101 -0
  41. data/spec/runtime/interval_skip_list/delete_spec.rb +147 -0
  42. data/spec/runtime/interval_skip_list/expire_range_spec.rb +349 -0
  43. data/spec/runtime/interval_skip_list/insert_and_delete_node.rb +385 -0
  44. data/spec/runtime/interval_skip_list/insert_spec.rb +660 -0
  45. data/spec/runtime/interval_skip_list/interval_skip_list_spec.graffle +6175 -0
  46. data/spec/runtime/interval_skip_list/interval_skip_list_spec.rb +58 -0
  47. data/spec/runtime/interval_skip_list/palindromic_fixture.rb +23 -0
  48. data/spec/runtime/interval_skip_list/palindromic_fixture_spec.rb +163 -0
  49. data/spec/runtime/interval_skip_list/spec_helper.rb +84 -0
  50. data/spec/runtime/syntax_node_spec.rb +77 -0
  51. data/spec/spec_helper.rb +110 -0
  52. data/treetop.gemspec +18 -0
  53. metadata +70 -9
@@ -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
- version: 1.4.5
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-03-29 00:00:00 +11:00
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
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
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
- version:
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.5
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