expressir 1.2.3-arm64-darwin → 1.2.6-arm64-darwin
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.cross_rubies +0 -6
- data/.github/workflows/rake.yml +223 -31
- data/.gitignore +7 -1
- data/.gitmodules +3 -0
- data/.rubocop.yml +13 -4
- data/README.adoc +8 -0
- data/Rakefile +4 -1
- data/bin/console +0 -1
- data/bin/rspec +3 -3
- data/exe/expressir +4 -2
- data/exe/format +1 -1
- data/exe/format-test +25 -25
- data/exe/generate-parser +16 -13
- data/expressir.gemspec +11 -9
- data/lib/expressir/config.rb +1 -1
- data/lib/expressir/express/2.7/express_parser.bundle +0 -0
- data/lib/expressir/express/3.0/express_parser.bundle +0 -0
- data/lib/expressir/express/3.1/express_parser.bundle +0 -0
- data/lib/expressir/express/parser.rb +17 -15
- data/lib/expressir/express/visitor.rb +7 -3
- data/lib/expressir/model.rb +78 -78
- data/lib/expressir/version.rb +1 -1
- data/rakelib/antlr4-native.rake +161 -0
- data/rakelib/cross-ruby.rake +213 -162
- data/spec/acceptance/version_spec.rb +17 -2
- data/spec/expressir/express/cache_spec.rb +23 -5
- data/spec/expressir/express/formatter_spec.rb +54 -8
- data/spec/expressir/express/parser_spec.rb +47 -11
- data/spec/expressir/model/model_element_spec.rb +198 -146
- data/spec/spec_helper.rb +7 -0
- metadata +52 -61
- data/demo.rb +0 -18
- data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.exp +0 -9589
- data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.owl +0 -36619
- data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.xml +0 -13294
- data/original/examples/employment/eclipse/.project +0 -17
- data/original/examples/employment/eclipse/Export/Employment.png +0 -0
- data/original/examples/employment/eclipse/Express/employment_schema.exp +0 -33
- data/original/examples/employment/eclipse/Express/employment_schema.xmi +0 -77
- data/original/examples/employment/eclipse/Express/employment_schema.xml +0 -93
- data/original/examples/employment/eclipse/Models/Employment.uml +0 -4
- data/original/examples/employment/eclipse/Models/Employment.umldi +0 -240
- data/original/examples/employment/eclipse/readme.txt +0 -7
- data/original/examples/employment/employment_schema.exp +0 -33
- data/original/examples/employment/employment_schema.rb +0 -232
- data/original/examples/employment/employment_schema.xml +0 -93
- data/original/examples/employment/employment_schema___module.rb +0 -46
- data/original/examples/employment/employment_schema___p28attr.rb +0 -126
- data/original/examples/employment/employment_schema___p28inst.rb +0 -26
- data/original/examples/employment/example_employment_data.xml +0 -1
- data/original/examples/employment/example_employment_data_copy.xml +0 -1
- data/original/examples/employment/example_employment_reader.rb +0 -30
- data/original/examples/employment/example_employment_writer.rb +0 -51
- data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.exp +0 -3710
- data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.owl +0 -35880
- data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.xmi +0 -15357
- data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.xml +0 -9468
- data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.exp +0 -8404
- data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.owl +0 -43147
- data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.xmi +0 -18341
- data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.xml +0 -11632
- data/original/exp2ruby.rb +0 -525
- data/original/expsm.rb +0 -34
- data/original/mapping_owl.rb +0 -1018
- data/original/mapping_sysml.rb +0 -2281
- data/original/mapping_uml2.rb +0 -599
- data/original/mapping_uml2_eclipse.rb +0 -433
- data/original/reeper.rb +0 -134
- data/spec/expressr_spec.rb +0 -5
@@ -7,7 +7,8 @@ require "expressir/express/hyperlink_formatter"
|
|
7
7
|
|
8
8
|
RSpec.describe Expressir::Express::Formatter do
|
9
9
|
describe ".format" do
|
10
|
-
it "exports an object (single.exp)" do
|
10
|
+
it "exports an object (single.exp)" do |example|
|
11
|
+
print "\n[#{example.description}] "
|
11
12
|
exp_file = Expressir.root_path.join("spec", "syntax", "single.exp")
|
12
13
|
formatted_exp_file = Expressir.root_path.join("spec", "syntax", "single_formatted.exp")
|
13
14
|
|
@@ -18,9 +19,15 @@ RSpec.describe Expressir::Express::Formatter do
|
|
18
19
|
expected_result = File.read(formatted_exp_file)
|
19
20
|
|
20
21
|
expect(result).to eq(expected_result)
|
22
|
+
|
23
|
+
# Validate Object Space
|
24
|
+
GC.start
|
25
|
+
GC.verify_compaction_references
|
26
|
+
GC.verify_internal_consistency
|
21
27
|
end
|
22
28
|
|
23
|
-
it "exports an object (multiple.exp)" do
|
29
|
+
it "exports an object (multiple.exp)" do |example|
|
30
|
+
print "\n[#{example.description}] "
|
24
31
|
exp_file = Expressir.root_path.join("spec", "syntax", "multiple.exp")
|
25
32
|
formatted_exp_file = Expressir.root_path.join("spec", "syntax", "multiple_formatted.exp")
|
26
33
|
|
@@ -31,9 +38,13 @@ RSpec.describe Expressir::Express::Formatter do
|
|
31
38
|
expected_result = File.read(formatted_exp_file)
|
32
39
|
|
33
40
|
expect(result).to eq(expected_result)
|
41
|
+
GC.start
|
42
|
+
GC.verify_compaction_references
|
43
|
+
GC.verify_internal_consistency
|
34
44
|
end
|
35
45
|
|
36
|
-
it "exports an object (remark.exp)" do
|
46
|
+
it "exports an object (remark.exp)" do |example|
|
47
|
+
print "\n[#{example.description}] "
|
37
48
|
exp_file = Expressir.root_path.join("spec", "syntax", "remark.exp")
|
38
49
|
formatted_exp_file = Expressir.root_path.join("spec", "syntax", "remark_formatted.exp")
|
39
50
|
|
@@ -44,9 +55,15 @@ RSpec.describe Expressir::Express::Formatter do
|
|
44
55
|
expected_result = File.read(formatted_exp_file)
|
45
56
|
|
46
57
|
expect(result).to eq(expected_result)
|
58
|
+
|
59
|
+
# Validate Object Space
|
60
|
+
GC.start
|
61
|
+
GC.verify_compaction_references
|
62
|
+
GC.verify_internal_consistency
|
47
63
|
end
|
48
64
|
|
49
|
-
it "exports an object (syntax.exp)" do
|
65
|
+
it "exports an object (syntax.exp)" do |example|
|
66
|
+
print "\n[#{example.description}] "
|
50
67
|
exp_file = Expressir.root_path.join("spec", "syntax", "syntax.exp")
|
51
68
|
formatted_exp_file = Expressir.root_path.join("spec", "syntax", "syntax_formatted.exp")
|
52
69
|
|
@@ -57,9 +74,15 @@ RSpec.describe Expressir::Express::Formatter do
|
|
57
74
|
expected_result = File.read(formatted_exp_file)
|
58
75
|
|
59
76
|
expect(result).to eq(expected_result)
|
77
|
+
|
78
|
+
# Validate Object Space
|
79
|
+
GC.start
|
80
|
+
GC.verify_compaction_references
|
81
|
+
GC.verify_internal_consistency
|
60
82
|
end
|
61
83
|
|
62
|
-
it "exports an object with schema head formatter (syntax.exp)" do
|
84
|
+
it "exports an object with schema head formatter (syntax.exp)" do |example|
|
85
|
+
print "\n[#{example.description}] "
|
63
86
|
exp_file = Expressir.root_path.join("spec", "syntax", "syntax.exp")
|
64
87
|
formatted_exp_file = Expressir.root_path.join("spec", "syntax", "syntax_schema_head_formatted.exp")
|
65
88
|
|
@@ -73,9 +96,15 @@ RSpec.describe Expressir::Express::Formatter do
|
|
73
96
|
expected_result = File.read(formatted_exp_file)
|
74
97
|
|
75
98
|
expect(result).to eq(expected_result)
|
99
|
+
|
100
|
+
# Validate Object Space
|
101
|
+
GC.start
|
102
|
+
GC.verify_compaction_references
|
103
|
+
GC.verify_internal_consistency
|
76
104
|
end
|
77
105
|
|
78
|
-
it "exports an object with hyperlink formatter (syntax.exp)" do
|
106
|
+
it "exports an object with hyperlink formatter (syntax.exp)" do |example|
|
107
|
+
print "\n[#{example.description}] "
|
79
108
|
exp_file = Expressir.root_path.join("spec", "syntax", "syntax.exp")
|
80
109
|
formatted_exp_file = Expressir.root_path.join("spec", "syntax", "syntax_hyperlink_formatted.exp")
|
81
110
|
|
@@ -89,9 +118,15 @@ RSpec.describe Expressir::Express::Formatter do
|
|
89
118
|
expected_result = File.read(formatted_exp_file)
|
90
119
|
|
91
120
|
expect(result).to eq(expected_result)
|
121
|
+
|
122
|
+
# Validate Object Space
|
123
|
+
GC.start
|
124
|
+
GC.verify_compaction_references
|
125
|
+
GC.verify_internal_consistency
|
92
126
|
end
|
93
127
|
|
94
|
-
it "exports an object with hyperlink formatter (multiple.exp)" do
|
128
|
+
it "exports an object with hyperlink formatter (multiple.exp)" do |example|
|
129
|
+
print "\n[#{example.description}] "
|
95
130
|
exp_file = Expressir.root_path.join("spec", "syntax", "multiple.exp")
|
96
131
|
formatted_exp_file = Expressir.root_path.join("spec", "syntax", "multiple_hyperlink_formatted.exp")
|
97
132
|
|
@@ -105,9 +140,15 @@ RSpec.describe Expressir::Express::Formatter do
|
|
105
140
|
expected_result = File.read(formatted_exp_file)
|
106
141
|
|
107
142
|
expect(result).to eq(expected_result)
|
143
|
+
|
144
|
+
# Validate Object Space
|
145
|
+
GC.start
|
146
|
+
GC.verify_compaction_references
|
147
|
+
GC.verify_internal_consistency
|
108
148
|
end
|
109
149
|
|
110
|
-
it "exports an object with schema head and hyperlink formatter (multiple.exp)" do
|
150
|
+
it "exports an object with schema head and hyperlink formatter (multiple.exp)" do |example|
|
151
|
+
print "\n[#{example.description}] "
|
111
152
|
exp_file = Expressir.root_path.join("spec", "syntax", "multiple.exp")
|
112
153
|
formatted_exp_file = Expressir.root_path.join("spec", "syntax", "multiple_schema_head_hyperlink_formatted.exp")
|
113
154
|
|
@@ -122,6 +163,11 @@ RSpec.describe Expressir::Express::Formatter do
|
|
122
163
|
expected_result = File.read(formatted_exp_file)
|
123
164
|
|
124
165
|
expect(result).to eq(expected_result)
|
166
|
+
|
167
|
+
# Validate Object Space
|
168
|
+
GC.start
|
169
|
+
GC.verify_compaction_references
|
170
|
+
GC.verify_internal_consistency
|
125
171
|
end
|
126
172
|
end
|
127
173
|
end
|
@@ -4,7 +4,8 @@ require "expressir/express/parser"
|
|
4
4
|
|
5
5
|
RSpec.describe Expressir::Express::Parser do
|
6
6
|
describe ".from_file" do
|
7
|
-
it "parses a file (single.exp)" do
|
7
|
+
it "parses a file (single.exp)" do |example|
|
8
|
+
print "\n[#{example.description}] "
|
8
9
|
exp_file = Expressir.root_path.join("spec", "syntax", "single.exp")
|
9
10
|
yaml_file = Expressir.root_path.join("spec", "syntax", "single.yaml")
|
10
11
|
|
@@ -12,11 +13,17 @@ RSpec.describe Expressir::Express::Parser do
|
|
12
13
|
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
|
13
14
|
# File.write(yaml_file, result)
|
14
15
|
expected_result = File.read(yaml_file)
|
15
|
-
|
16
|
+
|
16
17
|
expect(result).to eq(expected_result)
|
18
|
+
|
19
|
+
# Validate Object Space
|
20
|
+
GC.start
|
21
|
+
GC.verify_compaction_references
|
22
|
+
GC.verify_internal_consistency
|
17
23
|
end
|
18
24
|
|
19
|
-
it "parses a file (multiple.exp)" do
|
25
|
+
it "parses a file (multiple.exp)" do |example|
|
26
|
+
print "\n[#{example.description}] "
|
20
27
|
exp_file = Expressir.root_path.join("spec", "syntax", "multiple.exp")
|
21
28
|
yaml_file = Expressir.root_path.join("spec", "syntax", "multiple.yaml")
|
22
29
|
|
@@ -24,11 +31,17 @@ RSpec.describe Expressir::Express::Parser do
|
|
24
31
|
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
|
25
32
|
# File.write(yaml_file, result)
|
26
33
|
expected_result = File.read(yaml_file)
|
27
|
-
|
34
|
+
|
28
35
|
expect(result).to eq(expected_result)
|
36
|
+
|
37
|
+
# Validate Object Space
|
38
|
+
GC.start
|
39
|
+
GC.verify_compaction_references
|
40
|
+
GC.verify_internal_consistency
|
29
41
|
end
|
30
42
|
|
31
|
-
it "parses a file (syntax.exp)" do
|
43
|
+
it "parses a file (syntax.exp)" do |example|
|
44
|
+
print "\n[#{example.description}] "
|
32
45
|
exp_file = Expressir.root_path.join("spec", "syntax", "syntax.exp")
|
33
46
|
yaml_file = Expressir.root_path.join("spec", "syntax", "syntax.yaml")
|
34
47
|
|
@@ -36,11 +49,17 @@ RSpec.describe Expressir::Express::Parser do
|
|
36
49
|
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
|
37
50
|
# File.write(yaml_file, result)
|
38
51
|
expected_result = File.read(yaml_file)
|
39
|
-
|
52
|
+
|
40
53
|
expect(result).to eq(expected_result)
|
54
|
+
|
55
|
+
# Validate Object Space
|
56
|
+
GC.start
|
57
|
+
GC.verify_compaction_references
|
58
|
+
GC.verify_internal_consistency
|
41
59
|
end
|
42
60
|
|
43
|
-
it "parses a file (remark.exp)" do
|
61
|
+
it "parses a file (remark.exp)" do |example|
|
62
|
+
print "\n[#{example.description}] "
|
44
63
|
exp_file = Expressir.root_path.join("spec", "syntax", "remark.exp")
|
45
64
|
yaml_file = Expressir.root_path.join("spec", "syntax", "remark.yaml")
|
46
65
|
|
@@ -48,11 +67,17 @@ RSpec.describe Expressir::Express::Parser do
|
|
48
67
|
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
|
49
68
|
# File.write(yaml_file, result)
|
50
69
|
expected_result = File.read(yaml_file)
|
51
|
-
|
70
|
+
|
52
71
|
expect(result).to eq(expected_result)
|
72
|
+
|
73
|
+
# Validate Object Space
|
74
|
+
GC.start
|
75
|
+
GC.verify_compaction_references
|
76
|
+
GC.verify_internal_consistency
|
53
77
|
end
|
54
78
|
|
55
|
-
it "parses a file including original source (multiple.exp)" do
|
79
|
+
it "parses a file including original source (multiple.exp)" do |example|
|
80
|
+
print "\n[#{example.description}] "
|
56
81
|
exp_file = Expressir.root_path.join("spec", "syntax", "multiple.exp")
|
57
82
|
|
58
83
|
input = File.read(exp_file)
|
@@ -69,14 +94,20 @@ RSpec.describe Expressir::Express::Parser do
|
|
69
94
|
stop_index = input.index("END_ENTITY;") + "END_ENTITY;".length - 1
|
70
95
|
expected_result = input[start_index..stop_index]
|
71
96
|
expect(entity.source).to eq(expected_result)
|
97
|
+
|
98
|
+
# Validate Object Space
|
99
|
+
GC.start
|
100
|
+
GC.verify_compaction_references
|
101
|
+
GC.verify_internal_consistency
|
72
102
|
end
|
73
103
|
end
|
74
104
|
|
75
105
|
describe ".from_files" do
|
76
|
-
it "parses multiple files (single.exp, multiple.exp)" do
|
106
|
+
it "parses multiple files (single.exp, multiple.exp)" do |example|
|
107
|
+
print "\n[#{example.description}] "
|
77
108
|
exp_files = [
|
78
109
|
Expressir.root_path.join("spec", "syntax", "single.exp"),
|
79
|
-
Expressir.root_path.join("spec", "syntax", "multiple.exp")
|
110
|
+
Expressir.root_path.join("spec", "syntax", "multiple.exp"),
|
80
111
|
]
|
81
112
|
|
82
113
|
repo = Expressir::Express::Parser.from_files(exp_files)
|
@@ -93,6 +124,11 @@ RSpec.describe Expressir::Express::Parser do
|
|
93
124
|
expect(schemas[3].id).to eq("multiple_schema3")
|
94
125
|
expect(schemas[4].file).to eq(exp_files[1].to_s)
|
95
126
|
expect(schemas[4].id).to eq("multiple_schema4")
|
127
|
+
|
128
|
+
# Validate Object Space
|
129
|
+
GC.start
|
130
|
+
GC.verify_compaction_references
|
131
|
+
GC.verify_internal_consistency
|
96
132
|
end
|
97
133
|
end
|
98
134
|
end
|