Differences From Artifact [177fbea14b]:
- File gc_core/py/lang_core/gc_engine.py — part of check-in [81f21e06d4] at 2018-07-19 07:34:32 on branch rg — [core] gc engine: token tags (character: /) (user: olr, size: 47922) [annotate] [blame] [check-ins using]
To Artifact [cc991a6483]:
- File gc_core/py/lang_core/gc_engine.py — part of check-in [93c718cc67] at 2018-07-19 08:31:24 on branch rg — [core] semantic (token) tags (user: olr, size: 48590) [annotate] [blame] [check-ins using]
| ︙ | |||
782 783 784 785 786 787 788 789 790 791 792 793 794 795 | 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 | + + + + + + + + + + |
globals()[sWhat](self.lToken, nTokenOffset)
elif cActionType == ">":
# we do nothing, this test is just a condition to apply all following actions
if bDebug:
print(" COND_OK")
pass
elif cActionType == "/":
if bDebug:
print(" SEMANTIC_TAG:\n ", dRule[sRuleId])
nTokenStart = nTokenOffset + eAct[0]
nTokenEnd = nTokenOffset + eAct[1]
for i in range(nTokenStart, nTokenEnd+1)
if "tags" in self.lToken[i]:
self.lToken[i]["tags"].update(sWhat.split("|"))
else:
self.lToken[i]["tags"] = set(sWhat.split("|"))
elif cActionType == "%":
# sentence tags
if bDebug:
print(" SENTENCE_TAG:\n ", dRule[sRuleId])
nTokenTag = nTokenOffset + eAct[0]
if sWhat not in self.dTags:
self.dTags[sWhat] = (nTokenTag, nTokenTag)
elif nTokenTag > self.dTags[sWhat][1]:
|
| ︙ |