expressir 0.2.25-x86-linux → 0.2.26-x86-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +7 -6
- data/exe/format +2 -65
- data/exe/format-test +81 -0
- data/lib/expressir/express_exp/2.4/express_parser.so +0 -0
- data/lib/expressir/express_exp/2.5/express_parser.so +0 -0
- data/lib/expressir/express_exp/2.6/express_parser.so +0 -0
- data/lib/expressir/express_exp/2.7/express_parser.so +0 -0
- data/lib/expressir/express_exp/3.0/express_parser.so +0 -0
- data/lib/expressir/express_exp/resolve_references_model_visitor.rb +0 -4
- data/lib/expressir/model/model_element.rb +4 -0
- data/lib/expressir/model/schema.rb +2 -0
- data/lib/expressir/version.rb +1 -1
- data/original/examples/syntax/multiple.exp +1 -1
- data/original/examples/syntax/multiple.yaml +4 -4
- data/original/examples/syntax/multiple_formatted.exp +1 -1
- data/original/examples/syntax/multiple_hyperlink_formatted.exp +4 -4
- data/original/examples/syntax/multiple_schema_head_hyperlink_formatted.exp +1 -1
- data/spec/expressir/express_exp/parser_spec.rb +1 -1
- data/spec/expressir/model/model_element_spec.rb +53 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a19e83ffe59a27a7d77522e0e32ea2a24904a8b1968a2ad0b6384eccbd17c1e1
|
4
|
+
data.tar.gz: 2d6dc3476e43daee8a5cfd89876d2adb00c9a4d4291a143d6a626bef142dc97b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d171a07ad68d3adc106485b89805aa2c361b0923bd0c1653ff57f32c0e2c99047ad064c2ba4358d44c2d9aac992dd3980da23dfb1885591fd8d7933619c6c2b6
|
7
|
+
data.tar.gz: 36e9f2da9d6020afef1bdd2eee141c5b03062a1c2991710370760256f1fd9c1a4f674a40c6d5aee6de81cd10cd9d85bc424dc1046b7e370b842a09fcb249b08a
|
data/.github/workflows/rake.yml
CHANGED
@@ -40,11 +40,12 @@ jobs:
|
|
40
40
|
ruby-version: ${{ matrix.ruby }}
|
41
41
|
bundler-cache: true
|
42
42
|
|
43
|
-
-
|
43
|
+
- uses: actions/cache@v2
|
44
|
+
with:
|
45
|
+
path: lib/expressir/express_exp/express_parser.*
|
46
|
+
key: v3-${{ runner.os }}-${{ matrix.ruby }}-${{ hashFiles('ext/express-parser/extconf.rb', 'ext/express-parser/antlrgen/**', 'ext/express-parser/express_parser.cpp', '.git/modules/ext/express-parser/antlr4-upstream/HEAD') }}
|
44
47
|
|
45
|
-
-
|
48
|
+
- if: hashFiles('lib/expressir/express_exp/express_parser.*') == ''
|
49
|
+
run: bundle exec rake compile
|
46
50
|
|
47
|
-
-
|
48
|
-
with:
|
49
|
-
name: express_parser-${{ matrix.os }}-${{ matrix.ruby }}
|
50
|
-
path: lib/expressir/express_exp/express_parser.so
|
51
|
+
- run: bundle exec rake
|
data/exe/format
CHANGED
@@ -1,81 +1,18 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require "yaml"
|
4
|
-
require "tempfile"
|
5
4
|
require "expressir/express_exp/parser"
|
6
5
|
require "expressir/express_exp/formatter"
|
7
6
|
require "expressir/express_exp/schema_head_formatter"
|
8
7
|
require "expressir/express_exp/hyperlink_formatter"
|
9
|
-
require "expressir/express_exp/cache"
|
10
8
|
|
11
|
-
exp_files =
|
12
|
-
# basic test
|
13
|
-
# '../iso-10303-stepmod/data/resources/action_schema/action_schema_annotated.exp',
|
14
|
-
# '../iso-10303-stepmod/data/resources/basic_attribute_schema/basic_attribute_schema_annotated.exp',
|
15
|
-
# '../iso-10303-stepmod/data/resources/support_resource_schema/support_resource_schema_annotated.exp',
|
16
|
-
# cyclic reference test
|
17
|
-
# '../iso-10303-stepmod/data/modules/analysis/mim_annotated.exp',
|
18
|
-
# '../iso-10303-stepmod/data/modules/analysis_product_relationships/mim_annotated.exp',
|
19
|
-
# cyclic reference test 2
|
20
|
-
# '../iso-10303-stepmod/data/resources/product_property_definition_schema/product_property_definition_schema_annotated.exp',
|
21
|
-
# '../iso-10303-stepmod/data/resources/product_property_representation_schema/product_property_representation_schema_annotated.exp',
|
22
|
-
# renamed reference test (36s)
|
23
|
-
# '../iso-10303-stepmod/ballots/ballots/ap210_wg12/express/resources/mathematical_functions_schema.exp',
|
24
|
-
# '../iso-10303-stepmod/data/resources/iso13584_expressions_schema/iso13584_expressions_schema.exp',
|
25
|
-
# annotated-express test (12s)
|
26
|
-
# see https://github.com/metanorma/annotated-express/blob/master/data/documents/resources/fundamentals_of_product_description_and_support/sections/04-schemas.adoc
|
27
|
-
'../iso-10303-stepmod/data/resources/action_schema/action_schema_annotated.exp',
|
28
|
-
'../iso-10303-stepmod/data/resources/application_context_schema/application_context_schema_annotated.exp',
|
29
|
-
'../iso-10303-stepmod/data/resources/approval_schema/approval_schema_annotated.exp',
|
30
|
-
'../iso-10303-stepmod/data/resources/basic_attribute_schema/basic_attribute_schema_annotated.exp',
|
31
|
-
'../iso-10303-stepmod/data/resources/certification_schema/certification_schema_annotated.exp',
|
32
|
-
'../iso-10303-stepmod/data/resources/contract_schema/contract_schema_annotated.exp',
|
33
|
-
'../iso-10303-stepmod/data/resources/date_time_schema/date_time_schema_annotated.exp',
|
34
|
-
'../iso-10303-stepmod/data/resources/document_schema/document_schema.exp',
|
35
|
-
'../iso-10303-stepmod/data/resources/effectivity_schema/effectivity_schema_annotated.exp',
|
36
|
-
'../iso-10303-stepmod/data/resources/experience_schema/experience_schema_annotated.exp',
|
37
|
-
'../iso-10303-stepmod/data/resources/external_reference_schema/external_reference_schema_annotated.exp',
|
38
|
-
'../iso-10303-stepmod/data/resources/group_schema/group_schema_annotated.exp',
|
39
|
-
'../iso-10303-stepmod/data/resources/language_schema/language_schema_annotated.exp',
|
40
|
-
'../iso-10303-stepmod/data/resources/location_schema/location_schema_annotated.exp',
|
41
|
-
'../iso-10303-stepmod/data/resources/management_resources_schema/management_resources_schema_annotated.exp',
|
42
|
-
'../iso-10303-stepmod/data/resources/measure_schema/measure_schema_annotated.exp',
|
43
|
-
'../iso-10303-stepmod/data/resources/person_organization_schema/person_organization_schema_annotated.exp',
|
44
|
-
'../iso-10303-stepmod/data/resources/process_property_schema/process_property_schema_annotated.exp',
|
45
|
-
'../iso-10303-stepmod/data/resources/product_definition_schema/product_definition_schema_annotated.exp',
|
46
|
-
'../iso-10303-stepmod/data/resources/product_property_definition_schema/product_property_definition_schema_annotated.exp',
|
47
|
-
'../iso-10303-stepmod/data/resources/product_property_representation_schema/product_property_representation_schema_annotated.exp',
|
48
|
-
'../iso-10303-stepmod/data/resources/qualifications_schema/qualifications_schema_annotated.exp',
|
49
|
-
'../iso-10303-stepmod/data/resources/security_classification_schema/security_classification_schema_annotated.exp',
|
50
|
-
'../iso-10303-stepmod/data/resources/support_resource_schema/support_resource_schema_annotated.exp',
|
51
|
-
# full test (6m18s + 8s = 6m26s)
|
52
|
-
# *`bundle exec ../stepmod-utils/exe/stepmod-find-express-files ../iso-10303-stepmod`.strip.split("\n").map{|file| File.exists?(file.sub(/\.exp$/, '_annotated.exp')) ? file.sub(/\.exp$/, '_annotated.exp') : file}
|
53
|
-
]
|
9
|
+
exp_files = ARGV
|
54
10
|
|
55
|
-
start = Time.now
|
56
11
|
repository = Expressir::ExpressExp::Parser.from_files(exp_files)
|
57
|
-
puts "Parser.from_files time: #{(Time.now - start).round(2)}s"
|
58
|
-
|
59
|
-
temp_file = Tempfile.new
|
60
|
-
begin
|
61
|
-
start = Time.now
|
62
|
-
Expressir::ExpressExp::Cache.to_file(temp_file, repository)
|
63
|
-
puts "Cache.to_file time: #{(Time.now - start).round(2)}s"
|
64
|
-
|
65
|
-
start = Time.now
|
66
|
-
repository = Expressir::ExpressExp::Cache.from_file(temp_file)
|
67
|
-
puts "Cache.from_file time: #{(Time.now - start).round(2)}s"
|
68
|
-
ensure
|
69
|
-
temp_file.close
|
70
|
-
temp_file.unlink
|
71
|
-
end
|
72
|
-
|
73
|
-
start = Time.now
|
74
12
|
formatter = Class.new(Expressir::ExpressExp::Formatter) do
|
75
13
|
include Expressir::ExpressExp::SchemaHeadFormatter
|
76
14
|
include Expressir::ExpressExp::HyperlinkFormatter
|
77
15
|
end
|
78
16
|
result = repository.to_hash(formatter: formatter, skip_empty: true)
|
79
|
-
puts "Repository.to_hash time: #{(Time.now - start).round(2)}s"
|
80
17
|
|
81
|
-
|
18
|
+
puts YAML.dump(result)
|
data/exe/format-test
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "yaml"
|
4
|
+
require "tempfile"
|
5
|
+
require "expressir/express_exp/parser"
|
6
|
+
require "expressir/express_exp/formatter"
|
7
|
+
require "expressir/express_exp/schema_head_formatter"
|
8
|
+
require "expressir/express_exp/hyperlink_formatter"
|
9
|
+
require "expressir/express_exp/cache"
|
10
|
+
|
11
|
+
exp_files = [
|
12
|
+
# basic test
|
13
|
+
# '../iso-10303-stepmod/data/resources/action_schema/action_schema_annotated.exp',
|
14
|
+
# '../iso-10303-stepmod/data/resources/basic_attribute_schema/basic_attribute_schema_annotated.exp',
|
15
|
+
# '../iso-10303-stepmod/data/resources/support_resource_schema/support_resource_schema_annotated.exp',
|
16
|
+
# cyclic reference test
|
17
|
+
# '../iso-10303-stepmod/data/modules/analysis/mim_annotated.exp',
|
18
|
+
# '../iso-10303-stepmod/data/modules/analysis_product_relationships/mim_annotated.exp',
|
19
|
+
# cyclic reference test 2
|
20
|
+
# '../iso-10303-stepmod/data/resources/product_property_definition_schema/product_property_definition_schema_annotated.exp',
|
21
|
+
# '../iso-10303-stepmod/data/resources/product_property_representation_schema/product_property_representation_schema_annotated.exp',
|
22
|
+
# renamed reference test (36s)
|
23
|
+
# '../iso-10303-stepmod/ballots/ballots/ap210_wg12/express/resources/mathematical_functions_schema.exp',
|
24
|
+
# '../iso-10303-stepmod/data/resources/iso13584_expressions_schema/iso13584_expressions_schema.exp',
|
25
|
+
# annotated-express test (12s)
|
26
|
+
# see https://github.com/metanorma/annotated-express/blob/master/data/documents/resources/fundamentals_of_product_description_and_support/sections/04-schemas.adoc
|
27
|
+
'../iso-10303-stepmod/data/resources/action_schema/action_schema_annotated.exp',
|
28
|
+
'../iso-10303-stepmod/data/resources/application_context_schema/application_context_schema_annotated.exp',
|
29
|
+
'../iso-10303-stepmod/data/resources/approval_schema/approval_schema_annotated.exp',
|
30
|
+
'../iso-10303-stepmod/data/resources/basic_attribute_schema/basic_attribute_schema_annotated.exp',
|
31
|
+
'../iso-10303-stepmod/data/resources/certification_schema/certification_schema_annotated.exp',
|
32
|
+
'../iso-10303-stepmod/data/resources/contract_schema/contract_schema_annotated.exp',
|
33
|
+
'../iso-10303-stepmod/data/resources/date_time_schema/date_time_schema_annotated.exp',
|
34
|
+
'../iso-10303-stepmod/data/resources/document_schema/document_schema.exp',
|
35
|
+
'../iso-10303-stepmod/data/resources/effectivity_schema/effectivity_schema_annotated.exp',
|
36
|
+
'../iso-10303-stepmod/data/resources/experience_schema/experience_schema_annotated.exp',
|
37
|
+
'../iso-10303-stepmod/data/resources/external_reference_schema/external_reference_schema_annotated.exp',
|
38
|
+
'../iso-10303-stepmod/data/resources/group_schema/group_schema_annotated.exp',
|
39
|
+
'../iso-10303-stepmod/data/resources/language_schema/language_schema_annotated.exp',
|
40
|
+
'../iso-10303-stepmod/data/resources/location_schema/location_schema_annotated.exp',
|
41
|
+
'../iso-10303-stepmod/data/resources/management_resources_schema/management_resources_schema_annotated.exp',
|
42
|
+
'../iso-10303-stepmod/data/resources/measure_schema/measure_schema_annotated.exp',
|
43
|
+
'../iso-10303-stepmod/data/resources/person_organization_schema/person_organization_schema_annotated.exp',
|
44
|
+
'../iso-10303-stepmod/data/resources/process_property_schema/process_property_schema_annotated.exp',
|
45
|
+
'../iso-10303-stepmod/data/resources/product_definition_schema/product_definition_schema_annotated.exp',
|
46
|
+
'../iso-10303-stepmod/data/resources/product_property_definition_schema/product_property_definition_schema_annotated.exp',
|
47
|
+
'../iso-10303-stepmod/data/resources/product_property_representation_schema/product_property_representation_schema_annotated.exp',
|
48
|
+
'../iso-10303-stepmod/data/resources/qualifications_schema/qualifications_schema_annotated.exp',
|
49
|
+
'../iso-10303-stepmod/data/resources/security_classification_schema/security_classification_schema_annotated.exp',
|
50
|
+
'../iso-10303-stepmod/data/resources/support_resource_schema/support_resource_schema_annotated.exp',
|
51
|
+
# full test (6m18s + 8s = 6m26s)
|
52
|
+
# *`bundle exec ../stepmod-utils/exe/stepmod-find-express-files ../iso-10303-stepmod`.strip.split("\n").map{|file| File.exists?(file.sub(/\.exp$/, '_annotated.exp')) ? file.sub(/\.exp$/, '_annotated.exp') : file}
|
53
|
+
]
|
54
|
+
|
55
|
+
start = Time.now
|
56
|
+
repository = Expressir::ExpressExp::Parser.from_files(exp_files)
|
57
|
+
puts "Parser.from_files time: #{(Time.now - start).round(2)}s"
|
58
|
+
|
59
|
+
temp_file = Tempfile.new
|
60
|
+
begin
|
61
|
+
start = Time.now
|
62
|
+
Expressir::ExpressExp::Cache.to_file(temp_file, repository)
|
63
|
+
puts "Cache.to_file time: #{(Time.now - start).round(2)}s"
|
64
|
+
|
65
|
+
start = Time.now
|
66
|
+
repository = Expressir::ExpressExp::Cache.from_file(temp_file)
|
67
|
+
puts "Cache.from_file time: #{(Time.now - start).round(2)}s"
|
68
|
+
ensure
|
69
|
+
temp_file.close
|
70
|
+
temp_file.unlink
|
71
|
+
end
|
72
|
+
|
73
|
+
start = Time.now
|
74
|
+
formatter = Class.new(Expressir::ExpressExp::Formatter) do
|
75
|
+
include Expressir::ExpressExp::SchemaHeadFormatter
|
76
|
+
include Expressir::ExpressExp::HyperlinkFormatter
|
77
|
+
end
|
78
|
+
result = repository.to_hash(formatter: formatter, skip_empty: true)
|
79
|
+
puts "Repository.to_hash time: #{(Time.now - start).round(2)}s"
|
80
|
+
|
81
|
+
# puts YAML.dump(result)
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/expressir/version.rb
CHANGED
@@ -3,7 +3,7 @@ _class: Expressir::Model::Repository
|
|
3
3
|
schemas:
|
4
4
|
- _class: Expressir::Model::Schema
|
5
5
|
file: original/examples/syntax/multiple.exp
|
6
|
-
id:
|
6
|
+
id: multiple_schema
|
7
7
|
interfaces:
|
8
8
|
- _class: Expressir::Model::Interface
|
9
9
|
kind: :REFERENCE
|
@@ -54,13 +54,13 @@ schemas:
|
|
54
54
|
subtype_of:
|
55
55
|
- _class: Expressir::Model::Expressions::SimpleReference
|
56
56
|
id: empty_entity
|
57
|
-
base_path:
|
57
|
+
base_path: multiple_schema.empty_entity
|
58
58
|
- _class: Expressir::Model::Entity
|
59
59
|
id: subtype_attribute_entity
|
60
60
|
subtype_of:
|
61
61
|
- _class: Expressir::Model::Expressions::SimpleReference
|
62
62
|
id: attribute_entity
|
63
|
-
base_path:
|
63
|
+
base_path: multiple_schema.attribute_entity
|
64
64
|
attributes:
|
65
65
|
- _class: Expressir::Model::Attribute
|
66
66
|
kind: :EXPLICIT
|
@@ -74,7 +74,7 @@ schemas:
|
|
74
74
|
entity:
|
75
75
|
_class: Expressir::Model::Expressions::SimpleReference
|
76
76
|
id: attribute_entity
|
77
|
-
base_path:
|
77
|
+
base_path: multiple_schema.attribute_entity
|
78
78
|
attribute:
|
79
79
|
_class: Expressir::Model::Expressions::SimpleReference
|
80
80
|
id: test
|
@@ -1,4 +1,4 @@
|
|
1
|
-
SCHEMA
|
1
|
+
SCHEMA multiple_schema;
|
2
2
|
|
3
3
|
REFERENCE FROM {{{<<express:multiple_schema2,multiple_schema2>>}}};
|
4
4
|
REFERENCE FROM {{{<<express:multiple_schema3,multiple_schema3>>}}}
|
@@ -17,12 +17,12 @@ ENTITY attribute_entity;
|
|
17
17
|
END_ENTITY;
|
18
18
|
|
19
19
|
ENTITY subtype_empty_entity
|
20
|
-
SUBTYPE OF ({{{<<express:
|
20
|
+
SUBTYPE OF ({{{<<express:multiple_schema.empty_entity,empty_entity>>}}});
|
21
21
|
END_ENTITY;
|
22
22
|
|
23
23
|
ENTITY subtype_attribute_entity
|
24
|
-
SUBTYPE OF ({{{<<express:
|
25
|
-
SELF\{{{<<express:
|
24
|
+
SUBTYPE OF ({{{<<express:multiple_schema.attribute_entity,attribute_entity>>}}});
|
25
|
+
SELF\{{{<<express:multiple_schema.attribute_entity,attribute_entity>>}}}.test : BOOLEAN;
|
26
26
|
END_ENTITY;
|
27
27
|
|
28
28
|
ENTITY subtype_attribute_entity2
|
@@ -86,7 +86,7 @@ RSpec.describe Expressir::ExpressExp::Parser do
|
|
86
86
|
expect(schemas[0].file).to eq(exp_files[0].to_s)
|
87
87
|
expect(schemas[0].id).to eq("single_schema")
|
88
88
|
expect(schemas[1].file).to eq(exp_files[1].to_s)
|
89
|
-
expect(schemas[1].id).to eq("
|
89
|
+
expect(schemas[1].id).to eq("multiple_schema")
|
90
90
|
expect(schemas[2].file).to eq(exp_files[1].to_s)
|
91
91
|
expect(schemas[2].id).to eq("multiple_schema2")
|
92
92
|
expect(schemas[3].file).to eq(exp_files[1].to_s)
|
@@ -71,7 +71,57 @@ RSpec.describe Expressir::Model::ModelElement do
|
|
71
71
|
end
|
72
72
|
|
73
73
|
describe ".find" do
|
74
|
-
it "finds an object" do
|
74
|
+
it "finds an object (single.exp)" do
|
75
|
+
exp_file = Expressir.root_path.join("original", "examples", "syntax", "single.exp")
|
76
|
+
|
77
|
+
repo = Expressir::ExpressExp::Parser.from_file(exp_file)
|
78
|
+
|
79
|
+
# universal scope
|
80
|
+
expect(repo.find('single_schema')).to be_instance_of(Expressir::Model::Schema)
|
81
|
+
expect(repo.find('single_schema.empty_entity')).to be_instance_of(Expressir::Model::Entity)
|
82
|
+
|
83
|
+
# schema scope
|
84
|
+
schema = repo.schemas.first
|
85
|
+
expect(schema.find('empty_entity')).to be_instance_of(Expressir::Model::Entity)
|
86
|
+
end
|
87
|
+
|
88
|
+
it "finds an object (multiple.exp)" do
|
89
|
+
exp_file = Expressir.root_path.join("original", "examples", "syntax", "multiple.exp")
|
90
|
+
|
91
|
+
repo = Expressir::ExpressExp::Parser.from_file(exp_file)
|
92
|
+
|
93
|
+
# universal scope
|
94
|
+
expect(repo.find('multiple_schema')).to be_instance_of(Expressir::Model::Schema)
|
95
|
+
expect(repo.find('multiple_schema.empty_entity')).to be_instance_of(Expressir::Model::Entity)
|
96
|
+
expect(repo.find('multiple_schema.attribute_entity')).to be_instance_of(Expressir::Model::Entity)
|
97
|
+
expect(repo.find('multiple_schema.attribute_entity2')).to be_instance_of(Expressir::Model::Entity)
|
98
|
+
expect(repo.find('multiple_schema.attribute_entity3')).to be_instance_of(Expressir::Model::Entity)
|
99
|
+
expect(repo.find('multiple_schema.attribute_entity4')).to be_instance_of(Expressir::Model::Entity)
|
100
|
+
|
101
|
+
# schema scope
|
102
|
+
schema = repo.schemas.first
|
103
|
+
expect(schema.find('empty_entity')).to be_instance_of(Expressir::Model::Entity)
|
104
|
+
expect(schema.find('attribute_entity')).to be_instance_of(Expressir::Model::Entity)
|
105
|
+
expect(schema.find('attribute_entity2')).to be_instance_of(Expressir::Model::Entity)
|
106
|
+
expect(schema.find('attribute_entity3')).to be_instance_of(Expressir::Model::Entity)
|
107
|
+
expect(schema.find('attribute_entity4')).to be_instance_of(Expressir::Model::Entity)
|
108
|
+
end
|
109
|
+
|
110
|
+
it "finds an object (syntax.exp)" do
|
111
|
+
exp_file = Expressir.root_path.join("original", "examples", "syntax", "syntax.exp")
|
112
|
+
|
113
|
+
repo = Expressir::ExpressExp::Parser.from_file(exp_file)
|
114
|
+
|
115
|
+
# universal scope
|
116
|
+
expect(repo.find('syntax_schema')).to be_instance_of(Expressir::Model::Schema)
|
117
|
+
expect(repo.find('syntax_schema.empty_entity')).to be_instance_of(Expressir::Model::Entity)
|
118
|
+
|
119
|
+
# schema scope
|
120
|
+
schema = repo.schemas.first
|
121
|
+
expect(schema.find('empty_entity')).to be_instance_of(Expressir::Model::Entity)
|
122
|
+
end
|
123
|
+
|
124
|
+
it "finds an object (remark.exp)" do
|
75
125
|
exp_file = Expressir.root_path.join("original", "examples", "syntax", "remark.exp")
|
76
126
|
|
77
127
|
repo = Expressir::ExpressExp::Parser.from_file(exp_file)
|
@@ -116,6 +166,7 @@ RSpec.describe Expressir::Model::ModelElement do
|
|
116
166
|
expect(repo.find('remark_schema.remark_rule.wr:WR1')).to be_instance_of(Expressir::Model::Where)
|
117
167
|
expect(repo.find('remark_schema.remark_rule.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
118
168
|
expect(repo.find('remark_schema.remark_rule.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
169
|
+
expect(repo.find('remark_schema.remark_item')).to be_instance_of(Expressir::Model::RemarkItem)
|
119
170
|
|
120
171
|
# schema scope
|
121
172
|
schema = repo.schemas.first
|
@@ -157,6 +208,7 @@ RSpec.describe Expressir::Model::ModelElement do
|
|
157
208
|
expect(schema.find('remark_rule.wr:WR1')).to be_instance_of(Expressir::Model::Where)
|
158
209
|
expect(schema.find('remark_rule.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
159
210
|
expect(schema.find('remark_rule.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
211
|
+
expect(schema.find('remark_item')).to be_instance_of(Expressir::Model::RemarkItem)
|
160
212
|
|
161
213
|
# type scope
|
162
214
|
type = schema.types.first
|
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.
|
4
|
+
version: 0.2.26
|
5
5
|
platform: x86-linux
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -175,6 +175,7 @@ files:
|
|
175
175
|
- docs/development.md
|
176
176
|
- exe/expressir
|
177
177
|
- exe/format
|
178
|
+
- exe/format-test
|
178
179
|
- exe/generate-parser
|
179
180
|
- expressir.gemspec
|
180
181
|
- lib/expressir.rb
|