oedipus_lex 2.3.1 → 2.3.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: c56dcc885b6ee098fa6e988db8ffd9a423134640
4
- data.tar.gz: 03ee3915b080e450e7ff564842b5c7298dde0672
3
+ metadata.gz: 2d1d4969de9074724f4c4491ba4ed4e11c49625d
4
+ data.tar.gz: db2fff4a5947473754ff79c4b0ea7bce982496d6
5
5
  SHA512:
6
- metadata.gz: a2843b5841203dbc901caded1175e7cdb392e392429f0cdb8723054cd5bb04de9e4351a83e56ba75a5fa43a0144ee50e70a430d4cbbd04d7598370788ae76c64
7
- data.tar.gz: 369ae18943123aca8e0b5d331932747d98c5eb7dee8ff100fab4bfba3e81078e776871237c52fc74055f6b4ccb45e8989b32af31a8dae009abbbae3e10d06eb4
6
+ metadata.gz: 03883e37fc06e56850ded37019c6b500e54d30ee0d455f529d4f5b9fbfe4f31baf053305bd503fa7bbf69ac4bacb11fe0c832128fe1d024d6e7d4c2d7d374f8f
7
+ data.tar.gz: ff54b5cb64e1ca96a20c3a6f094ed925dfb845dba5a6e66de5e73925e24a6c5655fa4cb78d283e46f9bb2649ae2b9361377d891b657ee99c2d2dbc27fec977d1
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/History.rdoc CHANGED
@@ -1,3 +1,9 @@
1
+ === 2.3.2 / 2014-08-06
2
+
3
+ * 1 bug fix:
4
+
5
+ * Increase lineno on nil token. (hashmal)
6
+
1
7
  === 2.3.1 / 2014-06-09
2
8
 
3
9
  * 1 minor enhancement:
data/lib/oedipus_lex.rb CHANGED
@@ -4,7 +4,7 @@ require "erb"
4
4
  require "oedipus_lex.rex"
5
5
 
6
6
  class OedipusLex
7
- VERSION = "2.3.1"
7
+ VERSION = "2.3.2"
8
8
 
9
9
  attr_accessor :class_name
10
10
  attr_accessor :header
@@ -316,13 +316,13 @@ class OedipusLex
316
316
  % starts.each do |s|
317
317
  <%= s %>
318
318
  % end
319
- % if option[:lineno] then
320
- self.lineno += 1 if ss.peek(1) == "\n"
321
- % end
322
319
 
323
320
  token = nil
324
321
 
325
322
  until ss.eos? or token do
323
+ % if option[:lineno] then
324
+ self.lineno += 1 if ss.peek(1) == "\n"
325
+ % end
326
326
  token =
327
327
  case state
328
328
  % all_states.each do |the_states|
@@ -741,4 +741,21 @@ class TestOedipusLex < Minitest::Test
741
741
 
742
742
  assert_lexer_error src, txt, "can not match (:B): 'a'"
743
743
  end
744
+
745
+ def test_incrementing_lineno_on_nil_token
746
+ src = <<-'REX'
747
+ class Calculator
748
+ option
749
+ lineno
750
+ rule
751
+ /\n/
752
+ /a/ { [:A, lineno] }
753
+ end
754
+ REX
755
+
756
+ txt = "\n\na"
757
+ exp = [[:A, 3]]
758
+
759
+ assert_lexer src, txt, exp
760
+ end
744
761
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oedipus_lex
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -29,7 +29,7 @@ cert_chain:
29
29
  Y4evBVezr3SjXz08vPqRO5YRdO3zfeMT8gBjRqZjWJGMZ2lD4XNfrs7eky74CyZw
30
30
  xx3n58i0lQkBE1EpKE0lFu/y
31
31
  -----END CERTIFICATE-----
32
- date: 2014-06-10 00:00:00.000000000 Z
32
+ date: 2014-08-07 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: minitest
@@ -37,14 +37,14 @@ dependencies:
37
37
  requirements:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: '5.3'
40
+ version: '5.4'
41
41
  type: :development
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ~>
46
46
  - !ruby/object:Gem::Version
47
- version: '5.3'
47
+ version: '5.4'
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rdoc
50
50
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file