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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee15b89d663889db39772853d91bdb4152977d0f
4
- data.tar.gz: 4790044e23aca76c211d3aa4e56d10b585399cb7
3
+ metadata.gz: cb89405e18a8a6774cf5e844f27d2f9006e70b79
4
+ data.tar.gz: b8bc6349e4ecda409ae4234d3968a49575cb0fbc
5
5
  SHA512:
6
- metadata.gz: ddfe76924797cc38c2c05e32f8465795340123d45385aa674e7e706a406eed36d9eecc3e437256af2fed11fb6b8d2e29da19e47bab57d044213185fa3ed269f7
7
- data.tar.gz: b91be335cd609992b2ca23424d39173f26a26b385c984da079cb1a8da6b3d4cd15e0f54affc5d9efa42ae1eb6404359207aaefbf1fe42ed520e90edf11a838a4
6
+ metadata.gz: 10abdd9d749ff65755199bd82a4fc983efc870398f3c41ddc7f1f3c331361dcfc69d8c7948447932e291b5929298096612e69bc377e7354b3cc1e367db978b83
7
+ data.tar.gz: c9bef6e94b267ee9342267f03f1eaa1d0f03b474fd1113c88ea6169250996b7b36c2aac69437cd56bc988a859549655bd49286d6e1c211787ca9a68ccff700c0
@@ -1,3 +1,3 @@
1
1
  class LexicalAnalyzer
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -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.1
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-18 00:00:00.000000000 Z
11
+ date: 2018-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler