File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments