skoba / openehr-ruby

Ruby implementation of the openEHR specification
http://openehr.jp/projects/ref-impl-ruby/
Apache License 2.0
35 stars 12 forks source link

Error causes with treetop 1.4.14 #19

Closed skoba closed 11 years ago

skoba commented 11 years ago

/usr/local/lib/ruby/gems/2.0/gems/activesupport-4.0.0.rc1/lib/active_support/core_ext/string/indent.rb:8:in *': negative argument (ArgumentError) from /usr/local/lib/ruby/gems/2.0/gems/activesupport-4.0.0.rc1/lib/active_support/core_ext/string/indent.rb:8:inindent!' from /usr/local/lib/ruby/gems/2.0/gems/activesupport-4.0.0.rc1/lib/active_support/core_ext/string/indent.rb:41:in block in indent' from /usr/local/lib/ruby/gems/2.0/gems/activesupport-4.0.0.rc1/lib/active_support/core_ext/string/indent.rb:41:intap' from /usr/local/lib/ruby/gems/2.0/gems/activesupport-4.0.0.rc1/lib/active_support/core_ext/string/indent.rb:41:in indent' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/ruby_extensions/string.rb:25:intabto' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/ruby_builder.rb:17:in <<' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/node_classes/inline_module.rb:18:inblock in compile' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/ruby_builder.rb:26:in indented' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/ruby_builder.rb:38:inmodule_declaration' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/node_classes/inline_module.rb:17:in compile' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/node_classes/parsing_rule.rb:12:inblock in compile_inline_module_declarations' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/node_classes/parsing_rule.rb:11:in each' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/node_classes/parsing_rule.rb:11:ineach_with_index' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/node_classes/parsing_rule.rb:11:in compile_inline_module_declarations' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/node_classes/parsing_rule.rb:6:incompile' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/node_classes/declaration_sequence.rb:14:in block in compile' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/node_classes/declaration_sequence.rb:13:ineach' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/node_classes/declaration_sequence.rb:13:in compile' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/node_classes/grammar.rb:11:inblock in compile' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/ruby_builder.rb:26:in indented' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/ruby_builder.rb:38:inmodule_declaration' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/node_classes/grammar.rb:7:in compile' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/metagrammar.rb:297:incompile' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/metagrammar.rb:297:in compile' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/metagrammar.rb:39:incompile' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/grammar_compiler.rb:29:in ruby_source_from_string' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/grammar_compiler.rb:47:inload_from_string' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/grammar_compiler.rb:40:in block in load' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/grammar_compiler.rb:37:inopen' from /usr/local/lib/ruby/gems/2.0/gems/treetop-1.4.14/lib/treetop/compiler/grammar_compiler.rb:37:in load' from /usr/local/lib/ruby/gems/2.0/gems/openehr-1.2.13/lib/openehr/parser/adl_parser.rb:10:inclass:ADLParser' from /usr/local/lib/ruby/gems/2.0/gems/openehr-1.2.13/lib/openehr/parser/adl_parser.rb:9:in <module:Parser>' from /usr/local/lib/ruby/gems/2.0/gems/openehr-1.2.13/lib/openehr/parser/adl_parser.rb:7:inmodule:OpenEHR' from /usr/local/lib/ruby/gems/2.0/gems/openehr-1.2.13/lib/openehr/parser/adl_parser.rb:6:in <top (required)>' from /usr/local/lib/ruby/gems/2.0/gems/openehr-1.2.13/lib/openehr/parser.rb:14:inrequire_relative' from /usr/local/lib/ruby/gems/2.0/gems/openehr-1.2.13/lib/openehr/parser.rb:14:in <module:Parser>' from /usr/local/lib/ruby/gems/2.0/gems/openehr-1.2.13/lib/openehr/parser.rb:2:inmodule:OpenEHR' from /usr/local/lib/ruby/gems/2.0/gems/openehr-1.2.13/lib/openehr/parser.rb:1:in <top (required)>' from /usr/local/lib/ruby/site_ruby/2.0/rubygems/custom_require.rb:55:inrequire' from /usr/local/lib/ruby/site_ruby/2.0/rubygems/custom_require.rb:55:in require' from /usr/home/skoba/src/openehr-rails/lib/generators/openehr/i18n/i18n_generator.rb:4:in<top (required)>' from /usr/local/lib/ruby/site_ruby/2.0/rubygems/custom_require.rb:55:in require' from /usr/local/lib/ruby/site_ruby/2.0/rubygems/custom_require.rb:55:inrequire' from /usr/home/skoba/src/openehr-rails/spec/generators/openehr/i18n/i18n_generator_spec.rb:3:in <top (required)>' from /usr/local/lib/ruby/gems/2.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:inload' from /usr/local/lib/ruby/gems/2.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in block in load_spec_files' from /usr/local/lib/ruby/gems/2.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:ineach' from /usr/local/lib/ruby/gems/2.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in load_spec_files' from /usr/local/lib/ruby/gems/2.0/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:inrun' from /usr/local/lib/ruby/gems/2.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in run' from /usr/local/lib/ruby/gems/2.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:inblock in autorun'

kuma-giyomu commented 11 years ago

Sorry to bug you, but how did you manage to sort out this issue? I have a similar problem and can't figure out a clean way to fix it.

Thanks!

kuma-giyomu commented 11 years ago

Nevermind, the latest release of treetop 1.4.15 seems to fix the compatibility issue with active_support 4.0.0

skoba commented 11 years ago

I reported this issue to the treetop team, and send pr. They implemented other smart codes.

skoba commented 11 years ago

BTW, thank you for your information that treetop 1.4.5 was fixed. I confirmed my library works well, too.