From 26a2361d419a33e2620ebf492c59e2a1bf4f62a1 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Sun, 16 May 2021 16:48:11 +0200 Subject: [PATCH 1/3] Separate it from the ManuScript XML parser from the rest of the code It needs some love to make it work again --- tools/langs/manuscript.py | 77 ++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 46 deletions(-) diff --git a/tools/langs/manuscript.py b/tools/langs/manuscript.py index 073421a8..12724c39 100644 --- a/tools/langs/manuscript.py +++ b/tools/langs/manuscript.py @@ -226,28 +226,6 @@ } } return res; -}" - getPositionInDocument "(obj) { - if (not Self.MEIFlattened) { - return false; - } - for i = 0 to Length(Self.MEIFlattened) { - if (Self.MEIFlattened[i] = obj) { - return i; - } - } - return false; -}" - lookBack "(from, name) { - if (not Self.MEIFlattened) { - return false; - } - pos = getPositionInDocument(from); - for i = pos to 0 step -1 { - if (getName(Self.MEIFlattened[i]) = name) { - return Self.MEIFlattened[i]; - } - } }" createXmlTag "(name, id, attributesList, isTerminal) { if (name = '