parslet 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.txt +29 -0
- data/README +2 -4
- data/Rakefile +18 -4
- data/example/comments.rb +11 -13
- data/example/documentation.rb +1 -1
- data/example/email_parser.rb +5 -5
- data/example/empty.rb +2 -2
- data/example/erb.rb +6 -3
- data/example/ip_address.rb +2 -2
- data/example/local.rb +34 -0
- data/example/minilisp.rb +2 -2
- data/example/output/comments.out +8 -0
- data/example/output/documentation.err +4 -0
- data/example/output/documentation.out +1 -0
- data/example/output/email_parser.out +2 -0
- data/example/output/empty.err +1 -0
- data/example/output/erb.out +7 -0
- data/example/output/ip_address.out +9 -0
- data/example/output/local.out +3 -0
- data/example/output/minilisp.out +5 -0
- data/example/output/parens.out +8 -0
- data/example/output/readme.out +1 -0
- data/example/output/seasons.out +28 -0
- data/example/output/simple_xml.out +2 -0
- data/example/output/string_parser.out +3 -0
- data/example/parens.rb +1 -3
- data/example/readme.rb +4 -10
- data/example/seasons.rb +2 -1
- data/example/simple_xml.rb +5 -8
- data/example/string_parser.rb +7 -5
- data/lib/parslet.rb +20 -31
- data/lib/parslet/atoms.rb +1 -0
- data/lib/parslet/atoms/base.rb +46 -87
- data/lib/parslet/atoms/dsl.rb +98 -0
- data/lib/parslet/atoms/entity.rb +3 -4
- data/lib/parslet/atoms/lookahead.rb +1 -1
- data/lib/parslet/atoms/re.rb +2 -2
- data/lib/parslet/atoms/str.rb +5 -2
- data/lib/parslet/atoms/transform.rb +75 -0
- data/lib/parslet/atoms/visitor.rb +9 -9
- data/lib/parslet/convenience.rb +3 -3
- data/lib/parslet/export.rb +13 -13
- data/lib/parslet/expression/treetop.rb +2 -2
- data/lib/parslet/parser.rb +55 -1
- data/lib/parslet/rig/rspec.rb +36 -10
- data/lib/parslet/slice.rb +172 -0
- data/lib/parslet/source.rb +72 -83
- data/lib/parslet/source/line_cache.rb +90 -0
- metadata +22 -20
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parslet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 1
|
7
|
-
- 1
|
8
|
-
- 1
|
9
|
-
version: 1.1.1
|
4
|
+
prerelease:
|
5
|
+
version: 1.2.0
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Kaspar Schiess
|
@@ -25,9 +21,6 @@ dependencies:
|
|
25
21
|
requirements:
|
26
22
|
- - ~>
|
27
23
|
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 2
|
30
|
-
- 0
|
31
24
|
version: "2.0"
|
32
25
|
type: :runtime
|
33
26
|
version_requirements: *id001
|
@@ -39,8 +32,6 @@ dependencies:
|
|
39
32
|
requirements:
|
40
33
|
- - ">="
|
41
34
|
- !ruby/object:Gem::Version
|
42
|
-
segments:
|
43
|
-
- 0
|
44
35
|
version: "0"
|
45
36
|
type: :development
|
46
37
|
version_requirements: *id002
|
@@ -52,8 +43,6 @@ dependencies:
|
|
52
43
|
requirements:
|
53
44
|
- - ">="
|
54
45
|
- !ruby/object:Gem::Version
|
55
|
-
segments:
|
56
|
-
- 0
|
57
46
|
version: "0"
|
58
47
|
type: :development
|
59
48
|
version_requirements: *id003
|
@@ -65,8 +54,6 @@ dependencies:
|
|
65
54
|
requirements:
|
66
55
|
- - ">="
|
67
56
|
- !ruby/object:Gem::Version
|
68
|
-
segments:
|
69
|
-
- 0
|
70
57
|
version: "0"
|
71
58
|
type: :development
|
72
59
|
version_requirements: *id004
|
@@ -87,6 +74,7 @@ files:
|
|
87
74
|
- lib/parslet/atoms/alternative.rb
|
88
75
|
- lib/parslet/atoms/base.rb
|
89
76
|
- lib/parslet/atoms/context.rb
|
77
|
+
- lib/parslet/atoms/dsl.rb
|
90
78
|
- lib/parslet/atoms/entity.rb
|
91
79
|
- lib/parslet/atoms/lookahead.rb
|
92
80
|
- lib/parslet/atoms/named.rb
|
@@ -94,6 +82,7 @@ files:
|
|
94
82
|
- lib/parslet/atoms/repetition.rb
|
95
83
|
- lib/parslet/atoms/sequence.rb
|
96
84
|
- lib/parslet/atoms/str.rb
|
85
|
+
- lib/parslet/atoms/transform.rb
|
97
86
|
- lib/parslet/atoms/visitor.rb
|
98
87
|
- lib/parslet/atoms.rb
|
99
88
|
- lib/parslet/convenience.rb
|
@@ -106,6 +95,8 @@ files:
|
|
106
95
|
- lib/parslet/pattern/context.rb
|
107
96
|
- lib/parslet/pattern.rb
|
108
97
|
- lib/parslet/rig/rspec.rb
|
98
|
+
- lib/parslet/slice.rb
|
99
|
+
- lib/parslet/source/line_cache.rb
|
109
100
|
- lib/parslet/source.rb
|
110
101
|
- lib/parslet/transform.rb
|
111
102
|
- lib/parslet.rb
|
@@ -115,7 +106,22 @@ files:
|
|
115
106
|
- example/empty.rb
|
116
107
|
- example/erb.rb
|
117
108
|
- example/ip_address.rb
|
109
|
+
- example/local.rb
|
118
110
|
- example/minilisp.rb
|
111
|
+
- example/output/comments.out
|
112
|
+
- example/output/documentation.err
|
113
|
+
- example/output/documentation.out
|
114
|
+
- example/output/email_parser.out
|
115
|
+
- example/output/empty.err
|
116
|
+
- example/output/erb.out
|
117
|
+
- example/output/ip_address.out
|
118
|
+
- example/output/local.out
|
119
|
+
- example/output/minilisp.out
|
120
|
+
- example/output/parens.out
|
121
|
+
- example/output/readme.out
|
122
|
+
- example/output/seasons.out
|
123
|
+
- example/output/simple_xml.out
|
124
|
+
- example/output/string_parser.out
|
119
125
|
- example/parens.rb
|
120
126
|
- example/readme.rb
|
121
127
|
- example/seasons.rb
|
@@ -138,21 +144,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
138
144
|
requirements:
|
139
145
|
- - ">="
|
140
146
|
- !ruby/object:Gem::Version
|
141
|
-
segments:
|
142
|
-
- 0
|
143
147
|
version: "0"
|
144
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
149
|
none: false
|
146
150
|
requirements:
|
147
151
|
- - ">="
|
148
152
|
- !ruby/object:Gem::Version
|
149
|
-
segments:
|
150
|
-
- 0
|
151
153
|
version: "0"
|
152
154
|
requirements: []
|
153
155
|
|
154
156
|
rubyforge_project:
|
155
|
-
rubygems_version: 1.
|
157
|
+
rubygems_version: 1.5.2
|
156
158
|
signing_key:
|
157
159
|
specification_version: 3
|
158
160
|
summary: Parser construction library with great error reporting in Ruby.
|