expressir 0.2.7-x86-linux

Sign up to get free protection for your applications and to get access to all the features.
Files changed (183) hide show
  1. checksums.yaml +7 -0
  2. data/.cross_rubies +30 -0
  3. data/.github/workflows/rake.yml +45 -0
  4. data/.github/workflows/release.yml +84 -0
  5. data/.gitignore +17 -0
  6. data/.gitmodules +3 -0
  7. data/.rspec +2 -0
  8. data/.rubocop.yml +508 -0
  9. data/Gemfile +4 -0
  10. data/README.adoc +147 -0
  11. data/Rakefile +11 -0
  12. data/bin/console +12 -0
  13. data/bin/rspec +29 -0
  14. data/bin/setup +8 -0
  15. data/demo.rb +18 -0
  16. data/docs/development.md +90 -0
  17. data/exe/expressir +20 -0
  18. data/exe/generate-parser +48 -0
  19. data/expressir.gemspec +43 -0
  20. data/lib/expressir/cli/ui.rb +36 -0
  21. data/lib/expressir/cli.rb +27 -0
  22. data/lib/expressir/config.rb +23 -0
  23. data/lib/expressir/express/aggregate_dimension.rb +38 -0
  24. data/lib/expressir/express/attribute.rb +15 -0
  25. data/lib/expressir/express/comment.rb +7 -0
  26. data/lib/expressir/express/defined_type.rb +36 -0
  27. data/lib/expressir/express/derived.rb +65 -0
  28. data/lib/expressir/express/derived_aggregate.rb +43 -0
  29. data/lib/expressir/express/entity.rb +137 -0
  30. data/lib/expressir/express/explicit.rb +70 -0
  31. data/lib/expressir/express/explicit_aggregate.rb +46 -0
  32. data/lib/expressir/express/explicit_or_derived.rb +16 -0
  33. data/lib/expressir/express/global_rule.rb +44 -0
  34. data/lib/expressir/express/interface_specification.rb +51 -0
  35. data/lib/expressir/express/interfaced_item.rb +38 -0
  36. data/lib/expressir/express/inverse.rb +46 -0
  37. data/lib/expressir/express/inverse_aggregate.rb +37 -0
  38. data/lib/expressir/express/model_element.rb +7 -0
  39. data/lib/expressir/express/named_type.rb +19 -0
  40. data/lib/expressir/express/remark.rb +8 -0
  41. data/lib/expressir/express/repository.rb +306 -0
  42. data/lib/expressir/express/schema_definition.rb +96 -0
  43. data/lib/expressir/express/subtype_constraint.rb +14 -0
  44. data/lib/expressir/express/type.rb +26 -0
  45. data/lib/expressir/express/type_aggregate.rb +42 -0
  46. data/lib/expressir/express/type_enum.rb +29 -0
  47. data/lib/expressir/express/type_parser.rb +45 -0
  48. data/lib/expressir/express/type_select.rb +82 -0
  49. data/lib/expressir/express/unique_rule.rb +35 -0
  50. data/lib/expressir/express/where_rule.rb +32 -0
  51. data/lib/expressir/express.rb +11 -0
  52. data/lib/expressir/express_exp/2.4/express_parser.so +0 -0
  53. data/lib/expressir/express_exp/2.5/express_parser.so +0 -0
  54. data/lib/expressir/express_exp/2.6/express_parser.so +0 -0
  55. data/lib/expressir/express_exp/2.7/express_parser.so +0 -0
  56. data/lib/expressir/express_exp/3.0/express_parser.so +0 -0
  57. data/lib/expressir/express_exp/formatter.rb +1450 -0
  58. data/lib/expressir/express_exp/parser.rb +41 -0
  59. data/lib/expressir/express_exp/visitor.rb +2464 -0
  60. data/lib/expressir/express_parser.rb +30 -0
  61. data/lib/expressir/model/attribute.rb +27 -0
  62. data/lib/expressir/model/constant.rb +17 -0
  63. data/lib/expressir/model/entity.rb +46 -0
  64. data/lib/expressir/model/enumeration_item.rb +11 -0
  65. data/lib/expressir/model/expressions/aggregate_initializer.rb +13 -0
  66. data/lib/expressir/model/expressions/aggregate_item.rb +15 -0
  67. data/lib/expressir/model/expressions/attribute_reference.rb +15 -0
  68. data/lib/expressir/model/expressions/binary_expression.rb +40 -0
  69. data/lib/expressir/model/expressions/call.rb +15 -0
  70. data/lib/expressir/model/expressions/entity_constructor.rb +15 -0
  71. data/lib/expressir/model/expressions/group_reference.rb +15 -0
  72. data/lib/expressir/model/expressions/index_reference.rb +17 -0
  73. data/lib/expressir/model/expressions/interval.rb +21 -0
  74. data/lib/expressir/model/expressions/query_expression.rb +26 -0
  75. data/lib/expressir/model/expressions/simple_reference.rb +13 -0
  76. data/lib/expressir/model/expressions/unary_expression.rb +19 -0
  77. data/lib/expressir/model/function.rb +62 -0
  78. data/lib/expressir/model/identifier.rb +10 -0
  79. data/lib/expressir/model/interface.rb +18 -0
  80. data/lib/expressir/model/literals/binary.rb +13 -0
  81. data/lib/expressir/model/literals/integer.rb +13 -0
  82. data/lib/expressir/model/literals/logical.rb +17 -0
  83. data/lib/expressir/model/literals/real.rb +13 -0
  84. data/lib/expressir/model/literals/string.rb +15 -0
  85. data/lib/expressir/model/parameter.rb +17 -0
  86. data/lib/expressir/model/procedure.rb +60 -0
  87. data/lib/expressir/model/renamed_ref.rb +13 -0
  88. data/lib/expressir/model/repository.rb +19 -0
  89. data/lib/expressir/model/rule.rb +62 -0
  90. data/lib/expressir/model/schema.rb +67 -0
  91. data/lib/expressir/model/scope.rb +17 -0
  92. data/lib/expressir/model/statements/alias.rb +26 -0
  93. data/lib/expressir/model/statements/assignment.rb +15 -0
  94. data/lib/expressir/model/statements/call.rb +15 -0
  95. data/lib/expressir/model/statements/case.rb +17 -0
  96. data/lib/expressir/model/statements/case_action.rb +15 -0
  97. data/lib/expressir/model/statements/compound.rb +13 -0
  98. data/lib/expressir/model/statements/escape.rb +8 -0
  99. data/lib/expressir/model/statements/if.rb +17 -0
  100. data/lib/expressir/model/statements/null.rb +8 -0
  101. data/lib/expressir/model/statements/repeat.rb +34 -0
  102. data/lib/expressir/model/statements/return.rb +13 -0
  103. data/lib/expressir/model/statements/skip.rb +8 -0
  104. data/lib/expressir/model/subtype_constraint.rb +27 -0
  105. data/lib/expressir/model/type.rb +24 -0
  106. data/lib/expressir/model/types/aggregate.rb +17 -0
  107. data/lib/expressir/model/types/array.rb +21 -0
  108. data/lib/expressir/model/types/bag.rb +17 -0
  109. data/lib/expressir/model/types/binary.rb +15 -0
  110. data/lib/expressir/model/types/boolean.rb +8 -0
  111. data/lib/expressir/model/types/enumeration.rb +19 -0
  112. data/lib/expressir/model/types/generic.rb +13 -0
  113. data/lib/expressir/model/types/generic_entity.rb +13 -0
  114. data/lib/expressir/model/types/integer.rb +8 -0
  115. data/lib/expressir/model/types/list.rb +19 -0
  116. data/lib/expressir/model/types/logical.rb +8 -0
  117. data/lib/expressir/model/types/number.rb +8 -0
  118. data/lib/expressir/model/types/real.rb +13 -0
  119. data/lib/expressir/model/types/select.rb +21 -0
  120. data/lib/expressir/model/types/set.rb +17 -0
  121. data/lib/expressir/model/types/string.rb +15 -0
  122. data/lib/expressir/model/unique.rb +15 -0
  123. data/lib/expressir/model/variable.rb +17 -0
  124. data/lib/expressir/model/where.rb +15 -0
  125. data/lib/expressir/model.rb +65 -0
  126. data/lib/expressir/parser/owl_parser.rb +8 -0
  127. data/lib/expressir/parser.rb +6 -0
  128. data/lib/expressir/version.rb +3 -0
  129. data/lib/expressir.rb +21 -0
  130. data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.exp +9589 -0
  131. data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.owl +36619 -0
  132. data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.xml +13294 -0
  133. data/original/examples/employment/eclipse/.project +17 -0
  134. data/original/examples/employment/eclipse/Export/Employment.png +0 -0
  135. data/original/examples/employment/eclipse/Express/employment_schema.exp +33 -0
  136. data/original/examples/employment/eclipse/Express/employment_schema.xmi +77 -0
  137. data/original/examples/employment/eclipse/Express/employment_schema.xml +93 -0
  138. data/original/examples/employment/eclipse/Models/Employment.uml +4 -0
  139. data/original/examples/employment/eclipse/Models/Employment.umldi +240 -0
  140. data/original/examples/employment/eclipse/readme.txt +7 -0
  141. data/original/examples/employment/employment_schema.exp +33 -0
  142. data/original/examples/employment/employment_schema.rb +232 -0
  143. data/original/examples/employment/employment_schema.xml +93 -0
  144. data/original/examples/employment/employment_schema___module.rb +46 -0
  145. data/original/examples/employment/employment_schema___p28attr.rb +126 -0
  146. data/original/examples/employment/employment_schema___p28inst.rb +26 -0
  147. data/original/examples/employment/example_employment_data.xml +1 -0
  148. data/original/examples/employment/example_employment_data_copy.xml +1 -0
  149. data/original/examples/employment/example_employment_reader.rb +30 -0
  150. data/original/examples/employment/example_employment_writer.rb +51 -0
  151. data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.exp +3710 -0
  152. data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.owl +35880 -0
  153. data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.xmi +15357 -0
  154. data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.xml +9468 -0
  155. data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.exp +8404 -0
  156. data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.owl +43147 -0
  157. data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.xmi +18341 -0
  158. data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.xml +11632 -0
  159. data/original/examples/syntax/remark.exp +146 -0
  160. data/original/examples/syntax/remark_formatted.exp +175 -0
  161. data/original/examples/syntax/syntax.exp +311 -0
  162. data/original/examples/syntax/syntax_formatted.exp +1191 -0
  163. data/original/exp2ruby.rb +525 -0
  164. data/original/expsm.rb +34 -0
  165. data/original/mapping_owl.rb +1018 -0
  166. data/original/mapping_sysml.rb +2281 -0
  167. data/original/mapping_uml2.rb +599 -0
  168. data/original/mapping_uml2_eclipse.rb +433 -0
  169. data/original/reeper.rb +134 -0
  170. data/rakelib/cross-ruby.rake +308 -0
  171. data/spec/acceptance/express_to_owl_spec.rb +18 -0
  172. data/spec/acceptance/version_spec.rb +12 -0
  173. data/spec/expressir/express/repository_spec.rb +25 -0
  174. data/spec/expressir/express_exp/ap233_spec.rb +22 -0
  175. data/spec/expressir/express_exp/format_remark_spec.rb +28 -0
  176. data/spec/expressir/express_exp/format_syntax_spec.rb +28 -0
  177. data/spec/expressir/express_exp/parse_remark_spec.rb +346 -0
  178. data/spec/expressir/express_exp/parse_syntax_spec.rb +3003 -0
  179. data/spec/expressir/model/find_spec.rb +110 -0
  180. data/spec/expressr_spec.rb +5 -0
  181. data/spec/spec_helper.rb +17 -0
  182. data/spec/support/console_helper.rb +29 -0
  183. metadata +357 -0
@@ -0,0 +1,62 @@
1
+ module Expressir
2
+ module Model
3
+ class Rule
4
+ include Scope
5
+ include Identifier
6
+
7
+ attr_accessor :applies_to
8
+ attr_accessor :declarations
9
+ attr_accessor :constants
10
+ attr_accessor :variables
11
+ attr_accessor :statements
12
+ attr_accessor :where
13
+
14
+ def initialize(options = {})
15
+ @id = options[:id]
16
+
17
+ @applies_to = options[:applies_to]
18
+ @declarations = options[:declarations]
19
+ @constants = options[:constants]
20
+ @variables = options[:variables]
21
+ @statements = options[:statements]
22
+ @where = options[:where]
23
+ end
24
+
25
+ def types
26
+ @declarations.select{|x| x.instance_of? Expressir::Model::Type}
27
+ end
28
+
29
+ def entities
30
+ @declarations.select{|x| x.instance_of? Expressir::Model::Entity}
31
+ end
32
+
33
+ def subtype_constraints
34
+ @declarations.select{|x| x.instance_of? Expressir::Model::SubtypeConstraint}
35
+ end
36
+
37
+ def functions
38
+ @declarations.select{|x| x.instance_of? Expressir::Model::Function}
39
+ end
40
+
41
+ def procedures
42
+ @declarations.select{|x| x.instance_of? Expressir::Model::Procedure}
43
+ end
44
+
45
+ def children
46
+ items = []
47
+ items.push(*@declarations.flat_map do |x|
48
+ [
49
+ x,
50
+ *if x.instance_of? Expressir::Model::Type and x.type.instance_of? Expressir::Model::Types::Enumeration
51
+ x.type.items
52
+ end
53
+ ]
54
+ end) if @declarations
55
+ items.push(*@constants) if @constants
56
+ items.push(*@variables) if @variables
57
+ items.push(*@where) if @where
58
+ items
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,67 @@
1
+ module Expressir
2
+ module Model
3
+ class Schema
4
+ include Scope
5
+ include Identifier
6
+
7
+ attr_accessor :version
8
+ attr_accessor :interfaces
9
+ attr_accessor :constants
10
+ attr_accessor :declarations
11
+
12
+ def initialize(options = {})
13
+ @id = options[:id]
14
+ @version = options[:version]
15
+ @interfaces = options[:interfaces]
16
+ @constants = options[:constants]
17
+ @declarations = options[:declarations]
18
+ end
19
+
20
+ def use_interfaces
21
+ @interfaces.select{|x| x.kind == Expressir::Model::Interface::USE}
22
+ end
23
+
24
+ def reference_interfaces
25
+ @interfaces.select{|x| x.kind == Expressir::Model::Interface::REFERENCE}
26
+ end
27
+
28
+ def types
29
+ @declarations.select{|x| x.instance_of? Expressir::Model::Type}
30
+ end
31
+
32
+ def entities
33
+ @declarations.select{|x| x.instance_of? Expressir::Model::Entity}
34
+ end
35
+
36
+ def subtype_constraints
37
+ @declarations.select{|x| x.instance_of? Expressir::Model::SubtypeConstraint}
38
+ end
39
+
40
+ def functions
41
+ @declarations.select{|x| x.instance_of? Expressir::Model::Function}
42
+ end
43
+
44
+ def procedures
45
+ @declarations.select{|x| x.instance_of? Expressir::Model::Procedure}
46
+ end
47
+
48
+ def rules
49
+ @declarations.select{|x| x.instance_of? Expressir::Model::Rule}
50
+ end
51
+
52
+ def children
53
+ items = []
54
+ items.push(*@constants) if @constants
55
+ items.push(*@declarations.flat_map do |x|
56
+ [
57
+ x,
58
+ *if x.instance_of? Expressir::Model::Type and x.type.instance_of? Expressir::Model::Types::Enumeration
59
+ x.type.items
60
+ end
61
+ ]
62
+ end) if @declarations
63
+ items
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,17 @@
1
+ module Expressir
2
+ module Model
3
+ module Scope
4
+ def find(path)
5
+ path.downcase.split(".").reduce(self) do |acc, curr|
6
+ if acc and acc.class.method_defined? :children
7
+ acc.children.find{|x| x.id.downcase == curr}
8
+ end
9
+ end
10
+ end
11
+
12
+ def children
13
+ raise 'Not implemented'
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,26 @@
1
+ module Expressir
2
+ module Model
3
+ module Statements
4
+ class Alias
5
+ include Scope
6
+ include Identifier
7
+
8
+ attr_accessor :expression
9
+ attr_accessor :statements
10
+
11
+ def initialize(options = {})
12
+ @id = options[:id]
13
+
14
+ @expression = options[:expression]
15
+ @statements = options[:statements]
16
+ end
17
+
18
+ def children
19
+ items = []
20
+ items.push(self)
21
+ items
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,15 @@
1
+ module Expressir
2
+ module Model
3
+ module Statements
4
+ class Assignment
5
+ attr_accessor :ref
6
+ attr_accessor :expression
7
+
8
+ def initialize(options = {})
9
+ @ref = options[:ref]
10
+ @expression = options[:expression]
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module Expressir
2
+ module Model
3
+ module Statements
4
+ class Call
5
+ attr_accessor :ref
6
+ attr_accessor :parameters
7
+
8
+ def initialize(options = {})
9
+ @ref = options[:ref]
10
+ @parameters = options[:parameters]
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,17 @@
1
+ module Expressir
2
+ module Model
3
+ module Statements
4
+ class Case
5
+ attr_accessor :expression
6
+ attr_accessor :actions
7
+ attr_accessor :otherwise_statement
8
+
9
+ def initialize(options = {})
10
+ @expression = options[:expression]
11
+ @actions = options[:actions]
12
+ @otherwise_statement = options[:otherwise_statement]
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ module Expressir
2
+ module Model
3
+ module Statements
4
+ class CaseAction
5
+ attr_accessor :labels
6
+ attr_accessor :statement
7
+
8
+ def initialize(options = {})
9
+ @labels = options[:labels]
10
+ @statement = options[:statement]
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ module Expressir
2
+ module Model
3
+ module Statements
4
+ class Compound
5
+ attr_accessor :statements
6
+
7
+ def initialize(options = {})
8
+ @statements = options[:statements]
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,8 @@
1
+ module Expressir
2
+ module Model
3
+ module Statements
4
+ class Escape
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,17 @@
1
+ module Expressir
2
+ module Model
3
+ module Statements
4
+ class If
5
+ attr_accessor :expression
6
+ attr_accessor :statements
7
+ attr_accessor :else_statements
8
+
9
+ def initialize(options = {})
10
+ @expression = options[:expression]
11
+ @statements = options[:statements]
12
+ @else_statements = options[:else_statements]
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,8 @@
1
+ module Expressir
2
+ module Model
3
+ module Statements
4
+ class Null
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,34 @@
1
+ module Expressir
2
+ module Model
3
+ module Statements
4
+ class Repeat
5
+ include Scope
6
+ include Identifier
7
+
8
+ attr_accessor :bound1
9
+ attr_accessor :bound2
10
+ attr_accessor :increment
11
+ attr_accessor :while_expression
12
+ attr_accessor :until_expression
13
+ attr_accessor :statements
14
+
15
+ def initialize(options = {})
16
+ @id = options[:id]
17
+
18
+ @bound1 = options[:bound1]
19
+ @bound2 = options[:bound2]
20
+ @increment = options[:increment]
21
+ @while_expression = options[:while_expression]
22
+ @until_expression = options[:until_expression]
23
+ @statements = options[:statements]
24
+ end
25
+
26
+ def children
27
+ items = []
28
+ items.push(self)
29
+ items
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,13 @@
1
+ module Expressir
2
+ module Model
3
+ module Statements
4
+ class Return
5
+ attr_accessor :expression
6
+
7
+ def initialize(options = {})
8
+ @expression = options[:expression]
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,8 @@
1
+ module Expressir
2
+ module Model
3
+ module Statements
4
+ class Skip
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,27 @@
1
+ module Expressir
2
+ module Model
3
+ class SubtypeConstraint
4
+ include Scope
5
+ include Identifier
6
+
7
+ attr_accessor :applies_to
8
+ attr_accessor :abstract
9
+ attr_accessor :total_over
10
+ attr_accessor :supertype_expression
11
+
12
+ def initialize(options = {})
13
+ @id = options[:id]
14
+
15
+ @applies_to = options[:applies_to]
16
+ @abstract = options[:abstract]
17
+ @total_over = options[:total_over]
18
+ @supertype_expression = options[:supertype_expression]
19
+ end
20
+
21
+ def children
22
+ items = []
23
+ items
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,24 @@
1
+ module Expressir
2
+ module Model
3
+ class Type
4
+ include Scope
5
+ include Identifier
6
+
7
+ attr_accessor :type
8
+ attr_accessor :where
9
+
10
+ def initialize(options = {})
11
+ @id = options[:id]
12
+
13
+ @type = options[:type]
14
+ @where = options[:where]
15
+ end
16
+
17
+ def children
18
+ items = []
19
+ items.push(*@where) if @where
20
+ items
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,17 @@
1
+ module Expressir
2
+ module Model
3
+ module Types
4
+ class Aggregate
5
+ include Identifier
6
+
7
+ attr_accessor :base_type
8
+
9
+ def initialize(options = {})
10
+ @id = options[:id]
11
+
12
+ @base_type = options[:base_type]
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,21 @@
1
+ module Expressir
2
+ module Model
3
+ module Types
4
+ class Array
5
+ attr_accessor :bound1
6
+ attr_accessor :bound2
7
+ attr_accessor :optional
8
+ attr_accessor :unique
9
+ attr_accessor :base_type
10
+
11
+ def initialize(options = {})
12
+ @bound1 = options[:bound1]
13
+ @bound2 = options[:bound2]
14
+ @optional = options[:optional]
15
+ @unique = options[:unique]
16
+ @base_type = options[:base_type]
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,17 @@
1
+ module Expressir
2
+ module Model
3
+ module Types
4
+ class Bag
5
+ attr_accessor :bound1
6
+ attr_accessor :bound2
7
+ attr_accessor :base_type
8
+
9
+ def initialize(options = {})
10
+ @bound1 = options[:bound1]
11
+ @bound2 = options[:bound2]
12
+ @base_type = options[:base_type]
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ module Expressir
2
+ module Model
3
+ module Types
4
+ class Binary
5
+ attr_accessor :width
6
+ attr_accessor :fixed
7
+
8
+ def initialize(options = {})
9
+ @width = options[:width]
10
+ @fixed = options[:fixed]
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,8 @@
1
+ module Expressir
2
+ module Model
3
+ module Types
4
+ class Boolean
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,19 @@
1
+ module Expressir
2
+ module Model
3
+ module Types
4
+ class Enumeration
5
+ attr_accessor :extensible
6
+ attr_accessor :items
7
+ attr_accessor :extension_type
8
+ attr_accessor :extension_items
9
+
10
+ def initialize(options = {})
11
+ @extensible = options[:extensible]
12
+ @items = options[:items]
13
+ @extension_type = options[:extension_type]
14
+ @extension_items = options[:extension_items]
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,13 @@
1
+ module Expressir
2
+ module Model
3
+ module Types
4
+ class Generic
5
+ include Identifier
6
+
7
+ def initialize(options = {})
8
+ @id = options[:id]
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Expressir
2
+ module Model
3
+ module Types
4
+ class GenericEntity
5
+ include Identifier
6
+
7
+ def initialize(options = {})
8
+ @id = options[:id]
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,8 @@
1
+ module Expressir
2
+ module Model
3
+ module Types
4
+ class Integer
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,19 @@
1
+ module Expressir
2
+ module Model
3
+ module Types
4
+ class List
5
+ attr_accessor :bound1
6
+ attr_accessor :bound2
7
+ attr_accessor :unique
8
+ attr_accessor :base_type
9
+
10
+ def initialize(options = {})
11
+ @bound1 = options[:bound1]
12
+ @bound2 = options[:bound2]
13
+ @unique = options[:unique]
14
+ @base_type = options[:base_type]
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,8 @@
1
+ module Expressir
2
+ module Model
3
+ module Types
4
+ class Logical
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Expressir
2
+ module Model
3
+ module Types
4
+ class Number
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,13 @@
1
+ module Expressir
2
+ module Model
3
+ module Types
4
+ class Real
5
+ attr_accessor :precision
6
+
7
+ def initialize(options = {})
8
+ @precision = options[:precision]
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,21 @@
1
+ module Expressir
2
+ module Model
3
+ module Types
4
+ class Select
5
+ attr_accessor :extensible
6
+ attr_accessor :generic_entity
7
+ attr_accessor :items
8
+ attr_accessor :extension_type
9
+ attr_accessor :extension_items
10
+
11
+ def initialize(options = {})
12
+ @extensible = options[:extensible]
13
+ @generic_entity = options[:generic_entity]
14
+ @items = options[:items]
15
+ @extension_type = options[:extension_type]
16
+ @extension_items = options[:extension_items]
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,17 @@
1
+ module Expressir
2
+ module Model
3
+ module Types
4
+ class Set
5
+ attr_accessor :bound1
6
+ attr_accessor :bound2
7
+ attr_accessor :base_type
8
+
9
+ def initialize(options = {})
10
+ @bound1 = options[:bound1]
11
+ @bound2 = options[:bound2]
12
+ @base_type = options[:base_type]
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ module Expressir
2
+ module Model
3
+ module Types
4
+ class String
5
+ attr_accessor :width
6
+ attr_accessor :fixed
7
+
8
+ def initialize(options = {})
9
+ @width = options[:width]
10
+ @fixed = options[:fixed]
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module Expressir
2
+ module Model
3
+ class Unique
4
+ include Identifier
5
+
6
+ attr_accessor :attributes
7
+
8
+ def initialize(options = {})
9
+ @id = options[:id]
10
+
11
+ @attributes = options[:attributes]
12
+ end
13
+ end
14
+ end
15
+ end