Skip to content

Commit 2e49b0c

Browse files
committed
Revert "fix(isc): retry the DSL grammar when the artifact misparses a source"
This reverts commit 1d80448.
1 parent 1d80448 commit 2e49b0c

2 files changed

Lines changed: 0 additions & 20 deletions

File tree

‎lib/interscript/isc/parser.rb‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ def parse_with_callbacks(source, filename: nil)
3434
parse_with_artifact(source)
3535
rescue ArtifactUnavailable
3636
parse_with_dsl(source)
37-
rescue Parsanol::ParseFailed
38-
# A stale or buggy artifact must not fail a source the DSL
39-
# grammar accepts (the acadsin-zho-Hani-Latn-2002 incident:
40-
# the shipped artifact rejected lowercase system codes the
41-
# DSL handles). Re-parse through the Ruby grammar; the
42-
# artifact recompile remains the real fix upstream.
43-
parse_with_dsl(source)
4437
end
4538
Normalizer.normalize(tree)
4639
rescue Parsanol::ParseFailed => e

‎spec/interscript/isc/parser_spec.rb‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,6 @@
8080
expect(artifact_tree).to eq(dsl_tree)
8181
end
8282

83-
it "retries the DSL grammar when the artifact misparses a corpus map" do
84-
skip "parsanol lacks PARG (needs >= 1.3.61)" unless Interscript::Isc::Parser.respond_to?(:artifact)
85-
86-
# Regression guard: a stale/buggy artifact must not fail a source the
87-
# DSL grammar handles (acadsin-zho-Hani-Latn-2002.isc did exactly
88-
# this — artifact rejected lowercase system codes, DSL accepted).
89-
allow(described_class).to receive(:parse_with_artifact)
90-
.and_raise(Parsanol::ParseFailed.new("artifact mismatch"))
91-
tree = described_class.parse(src)
92-
doc = Interscript::Isc::DocumentBuilder.build(tree, filename: "test.isc")
93-
expect(doc[:systemCode]).to eq("s")
94-
end
95-
9683
it "falls back to the DSL grammar when the artifact cannot load" do
9784
skip "parsanol lacks PARG (needs >= 1.3.61)" unless Interscript::Isc::Parser.respond_to?(:artifact)
9885

0 commit comments

Comments
 (0)