treetop 1.5.3 → 1.6.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/Gemfile +12 -0
- data/History.txt +18 -0
- data/README.md +4 -0
- data/Rakefile +20 -40
- data/Treetop.tmbundle/Preferences/Comments.tmPreferences +28 -0
- data/Treetop.tmbundle/Snippets/grammar ___ end.tmSnippet +20 -0
- data/Treetop.tmbundle/Snippets/rule ___ end.tmSnippet +18 -0
- data/Treetop.tmbundle/Support/nibs/SyntaxTreeViewer.nib/designable.nib +1524 -0
- data/Treetop.tmbundle/Support/nibs/SyntaxTreeViewer.nib/keyedobjects.nib +0 -0
- data/Treetop.tmbundle/Support/syntax_tree_viewer.rb +117 -0
- data/Treetop.tmbundle/Syntaxes/Treetop Grammar.tmLanguage +358 -0
- data/Treetop.tmbundle/info.plist +10 -0
- data/doc/pitfalls_and_advanced_techniques.markdown +7 -1
- data/doc/syntactic_recognition.markdown +7 -2
- data/doc/tt.1 +1 -1
- data/examples/indented_blocks/indented_blocks.tt +73 -0
- data/examples/indented_blocks/indented_blocks_test.rb +24 -0
- data/lib/treetop/compiler/grammar_compiler.rb +6 -3
- data/lib/treetop/compiler/metagrammar.rb +301 -159
- data/lib/treetop/compiler/metagrammar.treetop +96 -13
- data/lib/treetop/compiler/node_classes/anything_symbol.rb +10 -2
- data/lib/treetop/compiler/node_classes/atomic_expression.rb +2 -2
- data/lib/treetop/compiler/node_classes/character_class.rb +10 -2
- data/lib/treetop/compiler/node_classes/choice.rb +11 -7
- data/lib/treetop/compiler/node_classes/nonterminal.rb +6 -2
- data/lib/treetop/compiler/node_classes/parenthesized_expression.rb +5 -1
- data/lib/treetop/compiler/node_classes/parsing_expression.rb +10 -1
- data/lib/treetop/compiler/node_classes/parsing_rule.rb +1 -1
- data/lib/treetop/compiler/node_classes/predicate.rb +8 -1
- data/lib/treetop/compiler/node_classes/predicate_block.rb +7 -0
- data/lib/treetop/compiler/node_classes/repetition.rb +28 -8
- data/lib/treetop/compiler/node_classes/sequence.rb +5 -1
- data/lib/treetop/compiler/node_classes/terminal.rb +36 -22
- data/lib/treetop/compiler/ruby_builder.rb +2 -2
- data/lib/treetop/ruby_extensions/string.rb +0 -6
- data/lib/treetop/runtime/compiled_parser.rb +33 -14
- data/lib/treetop/runtime/syntax_node.rb +24 -15
- data/lib/treetop/runtime/terminal_parse_failure.rb +4 -3
- data/lib/treetop/runtime/terminal_syntax_node.rb +4 -4
- data/lib/treetop/version.rb +2 -2
- data/treetop.gemspec +25 -165
- metadata +43 -98
- data/doc/site.rb +0 -112
- data/doc/sitegen.rb +0 -65
- data/examples/lambda_calculus/lambda_calculus +0 -0
- data/spec/compiler/and_predicate_spec.rb +0 -36
- data/spec/compiler/anything_symbol_spec.rb +0 -44
- data/spec/compiler/character_class_spec.rb +0 -301
- data/spec/compiler/choice_spec.rb +0 -80
- data/spec/compiler/circular_compilation_spec.rb +0 -30
- data/spec/compiler/failure_propagation_functional_spec.rb +0 -21
- data/spec/compiler/grammar_compiler_spec.rb +0 -113
- data/spec/compiler/grammar_spec.rb +0 -41
- data/spec/compiler/multibyte_chars_spec.rb +0 -38
- data/spec/compiler/namespace_spec.rb +0 -42
- data/spec/compiler/nonterminal_symbol_spec.rb +0 -40
- data/spec/compiler/not_predicate_spec.rb +0 -38
- data/spec/compiler/occurrence_range_spec.rb +0 -189
- data/spec/compiler/one_or_more_spec.rb +0 -35
- data/spec/compiler/optional_spec.rb +0 -37
- data/spec/compiler/parenthesized_expression_spec.rb +0 -19
- data/spec/compiler/parsing_rule_spec.rb +0 -61
- data/spec/compiler/repeated_subrule_spec.rb +0 -29
- data/spec/compiler/semantic_predicate_spec.rb +0 -175
- data/spec/compiler/sequence_spec.rb +0 -129
- data/spec/compiler/terminal_spec.rb +0 -170
- data/spec/compiler/terminal_symbol_spec.rb +0 -37
- data/spec/compiler/test_grammar.treetop +0 -7
- data/spec/compiler/test_grammar.tt +0 -7
- data/spec/compiler/test_grammar_do.treetop +0 -7
- data/spec/compiler/test_grammar_magic_coding.treetop +0 -8
- data/spec/compiler/test_grammar_magic_encoding.treetop +0 -8
- data/spec/compiler/tt_compiler_spec.rb +0 -224
- data/spec/compiler/zero_or_more_spec.rb +0 -56
- data/spec/composition/a.treetop +0 -11
- data/spec/composition/b.treetop +0 -11
- data/spec/composition/c.treetop +0 -10
- data/spec/composition/d.treetop +0 -10
- data/spec/composition/f.treetop +0 -17
- data/spec/composition/grammar_composition_spec.rb +0 -40
- data/spec/composition/subfolder/e_includes_c.treetop +0 -15
- data/spec/ruby_extensions/string_spec.rb +0 -32
- data/spec/runtime/compiled_parser_spec.rb +0 -123
- data/spec/runtime/interval_skip_list/delete_spec.rb +0 -147
- data/spec/runtime/interval_skip_list/expire_range_spec.rb +0 -349
- data/spec/runtime/interval_skip_list/insert_and_delete_node_spec.rb +0 -385
- data/spec/runtime/interval_skip_list/insert_spec.rb +0 -660
- data/spec/runtime/interval_skip_list/interval_skip_list_spec.graffle +0 -6175
- data/spec/runtime/interval_skip_list/interval_skip_list_spec.rb +0 -58
- data/spec/runtime/interval_skip_list/palindromic_fixture.rb +0 -35
- data/spec/runtime/interval_skip_list/palindromic_fixture_spec.rb +0 -163
- data/spec/runtime/interval_skip_list/spec_helper.rb +0 -91
- data/spec/runtime/syntax_node_spec.rb +0 -77
- 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
|
-
|
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[
|
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
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
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
|
-
|
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
|
-
|
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
|
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
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
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
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
data/lib/treetop/version.rb
CHANGED
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
|
-
|
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 |
|
8
|
-
|
9
|
-
|
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
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
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
|
|