treetop 1.5.3 → 1.6.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +5 -13
  2. data/Gemfile +12 -0
  3. data/History.txt +18 -0
  4. data/README.md +4 -0
  5. data/Rakefile +20 -40
  6. data/Treetop.tmbundle/Preferences/Comments.tmPreferences +28 -0
  7. data/Treetop.tmbundle/Snippets/grammar ___ end.tmSnippet +20 -0
  8. data/Treetop.tmbundle/Snippets/rule ___ end.tmSnippet +18 -0
  9. data/Treetop.tmbundle/Support/nibs/SyntaxTreeViewer.nib/designable.nib +1524 -0
  10. data/Treetop.tmbundle/Support/nibs/SyntaxTreeViewer.nib/keyedobjects.nib +0 -0
  11. data/Treetop.tmbundle/Support/syntax_tree_viewer.rb +117 -0
  12. data/Treetop.tmbundle/Syntaxes/Treetop Grammar.tmLanguage +358 -0
  13. data/Treetop.tmbundle/info.plist +10 -0
  14. data/doc/pitfalls_and_advanced_techniques.markdown +7 -1
  15. data/doc/syntactic_recognition.markdown +7 -2
  16. data/doc/tt.1 +1 -1
  17. data/examples/indented_blocks/indented_blocks.tt +73 -0
  18. data/examples/indented_blocks/indented_blocks_test.rb +24 -0
  19. data/lib/treetop/compiler/grammar_compiler.rb +6 -3
  20. data/lib/treetop/compiler/metagrammar.rb +301 -159
  21. data/lib/treetop/compiler/metagrammar.treetop +96 -13
  22. data/lib/treetop/compiler/node_classes/anything_symbol.rb +10 -2
  23. data/lib/treetop/compiler/node_classes/atomic_expression.rb +2 -2
  24. data/lib/treetop/compiler/node_classes/character_class.rb +10 -2
  25. data/lib/treetop/compiler/node_classes/choice.rb +11 -7
  26. data/lib/treetop/compiler/node_classes/nonterminal.rb +6 -2
  27. data/lib/treetop/compiler/node_classes/parenthesized_expression.rb +5 -1
  28. data/lib/treetop/compiler/node_classes/parsing_expression.rb +10 -1
  29. data/lib/treetop/compiler/node_classes/parsing_rule.rb +1 -1
  30. data/lib/treetop/compiler/node_classes/predicate.rb +8 -1
  31. data/lib/treetop/compiler/node_classes/predicate_block.rb +7 -0
  32. data/lib/treetop/compiler/node_classes/repetition.rb +28 -8
  33. data/lib/treetop/compiler/node_classes/sequence.rb +5 -1
  34. data/lib/treetop/compiler/node_classes/terminal.rb +36 -22
  35. data/lib/treetop/compiler/ruby_builder.rb +2 -2
  36. data/lib/treetop/ruby_extensions/string.rb +0 -6
  37. data/lib/treetop/runtime/compiled_parser.rb +33 -14
  38. data/lib/treetop/runtime/syntax_node.rb +24 -15
  39. data/lib/treetop/runtime/terminal_parse_failure.rb +4 -3
  40. data/lib/treetop/runtime/terminal_syntax_node.rb +4 -4
  41. data/lib/treetop/version.rb +2 -2
  42. data/treetop.gemspec +25 -165
  43. metadata +43 -98
  44. data/doc/site.rb +0 -112
  45. data/doc/sitegen.rb +0 -65
  46. data/examples/lambda_calculus/lambda_calculus +0 -0
  47. data/spec/compiler/and_predicate_spec.rb +0 -36
  48. data/spec/compiler/anything_symbol_spec.rb +0 -44
  49. data/spec/compiler/character_class_spec.rb +0 -301
  50. data/spec/compiler/choice_spec.rb +0 -80
  51. data/spec/compiler/circular_compilation_spec.rb +0 -30
  52. data/spec/compiler/failure_propagation_functional_spec.rb +0 -21
  53. data/spec/compiler/grammar_compiler_spec.rb +0 -113
  54. data/spec/compiler/grammar_spec.rb +0 -41
  55. data/spec/compiler/multibyte_chars_spec.rb +0 -38
  56. data/spec/compiler/namespace_spec.rb +0 -42
  57. data/spec/compiler/nonterminal_symbol_spec.rb +0 -40
  58. data/spec/compiler/not_predicate_spec.rb +0 -38
  59. data/spec/compiler/occurrence_range_spec.rb +0 -189
  60. data/spec/compiler/one_or_more_spec.rb +0 -35
  61. data/spec/compiler/optional_spec.rb +0 -37
  62. data/spec/compiler/parenthesized_expression_spec.rb +0 -19
  63. data/spec/compiler/parsing_rule_spec.rb +0 -61
  64. data/spec/compiler/repeated_subrule_spec.rb +0 -29
  65. data/spec/compiler/semantic_predicate_spec.rb +0 -175
  66. data/spec/compiler/sequence_spec.rb +0 -129
  67. data/spec/compiler/terminal_spec.rb +0 -170
  68. data/spec/compiler/terminal_symbol_spec.rb +0 -37
  69. data/spec/compiler/test_grammar.treetop +0 -7
  70. data/spec/compiler/test_grammar.tt +0 -7
  71. data/spec/compiler/test_grammar_do.treetop +0 -7
  72. data/spec/compiler/test_grammar_magic_coding.treetop +0 -8
  73. data/spec/compiler/test_grammar_magic_encoding.treetop +0 -8
  74. data/spec/compiler/tt_compiler_spec.rb +0 -224
  75. data/spec/compiler/zero_or_more_spec.rb +0 -56
  76. data/spec/composition/a.treetop +0 -11
  77. data/spec/composition/b.treetop +0 -11
  78. data/spec/composition/c.treetop +0 -10
  79. data/spec/composition/d.treetop +0 -10
  80. data/spec/composition/f.treetop +0 -17
  81. data/spec/composition/grammar_composition_spec.rb +0 -40
  82. data/spec/composition/subfolder/e_includes_c.treetop +0 -15
  83. data/spec/ruby_extensions/string_spec.rb +0 -32
  84. data/spec/runtime/compiled_parser_spec.rb +0 -123
  85. data/spec/runtime/interval_skip_list/delete_spec.rb +0 -147
  86. data/spec/runtime/interval_skip_list/expire_range_spec.rb +0 -349
  87. data/spec/runtime/interval_skip_list/insert_and_delete_node_spec.rb +0 -385
  88. data/spec/runtime/interval_skip_list/insert_spec.rb +0 -660
  89. data/spec/runtime/interval_skip_list/interval_skip_list_spec.graffle +0 -6175
  90. data/spec/runtime/interval_skip_list/interval_skip_list_spec.rb +0 -58
  91. data/spec/runtime/interval_skip_list/palindromic_fixture.rb +0 -35
  92. data/spec/runtime/interval_skip_list/palindromic_fixture_spec.rb +0 -163
  93. data/spec/runtime/interval_skip_list/spec_helper.rb +0 -91
  94. data/spec/runtime/syntax_node_spec.rb +0 -77
  95. data/spec/spec_helper.rb +0 -115
@@ -17,7 +17,12 @@ module Treetop
17
17
  @index = options[:index] if options[:index]
18
18
  result = send("_nt_#{options[:root] || root}")
19
19
  should_consume_all = options.include?(:consume_all_input) ? options[:consume_all_input] : consume_all_input?
20
- return nil if (should_consume_all && index != input.size)
20
+ if (should_consume_all && index != input.size)
21
+ if index > max_terminal_failure_index # Otherwise the failure is already explained
22
+ terminal_parse_failure('<END OF INPUT>', true)
23
+ end
24
+ return nil
25
+ end
21
26
  return SyntaxNode.new(input, index...(index + 1)) if result == true
22
27
  return result
23
28
  end
@@ -34,22 +39,23 @@ module Treetop
34
39
  @terminal_failures && input.column_of(failure_index)
35
40
  end
36
41
 
42
+ OtherThan = 'something other than '
37
43
  def failure_reason
38
44
  return nil unless (tf = terminal_failures) && tf.size > 0
39
45
  "Expected " +
40
46
  (tf.size == 1 ?
41
- tf[0].expected_string :
42
- "one of #{tf.map{|f| f.expected_string}.uniq*', '}"
47
+ (tf[0].unexpected ? OtherThan : '')+tf[0].expected_string :
48
+ "one of #{tf.map{|f| (f.unexpected ? OtherThan : '')+f.expected_string}.uniq*', '}"
43
49
  ) +
44
50
  " at line #{failure_line}, column #{failure_column} (byte #{failure_index+1})" +
45
- " after #{input[index...failure_index]}"
51
+ (failure_index > 0 ? " after #{input[index...failure_index]}" : '')
46
52
  end
47
53
 
48
54
  def terminal_failures
49
- if @terminal_failures.empty? || @terminal_failures[0].is_a?(TerminalParseFailure)
55
+ if @terminal_failures.empty? || @terminal_failures[-1].is_a?(TerminalParseFailure)
50
56
  @terminal_failures
51
57
  else
52
- @terminal_failures.map! {|tf_ary| TerminalParseFailure.new(*tf_ary) }
58
+ @terminal_failures.map! {|tf_ary| tf_ary.is_a?(TerminalParseFailure) ? tf_ary : TerminalParseFailure.new(*tf_ary) }
53
59
  end
54
60
  end
55
61
 
@@ -69,6 +75,11 @@ module Treetop
69
75
  @max_terminal_failure_index = 0
70
76
  end
71
77
 
78
+ def forget_failures_to_here
79
+ @terminal_failures = []
80
+ @max_terminal_failure_index = -1
81
+ end
82
+
72
83
  def reset_index
73
84
  @index = 0
74
85
  end
@@ -93,26 +104,34 @@ module Treetop
93
104
  end
94
105
 
95
106
  def has_terminal?(terminal, mode, index)
96
- case mode
97
- when :regexp # A Regexp has been passed in, either a character class or a literel regex 'foo'r
98
- (terminal =~ input[index..-1]) == 0 && $&.length
99
- when false # The terminal is a string which must match exactly
107
+ case mode
108
+ when :regexp # A Regexp has been passed in, either a character class or a literel regex 'foo'r
109
+ (terminal =~ input[index..-1]) == 0 && $&.length
110
+ when false # The terminal is a string which must match exactly
100
111
  input[index, terminal.size] == terminal && terminal.size
101
- when :insens # The terminal is a downcased string which must match input downcased
112
+ when :insens # The terminal is a downcased string which must match input downcased
102
113
  input[index, terminal.size].downcase == terminal && terminal.size
103
- when true # Only occurs with old compiled grammars, for character classes
114
+ when true # Only occurs with old compiled grammars, for character classes
104
115
  rx = @regexps[terminal] ||= Regexp.new(terminal)
105
116
  input.index(rx, index) == index && $&.length
106
117
  end
107
118
  end
108
119
 
109
- def terminal_parse_failure(expected_string)
120
+ def terminal_parse_failure(expected_string, unexpected = false)
121
+ if @max_terminal_failure_index == -1
122
+ @max_terminal_failure_index = 0
123
+ return nil
124
+ end
110
125
  return nil if index < max_terminal_failure_index
111
126
  if index > max_terminal_failure_index
112
127
  @max_terminal_failure_index = index
113
128
  @terminal_failures = []
114
129
  end
115
- @terminal_failures << [index, expected_string]
130
+ @terminal_failures << [index, expected_string, unexpected]
131
+ # It's very slow, but this shows the last 5 nested rules:
132
+ # caller.reject{|l| l =~ /`loop'|`block in /}[0..5].reverse.map{|l| l.sub(/[^`]*`_nt_/,'').sub(/'/,'')}
133
+
134
+ terminal_failures
116
135
  return nil
117
136
  end
118
137
  end
@@ -7,7 +7,9 @@ module Treetop
7
7
  def initialize(input, interval, elements = nil)
8
8
  @input = input
9
9
  @interval = interval
10
- @elements = elements
10
+ if (@elements = elements)
11
+ @elements.each { |e| e.equal?(true) or e.parent = self }
12
+ end
11
13
  end
12
14
 
13
15
  def elements
@@ -18,8 +20,8 @@ module Treetop
18
20
  if element == true
19
21
  index = last_element ? last_element.interval.last : interval.first
20
22
  element = SyntaxNode.new(input, index...(index + 1))
23
+ element.parent = self
21
24
  end
22
- element.parent = self
23
25
  last_element = element
24
26
  end
25
27
 
@@ -58,7 +60,7 @@ module Treetop
58
60
  end
59
61
  end
60
62
 
61
- def inspect(indent="")
63
+ def inspect_self(indent="")
62
64
  em = extension_modules
63
65
  interesting_methods = methods-[em.last ? em.last.methods : nil]-self.class.instance_methods
64
66
  im = interesting_methods.size > 0 ? " (#{interesting_methods.join(",")})" : ""
@@ -70,18 +72,25 @@ module Treetop
70
72
  em.map{|m| "+"+m.to_s.sub(/.*:/,'')}*"" +
71
73
  " offset=#{interval.first}" +
72
74
  ", #{tv.inspect}" +
73
- im +
74
- (elements && elements.size > 0 ?
75
- ":" +
76
- (elements||[]).map{|e|
77
- begin
78
- "\n"+e.inspect(indent+" ")
79
- rescue # Defend against inspect not taking a parameter
80
- "\n"+indent+" "+e.inspect
81
- end
82
- }.join("") :
83
- ""
84
- )
75
+ im
76
+ end
77
+
78
+ def inspect_children(indent="")
79
+ return '' unless elements && elements.size > 0
80
+ ":" +
81
+ elements.map do |e|
82
+ begin
83
+ "\n"+e.inspect(indent+" ")
84
+ rescue # Defend against inspect not taking a parameter
85
+ "\n"+indent+" "+e.inspect
86
+ end
87
+ end.
88
+ join("")
89
+ end
90
+
91
+ def inspect(indent="")
92
+ inspect_self(indent) +
93
+ inspect_children(indent)
85
94
  end
86
95
 
87
96
  @@dot_id_counter = 0
@@ -1,15 +1,16 @@
1
1
  module Treetop
2
2
  module Runtime
3
3
  class TerminalParseFailure
4
- attr_reader :index, :expected_string
4
+ attr_reader :index, :expected_string, :unexpected
5
5
 
6
- def initialize(index, expected_string)
6
+ def initialize(index, expected_string, unexpected = false)
7
7
  @index = index
8
8
  @expected_string = expected_string
9
+ @unexpected = unexpected
9
10
  end
10
11
 
11
12
  def to_s
12
- "String matching #{expected_string} expected."
13
+ "String matching #{expected_string} #{@unexpected ? 'not ' : ''}expected."
13
14
  end
14
15
  end
15
16
  end
@@ -7,10 +7,10 @@ module Treetop
7
7
  end
8
8
 
9
9
  def inspect(indent="")
10
- indent+
11
- self.class.to_s.sub(/.*:/,'') +
12
- " offset=#{interval.first}" +
13
- " #{text_value.inspect}"
10
+ indent+
11
+ self.class.to_s.sub(/.*:/,'') +
12
+ " offset=#{interval.first}" +
13
+ " #{text_value.inspect}"
14
14
  end
15
15
  end
16
16
  end
@@ -1,8 +1,8 @@
1
1
  module Treetop #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
- MINOR = 5
5
- TINY = 3
4
+ MINOR = 6
5
+ TINY = 12
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/treetop.gemspec CHANGED
@@ -1,174 +1,34 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
1
  # -*- encoding: utf-8 -*-
5
- # stub: treetop 1.5.3 ruby lib
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'date'
5
+ require 'treetop/version'
6
6
 
7
- Gem::Specification.new do |s|
8
- s.name = "treetop"
9
- s.version = "1.5.3"
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "treetop"
9
+ spec.version = Treetop::VERSION::STRING
10
+ spec.authors = ["Nathan Sobo", "Clifford Heath"]
10
11
 
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.require_paths = ["lib"]
13
- s.authors = ["Nathan Sobo", "Clifford Heath"]
14
- s.autorequire = "treetop"
15
- s.date = "2014-03-21"
16
- s.email = "cliffordheath@gmail.com"
17
- s.executables = ["tt"]
18
- s.extra_rdoc_files = [
12
+ spec.email = "cliffordheath@gmail.com"
13
+ spec.date = Date.today.strftime("%F")
14
+ spec.summary = "A Ruby-based text parsing and interpretation DSL"
15
+ spec.description = "A Parsing Expression Grammar (PEG) Parser generator DSL for Ruby"
16
+ spec.homepage = "https://github.com/cjheath/treetop"
17
+ spec.licenses = ["MIT"]
18
+
19
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec|website|script|\.|benchmark)}) }
20
+ spec.executables = ["tt"]
21
+ spec.require_paths = ["lib"]
22
+ spec.extra_rdoc_files = [
19
23
  "LICENSE",
20
24
  "README.md"
21
25
  ]
22
- s.files = [
23
- "LICENSE",
24
- "README.md",
25
- "Rakefile",
26
- "bin/tt",
27
- "doc/contributing_and_planned_features.markdown",
28
- "doc/grammar_composition.markdown",
29
- "doc/index.markdown",
30
- "doc/pitfalls_and_advanced_techniques.markdown",
31
- "doc/semantic_interpretation.markdown",
32
- "doc/site.rb",
33
- "doc/sitegen.rb",
34
- "doc/syntactic_recognition.markdown",
35
- "doc/tt.1",
36
- "doc/using_in_ruby.markdown",
37
- "examples/lambda_calculus/arithmetic.rb",
38
- "examples/lambda_calculus/arithmetic.treetop",
39
- "examples/lambda_calculus/arithmetic_node_classes.rb",
40
- "examples/lambda_calculus/arithmetic_test.rb",
41
- "examples/lambda_calculus/lambda_calculus",
42
- "examples/lambda_calculus/lambda_calculus.rb",
43
- "examples/lambda_calculus/lambda_calculus.treetop",
44
- "examples/lambda_calculus/lambda_calculus_node_classes.rb",
45
- "examples/lambda_calculus/lambda_calculus_test.rb",
46
- "examples/lambda_calculus/test_helper.rb",
47
- "lib/treetop.rb",
48
- "lib/treetop/bootstrap_gen_1_metagrammar.rb",
49
- "lib/treetop/compiler.rb",
50
- "lib/treetop/compiler/grammar_compiler.rb",
51
- "lib/treetop/compiler/lexical_address_space.rb",
52
- "lib/treetop/compiler/metagrammar.rb",
53
- "lib/treetop/compiler/metagrammar.treetop",
54
- "lib/treetop/compiler/node_classes.rb",
55
- "lib/treetop/compiler/node_classes/anything_symbol.rb",
56
- "lib/treetop/compiler/node_classes/atomic_expression.rb",
57
- "lib/treetop/compiler/node_classes/character_class.rb",
58
- "lib/treetop/compiler/node_classes/choice.rb",
59
- "lib/treetop/compiler/node_classes/declaration_sequence.rb",
60
- "lib/treetop/compiler/node_classes/grammar.rb",
61
- "lib/treetop/compiler/node_classes/inline_module.rb",
62
- "lib/treetop/compiler/node_classes/nonterminal.rb",
63
- "lib/treetop/compiler/node_classes/optional.rb",
64
- "lib/treetop/compiler/node_classes/parenthesized_expression.rb",
65
- "lib/treetop/compiler/node_classes/parsing_expression.rb",
66
- "lib/treetop/compiler/node_classes/parsing_rule.rb",
67
- "lib/treetop/compiler/node_classes/predicate.rb",
68
- "lib/treetop/compiler/node_classes/predicate_block.rb",
69
- "lib/treetop/compiler/node_classes/repetition.rb",
70
- "lib/treetop/compiler/node_classes/sequence.rb",
71
- "lib/treetop/compiler/node_classes/terminal.rb",
72
- "lib/treetop/compiler/node_classes/transient_prefix.rb",
73
- "lib/treetop/compiler/node_classes/treetop_file.rb",
74
- "lib/treetop/compiler/ruby_builder.rb",
75
- "lib/treetop/polyglot.rb",
76
- "lib/treetop/ruby_extensions.rb",
77
- "lib/treetop/ruby_extensions/string.rb",
78
- "lib/treetop/runtime.rb",
79
- "lib/treetop/runtime/compiled_parser.rb",
80
- "lib/treetop/runtime/interval_skip_list.rb",
81
- "lib/treetop/runtime/interval_skip_list/head_node.rb",
82
- "lib/treetop/runtime/interval_skip_list/interval_skip_list.rb",
83
- "lib/treetop/runtime/interval_skip_list/node.rb",
84
- "lib/treetop/runtime/syntax_node.rb",
85
- "lib/treetop/runtime/terminal_parse_failure.rb",
86
- "lib/treetop/runtime/terminal_syntax_node.rb",
87
- "lib/treetop/version.rb",
88
- "spec/compiler/and_predicate_spec.rb",
89
- "spec/compiler/anything_symbol_spec.rb",
90
- "spec/compiler/character_class_spec.rb",
91
- "spec/compiler/choice_spec.rb",
92
- "spec/compiler/circular_compilation_spec.rb",
93
- "spec/compiler/failure_propagation_functional_spec.rb",
94
- "spec/compiler/grammar_compiler_spec.rb",
95
- "spec/compiler/grammar_spec.rb",
96
- "spec/compiler/multibyte_chars_spec.rb",
97
- "spec/compiler/namespace_spec.rb",
98
- "spec/compiler/nonterminal_symbol_spec.rb",
99
- "spec/compiler/not_predicate_spec.rb",
100
- "spec/compiler/occurrence_range_spec.rb",
101
- "spec/compiler/one_or_more_spec.rb",
102
- "spec/compiler/optional_spec.rb",
103
- "spec/compiler/parenthesized_expression_spec.rb",
104
- "spec/compiler/parsing_rule_spec.rb",
105
- "spec/compiler/repeated_subrule_spec.rb",
106
- "spec/compiler/semantic_predicate_spec.rb",
107
- "spec/compiler/sequence_spec.rb",
108
- "spec/compiler/terminal_spec.rb",
109
- "spec/compiler/terminal_symbol_spec.rb",
110
- "spec/compiler/test_grammar.treetop",
111
- "spec/compiler/test_grammar.tt",
112
- "spec/compiler/test_grammar_do.treetop",
113
- "spec/compiler/test_grammar_magic_coding.treetop",
114
- "spec/compiler/test_grammar_magic_encoding.treetop",
115
- "spec/compiler/tt_compiler_spec.rb",
116
- "spec/compiler/zero_or_more_spec.rb",
117
- "spec/composition/a.treetop",
118
- "spec/composition/b.treetop",
119
- "spec/composition/c.treetop",
120
- "spec/composition/d.treetop",
121
- "spec/composition/f.treetop",
122
- "spec/composition/grammar_composition_spec.rb",
123
- "spec/composition/subfolder/e_includes_c.treetop",
124
- "spec/ruby_extensions/string_spec.rb",
125
- "spec/runtime/compiled_parser_spec.rb",
126
- "spec/runtime/interval_skip_list/delete_spec.rb",
127
- "spec/runtime/interval_skip_list/expire_range_spec.rb",
128
- "spec/runtime/interval_skip_list/insert_and_delete_node_spec.rb",
129
- "spec/runtime/interval_skip_list/insert_spec.rb",
130
- "spec/runtime/interval_skip_list/interval_skip_list_spec.graffle",
131
- "spec/runtime/interval_skip_list/interval_skip_list_spec.rb",
132
- "spec/runtime/interval_skip_list/palindromic_fixture.rb",
133
- "spec/runtime/interval_skip_list/palindromic_fixture_spec.rb",
134
- "spec/runtime/interval_skip_list/spec_helper.rb",
135
- "spec/runtime/syntax_node_spec.rb",
136
- "spec/spec_helper.rb",
137
- "treetop.gemspec"
138
- ]
139
- s.homepage = "https://github.com/cjheath/treetop"
140
- s.licenses = ["MIT"]
141
- s.rubygems_version = "2.2.2"
142
- s.summary = "A Ruby-based text parsing and interpretation DSL"
143
-
144
- if s.respond_to? :specification_version then
145
- s.specification_version = 4
146
26
 
147
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
148
- s.add_runtime_dependency(%q<polyglot>, ["~> 0.3"])
149
- s.add_development_dependency(%q<jeweler>, ["~> 2.0"])
150
- s.add_development_dependency(%q<activesupport>, ["~> 4.0"])
151
- s.add_development_dependency(%q<i18n>, ["~> 0.6"])
152
- s.add_development_dependency(%q<rr>, ["~> 1.0"])
153
- s.add_development_dependency(%q<rspec>, ["~> 2"])
154
- s.add_development_dependency(%q<rake>, ["~> 10"])
155
- else
156
- s.add_dependency(%q<polyglot>, ["~> 0.3"])
157
- s.add_dependency(%q<jeweler>, ["~> 2.0"])
158
- s.add_dependency(%q<activesupport>, ["~> 4.0"])
159
- s.add_dependency(%q<i18n>, ["~> 0.6"])
160
- s.add_dependency(%q<rr>, ["~> 1.0"])
161
- s.add_dependency(%q<rspec>, ["~> 2"])
162
- s.add_dependency(%q<rake>, ["~> 10"])
163
- end
164
- else
165
- s.add_dependency(%q<polyglot>, ["~> 0.3"])
166
- s.add_dependency(%q<jeweler>, ["~> 2.0"])
167
- s.add_dependency(%q<activesupport>, ["~> 4.0"])
168
- s.add_dependency(%q<i18n>, ["~> 0.6"])
169
- s.add_dependency(%q<rr>, ["~> 1.0"])
170
- s.add_dependency(%q<rspec>, ["~> 2"])
171
- s.add_dependency(%q<rake>, ["~> 10"])
172
- end
27
+ spec.add_runtime_dependency(%q<polyglot>, ["~> 0.3"])
28
+ spec.add_development_dependency(%q<activesupport>, [">= 4"])
29
+ spec.add_development_dependency(%q<i18n>, ["~> 1.0"])
30
+ spec.add_development_dependency(%q<rr>, ["~> 3.0"])
31
+ spec.add_development_dependency(%q<rspec>, ["~> 3"])
32
+ spec.add_development_dependency(%q<rake>, [">= 11"])
173
33
  end
174
34