expressir 2.1.15 → 2.1.16
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 +4 -4
- data/.rubocop_todo.yml +15 -8
- data/README.adoc +200 -58
- data/docs/benchmarking.adoc +107 -0
- data/expressir.gemspec +3 -1
- data/lib/expressir/benchmark.rb +307 -0
- data/lib/expressir/cli.rb +165 -0
- data/lib/expressir/config.rb +40 -1
- data/lib/expressir/express/cache.rb +1 -1
- data/lib/expressir/express/error.rb +87 -0
- data/lib/expressir/express/hyperlink_formatter.rb +1 -1
- data/lib/expressir/express/parser.rb +53 -30
- data/lib/expressir/express/schema_head_formatter.rb +1 -1
- data/lib/expressir/express/visitor.rb +54 -48
- data/lib/expressir/version.rb +1 -1
- data/lib/expressir.rb +1 -0
- metadata +34 -4
- data/docs/development.md +0 -90
@@ -1,4 +1,5 @@
|
|
1
1
|
require "parslet"
|
2
|
+
require_relative "error"
|
2
3
|
|
3
4
|
module Expressir
|
4
5
|
module Express
|
@@ -386,56 +387,78 @@ module Expressir
|
|
386
387
|
# @param [Boolean] skip_references skip resolving references
|
387
388
|
# @param [Boolean] include_source attach original source code to model elements
|
388
389
|
# @return [Model::Repository]
|
390
|
+
# @raise [SchemaParseFailure] if the schema file fails to parse
|
389
391
|
def self.from_file(file, skip_references: nil, include_source: nil, root_path: nil) # rubocop:disable Metrics/AbcSize
|
390
|
-
|
392
|
+
Expressir::Benchmark.measure_file(file) do
|
393
|
+
source = File.read file
|
391
394
|
|
392
|
-
|
393
|
-
|
395
|
+
# remove root path from file path
|
396
|
+
schema_file = root_path ? Pathname.new(file.to_s).relative_path_from(root_path).to_s : file.to_s
|
394
397
|
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
398
|
+
begin
|
399
|
+
ast = Parser.new.parse source
|
400
|
+
rescue Parslet::ParseFailed => e
|
401
|
+
# Instead of just printing, raise a proper error with file context
|
402
|
+
raise Error::SchemaParseFailure.new(schema_file, e)
|
403
|
+
end
|
401
404
|
|
402
|
-
|
403
|
-
|
405
|
+
visitor = Expressir::Express::Visitor.new(source, include_source: include_source)
|
406
|
+
@repository = visitor.visit_ast ast, :top
|
404
407
|
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
408
|
+
@repository.schemas.each do |schema|
|
409
|
+
schema.file = schema_file
|
410
|
+
schema.file_basename = File.basename(schema_file, ".exp")
|
411
|
+
schema.formatted = schema.to_s(no_remarks: true)
|
412
|
+
end
|
410
413
|
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
414
|
+
unless skip_references
|
415
|
+
Expressir::Benchmark.measure_references do
|
416
|
+
@resolve_references_model_visitor = ResolveReferencesModelVisitor.new
|
417
|
+
@resolve_references_model_visitor.visit(@repository)
|
418
|
+
end
|
419
|
+
end
|
415
420
|
|
416
|
-
|
421
|
+
@repository
|
422
|
+
end
|
417
423
|
end
|
418
424
|
|
419
425
|
# Parses Express files into an Express model
|
420
426
|
# @param [Array<String>] files Express file paths
|
421
427
|
# @param [Boolean] skip_references skip resolving references
|
422
428
|
# @param [Boolean] include_source attach original source code to model elements
|
429
|
+
# @yield [filename, schemas, error] Optional block called for each file processed
|
430
|
+
# @yieldparam filename [String] Name of the file being processed
|
431
|
+
# @yieldparam schemas [Array, nil] Array of parsed schemas (nil if parsing failed)
|
432
|
+
# @yieldparam error [Exception, nil] Error that occurred (nil if parsing succeeded)
|
423
433
|
# @return [Model::Repository]
|
424
434
|
def self.from_files(files, skip_references: nil, include_source: nil, root_path: nil)
|
425
|
-
|
426
|
-
|
435
|
+
all_schemas = []
|
436
|
+
|
437
|
+
files.each do |file|
|
427
438
|
repository = from_file(file, skip_references: true, root_path: root_path)
|
428
|
-
|
429
|
-
|
430
|
-
|
439
|
+
file_schemas = repository.schemas
|
440
|
+
all_schemas.concat(file_schemas)
|
441
|
+
|
442
|
+
# Call the progress block if provided
|
443
|
+
yield(file, file_schemas, nil) if block_given?
|
444
|
+
rescue StandardError => e
|
445
|
+
# Call the progress block with the error if provided
|
446
|
+
yield(file, nil, e) if block_given?
|
447
|
+
|
448
|
+
# Re-raise the error if it's not a schema parse failure
|
449
|
+
# This allows handling of specific schema parse failures while still propagating other errors
|
450
|
+
raise unless e.is_a?(Error::SchemaParseFailure)
|
451
|
+
end
|
431
452
|
|
432
453
|
@repository = Model::Repository.new(
|
433
|
-
schemas:
|
454
|
+
schemas: all_schemas,
|
434
455
|
)
|
435
456
|
|
436
|
-
unless
|
437
|
-
|
438
|
-
|
457
|
+
unless skip_references
|
458
|
+
Expressir::Benchmark.measure_references do
|
459
|
+
@resolve_references_model_visitor = ResolveReferencesModelVisitor.new
|
460
|
+
@resolve_references_model_visitor.visit(@repository)
|
461
|
+
end
|
439
462
|
end
|
440
463
|
|
441
464
|
@repository
|
@@ -9,7 +9,7 @@ module Expressir
|
|
9
9
|
# @!visibility private
|
10
10
|
def self.included(mod)
|
11
11
|
if !mod.superclass.private_method_defined?(:format_declarations_schema) || !mod.superclass.private_method_defined?(:format_declarations_schema_head)
|
12
|
-
raise "
|
12
|
+
raise Error::FormatterMethodMissingError.new("SchemaHeadFormatter", "format_declarations_schema/format_declarations_schema_head")
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
@@ -24,8 +24,6 @@ require "set"
|
|
24
24
|
# - prevents segfault in ANTLR4 C++ runtime, not sure why they are caused
|
25
25
|
# - e.g. see visit_schema_decl
|
26
26
|
|
27
|
-
require "objspace"
|
28
|
-
|
29
27
|
module Expressir
|
30
28
|
module Express
|
31
29
|
class Visitor
|
@@ -110,9 +108,18 @@ module Expressir
|
|
110
108
|
]
|
111
109
|
Ctx.new nodes, name
|
112
110
|
when Array
|
113
|
-
ast.map do |
|
114
|
-
|
115
|
-
|
111
|
+
ast.map do |element|
|
112
|
+
# Each array element should have exactly one key-value pair
|
113
|
+
unless element.length == 1
|
114
|
+
raise Error::VisitorInvalidInputError.new("Invalid array element: expected single key-value pair, got #{element.keys}")
|
115
|
+
end
|
116
|
+
|
117
|
+
# Extract the single key and value
|
118
|
+
key = element.keys[0]
|
119
|
+
value = element.values[0]
|
120
|
+
|
121
|
+
# Create context with the value and name it after the key
|
122
|
+
to_ctx(value, key)
|
116
123
|
end
|
117
124
|
when nil
|
118
125
|
nil
|
@@ -122,7 +129,6 @@ module Expressir
|
|
122
129
|
end
|
123
130
|
|
124
131
|
def get_source_pos(ctx)
|
125
|
-
nil
|
126
132
|
ranges = case ctx
|
127
133
|
when Ctx
|
128
134
|
ctx.source_pos and return ctx.source_pos # cache
|
@@ -134,7 +140,7 @@ module Expressir
|
|
134
140
|
when Array
|
135
141
|
ctx.map { |item| get_source_pos(item) }
|
136
142
|
else
|
137
|
-
raise "unknown type in Ctx tree: #{ctx}"
|
143
|
+
raise Error::VisitorInvalidInputError.new("unknown type in Ctx tree: #{ctx}")
|
138
144
|
end
|
139
145
|
source_pos = ranges.compact.reduce do |item, acc|
|
140
146
|
[[item[0], acc[0]].min, [item[1], acc[1]].max]
|
@@ -434,11 +440,11 @@ module Expressir
|
|
434
440
|
end
|
435
441
|
|
436
442
|
def visit_abstract_entity_declaration(_ctx)
|
437
|
-
raise "
|
443
|
+
raise Error::VisitorInvalidStateError.new("visit_abstract_entity_declaration called with invalid context")
|
438
444
|
end
|
439
445
|
|
440
446
|
def visit_abstract_supertype(_ctx)
|
441
|
-
raise "
|
447
|
+
raise Error::VisitorInvalidStateError.new("visit_abstract_supertype called with invalid context")
|
442
448
|
end
|
443
449
|
|
444
450
|
def visit_abstract_supertype_declaration(ctx)
|
@@ -469,7 +475,7 @@ module Expressir
|
|
469
475
|
elsif ctx__XOR
|
470
476
|
Model::Expressions::BinaryExpression::XOR
|
471
477
|
else
|
472
|
-
raise "
|
478
|
+
raise Error::VisitorInvalidStateError.new("visit_add_like_op called with invalid context")
|
473
479
|
end
|
474
480
|
end
|
475
481
|
|
@@ -512,7 +518,7 @@ module Expressir
|
|
512
518
|
end
|
513
519
|
|
514
520
|
def visit_algorithm_head(_ctx)
|
515
|
-
raise "
|
521
|
+
raise Error::VisitorInvalidStateError.new("visit_algorithm_head called with invalid context")
|
516
522
|
end
|
517
523
|
|
518
524
|
def visit_alias_stmt(ctx)
|
@@ -601,7 +607,7 @@ module Expressir
|
|
601
607
|
end
|
602
608
|
|
603
609
|
def visit_attribute_reference(_ctx)
|
604
|
-
raise "
|
610
|
+
raise Error::VisitorInvalidStateError.new("visit_attribute_reference called with invalid context")
|
605
611
|
end
|
606
612
|
|
607
613
|
def visit_bag_type(ctx)
|
@@ -652,7 +658,7 @@ module Expressir
|
|
652
658
|
end
|
653
659
|
|
654
660
|
def visit_bound_spec(_ctx)
|
655
|
-
raise "
|
661
|
+
raise Error::VisitorInvalidStateError.new("visit_bound_spec called with invalid context")
|
656
662
|
end
|
657
663
|
|
658
664
|
def visit_built_in_constant(ctx)
|
@@ -846,7 +852,7 @@ module Expressir
|
|
846
852
|
end
|
847
853
|
|
848
854
|
def visit_entity_body(_ctx)
|
849
|
-
raise "
|
855
|
+
raise Error::VisitorInvalidStateError.new("visit_entity_body called with invalid context")
|
850
856
|
end
|
851
857
|
|
852
858
|
def visit_entity_constructor(ctx)
|
@@ -910,7 +916,7 @@ module Expressir
|
|
910
916
|
end
|
911
917
|
|
912
918
|
def visit_entity_head(_ctx)
|
913
|
-
raise "
|
919
|
+
raise Error::VisitorInvalidStateError.new("visit_entity_head called with invalid context")
|
914
920
|
end
|
915
921
|
|
916
922
|
def visit_entity_id(ctx)
|
@@ -920,7 +926,7 @@ module Expressir
|
|
920
926
|
end
|
921
927
|
|
922
928
|
def visit_enumeration_extension(_ctx)
|
923
|
-
raise "
|
929
|
+
raise Error::VisitorInvalidStateError.new("visit_enumeration_extension called with invalid context")
|
924
930
|
end
|
925
931
|
|
926
932
|
def visit_enumeration_id(ctx)
|
@@ -1112,7 +1118,7 @@ module Expressir
|
|
1112
1118
|
end
|
1113
1119
|
|
1114
1120
|
def visit_function_head(_ctx)
|
1115
|
-
raise "
|
1121
|
+
raise Error::VisitorInvalidStateError.new("visit_function_head called with invalid context")
|
1116
1122
|
end
|
1117
1123
|
|
1118
1124
|
def visit_function_id(ctx)
|
@@ -1254,7 +1260,7 @@ module Expressir
|
|
1254
1260
|
end
|
1255
1261
|
|
1256
1262
|
def visit_group_reference(_ctx)
|
1257
|
-
raise "
|
1263
|
+
raise Error::VisitorInvalidStateError.new("visit_group_reference called with invalid context")
|
1258
1264
|
end
|
1259
1265
|
|
1260
1266
|
def visit_if_stmt(ctx)
|
@@ -1292,7 +1298,7 @@ module Expressir
|
|
1292
1298
|
end
|
1293
1299
|
|
1294
1300
|
def visit_increment_control(_ctx)
|
1295
|
-
raise "
|
1301
|
+
raise Error::VisitorInvalidStateError.new("visit_increment_control called with invalid context")
|
1296
1302
|
end
|
1297
1303
|
|
1298
1304
|
def visit_index(ctx)
|
@@ -1327,7 +1333,7 @@ module Expressir
|
|
1327
1333
|
end
|
1328
1334
|
|
1329
1335
|
def visit_index_reference(_ctx)
|
1330
|
-
raise "
|
1336
|
+
raise Error::VisitorInvalidStateError.new("visit_index_reference called with invalid context")
|
1331
1337
|
end
|
1332
1338
|
|
1333
1339
|
def visit_instantiable_type(ctx)
|
@@ -1398,7 +1404,7 @@ module Expressir
|
|
1398
1404
|
elsif ctx__LESS_THAN_OR_EQUAL
|
1399
1405
|
Model::Expressions::Interval::LESS_THAN_OR_EQUAL
|
1400
1406
|
else
|
1401
|
-
raise "
|
1407
|
+
raise Error::VisitorInvalidStateError.new("visit_interval_op called with invalid context")
|
1402
1408
|
end
|
1403
1409
|
end
|
1404
1410
|
|
@@ -1508,7 +1514,7 @@ module Expressir
|
|
1508
1514
|
elsif ctx__string_literal
|
1509
1515
|
visit(ctx__string_literal)
|
1510
1516
|
else
|
1511
|
-
raise "
|
1517
|
+
raise Error::VisitorInvalidStateError.new("visit_literal called with invalid context")
|
1512
1518
|
end
|
1513
1519
|
end
|
1514
1520
|
|
@@ -1554,7 +1560,7 @@ module Expressir
|
|
1554
1560
|
elsif ctx__UNKNOWN
|
1555
1561
|
Model::Literals::Logical::UNKNOWN
|
1556
1562
|
else
|
1557
|
-
raise "
|
1563
|
+
raise Error::VisitorInvalidStateError.new("visit_logical_literal called with invalid context")
|
1558
1564
|
end
|
1559
1565
|
|
1560
1566
|
Model::Literals::Logical.new(
|
@@ -1588,7 +1594,7 @@ module Expressir
|
|
1588
1594
|
elsif ctx__COMBINE
|
1589
1595
|
Model::Expressions::BinaryExpression::COMBINE
|
1590
1596
|
else
|
1591
|
-
raise "
|
1597
|
+
raise Error::VisitorInvalidStateError.new("visit_multiplication_like_op called with invalid context")
|
1592
1598
|
end
|
1593
1599
|
end
|
1594
1600
|
|
@@ -1679,7 +1685,7 @@ module Expressir
|
|
1679
1685
|
elsif ctx__qualifiable_factor
|
1680
1686
|
handle_qualified_ref(visit(ctx__qualifiable_factor), ctx__qualifier)
|
1681
1687
|
else
|
1682
|
-
raise "
|
1688
|
+
raise Error::VisitorInvalidStateError.new("visit_primary called with invalid context")
|
1683
1689
|
end
|
1684
1690
|
end
|
1685
1691
|
|
@@ -1734,7 +1740,7 @@ module Expressir
|
|
1734
1740
|
end
|
1735
1741
|
|
1736
1742
|
def visit_procedure_head(_ctx)
|
1737
|
-
raise "
|
1743
|
+
raise Error::VisitorInvalidStateError.new("visit_procedure_head called with invalid context")
|
1738
1744
|
end
|
1739
1745
|
|
1740
1746
|
def visit_procedure_head_parameter(ctx)
|
@@ -1826,7 +1832,7 @@ module Expressir
|
|
1826
1832
|
end
|
1827
1833
|
|
1828
1834
|
def visit_redeclared_attribute(_ctx)
|
1829
|
-
raise "
|
1835
|
+
raise Error::VisitorInvalidStateError.new("visit_redeclared_attribute called with invalid context")
|
1830
1836
|
end
|
1831
1837
|
|
1832
1838
|
def visit_referenced_attribute(ctx)
|
@@ -1878,7 +1884,7 @@ module Expressir
|
|
1878
1884
|
elsif ctx__INSTANCE_EQUAL
|
1879
1885
|
Model::Expressions::BinaryExpression::INSTANCE_EQUAL
|
1880
1886
|
else
|
1881
|
-
raise "
|
1887
|
+
raise Error::VisitorInvalidStateError.new("visit_rel_op called with invalid context")
|
1882
1888
|
end
|
1883
1889
|
end
|
1884
1890
|
|
@@ -1894,7 +1900,7 @@ module Expressir
|
|
1894
1900
|
elsif ctx__LIKE
|
1895
1901
|
Model::Expressions::BinaryExpression::LIKE
|
1896
1902
|
else
|
1897
|
-
raise "
|
1903
|
+
raise Error::VisitorInvalidStateError.new("visit_rel_op_extended called with invalid context")
|
1898
1904
|
end
|
1899
1905
|
end
|
1900
1906
|
|
@@ -2021,7 +2027,7 @@ module Expressir
|
|
2021
2027
|
end
|
2022
2028
|
|
2023
2029
|
def visit_rule_head(_ctx)
|
2024
|
-
raise "
|
2030
|
+
raise Error::VisitorInvalidStateError.new("visit_rule_head called with invalid context")
|
2025
2031
|
end
|
2026
2032
|
|
2027
2033
|
def visit_rule_id(ctx)
|
@@ -2037,7 +2043,7 @@ module Expressir
|
|
2037
2043
|
end
|
2038
2044
|
|
2039
2045
|
def visit_schema_body(_ctx)
|
2040
|
-
raise "
|
2046
|
+
raise Error::VisitorInvalidStateError.new("visit_schema_body called with invalid context")
|
2041
2047
|
end
|
2042
2048
|
|
2043
2049
|
def visit_schema_body_declaration(ctx)
|
@@ -2120,7 +2126,7 @@ module Expressir
|
|
2120
2126
|
end
|
2121
2127
|
|
2122
2128
|
def visit_selector(_ctx)
|
2123
|
-
raise "
|
2129
|
+
raise Error::VisitorInvalidStateError.new("visit_selector called with invalid context")
|
2124
2130
|
end
|
2125
2131
|
|
2126
2132
|
def visit_select_extension(ctx)
|
@@ -2185,12 +2191,12 @@ module Expressir
|
|
2185
2191
|
|
2186
2192
|
handle_binary_expression(operands, operators)
|
2187
2193
|
else
|
2188
|
-
raise "
|
2194
|
+
raise Error::VisitorInvalidStateError.new("visit_simple_expression called with invalid context")
|
2189
2195
|
end
|
2190
2196
|
elsif ctx__term.length == 1
|
2191
2197
|
visit(ctx__term[0])
|
2192
2198
|
else
|
2193
|
-
raise "
|
2199
|
+
raise Error::VisitorInvalidStateError.new("visit_simple_expression called with invalid context")
|
2194
2200
|
end
|
2195
2201
|
end
|
2196
2202
|
end
|
@@ -2276,7 +2282,7 @@ module Expressir
|
|
2276
2282
|
elsif ctx__EncodedStringLiteral
|
2277
2283
|
handle_encoded_string_literal(ctx__EncodedStringLiteral)
|
2278
2284
|
else
|
2279
|
-
raise "
|
2285
|
+
raise Error::VisitorInvalidStateError.new("visit_string_literal called with invalid context")
|
2280
2286
|
end
|
2281
2287
|
end
|
2282
2288
|
|
@@ -2333,7 +2339,7 @@ module Expressir
|
|
2333
2339
|
end
|
2334
2340
|
|
2335
2341
|
def visit_subtype_constraint_head(_ctx)
|
2336
|
-
raise "
|
2342
|
+
raise Error::VisitorInvalidStateError.new("visit_subtype_constraint_head called with invalid context")
|
2337
2343
|
end
|
2338
2344
|
|
2339
2345
|
def visit_subtype_constraint_id(ctx)
|
@@ -2349,7 +2355,7 @@ module Expressir
|
|
2349
2355
|
end
|
2350
2356
|
|
2351
2357
|
def visit_supertype_constraint(_ctx)
|
2352
|
-
raise "
|
2358
|
+
raise Error::VisitorInvalidStateError.new("visit_supertype_constraint called with invalid context")
|
2353
2359
|
end
|
2354
2360
|
|
2355
2361
|
def visit_supertype_expression(ctx)
|
@@ -2364,12 +2370,12 @@ module Expressir
|
|
2364
2370
|
|
2365
2371
|
handle_binary_supertype_expression(operands, operators)
|
2366
2372
|
else
|
2367
|
-
raise "
|
2373
|
+
raise Error::VisitorInvalidStateError.new("visit_supertype_expression called with invalid context")
|
2368
2374
|
end
|
2369
2375
|
elsif ctx__supertype_factor.length == 1
|
2370
2376
|
visit(ctx__supertype_factor[0])
|
2371
2377
|
else
|
2372
|
-
raise "
|
2378
|
+
raise Error::VisitorInvalidStateError.new("visit_supertype_expression called with invalid context")
|
2373
2379
|
end
|
2374
2380
|
end
|
2375
2381
|
end
|
@@ -2386,12 +2392,12 @@ module Expressir
|
|
2386
2392
|
|
2387
2393
|
handle_binary_supertype_expression(operands, operators)
|
2388
2394
|
else
|
2389
|
-
raise "
|
2395
|
+
raise Error::VisitorInvalidStateError.new("visit_supertype_factor called with invalid context")
|
2390
2396
|
end
|
2391
2397
|
elsif ctx__supertype_term.length == 1
|
2392
2398
|
visit(ctx__supertype_term[0])
|
2393
2399
|
else
|
2394
|
-
raise "
|
2400
|
+
raise Error::VisitorInvalidStateError.new("visit_supertype_factor called with invalid context")
|
2395
2401
|
end
|
2396
2402
|
end
|
2397
2403
|
end
|
@@ -2432,12 +2438,12 @@ module Expressir
|
|
2432
2438
|
|
2433
2439
|
handle_binary_expression(operands, operators)
|
2434
2440
|
else
|
2435
|
-
raise "
|
2441
|
+
raise Error::VisitorInvalidStateError.new("visit_term called with invalid context")
|
2436
2442
|
end
|
2437
2443
|
elsif ctx__factor.length == 1
|
2438
2444
|
visit(ctx__factor[0])
|
2439
2445
|
else
|
2440
|
-
raise "
|
2446
|
+
raise Error::VisitorInvalidStateError.new("visit_term called with invalid context")
|
2441
2447
|
end
|
2442
2448
|
end
|
2443
2449
|
end
|
@@ -2496,7 +2502,7 @@ module Expressir
|
|
2496
2502
|
elsif ctx__NOT
|
2497
2503
|
Model::Expressions::UnaryExpression::NOT
|
2498
2504
|
else
|
2499
|
-
raise "
|
2505
|
+
raise Error::VisitorInvalidStateError.new("visit_unary_op called with invalid context")
|
2500
2506
|
end
|
2501
2507
|
end
|
2502
2508
|
|
@@ -2571,12 +2577,12 @@ module Expressir
|
|
2571
2577
|
end
|
2572
2578
|
|
2573
2579
|
def visit_width_spec(_ctx)
|
2574
|
-
raise "
|
2580
|
+
raise Error::VisitorInvalidStateError.new("visit_width_spec called with invalid context")
|
2575
2581
|
end
|
2576
2582
|
|
2577
2583
|
def handle_binary_expression(operands, operators)
|
2578
2584
|
if operands.length != operators.length + 1
|
2579
|
-
raise "
|
2585
|
+
raise Error::VisitorInvalidStateError.new("handle_binary_expression called with invalid context")
|
2580
2586
|
end
|
2581
2587
|
|
2582
2588
|
expression = Model::Expressions::BinaryExpression.new(
|
@@ -2596,7 +2602,7 @@ module Expressir
|
|
2596
2602
|
|
2597
2603
|
def handle_binary_supertype_expression(operands, operators)
|
2598
2604
|
if operands.length != operators.length + 1
|
2599
|
-
raise "
|
2605
|
+
raise Error::VisitorInvalidStateError.new("handle_binary_supertype_expression called with invalid context")
|
2600
2606
|
end
|
2601
2607
|
|
2602
2608
|
expression = Model::SupertypeExpressions::BinarySupertypeExpression.new(
|
@@ -2643,7 +2649,7 @@ module Expressir
|
|
2643
2649
|
index2: index_reference.index2,
|
2644
2650
|
)
|
2645
2651
|
else
|
2646
|
-
raise "
|
2652
|
+
raise Error::VisitorInvalidStateError.new("handle_qualified_ref called with invalid context")
|
2647
2653
|
end
|
2648
2654
|
end
|
2649
2655
|
end
|
data/lib/expressir/version.rb
CHANGED
data/lib/expressir.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: expressir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: benchmark-ips
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: csv
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
13
41
|
- !ruby/object:Gem::Dependency
|
14
42
|
name: liquid
|
15
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,7 +108,7 @@ dependencies:
|
|
80
108
|
- - "~>"
|
81
109
|
- !ruby/object:Gem::Version
|
82
110
|
version: '2.6'
|
83
|
-
description: Expressir (
|
111
|
+
description: Expressir ("EXPRESS in Ruby") is a Ruby parser for EXPRESS and a set
|
84
112
|
of tools for accessing EXPRESS data models.
|
85
113
|
email:
|
86
114
|
- open.source@ribose.com
|
@@ -105,16 +133,18 @@ files:
|
|
105
133
|
- bin/console
|
106
134
|
- bin/rspec
|
107
135
|
- bin/setup
|
108
|
-
- docs/
|
136
|
+
- docs/benchmarking.adoc
|
109
137
|
- docs/liquid_drops.adoc
|
110
138
|
- exe/expressir
|
111
139
|
- exe/expressir-format
|
112
140
|
- exe/expressir-format-test
|
113
141
|
- expressir.gemspec
|
114
142
|
- lib/expressir.rb
|
143
|
+
- lib/expressir/benchmark.rb
|
115
144
|
- lib/expressir/cli.rb
|
116
145
|
- lib/expressir/config.rb
|
117
146
|
- lib/expressir/express/cache.rb
|
147
|
+
- lib/expressir/express/error.rb
|
118
148
|
- lib/expressir/express/express_remarks_decorator.rb
|
119
149
|
- lib/expressir/express/formatter.rb
|
120
150
|
- lib/expressir/express/hyperlink_formatter.rb
|