expressir 0.2.26-x64-mingw32 → 0.2.27-x64-mingw32

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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/lib/expressir/express_exp/2.4/express_parser.so +0 -0
  3. data/lib/expressir/express_exp/2.5/express_parser.so +0 -0
  4. data/lib/expressir/express_exp/2.6/express_parser.so +0 -0
  5. data/lib/expressir/express_exp/2.7/express_parser.so +0 -0
  6. data/lib/expressir/express_exp/3.0/express_parser.so +0 -0
  7. data/lib/expressir/express_exp/formatter.rb +10 -0
  8. data/lib/expressir/express_exp/visitor.rb +27 -1
  9. data/lib/expressir/model.rb +2 -0
  10. data/lib/expressir/model/attribute.rb +2 -2
  11. data/lib/expressir/model/constant.rb +2 -2
  12. data/lib/expressir/model/entity.rb +7 -7
  13. data/lib/expressir/model/enumeration_item.rb +2 -2
  14. data/lib/expressir/model/expressions/aggregate_initializer.rb +1 -1
  15. data/lib/expressir/model/expressions/call.rb +1 -1
  16. data/lib/expressir/model/expressions/entity_constructor.rb +1 -1
  17. data/lib/expressir/model/expressions/query_expression.rb +2 -2
  18. data/lib/expressir/model/function.rb +11 -11
  19. data/lib/expressir/model/interface.rb +1 -1
  20. data/lib/expressir/model/interfaced_item.rb +2 -2
  21. data/lib/expressir/model/parameter.rb +2 -2
  22. data/lib/expressir/model/procedure.rb +11 -11
  23. data/lib/expressir/model/remark_item.rb +1 -1
  24. data/lib/expressir/model/repository.rb +1 -1
  25. data/lib/expressir/model/rule.rb +13 -13
  26. data/lib/expressir/model/schema.rb +10 -10
  27. data/lib/expressir/model/schema_version.rb +15 -0
  28. data/lib/expressir/model/schema_version_item.rb +15 -0
  29. data/lib/expressir/model/statements/alias.rb +3 -3
  30. data/lib/expressir/model/statements/call.rb +1 -1
  31. data/lib/expressir/model/statements/case.rb +1 -1
  32. data/lib/expressir/model/statements/case_action.rb +1 -1
  33. data/lib/expressir/model/statements/compound.rb +1 -1
  34. data/lib/expressir/model/statements/if.rb +2 -2
  35. data/lib/expressir/model/statements/repeat.rb +3 -3
  36. data/lib/expressir/model/subtype_constraint.rb +3 -3
  37. data/lib/expressir/model/type.rb +4 -4
  38. data/lib/expressir/model/types/aggregate.rb +2 -2
  39. data/lib/expressir/model/types/enumeration.rb +2 -2
  40. data/lib/expressir/model/types/generic.rb +2 -2
  41. data/lib/expressir/model/types/generic_entity.rb +2 -2
  42. data/lib/expressir/model/types/select.rb +2 -2
  43. data/lib/expressir/model/unique.rb +3 -3
  44. data/lib/expressir/model/variable.rb +2 -2
  45. data/lib/expressir/model/where.rb +2 -2
  46. data/lib/expressir/version.rb +1 -1
  47. data/original/examples/syntax/single.exp +1 -1
  48. data/original/examples/syntax/single.yaml +3 -0
  49. data/original/examples/syntax/single_formatted.exp +1 -1
  50. data/original/examples/syntax/single_formatted.yaml +4 -1
  51. data/original/examples/syntax/syntax.exp +1 -1
  52. data/original/examples/syntax/syntax.yaml +18 -2
  53. data/original/examples/syntax/syntax_formatted.exp +1 -1
  54. data/original/examples/syntax/syntax_hyperlink_formatted.exp +1 -1
  55. data/original/examples/syntax/syntax_schema_head_formatted.exp +1 -1
  56. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dff149f1d71131ec1ac49d776da73afe49ff19d23b3727fb4ae95624d8bb285e
4
- data.tar.gz: 851cfa5f4617720bb92454bab7f0072cc90ac78e5d177036c78a6d4232ecebef
3
+ metadata.gz: 88db9468c402096775bd62accb0f5fe8044da37e3fbcf87e1f36a5c1b4c4df58
4
+ data.tar.gz: 1ae937f7d24a422d9adb5eef33c523485a67c38283f16bda6154e52b0cc1bb2b
5
5
  SHA512:
6
- metadata.gz: c431cceb8e446c4fe7a93775ffe5de048beceedddab791a7104f603995b1fc858e880c3aa41e35a955a527474b64a6140edf3cdc2e6d41b417492b9f68daf5e7
7
- data.tar.gz: 25b6960d89f352b294d63eb8908a6b38035d1abc66b60a06bc6dd83804905d1e1cb52a65efc61176128f6f2f61291803317d0bacd781cd7e02f61031be4348c1
6
+ metadata.gz: fc0e1b1f5abab4c07f24cb7d47d6a707ba139496a7b553c22b96107776e37ec84f60edc46c9c05558b9388e682bdbbee126c08a5001a9ae1adabcbce51b7b773
7
+ data.tar.gz: 8db9e5799d8bd2ab3533939220fc729ed00813379319beabbb1c629e8b53f598c649fe4246b295f16d9510e8d6d3a9344619f0a4925cf6a9c1aff0c0611d6ffb
@@ -62,6 +62,8 @@ module Expressir
62
62
  format_rule(node)
63
63
  elsif node.is_a? Model::Schema
64
64
  format_schema(node)
65
+ elsif node.is_a? Model::SchemaVersion
66
+ format_schema_version(node)
65
67
  elsif node.is_a? Model::SubtypeConstraint
66
68
  format_subtype_constraint(node)
67
69
  elsif node.is_a? Model::Type
@@ -659,6 +661,14 @@ module Expressir
659
661
  ].join("\n")
660
662
  end
661
663
 
664
+ def format_schema_version(node)
665
+ [
666
+ "'",
667
+ node.value,
668
+ "'"
669
+ ].join('')
670
+ end
671
+
662
672
  def format_subtype_constraint(node)
663
673
  [
664
674
  [
@@ -1957,7 +1957,33 @@ module Expressir
1957
1957
  def visit_schema_version_id(ctx)
1958
1958
  ctx__string_literal = ctx.string_literal
1959
1959
 
1960
- visit_if(ctx__string_literal)
1960
+ value = visit_if(ctx__string_literal)
1961
+ value = value.value
1962
+
1963
+ items = if value.start_with?('{') and value.end_with?('}')
1964
+ parts = value.sub(/^\{/, '').sub(/\}$/, '').split(' ')
1965
+ parts.map do |part|
1966
+ if match = part.match(/^(.+)\((\d+)\)$/)
1967
+ Model::SchemaVersionItem.new({
1968
+ name: match[1],
1969
+ value: match[2]
1970
+ })
1971
+ elsif part.match(/^\d+$/)
1972
+ Model::SchemaVersionItem.new({
1973
+ value: part
1974
+ })
1975
+ else
1976
+ Model::SchemaVersionItem.new({
1977
+ name: part
1978
+ })
1979
+ end
1980
+ end
1981
+ end
1982
+
1983
+ Model::SchemaVersion.new({
1984
+ value: value,
1985
+ items: items
1986
+ })
1961
1987
  end
1962
1988
 
1963
1989
  def visit_selector(ctx)
@@ -18,6 +18,8 @@ require 'expressir/model/remark_item'
18
18
  require 'expressir/model/repository'
19
19
  require 'expressir/model/rule'
20
20
  require 'expressir/model/schema'
21
+ require 'expressir/model/schema_version'
22
+ require 'expressir/model/schema_version_item'
21
23
  require 'expressir/model/subtype_constraint'
22
24
  require 'expressir/model/type'
23
25
  require 'expressir/model/unique'
@@ -15,8 +15,8 @@ module Expressir
15
15
 
16
16
  def initialize(options = {})
17
17
  @id = options[:id]
18
- @remarks = options.fetch(:remarks, [])
19
- @remark_items = options.fetch(:remark_items, [])
18
+ @remarks = options[:remarks] || []
19
+ @remark_items = options[:remark_items] || []
20
20
  @source = options[:source]
21
21
 
22
22
  @kind = options[:kind]
@@ -8,8 +8,8 @@ module Expressir
8
8
 
9
9
  def initialize(options = {})
10
10
  @id = options[:id]
11
- @remarks = options.fetch(:remarks, [])
12
- @remark_items = options.fetch(:remark_items, [])
11
+ @remarks = options[:remarks] || []
12
+ @remark_items = options[:remark_items] || []
13
13
  @source = options[:source]
14
14
 
15
15
  @type = options[:type]
@@ -13,17 +13,17 @@ module Expressir
13
13
 
14
14
  def initialize(options = {})
15
15
  @id = options[:id]
16
- @remarks = options.fetch(:remarks, [])
17
- @remark_items = options.fetch(:remark_items, [])
16
+ @remarks = options[:remarks] || []
17
+ @remark_items = options[:remark_items] || []
18
18
  @source = options[:source]
19
19
 
20
20
  @abstract = options[:abstract]
21
21
  @supertype_expression = options[:supertype_expression]
22
- @subtype_of = options.fetch(:subtype_of, [])
23
- @attributes = options.fetch(:attributes, [])
24
- @unique = options.fetch(:unique, [])
25
- @where = options.fetch(:where, [])
26
- @informal_propositions = options.fetch(:informal_propositions, [])
22
+ @subtype_of = options[:subtype_of] || []
23
+ @attributes = options[:attributes] || []
24
+ @unique = options[:unique] || []
25
+ @where = options[:where] || []
26
+ @informal_propositions = options[:informal_propositions] || []
27
27
 
28
28
  super
29
29
  end
@@ -5,8 +5,8 @@ module Expressir
5
5
 
6
6
  def initialize(options = {})
7
7
  @id = options[:id]
8
- @remarks = options.fetch(:remarks, [])
9
- @remark_items = options.fetch(:remark_items, [])
8
+ @remarks = options[:remarks] || []
9
+ @remark_items = options[:remark_items] || []
10
10
  @source = options[:source]
11
11
 
12
12
  super
@@ -5,7 +5,7 @@ module Expressir
5
5
  model_attr_accessor :items
6
6
 
7
7
  def initialize(options = {})
8
- @items = options.fetch(:items, [])
8
+ @items = options[:items] || []
9
9
 
10
10
  super
11
11
  end
@@ -7,7 +7,7 @@ module Expressir
7
7
 
8
8
  def initialize(options = {})
9
9
  @ref = options[:ref]
10
- @parameters = options.fetch(:parameters, [])
10
+ @parameters = options[:parameters] || []
11
11
 
12
12
  super
13
13
  end
@@ -7,7 +7,7 @@ module Expressir
7
7
 
8
8
  def initialize(options = {})
9
9
  @entity = options[:entity]
10
- @parameters = options.fetch(:parameters, [])
10
+ @parameters = options[:parameters] || []
11
11
 
12
12
  super
13
13
  end
@@ -9,8 +9,8 @@ module Expressir
9
9
 
10
10
  def initialize(options = {})
11
11
  @id = options[:id]
12
- @remarks = options.fetch(:remarks, [])
13
- @remark_items = options.fetch(:remark_items, [])
12
+ @remarks = options[:remarks] || []
13
+ @remark_items = options[:remark_items] || []
14
14
  @source = options[:source]
15
15
 
16
16
  @aggregate_source = options[:aggregate_source]
@@ -16,20 +16,20 @@ module Expressir
16
16
 
17
17
  def initialize(options = {})
18
18
  @id = options[:id]
19
- @remarks = options.fetch(:remarks, [])
20
- @remark_items = options.fetch(:remark_items, [])
19
+ @remarks = options[:remarks] || []
20
+ @remark_items = options[:remark_items] || []
21
21
  @source = options[:source]
22
22
 
23
- @parameters = options.fetch(:parameters, [])
23
+ @parameters = options[:parameters] || []
24
24
  @return_type = options[:return_type]
25
- @types = options.fetch(:types, [])
26
- @entities = options.fetch(:entities, [])
27
- @subtype_constraints = options.fetch(:subtype_constraints, [])
28
- @functions = options.fetch(:functions, [])
29
- @procedures = options.fetch(:procedures, [])
30
- @constants = options.fetch(:constants, [])
31
- @variables = options.fetch(:variables, [])
32
- @statements = options.fetch(:statements, [])
25
+ @types = options[:types] || []
26
+ @entities = options[:entities] || []
27
+ @subtype_constraints = options[:subtype_constraints] || []
28
+ @functions = options[:functions] || []
29
+ @procedures = options[:procedures] || []
30
+ @constants = options[:constants] || []
31
+ @variables = options[:variables] || []
32
+ @statements = options[:statements] || []
33
33
 
34
34
  super
35
35
  end
@@ -11,7 +11,7 @@ module Expressir
11
11
  def initialize(options = {})
12
12
  @kind = options[:kind]
13
13
  @schema = options[:schema]
14
- @items = options.fetch(:items, [])
14
+ @items = options[:items] || []
15
15
 
16
16
  super
17
17
  end
@@ -9,8 +9,8 @@ module Expressir
9
9
 
10
10
  def initialize(options = {})
11
11
  @id = options[:id]
12
- @remarks = options.fetch(:remarks, [])
13
- @remark_items = options.fetch(:remark_items, [])
12
+ @remarks = options[:remarks] || []
13
+ @remark_items = options[:remark_items] || []
14
14
 
15
15
  @base_item = options[:base_item]
16
16
 
@@ -8,8 +8,8 @@ module Expressir
8
8
 
9
9
  def initialize(options = {})
10
10
  @id = options[:id]
11
- @remarks = options.fetch(:remarks, [])
12
- @remark_items = options.fetch(:remark_items, [])
11
+ @remarks = options[:remarks] || []
12
+ @remark_items = options[:remark_items] || []
13
13
  @source = options[:source]
14
14
 
15
15
  @var = options[:var]
@@ -15,19 +15,19 @@ module Expressir
15
15
 
16
16
  def initialize(options = {})
17
17
  @id = options[:id]
18
- @remarks = options.fetch(:remarks, [])
19
- @remark_items = options.fetch(:remark_items, [])
18
+ @remarks = options[:remarks] || []
19
+ @remark_items = options[:remark_items] || []
20
20
  @source = options[:source]
21
21
 
22
- @parameters = options.fetch(:parameters, [])
23
- @types = options.fetch(:types, [])
24
- @entities = options.fetch(:entities, [])
25
- @subtype_constraints = options.fetch(:subtype_constraints, [])
26
- @functions = options.fetch(:functions, [])
27
- @procedures = options.fetch(:procedures, [])
28
- @constants = options.fetch(:constants, [])
29
- @variables = options.fetch(:variables, [])
30
- @statements = options.fetch(:statements, [])
22
+ @parameters = options[:parameters] || []
23
+ @types = options[:types] || []
24
+ @entities = options[:entities] || []
25
+ @subtype_constraints = options[:subtype_constraints] || []
26
+ @functions = options[:functions] || []
27
+ @procedures = options[:procedures] || []
28
+ @constants = options[:constants] || []
29
+ @variables = options[:variables] || []
30
+ @statements = options[:statements] || []
31
31
 
32
32
  super
33
33
  end
@@ -6,7 +6,7 @@ module Expressir
6
6
 
7
7
  def initialize(options = {})
8
8
  @id = options[:id]
9
- @remarks = options.fetch(:remarks, [])
9
+ @remarks = options[:remarks] || []
10
10
 
11
11
  super
12
12
  end
@@ -4,7 +4,7 @@ module Expressir
4
4
  model_attr_accessor :schemas
5
5
 
6
6
  def initialize(options = {})
7
- @schemas = options.fetch(:schemas, [])
7
+ @schemas = options[:schemas] || []
8
8
 
9
9
  super
10
10
  end
@@ -17,21 +17,21 @@ module Expressir
17
17
 
18
18
  def initialize(options = {})
19
19
  @id = options[:id]
20
- @remarks = options.fetch(:remarks, [])
21
- @remark_items = options.fetch(:remark_items, [])
20
+ @remarks = options[:remarks] || []
21
+ @remark_items = options[:remark_items] || []
22
22
  @source = options[:source]
23
23
 
24
- @applies_to = options.fetch(:applies_to, [])
25
- @types = options.fetch(:types, [])
26
- @entities = options.fetch(:entities, [])
27
- @subtype_constraints = options.fetch(:subtype_constraints, [])
28
- @functions = options.fetch(:functions, [])
29
- @procedures = options.fetch(:procedures, [])
30
- @constants = options.fetch(:constants, [])
31
- @variables = options.fetch(:variables, [])
32
- @statements = options.fetch(:statements, [])
33
- @where = options.fetch(:where, [])
34
- @informal_propositions = options.fetch(:informal_propositions, [])
24
+ @applies_to = options[:applies_to] || []
25
+ @types = options[:types] || []
26
+ @entities = options[:entities] || []
27
+ @subtype_constraints = options[:subtype_constraints] || []
28
+ @functions = options[:functions] || []
29
+ @procedures = options[:procedures] || []
30
+ @constants = options[:constants] || []
31
+ @variables = options[:variables] || []
32
+ @statements = options[:statements] || []
33
+ @where = options[:where] || []
34
+ @informal_propositions = options[:informal_propositions] || []
35
35
 
36
36
  super
37
37
  end
@@ -19,19 +19,19 @@ module Expressir
19
19
  @file = options[:file]
20
20
 
21
21
  @id = options[:id]
22
- @remarks = options.fetch(:remarks, [])
23
- @remark_items = options.fetch(:remark_items, [])
22
+ @remarks = options[:remarks] || []
23
+ @remark_items = options[:remark_items] || []
24
24
  @source = options[:source]
25
25
 
26
26
  @version = options[:version]
27
- @interfaces = options.fetch(:interfaces, [])
28
- @constants = options.fetch(:constants, [])
29
- @types = options.fetch(:types, [])
30
- @entities = options.fetch(:entities, [])
31
- @subtype_constraints = options.fetch(:subtype_constraints, [])
32
- @functions = options.fetch(:functions, [])
33
- @rules = options.fetch(:rules, [])
34
- @procedures = options.fetch(:procedures, [])
27
+ @interfaces = options[:interfaces] || []
28
+ @constants = options[:constants] || []
29
+ @types = options[:types] || []
30
+ @entities = options[:entities] || []
31
+ @subtype_constraints = options[:subtype_constraints] || []
32
+ @functions = options[:functions] || []
33
+ @rules = options[:rules] || []
34
+ @procedures = options[:procedures] || []
35
35
 
36
36
  super
37
37
  end
@@ -0,0 +1,15 @@
1
+ module Expressir
2
+ module Model
3
+ class SchemaVersion < ModelElement
4
+ model_attr_accessor :value
5
+ model_attr_accessor :items
6
+
7
+ def initialize(options = {})
8
+ @value = options[:value]
9
+ @items = options[:items] || []
10
+
11
+ super
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module Expressir
2
+ module Model
3
+ class SchemaVersionItem < ModelElement
4
+ model_attr_accessor :name
5
+ model_attr_accessor :value
6
+
7
+ def initialize(options = {})
8
+ @name = options[:name]
9
+ @value = options[:value]
10
+
11
+ super
12
+ end
13
+ end
14
+ end
15
+ end
@@ -9,12 +9,12 @@ module Expressir
9
9
 
10
10
  def initialize(options = {})
11
11
  @id = options[:id]
12
- @remarks = options.fetch(:remarks, [])
13
- @remark_items = options.fetch(:remark_items, [])
12
+ @remarks = options[:remarks] || []
13
+ @remark_items = options[:remark_items] || []
14
14
  @source = options[:source]
15
15
 
16
16
  @expression = options[:expression]
17
- @statements = options.fetch(:statements, [])
17
+ @statements = options[:statements] || []
18
18
 
19
19
  super
20
20
  end
@@ -7,7 +7,7 @@ module Expressir
7
7
 
8
8
  def initialize(options = {})
9
9
  @ref = options[:ref]
10
- @parameters = options.fetch(:parameters, [])
10
+ @parameters = options[:parameters] || []
11
11
 
12
12
  super
13
13
  end
@@ -8,7 +8,7 @@ module Expressir
8
8
 
9
9
  def initialize(options = {})
10
10
  @expression = options[:expression]
11
- @actions = options.fetch(:actions, [])
11
+ @actions = options[:actions] || []
12
12
  @otherwise_statement = options[:otherwise_statement]
13
13
 
14
14
  super
@@ -6,7 +6,7 @@ module Expressir
6
6
  model_attr_accessor :statement
7
7
 
8
8
  def initialize(options = {})
9
- @labels = options.fetch(:labels, [])
9
+ @labels = options[:labels] || []
10
10
  @statement = options[:statement]
11
11
 
12
12
  super
@@ -5,7 +5,7 @@ module Expressir
5
5
  model_attr_accessor :statements
6
6
 
7
7
  def initialize(options = {})
8
- @statements = options.fetch(:statements, [])
8
+ @statements = options[:statements] || []
9
9
 
10
10
  super
11
11
  end
@@ -8,8 +8,8 @@ module Expressir
8
8
 
9
9
  def initialize(options = {})
10
10
  @expression = options[:expression]
11
- @statements = options.fetch(:statements, [])
12
- @else_statements = options.fetch(:else_statements, [])
11
+ @statements = options[:statements] || []
12
+ @else_statements = options[:else_statements] || []
13
13
 
14
14
  super
15
15
  end
@@ -13,8 +13,8 @@ module Expressir
13
13
 
14
14
  def initialize(options = {})
15
15
  @id = options[:id]
16
- @remarks = options.fetch(:remarks, [])
17
- @remark_items = options.fetch(:remark_items, [])
16
+ @remarks = options[:remarks] || []
17
+ @remark_items = options[:remark_items] || []
18
18
  @source = options[:source]
19
19
 
20
20
  @bound1 = options[:bound1]
@@ -22,7 +22,7 @@ module Expressir
22
22
  @increment = options[:increment]
23
23
  @while_expression = options[:while_expression]
24
24
  @until_expression = options[:until_expression]
25
- @statements = options.fetch(:statements, [])
25
+ @statements = options[:statements] || []
26
26
 
27
27
  super
28
28
  end
@@ -10,13 +10,13 @@ module Expressir
10
10
 
11
11
  def initialize(options = {})
12
12
  @id = options[:id]
13
- @remarks = options.fetch(:remarks, [])
14
- @remark_items = options.fetch(:remark_items, [])
13
+ @remarks = options[:remarks] || []
14
+ @remark_items = options[:remark_items] || []
15
15
  @source = options[:source]
16
16
 
17
17
  @applies_to = options[:applies_to]
18
18
  @abstract = options[:abstract]
19
- @total_over = options.fetch(:total_over, [])
19
+ @total_over = options[:total_over] || []
20
20
  @supertype_expression = options[:supertype_expression]
21
21
 
22
22
  super
@@ -9,13 +9,13 @@ module Expressir
9
9
 
10
10
  def initialize(options = {})
11
11
  @id = options[:id]
12
- @remarks = options.fetch(:remarks, [])
13
- @remark_items = options.fetch(:remark_items, [])
12
+ @remarks = options[:remarks] || []
13
+ @remark_items = options[:remark_items] || []
14
14
  @source = options[:source]
15
15
 
16
16
  @type = options[:type]
17
- @where = options.fetch(:where, [])
18
- @informal_propositions = options.fetch(:informal_propositions, [])
17
+ @where = options[:where] || []
18
+ @informal_propositions = options[:informal_propositions] || []
19
19
 
20
20
  super
21
21
  end
@@ -8,8 +8,8 @@ module Expressir
8
8
 
9
9
  def initialize(options = {})
10
10
  @id = options[:id]
11
- @remarks = options.fetch(:remarks, [])
12
- @remark_items = options.fetch(:remark_items, [])
11
+ @remarks = options[:remarks] || []
12
+ @remark_items = options[:remark_items] || []
13
13
  @source = options[:source]
14
14
 
15
15
  @base_type = options[:base_type]
@@ -9,9 +9,9 @@ module Expressir
9
9
 
10
10
  def initialize(options = {})
11
11
  @extensible = options[:extensible]
12
- @items = options.fetch(:items, [])
12
+ @items = options[:items] || []
13
13
  @extension_type = options[:extension_type]
14
- @extension_items = options.fetch(:extension_items, [])
14
+ @extension_items = options[:extension_items] || []
15
15
 
16
16
  super
17
17
  end
@@ -6,8 +6,8 @@ module Expressir
6
6
 
7
7
  def initialize(options = {})
8
8
  @id = options[:id]
9
- @remarks = options.fetch(:remarks, [])
10
- @remark_items = options.fetch(:remark_items, [])
9
+ @remarks = options[:remarks] || []
10
+ @remark_items = options[:remark_items] || []
11
11
  @source = options[:source]
12
12
 
13
13
  super
@@ -6,8 +6,8 @@ module Expressir
6
6
 
7
7
  def initialize(options = {})
8
8
  @id = options[:id]
9
- @remarks = options.fetch(:remarks, [])
10
- @remark_items = options.fetch(:remark_items, [])
9
+ @remarks = options[:remarks] || []
10
+ @remark_items = options[:remark_items] || []
11
11
  @source = options[:source]
12
12
 
13
13
  super
@@ -11,9 +11,9 @@ module Expressir
11
11
  def initialize(options = {})
12
12
  @extensible = options[:extensible]
13
13
  @generic_entity = options[:generic_entity]
14
- @items = options.fetch(:items, [])
14
+ @items = options[:items] || []
15
15
  @extension_type = options[:extension_type]
16
- @extension_items = options.fetch(:extension_items, [])
16
+ @extension_items = options[:extension_items] || []
17
17
 
18
18
  super
19
19
  end
@@ -7,11 +7,11 @@ module Expressir
7
7
 
8
8
  def initialize(options = {})
9
9
  @id = options[:id]
10
- @remarks = options.fetch(:remarks, [])
11
- @remark_items = options.fetch(:remark_items, [])
10
+ @remarks = options[:remarks] || []
11
+ @remark_items = options[:remark_items] || []
12
12
  @source = options[:source]
13
13
 
14
- @attributes = options.fetch(:attributes, [])
14
+ @attributes = options[:attributes] || []
15
15
 
16
16
  super
17
17
  end
@@ -8,8 +8,8 @@ module Expressir
8
8
 
9
9
  def initialize(options = {})
10
10
  @id = options[:id]
11
- @remarks = options.fetch(:remarks, [])
12
- @remark_items = options.fetch(:remark_items, [])
11
+ @remarks = options[:remarks] || []
12
+ @remark_items = options[:remark_items] || []
13
13
  @source = options[:source]
14
14
 
15
15
  @type = options[:type]
@@ -7,8 +7,8 @@ module Expressir
7
7
 
8
8
  def initialize(options = {})
9
9
  @id = options[:id]
10
- @remarks = options.fetch(:remarks, [])
11
- @remark_items = options.fetch(:remark_items, [])
10
+ @remarks = options[:remarks] || []
11
+ @remark_items = options[:remark_items] || []
12
12
  @source = options[:source]
13
13
 
14
14
  @expression = options[:expression]
@@ -1,3 +1,3 @@
1
1
  module Expressir
2
- VERSION = "0.2.26".freeze
2
+ VERSION = "0.2.27".freeze
3
3
  end
@@ -1,4 +1,4 @@
1
- SCHEMA single_schema;
1
+ SCHEMA single_schema 'version';
2
2
  ENTITY empty_entity; END_ENTITY;
3
3
  ENTITY subtype_empty_entity SUBTYPE OF (empty_entity); END_ENTITY;
4
4
  END_SCHEMA;
@@ -4,6 +4,9 @@ schemas:
4
4
  - _class: Expressir::Model::Schema
5
5
  file: original/examples/syntax/single.exp
6
6
  id: single_schema
7
+ version:
8
+ _class: Expressir::Model::SchemaVersion
9
+ value: version
7
10
  entities:
8
11
  - _class: Expressir::Model::Entity
9
12
  id: empty_entity
@@ -1,4 +1,4 @@
1
- SCHEMA single_schema;
1
+ SCHEMA single_schema 'version';
2
2
 
3
3
  ENTITY empty_entity;
4
4
  END_ENTITY;
@@ -4,6 +4,9 @@ schemas:
4
4
  - _class: Expressir::Model::Schema
5
5
  file: original/examples/syntax/single.exp
6
6
  id: single_schema
7
+ version:
8
+ _class: Expressir::Model::SchemaVersion
9
+ value: version
7
10
  entities:
8
11
  - _class: Expressir::Model::Entity
9
12
  id: empty_entity
@@ -21,7 +24,7 @@ schemas:
21
24
  SUBTYPE OF (empty_entity);
22
25
  END_ENTITY;
23
26
  source: |-
24
- SCHEMA single_schema;
27
+ SCHEMA single_schema 'version';
25
28
 
26
29
  ENTITY empty_entity;
27
30
  END_ENTITY;
@@ -1,5 +1,5 @@
1
1
  -- schema
2
- SCHEMA syntax_schema 'version';
2
+ SCHEMA syntax_schema '{ISO standard 10303 part(41) object(1) version(8)}';
3
3
 
4
4
  -- interfaces
5
5
  USE FROM contract_schema;
@@ -5,8 +5,24 @@ schemas:
5
5
  file: original/examples/syntax/syntax.exp
6
6
  id: syntax_schema
7
7
  version:
8
- _class: Expressir::Model::Literals::String
9
- value: version
8
+ _class: Expressir::Model::SchemaVersion
9
+ value: "{ISO standard 10303 part(41) object(1) version(8)}"
10
+ items:
11
+ - _class: Expressir::Model::SchemaVersionItem
12
+ name: ISO
13
+ - _class: Expressir::Model::SchemaVersionItem
14
+ name: standard
15
+ - _class: Expressir::Model::SchemaVersionItem
16
+ value: '10303'
17
+ - _class: Expressir::Model::SchemaVersionItem
18
+ name: part
19
+ value: '41'
20
+ - _class: Expressir::Model::SchemaVersionItem
21
+ name: object
22
+ value: '1'
23
+ - _class: Expressir::Model::SchemaVersionItem
24
+ name: version
25
+ value: '8'
10
26
  interfaces:
11
27
  - _class: Expressir::Model::Interface
12
28
  kind: :USE
@@ -1,4 +1,4 @@
1
- SCHEMA syntax_schema 'version';
1
+ SCHEMA syntax_schema '{ISO standard 10303 part(41) object(1) version(8)}';
2
2
 
3
3
  USE FROM contract_schema;
4
4
  USE FROM contract_schema
@@ -1,4 +1,4 @@
1
- SCHEMA syntax_schema 'version';
1
+ SCHEMA syntax_schema '{ISO standard 10303 part(41) object(1) version(8)}';
2
2
 
3
3
  USE FROM contract_schema;
4
4
  USE FROM contract_schema
@@ -1,4 +1,4 @@
1
- SCHEMA syntax_schema 'version';
1
+ SCHEMA syntax_schema '{ISO standard 10303 part(41) object(1) version(8)}';
2
2
 
3
3
  USE FROM contract_schema;
4
4
  USE FROM contract_schema
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expressir
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.26
4
+ version: 0.2.27
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-29 00:00:00.000000000 Z
11
+ date: 2021-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -260,6 +260,8 @@ files:
260
260
  - lib/expressir/model/repository.rb
261
261
  - lib/expressir/model/rule.rb
262
262
  - lib/expressir/model/schema.rb
263
+ - lib/expressir/model/schema_version.rb
264
+ - lib/expressir/model/schema_version_item.rb
263
265
  - lib/expressir/model/statements/alias.rb
264
266
  - lib/expressir/model/statements/assignment.rb
265
267
  - lib/expressir/model/statements/call.rb