eyeling 1.26.1 → 1.26.2
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.
- package/dist/browser/eyeling.browser.js +16 -17
- package/eyeling.js +16 -17
- package/lib/engine.js +16 -17
- package/package.json +1 -1
|
@@ -5538,7 +5538,7 @@ const EMPTY_LIST_TERM = new ListTerm([]);
|
|
|
5538
5538
|
const { lex, N3SyntaxError } = require('./lexer');
|
|
5539
5539
|
const { Parser } = require('./parser');
|
|
5540
5540
|
const { liftBlankRuleVars } = require('./rules');
|
|
5541
|
-
const {
|
|
5541
|
+
const { parseN3SourceList, parseN3Text } = require('./multisource');
|
|
5542
5542
|
|
|
5543
5543
|
const {
|
|
5544
5544
|
makeBuiltins,
|
|
@@ -9447,12 +9447,22 @@ function reasonStream(input, opts = {}) {
|
|
|
9447
9447
|
skipUnsupportedRdfJs = false,
|
|
9448
9448
|
builtinModules = null,
|
|
9449
9449
|
rdf = false,
|
|
9450
|
+
sourceLabel = '<input>',
|
|
9450
9451
|
} = opts;
|
|
9451
9452
|
|
|
9452
9453
|
const useRdfCompatibility = !!rdf;
|
|
9453
9454
|
|
|
9454
9455
|
const parsedSourceList = parseN3SourceList(input, { baseIri, rdf: useRdfCompatibility, sourceLocations: proof });
|
|
9455
|
-
const
|
|
9456
|
+
const parsedTextInput = (!parsedSourceList && proof && typeof input === 'string')
|
|
9457
|
+
? parseN3Text(input, {
|
|
9458
|
+
baseIri: baseIri || '',
|
|
9459
|
+
label: sourceLabel || '<input>',
|
|
9460
|
+
keepSourceArtifacts: false,
|
|
9461
|
+
sourceLocations: true,
|
|
9462
|
+
rdf: useRdfCompatibility,
|
|
9463
|
+
})
|
|
9464
|
+
: null;
|
|
9465
|
+
const parsedInput = parsedSourceList || parsedTextInput || normalizeParsedReasonerInputSync(input);
|
|
9456
9466
|
const rdfFactory = rdfjs ? getDataFactory(dataFactory) : null;
|
|
9457
9467
|
|
|
9458
9468
|
const __oldEnforceHttps = deref.getEnforceHttpsEnabled();
|
|
@@ -9487,22 +9497,11 @@ function reasonStream(input, opts = {}) {
|
|
|
9487
9497
|
if (baseIri) prefixes.setBase(baseIri);
|
|
9488
9498
|
} else {
|
|
9489
9499
|
const n3Text = normalizeReasonerInputSync(input);
|
|
9490
|
-
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
baseIri: baseIri || '',
|
|
9494
|
-
keepSourceArtifacts: false,
|
|
9495
|
-
sourceLocations: true,
|
|
9496
|
-
rdf: useRdfCompatibility,
|
|
9497
|
-
});
|
|
9498
|
-
({ prefixes, triples, frules, brules, logQueryRules } = parsed);
|
|
9499
|
-
} else {
|
|
9500
|
-
const toks = lex(n3Text, { rdf: useRdfCompatibility });
|
|
9501
|
-
const parser = new Parser(toks);
|
|
9502
|
-
if (baseIri) parser.prefixes.setBase(baseIri);
|
|
9500
|
+
const toks = lex(n3Text, { rdf: useRdfCompatibility });
|
|
9501
|
+
const parser = new Parser(toks);
|
|
9502
|
+
if (baseIri) parser.prefixes.setBase(baseIri);
|
|
9503
9503
|
|
|
9504
|
-
|
|
9505
|
-
}
|
|
9504
|
+
[prefixes, triples, frules, brules, logQueryRules] = parser.parseDocument();
|
|
9506
9505
|
}
|
|
9507
9506
|
// Make the parsed prefixes available to log:trace output
|
|
9508
9507
|
trace.setTracePrefixes(prefixes);
|
package/eyeling.js
CHANGED
|
@@ -5538,7 +5538,7 @@ const EMPTY_LIST_TERM = new ListTerm([]);
|
|
|
5538
5538
|
const { lex, N3SyntaxError } = require('./lexer');
|
|
5539
5539
|
const { Parser } = require('./parser');
|
|
5540
5540
|
const { liftBlankRuleVars } = require('./rules');
|
|
5541
|
-
const {
|
|
5541
|
+
const { parseN3SourceList, parseN3Text } = require('./multisource');
|
|
5542
5542
|
|
|
5543
5543
|
const {
|
|
5544
5544
|
makeBuiltins,
|
|
@@ -9447,12 +9447,22 @@ function reasonStream(input, opts = {}) {
|
|
|
9447
9447
|
skipUnsupportedRdfJs = false,
|
|
9448
9448
|
builtinModules = null,
|
|
9449
9449
|
rdf = false,
|
|
9450
|
+
sourceLabel = '<input>',
|
|
9450
9451
|
} = opts;
|
|
9451
9452
|
|
|
9452
9453
|
const useRdfCompatibility = !!rdf;
|
|
9453
9454
|
|
|
9454
9455
|
const parsedSourceList = parseN3SourceList(input, { baseIri, rdf: useRdfCompatibility, sourceLocations: proof });
|
|
9455
|
-
const
|
|
9456
|
+
const parsedTextInput = (!parsedSourceList && proof && typeof input === 'string')
|
|
9457
|
+
? parseN3Text(input, {
|
|
9458
|
+
baseIri: baseIri || '',
|
|
9459
|
+
label: sourceLabel || '<input>',
|
|
9460
|
+
keepSourceArtifacts: false,
|
|
9461
|
+
sourceLocations: true,
|
|
9462
|
+
rdf: useRdfCompatibility,
|
|
9463
|
+
})
|
|
9464
|
+
: null;
|
|
9465
|
+
const parsedInput = parsedSourceList || parsedTextInput || normalizeParsedReasonerInputSync(input);
|
|
9456
9466
|
const rdfFactory = rdfjs ? getDataFactory(dataFactory) : null;
|
|
9457
9467
|
|
|
9458
9468
|
const __oldEnforceHttps = deref.getEnforceHttpsEnabled();
|
|
@@ -9487,22 +9497,11 @@ function reasonStream(input, opts = {}) {
|
|
|
9487
9497
|
if (baseIri) prefixes.setBase(baseIri);
|
|
9488
9498
|
} else {
|
|
9489
9499
|
const n3Text = normalizeReasonerInputSync(input);
|
|
9490
|
-
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
baseIri: baseIri || '',
|
|
9494
|
-
keepSourceArtifacts: false,
|
|
9495
|
-
sourceLocations: true,
|
|
9496
|
-
rdf: useRdfCompatibility,
|
|
9497
|
-
});
|
|
9498
|
-
({ prefixes, triples, frules, brules, logQueryRules } = parsed);
|
|
9499
|
-
} else {
|
|
9500
|
-
const toks = lex(n3Text, { rdf: useRdfCompatibility });
|
|
9501
|
-
const parser = new Parser(toks);
|
|
9502
|
-
if (baseIri) parser.prefixes.setBase(baseIri);
|
|
9500
|
+
const toks = lex(n3Text, { rdf: useRdfCompatibility });
|
|
9501
|
+
const parser = new Parser(toks);
|
|
9502
|
+
if (baseIri) parser.prefixes.setBase(baseIri);
|
|
9503
9503
|
|
|
9504
|
-
|
|
9505
|
-
}
|
|
9504
|
+
[prefixes, triples, frules, brules, logQueryRules] = parser.parseDocument();
|
|
9506
9505
|
}
|
|
9507
9506
|
// Make the parsed prefixes available to log:trace output
|
|
9508
9507
|
trace.setTracePrefixes(prefixes);
|
package/lib/engine.js
CHANGED
|
@@ -43,7 +43,7 @@ const EMPTY_LIST_TERM = new ListTerm([]);
|
|
|
43
43
|
const { lex, N3SyntaxError } = require('./lexer');
|
|
44
44
|
const { Parser } = require('./parser');
|
|
45
45
|
const { liftBlankRuleVars } = require('./rules');
|
|
46
|
-
const {
|
|
46
|
+
const { parseN3SourceList, parseN3Text } = require('./multisource');
|
|
47
47
|
|
|
48
48
|
const {
|
|
49
49
|
makeBuiltins,
|
|
@@ -3952,12 +3952,22 @@ function reasonStream(input, opts = {}) {
|
|
|
3952
3952
|
skipUnsupportedRdfJs = false,
|
|
3953
3953
|
builtinModules = null,
|
|
3954
3954
|
rdf = false,
|
|
3955
|
+
sourceLabel = '<input>',
|
|
3955
3956
|
} = opts;
|
|
3956
3957
|
|
|
3957
3958
|
const useRdfCompatibility = !!rdf;
|
|
3958
3959
|
|
|
3959
3960
|
const parsedSourceList = parseN3SourceList(input, { baseIri, rdf: useRdfCompatibility, sourceLocations: proof });
|
|
3960
|
-
const
|
|
3961
|
+
const parsedTextInput = (!parsedSourceList && proof && typeof input === 'string')
|
|
3962
|
+
? parseN3Text(input, {
|
|
3963
|
+
baseIri: baseIri || '',
|
|
3964
|
+
label: sourceLabel || '<input>',
|
|
3965
|
+
keepSourceArtifacts: false,
|
|
3966
|
+
sourceLocations: true,
|
|
3967
|
+
rdf: useRdfCompatibility,
|
|
3968
|
+
})
|
|
3969
|
+
: null;
|
|
3970
|
+
const parsedInput = parsedSourceList || parsedTextInput || normalizeParsedReasonerInputSync(input);
|
|
3961
3971
|
const rdfFactory = rdfjs ? getDataFactory(dataFactory) : null;
|
|
3962
3972
|
|
|
3963
3973
|
const __oldEnforceHttps = deref.getEnforceHttpsEnabled();
|
|
@@ -3992,22 +4002,11 @@ function reasonStream(input, opts = {}) {
|
|
|
3992
4002
|
if (baseIri) prefixes.setBase(baseIri);
|
|
3993
4003
|
} else {
|
|
3994
4004
|
const n3Text = normalizeReasonerInputSync(input);
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
baseIri: baseIri || '',
|
|
3999
|
-
keepSourceArtifacts: false,
|
|
4000
|
-
sourceLocations: true,
|
|
4001
|
-
rdf: useRdfCompatibility,
|
|
4002
|
-
});
|
|
4003
|
-
({ prefixes, triples, frules, brules, logQueryRules } = parsed);
|
|
4004
|
-
} else {
|
|
4005
|
-
const toks = lex(n3Text, { rdf: useRdfCompatibility });
|
|
4006
|
-
const parser = new Parser(toks);
|
|
4007
|
-
if (baseIri) parser.prefixes.setBase(baseIri);
|
|
4005
|
+
const toks = lex(n3Text, { rdf: useRdfCompatibility });
|
|
4006
|
+
const parser = new Parser(toks);
|
|
4007
|
+
if (baseIri) parser.prefixes.setBase(baseIri);
|
|
4008
4008
|
|
|
4009
|
-
|
|
4010
|
-
}
|
|
4009
|
+
[prefixes, triples, frules, brules, logQueryRules] = parser.parseDocument();
|
|
4011
4010
|
}
|
|
4012
4011
|
// Make the parsed prefixes available to log:trace output
|
|
4013
4012
|
trace.setTracePrefixes(prefixes);
|