racc 1.4.12-java → 1.4.13-java

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: b64b7450f28cdca4e407bd597d64e6a8b635e5f3
4
- data.tar.gz: 5faf2ea06a588cc579f9339cdf299b29357af6cc
3
+ metadata.gz: b4fc725ef77f34fbb5b4dccd7f231a842b8bfd7c
4
+ data.tar.gz: 685f8318b917162f0a07beac64ebd41960d78203
5
5
  SHA512:
6
- metadata.gz: 8a416cc7f06502eeb0677ddd5bd6f5e75c29702df58d3a0009de8ab36b38e68492a4429158b063c5bd82ece0e753b2cfdfc54bb9b46de980aa1f9cc3578195d0
7
- data.tar.gz: 8dc5911addde1f6d98ee6bc2bc20ab78711e5d2e60bd424e584fb079d7525ec6c5b988876b13391ea82db5dea1b40355f42234a32e5fb5c2e06f2426907bd12f
6
+ metadata.gz: 4fe9b8ec6a5d373eda60d79db37d8c3a43065ba5ffd34ddddf8207afd2055ab246067b706dac6e3969de49195f38307303142749a93a2efcd7bc612dc366c80f
7
+ data.tar.gz: 83894982df218989c2556874dfcff4e2dccbc226af7e31ad98c235f90ade5330991a40e165137c85276925e3a7c6e71c52e45421237e473baf6e0d12b33c01d8
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ def java?
11
11
  /java/ === RUBY_PLATFORM
12
12
  end
13
13
  def jruby?
14
- 'jruby' == RUBY_ENGINE
14
+ Object.const_defined?(:RUBY_ENGINE) and 'jruby' == RUBY_ENGINE
15
15
  end
16
16
 
17
17
  HOE = Hoe.spec 'racc' do
@@ -30,7 +30,7 @@ import org.jruby.runtime.builtin.IRubyObject;
30
30
  import org.jruby.runtime.load.Library;
31
31
 
32
32
  public class Cparse implements Library {
33
- public static final String RACC_VERSION = "1.4.12"; // TODO: parse from Cparse.c
33
+ public static final String RACC_VERSION = "1.4.13"; // TODO: parse from Cparse.c
34
34
 
35
35
  public enum TokenType {
36
36
  DEFAULT(-1),
@@ -70,8 +70,6 @@ public class Cparse implements Library {
70
70
  private CallSite call_d_read_token;
71
71
  private CallSite call_d_next_state;
72
72
  private CallSite call_d_e_pop;
73
- private AttrWriterMethod set_errstatus;
74
- private AttrReaderMethod get_errstatus;
75
73
 
76
74
  private static RubySymbol value_to_id(ThreadContext context, IRubyObject v) {
77
75
  if (!(v instanceof RubySymbol)) {
@@ -173,7 +171,7 @@ public class Cparse implements Library {
173
171
  this.t = runtime.newFixnum(TokenType.FINAL.id + 1); // must not init to FINAL_TOKEN
174
172
  this.nerr = 0;
175
173
  this.errstatus = 0;
176
- set_errstatus.call(context, parser, parser.getMetaClass(), ID_ERRSTATUS, RubyNumeric.int2fix(runtime, this.errstatus));
174
+ this.parser.setInstanceVariable(ID_ERRSTATUS, runtime.newFixnum(this.errstatus));
177
175
 
178
176
  this.retval = context.nil;
179
177
  this.fin = 0;
@@ -349,7 +347,7 @@ public class Cparse implements Library {
349
347
  D_puts("shift");
350
348
  if (this.errstatus > 0) {
351
349
  this.errstatus--;
352
- set_errstatus.call(context, this.parser, this.parser.getMetaClass(), ID_ERRSTATUS, runtime.newFixnum(this.errstatus));
350
+ this.parser.setInstanceVariable(ID_ERRSTATUS, runtime.newFixnum(this.errstatus));
353
351
  }
354
352
  SHIFT(context, act, this.t, val);
355
353
  read_next = true;
@@ -401,7 +399,7 @@ public class Cparse implements Library {
401
399
  read_next = true;
402
400
  }
403
401
  this.errstatus = 3;
404
- set_errstatus.call(context, this.parser, this.parser.getMetaClass(), ID_ERRSTATUS, runtime.newFixnum(this.errstatus));
402
+ this.parser.setInstanceVariable(ID_ERRSTATUS, runtime.newFixnum(this.errstatus));
405
403
 
406
404
  /* check if we can shift/reduce error token */
407
405
  D_printf("(err) k1=%ld\n", this.curstate);
@@ -498,7 +496,7 @@ public class Cparse implements Library {
498
496
  try {
499
497
  context.pushCatch(rbContinuation.getContinuation());
500
498
  code = reduce0(context);
501
- errstatus = assert_integer(get_errstatus.call(context, parser, parser.getMetaClass(), ID_ERRSTATUS));
499
+ errstatus = assert_integer(parser.getInstanceVariable(ID_ERRSTATUS));
502
500
  } finally {
503
501
  context.popCatch();
504
502
  }
@@ -734,8 +732,14 @@ public class Cparse implements Library {
734
732
  return v.retval;
735
733
  }
736
734
 
735
+ private class LexerUnroll extends RuntimeException {
736
+ public Throwable fillInStackTrace() {
737
+ return this;
738
+ }
739
+ }
740
+
737
741
  private void call_lexer(ThreadContext context, final CparseParams v) {
738
- final int frame = context.getFrameJumpTarget();
742
+ final LexerUnroll lexerUnroll = new LexerUnroll();
739
743
  try {
740
744
  v.call_lexmid.call(context, v.lexer, v.lexer, CallBlock19.newCallClosure(v, v.getMetaClass(), Arity.ONE_ARGUMENT, new BlockCallback() {
741
745
  @Override
@@ -748,14 +752,14 @@ public class Cparse implements Library {
748
752
  v.extract_user_token(context, args[0], tokVal);
749
753
  v.parse_main(context, tokVal[0], tokVal[1], true);
750
754
  if (v.fin != 0 && v.fin != CP_FIN_ACCEPT) {
751
- throw new JumpException.BreakJump(frame, context.nil);
755
+ throw lexerUnroll;
752
756
  }
753
757
 
754
758
  return context.nil;
755
759
  }
756
760
  }, context));
757
- } catch (JumpException.BreakJump bj) {
758
- if (bj.getTarget() == frame) {
761
+ } catch (LexerUnroll maybeOurs) {
762
+ if (maybeOurs == lexerUnroll) {
759
763
  return;
760
764
  }
761
765
  }
@@ -795,10 +799,6 @@ public class Cparse implements Library {
795
799
  call_d_next_state = MethodIndex.getFunctionalCallSite(ID_D_NEXT_STATE);
796
800
  call_d_e_pop = MethodIndex.getFunctionalCallSite(ID_D_E_POP);
797
801
 
798
- // hacky utility for caching instance var accessor
799
- set_errstatus = new AttrWriterMethod(parser, Visibility.PUBLIC, CallConfiguration.FrameNoneScopeNone, ID_ERRSTATUS);
800
- get_errstatus = new AttrReaderMethod(parser, Visibility.PUBLIC, CallConfiguration.FrameNoneScopeNone, ID_ERRSTATUS);
801
-
802
802
  vDEFAULT_TOKEN = runtime.newFixnum(TokenType.DEFAULT.id);
803
803
  vERROR_TOKEN = runtime.newFixnum(TokenType.ERROR.id);
804
804
  vFINAL_TOKEN = runtime.newFixnum(TokenType.FINAL.id);
data/ext/racc/cparse.c CHANGED
@@ -17,7 +17,7 @@
17
17
  Important Constants
18
18
  ----------------------------------------------------------------------- */
19
19
 
20
- #define RACC_VERSION "1.4.12"
20
+ #define RACC_VERSION "1.4.13"
21
21
 
22
22
  #define DEFAULT_TOKEN -1
23
23
  #define ERROR_TOKEN 1
Binary file
data/lib/racc/info.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # $Id: 90afb43b1438ad2bb681a529146d1cb5cd7e45ac $
2
+ # $Id: 22e498362c014749b453953e8d986243c0b8660c $
3
3
  #
4
4
  # Copyright (c) 1999-2006 Minero Aoki
5
5
  #
@@ -10,7 +10,7 @@
10
10
  #
11
11
 
12
12
  module Racc
13
- VERSION = '1.4.12'
13
+ VERSION = '1.4.13'
14
14
  Version = VERSION
15
15
  Copyright = 'Copyright (c) 1999-2006 Minero Aoki'
16
16
  end
@@ -1,7 +1,7 @@
1
1
  module Racc
2
2
  PARSER_TEXT = <<'__end_of_file__'
3
3
  #
4
- # $Id: a7af944d201a32a63d2536cdd589d8e9910848e0 $
4
+ # $Id: f015c335c3b92ed58b32b8fb00163be48783f689 $
5
5
  #
6
6
  # Copyright (c) 1999-2006 Minero Aoki
7
7
  #
@@ -189,12 +189,12 @@ module Racc
189
189
  class Parser
190
190
 
191
191
  Racc_Runtime_Version = ::Racc::VERSION
192
- Racc_Runtime_Revision = '$Id: a7af944d201a32a63d2536cdd589d8e9910848e0 $'
192
+ Racc_Runtime_Revision = '$Id: f015c335c3b92ed58b32b8fb00163be48783f689 $'
193
193
 
194
194
  Racc_Runtime_Core_Version_R = ::Racc::VERSION
195
- Racc_Runtime_Core_Revision_R = '$Id: a7af944d201a32a63d2536cdd589d8e9910848e0 $'.split[1]
195
+ Racc_Runtime_Core_Revision_R = '$Id: f015c335c3b92ed58b32b8fb00163be48783f689 $'.split[1]
196
196
  begin
197
- if RUBY_ENGINE == 'jruby'
197
+ if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
198
198
  require 'racc/cparse-jruby.jar'
199
199
  com.headius.racc.Cparse.new.load(JRuby.runtime, false)
200
200
  else
data/lib/racc/parser.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # $Id: a7af944d201a32a63d2536cdd589d8e9910848e0 $
2
+ # $Id: f015c335c3b92ed58b32b8fb00163be48783f689 $
3
3
  #
4
4
  # Copyright (c) 1999-2006 Minero Aoki
5
5
  #
@@ -187,12 +187,12 @@ module Racc
187
187
  class Parser
188
188
 
189
189
  Racc_Runtime_Version = ::Racc::VERSION
190
- Racc_Runtime_Revision = '$Id: a7af944d201a32a63d2536cdd589d8e9910848e0 $'
190
+ Racc_Runtime_Revision = '$Id: f015c335c3b92ed58b32b8fb00163be48783f689 $'
191
191
 
192
192
  Racc_Runtime_Core_Version_R = ::Racc::VERSION
193
- Racc_Runtime_Core_Revision_R = '$Id: a7af944d201a32a63d2536cdd589d8e9910848e0 $'.split[1]
193
+ Racc_Runtime_Core_Revision_R = '$Id: f015c335c3b92ed58b32b8fb00163be48783f689 $'.split[1]
194
194
  begin
195
- if RUBY_ENGINE == 'jruby'
195
+ if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
196
196
  require 'racc/cparse-jruby.jar'
197
197
  com.headius.racc.Cparse.new.load(JRuby.runtime, false)
198
198
  else
metadata CHANGED
@@ -1,25 +1,25 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: racc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.12
4
+ version: 1.4.13
5
5
  platform: java
6
6
  authors:
7
7
  - Aaron Patterson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-26 00:00:00.000000000 Z
11
+ date: 2015-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
15
15
  version_requirements: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.0'
20
20
  requirement: !ruby/object:Gem::Requirement
21
21
  requirements:
22
- - - ~>
22
+ - - "~>"
23
23
  - !ruby/object:Gem::Version
24
24
  version: '4.0'
25
25
  prerelease: false
@@ -28,12 +28,12 @@ dependencies:
28
28
  name: rake-compiler
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.4.1
34
34
  requirement: !ruby/object:Gem::Requirement
35
35
  requirements:
36
- - - '>='
36
+ - - ">="
37
37
  - !ruby/object:Gem::Version
38
38
  version: 0.4.1
39
39
  prerelease: false
@@ -42,12 +42,12 @@ dependencies:
42
42
  name: minitest
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '4.7'
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  requirements:
50
- - - ~>
50
+ - - "~>"
51
51
  - !ruby/object:Gem::Version
52
52
  version: '4.7'
53
53
  prerelease: false
@@ -56,14 +56,14 @@ dependencies:
56
56
  name: hoe
57
57
  version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '3.12'
61
+ version: '3.13'
62
62
  requirement: !ruby/object:Gem::Requirement
63
63
  requirements:
64
- - - ~>
64
+ - - "~>"
65
65
  - !ruby/object:Gem::Version
66
- version: '3.12'
66
+ version: '3.13'
67
67
  prerelease: false
68
68
  type: :development
69
69
  description: |-
@@ -91,6 +91,7 @@ extra_rdoc_files:
91
91
  - rdoc/ja/grammar.ja.rdoc
92
92
  - rdoc/ja/parser.ja.rdoc
93
93
  files:
94
+ - ".gemtest"
94
95
  - COPYING
95
96
  - ChangeLog
96
97
  - DEPENDS
@@ -103,14 +104,15 @@ files:
103
104
  - bin/racc2y
104
105
  - bin/y2racc
105
106
  - ext/racc/MANIFEST
107
+ - ext/racc/com/headius/racc/Cparse.java
106
108
  - ext/racc/cparse.c
107
109
  - ext/racc/depend
108
110
  - ext/racc/extconf.rb
109
- - ext/racc/com/headius/racc/Cparse.java
110
111
  - fastcache/extconf.rb
111
112
  - fastcache/fastcache.c
112
113
  - lib/racc.rb
113
114
  - lib/racc/compat.rb
115
+ - lib/racc/cparse-jruby.jar
114
116
  - lib/racc/debugflags.rb
115
117
  - lib/racc/exception.rb
116
118
  - lib/racc/grammar.rb
@@ -192,36 +194,30 @@ files:
192
194
  - test/testscanner.rb
193
195
  - web/racc.en.rhtml
194
196
  - web/racc.ja.rhtml
195
- - .gemtest
196
- - lib/racc/cparse-jruby.jar
197
197
  homepage: http://i.loveruby.net/en/projects/racc/
198
198
  licenses:
199
199
  - MIT
200
200
  metadata: {}
201
201
  post_install_message:
202
202
  rdoc_options:
203
- - --main
203
+ - "--main"
204
204
  - README.rdoc
205
205
  require_paths:
206
206
  - lib
207
207
  required_ruby_version: !ruby/object:Gem::Requirement
208
208
  requirements:
209
- - - '>='
209
+ - - ">="
210
210
  - !ruby/object:Gem::Version
211
211
  version: '0'
212
212
  required_rubygems_version: !ruby/object:Gem::Requirement
213
213
  requirements:
214
- - - '>='
214
+ - - ">="
215
215
  - !ruby/object:Gem::Version
216
216
  version: '0'
217
217
  requirements: []
218
218
  rubyforge_project:
219
- rubygems_version: 2.1.9
219
+ rubygems_version: 2.4.8
220
220
  signing_key:
221
221
  specification_version: 4
222
222
  summary: Racc is a LALR(1) parser generator
223
- test_files:
224
- - test/test_chk_y.rb
225
- - test/test_grammar_file_parser.rb
226
- - test/test_racc_command.rb
227
- - test/test_scan_y.rb
223
+ test_files: []