ridl 2.8.2 → 2.10.0

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
2
  SHA256:
3
- metadata.gz: 880d87c66c5e6542fd7a61744fd2c10db2344e75849e73efbc45e26f8c33511a
4
- data.tar.gz: 3d8b9e40f5d9220f5a677e4ebee507042f31246a0cbdc680166512985a1ba6ee
3
+ metadata.gz: c813bc37b6ebda1ec576dd678c82e9764a3ecf7160b199c7c55794c7da36c3c8
4
+ data.tar.gz: 83b7e565b4a8bacdef3b3d3e5cdef124b2314018d54050f48ab5ef8ae4a8d28a
5
5
  SHA512:
6
- metadata.gz: a79c369f080a3e914de2df4899bd523c312814abd400726c9315043495bbfa4b3870f9ebc696019804487c86b5b1edc4791c1252dd616ac342da214849764304
7
- data.tar.gz: a136ede546812cafba12a925d7c86415d5e453f2ad4d513f65be54751434c2bbd43fca0bbcea36bc898d522a2bd644da71dedd56029c26473ca77645a1827cfd
6
+ metadata.gz: 88ac006539e173dae2972e9c8fa5181afdc7d6418c047b241600b8142507e5f16ee7a977f11e23333a685afc1b8da9cb554a84f36de27089d10c94b0c420e1bb
7
+ data.tar.gz: 6ab751d08491dd63c33a4608f2ae17d6f603aa401dcf282ef81b9761bbf765463ddbd64a6b79e05e95bfc61f841313347f0abfd65e8287ca256cf4894ce2eb89
data/README.rdoc CHANGED
@@ -1,6 +1,7 @@
1
- {<img src="https://badge.fury.io/rb/ridl.svg" alt="Gem Version" />}[https://badge.fury.io/rb/ridl]
2
- {<img src="https://github.com/RemedyIT/ridl/workflows/linux/badge.svg" alt="Linux CI" />}[https://github.com/RemedyIT/ridl/actions?query=workflow%3Alinux]
3
- {<img src="https://www.codefactor.io/repository/github/remedyit/ridl/badge" alt="CodeFactor" />}[https://www.codefactor.io/repository/github/remedyit/ridl]
1
+ {rdoc-image:https://badge.fury.io/rb/ridl.svg}[https://badge.fury.io/rb/ridl]
2
+ {rdoc-image:https://github.com/RemedyIT/ridl/actions/workflows/r2corba.yml/badge.svg}[https://github.com/RemedyIT/ridl/actions?query=workflow%3Ar2corba]
3
+ {rdoc-image:https://github.com/RemedyIT/ridl/actions/workflows/taox11.yml/badge.svg}[https://github.com/RemedyIT/ridl/actions?query=workflow%3Ataox11]
4
+ {rdoc-image:https://www.codefactor.io/repository/github/remedyit/ridl/badge}[https://www.codefactor.io/repository/github/remedyit/ridl]
4
5
 
5
6
  = RIDL Compiler
6
7
 
@@ -18,9 +19,11 @@ RIDL provides a framework for implementing compiler/generators for OMG standard
18
19
  * a builtin IDL preprocessor expression parser/evaluator
19
20
  * a flexible framework for pluggable (and stackable) backends
20
21
  * basic support for backend code re-generation
21
- * compliant with the {OMG IDL 3.5}[https://www.omg.org/spec/IDL/3.5] standard.
22
+ * compliant with the {OMG IDL 3.5}[https://www.omg.org/spec/IDL/3.5] standard
23
+ * support for {OMG IDL 4.2}[https://www.omg.org/spec/IDL/4.2] annotations
24
+ * support for IDL 4.2 map, int8/uint8, explicitly-named integer types, bitmask, bitset, empty struct, and struct inheritance
22
25
 
23
- Remedy IT has developed multiple backends for RIDL. These include:
26
+ Remedy IT has developed multiple backends for RIDL. These include the following open source backends:
24
27
  * {R2CORBA}[https://www.remedy.nl/opensource/r2corba.html] generating Ruby code
25
28
  * {TAOX11}[https://www.taox11.org] generating C++11 code
26
29
  * {AXCIOMA}[https://www.axcioma.org] generating C++11 code
@@ -47,6 +50,6 @@ The RIDL Gem is a Ruby-only Gem without any dependencies.
47
50
 
48
51
  A new RIDL ruby gem release can be made by incrementing the RIDL version in link:lib/ridl/version.rb and create a new release on {github}[https://github.com/RemedyIT/ridl/releases] matching the new version (for example v2.7.0). The github {Ruby Gem Release}[https://github.com/RemedyIT/ridl/actions?query=workflow%3A%22Ruby+Gem+Release%22] action will automatically create a new gem and push it to {Rubygems.org}[https://www.rubygems.org/gems/ridl].
49
52
 
50
- == Regenerating `lib/racc/parser.rb`
53
+ == Regenerating `lib/ridl/parser.rb`
51
54
 
52
- The file `lib/racc/parser.rb` can be regenerated using `racc -o parser.rb -E parser.ry`. The option `-E` embeds the racc parser within RIDL which is required for RIDL because jruby doesn't contain `RACC` as cruby does.
55
+ The file `lib/ridl/parser.rb` can be regenerated using `racc -o parser.rb -F -E parser.ry`. The option `-E` embeds the racc parser within RIDL which is required for RIDL because jruby doesn't contain `RACC` as cruby does.
data/lib/ridl/backend.rb CHANGED
@@ -11,15 +11,14 @@
11
11
  #--------------------------------------------------------------------
12
12
 
13
13
  module IDL
14
-
15
14
  class Backend
16
-
17
15
  @@backends = {}
18
16
 
19
17
  class ProcessStop < RuntimeError; end
20
18
 
21
19
  class Configurator
22
20
  attr_reader :backend
21
+
23
22
  def initialize(be_name, root, title, copyright, version)
24
23
  @backend = IDL::Backend.new(be_name, root, title, copyright, version)
25
24
  @be_ext_klass = class << @backend; self; end
@@ -47,10 +46,10 @@ module IDL
47
46
  IDL.log(1, "> loaded RIDL backend :#{be_name} from #{@@backends[be_name.to_sym].root}")
48
47
  # return backend
49
48
  return @@backends[be_name.to_sym]
50
- rescue LoadError => ex
49
+ rescue LoadError => e
51
50
  IDL.error "ERROR: Cannot load RIDL backend [:#{be_name}]"
52
- IDL.error ex.inspect
53
- IDL.error(ex.backtrace.join("\n")) if IDL.verbose_level > 0
51
+ IDL.error e.inspect
52
+ IDL.error(e.backtrace.join("\n")) if IDL.verbose_level.positive?
54
53
  exit 1
55
54
  end
56
55
  end
@@ -62,7 +61,7 @@ module IDL
62
61
  end
63
62
 
64
63
  # stop processing of current input and skip to next or exit RIDL
65
- def self.stop_processing(msg='')
64
+ def self.stop_processing(msg = '')
66
65
  raise ProcessStop, msg, caller(1).first
67
66
  end
68
67
 
@@ -71,7 +70,7 @@ module IDL
71
70
  @root = root
72
71
  @title = ttl
73
72
  @copyright = cpr
74
- @version = (Hash === ver ? ver : { :major => ver.to_i, :minor => 0, :release => 0 })
73
+ @version = (Hash === ver ? ver : { major: ver.to_i, minor: 0, release: 0 })
75
74
  @base_backends = []
76
75
  end
77
76
 
@@ -84,24 +83,25 @@ module IDL
84
83
  def print_version
85
84
  puts "#{title} #{version}"
86
85
  puts copyright
87
- @base_backends.each {|be| puts '---'; be.print_version }
86
+ @base_backends.each { |be| puts '---'
87
+ be.print_version }
88
88
  end
89
89
 
90
90
  def lookup_path
91
- @base_backends.inject([@root]) {|paths, bbe| paths.concat(bbe.lookup_path) }
91
+ @base_backends.inject([@root]) { |paths, bbe| paths.concat(bbe.lookup_path) }
92
92
  end
93
93
 
94
94
  def setup_be(optlist, idl_options)
95
95
  # initialize base backends in reverse order so each dependent BE can overrule its
96
96
  # base settings
97
- @base_backends.reverse.each {|be| be.setup_be(optlist, idl_options) }
97
+ @base_backends.reverse.each { |be| be.setup_be(optlist, idl_options) }
98
98
  # initialize this backend
99
99
  _setup_be(optlist, idl_options) if self.respond_to?(:_setup_be, true)
100
100
  end
101
101
 
102
102
  def process_input(parser, params)
103
103
  # process input bottom-up
104
- @base_backends.reverse.each {|be| be.process_input(parser, params) }
104
+ @base_backends.reverse.each { |be| be.process_input(parser, params) }
105
105
  _process_input(parser, params) if self.respond_to?(:_process_input, true)
106
106
  end
107
107
 
@@ -115,6 +115,5 @@ module IDL
115
115
  end
116
116
  end
117
117
  end
118
-
119
118
  end
120
119
  end