c_lexer 2.5.3.0.0 → 2.6.0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -3
- data/Gemfile.lock +4 -4
- data/README.md +6 -2
- data/c_lexer.gemspec +2 -2
- data/ext/lexer/lexer.c +841 -933
- data/ext/lexer/lexer.rl +7 -9
- data/ext/lexer/literal/literal.h +1 -0
- data/ext/lexer/literal/methods.h +20 -0
- data/lib/c_lexer/version.rb +1 -1
- data/lib/c_lexer.rb +10 -0
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ee1cbb2b777d965067e0f21120d99e03c7fb6ce73aaf76411283b1445a71dfc
|
4
|
+
data.tar.gz: 4c7c9f706829515c94ec98edd2efc81dd112b65628b3f1fb6c5649385c704d12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e85f5811025d2c14d20436a6c684dd0a4f569fd93443a70f0b5d435284ac969cd96d8481ee608ca0cf6f6634831f91063100ac2f422cca245bc8c6ae3a72968
|
7
|
+
data.tar.gz: 59b42e79b0e3fea9fb44237eb7ec68767e86fdcd468faef3fdf0cbf4aa5a249c3d5d4c732f523c29d6b3f4acf5e58396b966d3343e70e30e4a2edef73324acb2
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -3,12 +3,12 @@ PATH
|
|
3
3
|
specs:
|
4
4
|
c_lexer (2.5.3.0.0)
|
5
5
|
ast (~> 2.4.0)
|
6
|
-
parser (= 2.
|
6
|
+
parser (= 2.6.0.0)
|
7
7
|
|
8
8
|
PATH
|
9
9
|
remote: vendor/parser
|
10
10
|
specs:
|
11
|
-
parser (2.
|
11
|
+
parser (2.6.0.0)
|
12
12
|
ast (~> 2.4.0)
|
13
13
|
|
14
14
|
GEM
|
@@ -38,7 +38,7 @@ PLATFORMS
|
|
38
38
|
ruby
|
39
39
|
|
40
40
|
DEPENDENCIES
|
41
|
-
bundler
|
41
|
+
bundler
|
42
42
|
c_lexer!
|
43
43
|
cliver (~> 0.3.2)
|
44
44
|
minitest (~> 5.10)
|
@@ -50,4 +50,4 @@ DEPENDENCIES
|
|
50
50
|
simplecov (~> 0.15.1)
|
51
51
|
|
52
52
|
BUNDLED WITH
|
53
|
-
1.
|
53
|
+
1.17.2
|
data/README.md
CHANGED
@@ -19,9 +19,10 @@ $ gem install c_lexer
|
|
19
19
|
|
20
20
|
`c_lexer` doesn't change any parser classes.
|
21
21
|
|
22
|
-
It provides
|
22
|
+
It provides 3 classes:
|
23
23
|
+ `Parser::CLexer` (C version of the lexer)
|
24
24
|
+ `Parser::Ruby25WithCLexer` (a subclass of `parser/ruby25` that uses `Parser::CLexer` for lexing)
|
25
|
+
+ `Parser::Ruby26WithCLexer` (a subclass of `parser/ruby26` that uses `Parser::CLexer` for lexing)
|
25
26
|
|
26
27
|
If you want `CLexer` to be a default lexer you can use the following patch:
|
27
28
|
|
@@ -35,13 +36,16 @@ module Parser
|
|
35
36
|
remove_const(:Lexer)
|
36
37
|
Lexer = CLexer
|
37
38
|
Lexer::Dedenter = dedenter
|
39
|
+
|
40
|
+
remove_const(:Ruby26)
|
41
|
+
Ruby26 = Ruby26WithCLexer
|
38
42
|
end
|
39
43
|
```
|
40
44
|
|
41
45
|
## Versioning
|
42
46
|
|
43
47
|
`c_lexer` follows versioning of the `parser` gem to avoid confusions like
|
44
|
-
"which version of `c_lexer` should be used with the `parser vX.Y.Z`". For `parser 2.5.1.0` you should use `c_lexer 2.5.1.0`.
|
48
|
+
"which version of `c_lexer` should be used with the `parser vX.Y.Z`". For `parser 2.5.1.0` you should use `c_lexer 2.5.1.0.X`.
|
45
49
|
|
46
50
|
`c_lexer` supports all versions of `parser` starting from `2.5.1.0`
|
47
51
|
|
data/c_lexer.gemspec
CHANGED
@@ -22,9 +22,9 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.extensions = ['ext/lexer/extconf.rb']
|
23
23
|
|
24
24
|
spec.add_dependency 'ast', '~> 2.4.0'
|
25
|
-
spec.add_dependency 'parser', '= 2.
|
25
|
+
spec.add_dependency 'parser', '= 2.6.0.0'
|
26
26
|
|
27
|
-
spec.add_development_dependency 'bundler'
|
27
|
+
spec.add_development_dependency 'bundler'
|
28
28
|
spec.add_development_dependency 'rake', '~> 10.0'
|
29
29
|
spec.add_development_dependency 'rake-compiler', '~> 0.9'
|
30
30
|
|