linked-data-python 0.6.3__py3-none-any.whl → 0.6.4__py3-none-any.whl
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.
- ldpy/transpiler/core.py +16 -1
- {linked_data_python-0.6.3.dist-info → linked_data_python-0.6.4.dist-info}/METADATA +1 -1
- {linked_data_python-0.6.3.dist-info → linked_data_python-0.6.4.dist-info}/RECORD +7 -7
- {linked_data_python-0.6.3.dist-info → linked_data_python-0.6.4.dist-info}/WHEEL +0 -0
- {linked_data_python-0.6.3.dist-info → linked_data_python-0.6.4.dist-info}/entry_points.txt +0 -0
- {linked_data_python-0.6.3.dist-info → linked_data_python-0.6.4.dist-info}/licenses/LICENSE.md +0 -0
- {linked_data_python-0.6.3.dist-info → linked_data_python-0.6.4.dist-info}/top_level.txt +0 -0
ldpy/transpiler/core.py
CHANGED
|
@@ -1392,6 +1392,10 @@ class Transpiler:
|
|
|
1392
1392
|
self._take(j - self.i) # '@prefix p:' + blancs
|
|
1393
1393
|
parts = self._take_firi_parts()
|
|
1394
1394
|
self._g_ws()
|
|
1395
|
+
as_name, k = self._prefix_as_clause(self.i)
|
|
1396
|
+
if as_name:
|
|
1397
|
+
self._take(k - self.i)
|
|
1398
|
+
self._g_ws()
|
|
1395
1399
|
if self._peek() != ".":
|
|
1396
1400
|
self._error("'.' attendu pour clore la déclaration @prefix")
|
|
1397
1401
|
self._take(1)
|
|
@@ -1411,6 +1415,11 @@ class Transpiler:
|
|
|
1411
1415
|
scope_mode)
|
|
1412
1416
|
gen = "__namespaces__[%r] = %s.Namespace(%r)" % (
|
|
1413
1417
|
prefix, RUNTIME_ALIAS, resolved)
|
|
1418
|
+
if as_name:
|
|
1419
|
+
gen = "__namespaces__[%r] = %s = %s.Namespace(%r)" % (
|
|
1420
|
+
prefix, as_name, RUNTIME_ALIAS, resolved)
|
|
1421
|
+
if scope_mode:
|
|
1422
|
+
gen = "%s %s; %s" % (scope_mode, as_name, gen)
|
|
1414
1423
|
else:
|
|
1415
1424
|
# global/nonlocal : réutiliser la variable de la liaison cible si
|
|
1416
1425
|
# elle est dynamique — c'est elle que les usages du dehors lisent
|
|
@@ -1424,8 +1433,14 @@ class Transpiler:
|
|
|
1424
1433
|
gen = "%s = %s.Namespace(%s.firi(%s)); __namespaces__[%r] = %s" % (
|
|
1425
1434
|
var, RUNTIME_ALIAS, RUNTIME_ALIAS,
|
|
1426
1435
|
self._firi_args(parts), prefix, var)
|
|
1436
|
+
if as_name:
|
|
1437
|
+
# `as EX` on a DYNAMIC prefix binds the Namespace built from
|
|
1438
|
+
# the IRI resolved at that point — the same object the
|
|
1439
|
+
# prefix itself uses, so the two can never disagree.
|
|
1440
|
+
gen += "; %s = %s" % (as_name, var)
|
|
1427
1441
|
if scope_mode:
|
|
1428
|
-
|
|
1442
|
+
names = var if not as_name else "%s, %s" % (var, as_name)
|
|
1443
|
+
gen = "%s %s; %s" % (scope_mode, names, gen)
|
|
1429
1444
|
self._end_island("prefix", mark, gen)
|
|
1430
1445
|
return True
|
|
1431
1446
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: linked-data-python
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.4
|
|
4
4
|
Summary: Python extended with Semantic Web primitives: IRIs, RDF literals and Turtle-notation graphs as expressions, transpiled by island parsing.
|
|
5
5
|
Author-email: Maxime Lefrançois <maxime.lefrancois@emse.fr>
|
|
6
6
|
License: MIT
|
|
@@ -18,12 +18,12 @@ ldpy/lsp/rpc.py,sha256=-TF_9U8dum23Pi4O1FZLogwoZgrGrt14J5BFB1OYVZw,3554
|
|
|
18
18
|
ldpy/lsp/server.py,sha256=PAMMookGUn00vAW_-a5BGy3qkVe9PoUdfzAzpdlvoF8,16359
|
|
19
19
|
ldpy/lsp/translate.py,sha256=HU9fBP_xWyYLih6QwQfSoyfF-MH-oInFcPX3o8Vc2GI,6116
|
|
20
20
|
ldpy/transpiler/__init__.py,sha256=9mQx0e47ixz0iMqSbCBbtGiwJ7PLxTcsVSIp6KNTMG4,504
|
|
21
|
-
ldpy/transpiler/core.py,sha256=
|
|
21
|
+
ldpy/transpiler/core.py,sha256=FkrUvx6Ed7dTRH6VuTGqyEwC1p7UrGvFD12XQOiKxv4,119679
|
|
22
22
|
ldpy/transpiler/errors.py,sha256=zEEwsNvC2Tawq8jIYls7hrbcWSvQtd7eo89k_SKp0k0,1142
|
|
23
23
|
ldpy/transpiler/linemap.py,sha256=ecLlCUkD4-6QQtUjGfAL28ql7LPITTS4fjLcDIbAwpQ,11386
|
|
24
|
-
linked_data_python-0.6.
|
|
25
|
-
linked_data_python-0.6.
|
|
26
|
-
linked_data_python-0.6.
|
|
27
|
-
linked_data_python-0.6.
|
|
28
|
-
linked_data_python-0.6.
|
|
29
|
-
linked_data_python-0.6.
|
|
24
|
+
linked_data_python-0.6.4.dist-info/licenses/LICENSE.md,sha256=R6KjQ098eAFd2k5mKaSRJqMH1LhY4o7xkHrKT5vjRfs,1074
|
|
25
|
+
linked_data_python-0.6.4.dist-info/METADATA,sha256=URkPNjTEi6cn2kZiIY97Cs59x30CQitiTgH8F9u7GgQ,7974
|
|
26
|
+
linked_data_python-0.6.4.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
27
|
+
linked_data_python-0.6.4.dist-info/entry_points.txt,sha256=n8Vs52oH81BrKOe1DNUvdFLSOlEufRMpK2waPFa6aYk,224
|
|
28
|
+
linked_data_python-0.6.4.dist-info/top_level.txt,sha256=dkG_F4jYkh6CS6gdpQeV_gKW3yaJBvl1ukUu0zo2KA8,5
|
|
29
|
+
linked_data_python-0.6.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{linked_data_python-0.6.3.dist-info → linked_data_python-0.6.4.dist-info}/licenses/LICENSE.md
RENAMED
|
File without changes
|
|
File without changes
|