lexical_analyzer 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lexical_analyzer/version.rb +1 -1
- data/lib/lexical_analyzer.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb89405e18a8a6774cf5e844f27d2f9006e70b79
|
4
|
+
data.tar.gz: b8bc6349e4ecda409ae4234d3968a49575cb0fbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10abdd9d749ff65755199bd82a4fc983efc870398f3c41ddc7f1f3c331361dcfc69d8c7948447932e291b5929298096612e69bc377e7354b3cc1e367db978b83
|
7
|
+
data.tar.gz: c9bef6e94b267ee9342267f03f1eaa1d0f03b474fd1113c88ea6169250996b7b36c2aac69437cd56bc988a859549655bd49286d6e1c211787ca9a68ccff700c0
|
data/lib/lexical_analyzer.rb
CHANGED
@@ -23,8 +23,8 @@ class LexicalAnalyzer
|
|
23
23
|
end
|
24
24
|
|
25
25
|
# Get the next lexical token
|
26
|
-
def get
|
27
|
-
rules.each do |rule|
|
26
|
+
def get(extra=[])
|
27
|
+
(rules + extra).each do |rule|
|
28
28
|
if match_data = text.match(rule[REGEX])
|
29
29
|
@text = match_data.post_match
|
30
30
|
return (rule[BLOCK] || DTB).call(rule[SYMBOL], match_data.to_s) || get
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lexical_analyzer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PeterCamilleri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|