Grammalecte  Check-in [dc5d496871]

Overview
Comment:[build] fix regex
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | build
Files: files | file ages | folders
SHA3-256: dc5d49687130fdc52f1b96542c027cd9af7e38b62b1bf866a6c0c8724e94025d
User & Date: olr on 2020-12-13 09:50:13
Other Links: manifest | tags
Context
2020-12-13
12:51
[fr] ajustements check-in: 9da7738892 user: olr tags: trunk, fr
09:50
[build] fix regex check-in: dc5d496871 user: olr tags: trunk, build
2020-12-12
16:54
[core][build][fr][misc] disambiguator: merge functions select() and exclude() in one function -> select() check-in: cbfed9773f user: olr tags: trunk, fr, core, build, misc
Changes

Modified compile_rules.py from [b5b4c7e6b9] to [0ff606069c].

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
    s = re.sub(r"\brealstart\(\)", 'before("^ *$")', s)
    s = re.sub(r"\bstart0\(\)", 'before0("^ *$|, *$")', s)
    s = re.sub(r"\brealstart0\(\)", 'before0("^ *$")', s)
    s = re.sub(r"\bend\(\)", 'after("^ *$|^,")', s)
    s = re.sub(r"\brealend\(\)", 'after("^ *$")', s)
    s = re.sub(r"\bend0\(\)", 'after0("^ *$|^,")', s)
    s = re.sub(r"\brealend0\(\)", 'after0("^ *$")', s)
    s = re.sub(r"\bselect[(][\\](\d+)", '\\1(dTokenPos, m.start(\\2), m.group(\\2)', s)
    s = re.sub(r"\bdefine[(][\\](\d+)", 'define(dTokenPos, m.start(\\1)', s)
    s = re.sub(r"\b(morph|info)[(][\\](\d+)", '\\1((m.start(\\2), m.group(\\2))', s)
    s = re.sub(r"\b(morph|info)[(]", '\\1(dTokenPos, ', s)
    s = re.sub(r"\b(sugg\w+|switch\w+)\(@", '\\1(m.group(i[4])', s)
    s = re.sub(r"\bword\(\s*1\b", 'nextword1(sSentence, m.end()', s)                                # word(1)
    s = re.sub(r"\bword\(\s*-1\b", 'prevword1(sSentence, m.start()', s)                             # word(-1)
    s = re.sub(r"\bword\(\s*(\d)", 'nextword(sSentence, m.end(), \\1', s)                           # word(n)







|







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
    s = re.sub(r"\brealstart\(\)", 'before("^ *$")', s)
    s = re.sub(r"\bstart0\(\)", 'before0("^ *$|, *$")', s)
    s = re.sub(r"\brealstart0\(\)", 'before0("^ *$")', s)
    s = re.sub(r"\bend\(\)", 'after("^ *$|^,")', s)
    s = re.sub(r"\brealend\(\)", 'after("^ *$")', s)
    s = re.sub(r"\bend0\(\)", 'after0("^ *$|^,")', s)
    s = re.sub(r"\brealend0\(\)", 'after0("^ *$")', s)
    s = re.sub(r"\bselect[(][\\](\d+)", '\\1(dTokenPos, m.start(\\1), m.group(\\1)', s)
    s = re.sub(r"\bdefine[(][\\](\d+)", 'define(dTokenPos, m.start(\\1)', s)
    s = re.sub(r"\b(morph|info)[(][\\](\d+)", '\\1((m.start(\\2), m.group(\\2))', s)
    s = re.sub(r"\b(morph|info)[(]", '\\1(dTokenPos, ', s)
    s = re.sub(r"\b(sugg\w+|switch\w+)\(@", '\\1(m.group(i[4])', s)
    s = re.sub(r"\bword\(\s*1\b", 'nextword1(sSentence, m.end()', s)                                # word(1)
    s = re.sub(r"\bword\(\s*-1\b", 'prevword1(sSentence, m.start()', s)                             # word(-1)
    s = re.sub(r"\bword\(\s*(\d)", 'nextword(sSentence, m.end(), \\1', s)                           # word(n)