ruby-ll 2.1.2 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 16434fd810b4518d2ac62a33656fd56cc7e1151d
4
- data.tar.gz: f5f5551ab43f5f59bbb2ad53d7ab7d3787637da6
2
+ SHA256:
3
+ metadata.gz: 1d49084634bb74f2dbcb1a7b5879b4dc04834eaa5b8fb9b6320f27bb5b3a163a
4
+ data.tar.gz: 6bb604c577c149786c6786620eb7051ded78c0abbecfaa948dcaa668b276cad8
5
5
  SHA512:
6
- metadata.gz: 7db6cc456057e5831a0f3a4b084178e5a5374f327533b801684dd816b77dd6de609b2d67d84732a9f9b842db6792acfe7a51255bda0232d9b179fc46056e1d90
7
- data.tar.gz: 9ad4abdb38f2ba1ecffca23f45af260e03e83c46f4d610a26bec881228c162a034b94e7c39fbf22a3bad71f330bd7b47cfef72a017b9bdf4a71a218e6b50d380
6
+ metadata.gz: 699326ad786887699f305388f7dca6dab8da10492f4f2dc49f7633cce7a8125c087f78a1a3bc31a8547c916ca51175801090c4eecd852a8a6b790a039af9da8a
7
+ data.tar.gz: 1cbb1b087c2b404b3fc942f148a5c6d9aa0b4289132193cd73a10cef7758e489881733e04e622b49ca4480c878f51955944d287334c2fc2f7e8f79bbad385012
data/README.md CHANGED
@@ -27,20 +27,20 @@ For more information on LL parsing, see
27
27
 
28
28
  ## Requirements
29
29
 
30
- | Ruby | Required | Recommended |
31
- |:---------|:--------------|:------------|
32
- | MRI | >= 1.9.3 | >= 2.1.0 |
33
- | Rubinius | >= 2.2 | >= 2.5.0 |
34
- | JRuby | >= 1.7 | >= 1.7.0 |
35
- | Maglev | Not supported | |
36
- | Topaz | Not supported | |
37
- | mruby | Not supported | |
38
-
39
- For MRI/Rubinius you'll need a C90 compatible compiler such as clang or gcc. For
40
- JRuby you don't need any compilers to be installed as the .jar is packaged with
41
- the Gem itself.
42
-
43
- When hacking on Oga you'll also need to have the following installed:
30
+ | Ruby | Required
31
+ |:---------|:--------------
32
+ | MRI | >= 2.6.0
33
+ | JRuby | >= 9.0
34
+ | Rubinius | Not supported
35
+ | Maglev | Not supported
36
+ | Topaz | Not supported
37
+ | mruby | Not supported
38
+
39
+ For MRI you'll need a C90 compatible compiler such as clang or gcc. For JRuby
40
+ you don't need any compilers to be installed as the .jar is packaged with the
41
+ Gem itself.
42
+
43
+ When hacking on ruby-ll you'll also need to have the following installed:
44
44
 
45
45
  * Ragel 6 for building the grammar lexer
46
46
  * javac for building the JRuby extension
data/ext/c/driver.c CHANGED
@@ -60,13 +60,24 @@ VALUE ll_driver_allocate(VALUE klass)
60
60
  }
61
61
 
62
62
  /**
63
- * Callback function for iterating over every input token and actually parsing
64
- * said input.
63
+ * Callback function for iterating over every input token and parsing it.
64
+ *
65
+ * This function is intended to be used as a block callback for Ruby's
66
+ * `rb_block_call`, and processes a single token per invocation.
65
67
  *
66
68
  * @param token An Array containing the token type as a Symbol and its value.
67
69
  * @param self The Driver instance currently in use.
70
+ * @param argc The number of additional arguments passed to the block.
71
+ * @param argv The array of additional arguments passed to the block.
72
+ * @param block_arg The block argument passed from Ruby (if any).
68
73
  */
69
- VALUE ll_driver_each_token(VALUE token, VALUE self)
74
+ VALUE ll_driver_each_token(
75
+ VALUE token,
76
+ VALUE self,
77
+ int argc,
78
+ const VALUE *argv,
79
+ VALUE block_arg
80
+ )
70
81
  {
71
82
  VALUE method;
72
83
  VALUE action_args;
@@ -326,7 +337,7 @@ VALUE ll_driver_parse(VALUE self)
326
337
  id_each_token,
327
338
  0,
328
339
  NULL,
329
- RUBY_METHOD_FUNC(ll_driver_each_token),
340
+ ll_driver_each_token,
330
341
  self
331
342
  );
332
343
 
@@ -24,7 +24,7 @@ module LL
24
24
  )
25
25
 
26
26
  template = File.read(TEMPLATE)
27
- erb = ERB.new(template, nil, '-').result(context.get_binding)
27
+ erb = ERB.new(template, trim_mode: '-').result(context.get_binding)
28
28
 
29
29
  return erb
30
30
  end
data/lib/ll/lexer.rb CHANGED
@@ -8,7 +8,7 @@ module LL
8
8
  #
9
9
  class Lexer
10
10
 
11
- # line 12 "lib/ll/lexer.rb"
11
+ # line 9 "lib/ll/lexer.rb"
12
12
  class << self
13
13
  attr_accessor :_ll_lexer_trans_keys
14
14
  private :_ll_lexer_trans_keys, :_ll_lexer_trans_keys=
@@ -264,7 +264,7 @@ self.ll_lexer_en_main = 22;
264
264
  _ll_lexer_trans_targs = self.class.send(:_ll_lexer_trans_targs)
265
265
 
266
266
 
267
- # line 268 "lib/ll/lexer.rb"
267
+ # line 263 "lib/ll/lexer.rb"
268
268
  begin
269
269
  testEof = false
270
270
  _slen, _trans, _keys, _inds, _acts, _nacts = nil
@@ -292,7 +292,7 @@ begin
292
292
  begin
293
293
  ts = p
294
294
  end
295
- # line 296 "lib/ll/lexer.rb"
295
+ # line 291 "lib/ll/lexer.rb"
296
296
  end
297
297
  _keys = cs << 1
298
298
  _inds = _ll_lexer_index_offsets[cs]
@@ -503,7 +503,7 @@ te = p+1
503
503
  # line 168 "lib/ll/lexer.rl"
504
504
  begin
505
505
  act = 23; end
506
- # line 507 "lib/ll/lexer.rb"
506
+ # line 502 "lib/ll/lexer.rb"
507
507
  end
508
508
  end
509
509
  end
@@ -513,7 +513,7 @@ act = 23; end
513
513
  # line 1 "NONE"
514
514
  begin
515
515
  ts = nil; end
516
- # line 517 "lib/ll/lexer.rb"
516
+ # line 512 "lib/ll/lexer.rb"
517
517
  end
518
518
 
519
519
  if cs == 0
data/lib/ll/setup.rb CHANGED
@@ -7,6 +7,8 @@ require 'libll'
7
7
 
8
8
  #:nocov:
9
9
  if RUBY_PLATFORM == 'java'
10
+ require 'jruby'
11
+
10
12
  org.libll.Libll.load(JRuby.runtime)
11
13
  end
12
14
  #:nocov:
data/lib/ll/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module LL
2
- VERSION = '2.1.2'
2
+ VERSION = '2.1.4'
3
3
  end # LL
data/ruby-ll.gemspec CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
4
4
  s.name = 'ruby-ll'
5
5
  s.version = LL::VERSION
6
6
  s.authors = ['Yorick Peterse']
7
- s.email = 'yorickpeterse@gmail.com'
7
+ s.email = 'yorick@yorickpeterse.com'
8
8
  s.summary = 'An LL(1) parser generator for Ruby.'
9
9
  s.homepage = 'https://github.com/yorickpeterse/ruby-ll'
10
10
  s.description = s.summary
@@ -31,9 +31,6 @@ Gem::Specification.new do |s|
31
31
  s.extensions = ['ext/c/extconf.rb']
32
32
  end
33
33
 
34
- s.has_rdoc = 'yard'
35
- s.required_ruby_version = '>= 1.9.3'
36
-
37
34
  s.add_dependency 'ast'
38
35
  s.add_dependency 'ansi'
39
36
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-ll
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yorick Peterse
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2015-06-03 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: ast
@@ -137,7 +136,7 @@ dependencies:
137
136
  - !ruby/object:Gem::Version
138
137
  version: '0'
139
138
  description: An LL(1) parser generator for Ruby.
140
- email: yorickpeterse@gmail.com
139
+ email: yorick@yorickpeterse.com
141
140
  executables:
142
141
  - ruby-ll
143
142
  extensions:
@@ -193,7 +192,6 @@ homepage: https://github.com/yorickpeterse/ruby-ll
193
192
  licenses:
194
193
  - MPL-2.0
195
194
  metadata: {}
196
- post_install_message:
197
195
  rdoc_options: []
198
196
  require_paths:
199
197
  - lib
@@ -201,17 +199,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
201
199
  requirements:
202
200
  - - ">="
203
201
  - !ruby/object:Gem::Version
204
- version: 1.9.3
202
+ version: '0'
205
203
  required_rubygems_version: !ruby/object:Gem::Requirement
206
204
  requirements:
207
205
  - - ">="
208
206
  - !ruby/object:Gem::Version
209
207
  version: '0'
210
208
  requirements: []
211
- rubyforge_project:
212
- rubygems_version: 2.4.7
213
- signing_key:
209
+ rubygems_version: 3.6.9
214
210
  specification_version: 4
215
211
  summary: An LL(1) parser generator for Ruby.
216
212
  test_files: []
217
- has_rdoc: yard