Grammalecte  Check-in [0d097b9fcd]

Overview
Comment:[build] check casing within rules condition
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | build | rg
Files: files | file ages | folders
SHA3-256: 0d097b9fcd561aafa7908818754e0a3cde5e5da4caa754cb7f3e4dd166143ec6
User & Date: olr on 2018-06-22 12:23:26
Other Links: branch diff | manifest | tags
Context
2018-06-22
12:50
[build][core] look before, look after check-in: 09da5a46c8 user: olr tags: core, build, rg
12:23
[build] check casing within rules condition check-in: 0d097b9fcd user: olr tags: build, rg
11:11
[build][core][fr] tags for sentence check-in: 22a9b5a923 user: olr tags: fr, core, build, rg
Changes

Modified compile_rules_graph.py from [e586a73a20] to [8db3f5f069].

16
17
18
19
20
21
22
23

24
25
26
27
28
29
30
31
32
33
34
35
16
17
18
19
20
21
22

23





24
25
26
27
28
29
30







-
+
-
-
-
-
-







    s = s.replace("__else__", "not bCondMemo")
    s = re.sub(r"(morph|analyse|displayInfo)[(]\\(\d+)", 'g_\\1(lToken[\\2+nTokenOffset]', s)
    s = re.sub(r"(select|exclude|define)[(][\\](\d+)", 'g_\\1(lToken[\\2+nTokenOffset]', s)
    s = re.sub(r"(tag_before|tag_after)[(][\\](\d+)", 'g_\\1(lToken[\\2+nTokenOffset]', s)
    s = re.sub(r"(switchGender|has(?:Mas|Fem)Form)[(]\\(\d+)", '\\1(lToken[\\2+nTokenOffset]["sValue"]', s)
    s = re.sub(r"(morph|analyse)\(>1", 'g_\\1(lToken[nLastToken+1]', s)                     # next token
    s = re.sub(r"(morph|analyse)\(<1", 'g_\\1(lToken[nTokenOffset]', s)                     # previous token
    s = re.sub(r"before\(\s*", 'look(s[:m.start()], ', s)                                   # before(s)
    s = re.sub(r"[\\](\d+)\.is(upper|lower|title)\(\)", 'lToken[\\1+nTokenOffset]["sValue"].is(\\2)()', s)
    s = re.sub(r"after\(\s*", 'look(s[m.end():], ', s)                                      # after(s)
    s = re.sub(r"textarea\(\s*", 'look(s, ', s)                                             # textarea(s)
    s = re.sub(r"before_chk1\(\s*", 'look_chk1(dDA, s[:m.start()], 0, ', s)                 # before_chk1(s)
    s = re.sub(r"after_chk1\(\s*", 'look_chk1(dDA, s[m.end():], m.end(), ', s)              # after_chk1(s)
    s = re.sub(r"textarea_chk1\(\s*", 'look_chk1(dDA, s, 0, ', s)                           # textarea_chk1(s)
    s = re.sub(r"\bspell *[(]", '_oSpellChecker.isValid(', s)
    if bTokenValue:
        # token values are used as parameter
        s = re.sub(r"[\\](\d+)", 'lToken[\\1+nTokenOffset]["sValue"]', s)
    else:
        # tokens used as parameter
        s = re.sub(r"[\\](\d+)", 'lToken[\\1+nTokenOffset]', s)