Index: compile_rules.py ================================================================== --- compile_rules.py +++ compile_rules.py @@ -66,12 +66,12 @@ s = re.sub(r"isRealEnd *\(\)", 'after("^ *$")', s) s = re.sub(r"isEnd0 *\(\)", 'after0("^ *$|^,")', s) s = re.sub(r"isRealEnd0 *\(\)", 'after0("^ *$")', s) s = re.sub(r"(select|exclude)[(][\\](\d+)", '\\1(dTokenPos, m.start(\\2), m.group(\\2)', s) s = re.sub(r"define[(][\\](\d+)", 'define(dTokenPos, m.start(\\1)', s) - s = re.sub(r"(morph|displayInfo)[(][\\](\d+)", '\\1((m.start(\\2), m.group(\\2))', s) - s = re.sub(r"(morph|displayInfo)[(]", '\\1(dTokenPos, ', s) + s = re.sub(r"(morph|info)[(][\\](\d+)", '\\1((m.start(\\2), m.group(\\2))', s) + s = re.sub(r"(morph|info)[(]", '\\1(dTokenPos, ', s) s = re.sub(r"(sugg\w+|switch\w+)\(@", '\\1(m.group(i[4])', s) s = re.sub(r"word\(\s*1\b", 'nextword1(sSentence, m.end()', s) # word(1) s = re.sub(r"word\(\s*-1\b", 'prevword1(sSentence, m.start()', s) # word(-1) s = re.sub(r"word\(\s*(\d)", 'nextword(sSentence, m.end(), \\1', s) # word(n) s = re.sub(r"word\(\s*-(\d)", 'prevword(sSentence, m.start(), \\1', s) # word(-n) Index: compile_rules_graph.py ================================================================== --- compile_rules_graph.py +++ compile_rules_graph.py @@ -36,12 +36,12 @@ if sCode[0:1] == "=": sCode = sCode[1:] sCode = sCode.replace("__also__", "bCondMemo") sCode = sCode.replace("__else__", "not bCondMemo") sCode = sCode.replace("sContext", "_sAppContext") - sCode = re.sub(r"\b(morph|morphVC|analyse|value|tag|meta|displayInfo)[(]\\(\d+)", 'g_\\1(lToken[nTokenOffset+\\2]', sCode) - sCode = re.sub(r"\b(morph|morphVC|analyse|value|tag|meta|displayInfo)[(]\\-(\d+)", 'g_\\1(lToken[nLastToken-\\2+1]', sCode) + sCode = re.sub(r"\b(morph|morphVC|analyse|value|tag|meta|info)[(]\\(\d+)", 'g_\\1(lToken[nTokenOffset+\\2]', sCode) + sCode = re.sub(r"\b(morph|morphVC|analyse|value|tag|meta|info)[(]\\-(\d+)", 'g_\\1(lToken[nLastToken-\\2+1]', sCode) sCode = re.sub(r"\b(select|exclude|define|define_from|rewrite|add_morph|change_meta)[(][\\](\d+)", 'g_\\1(lToken[nTokenOffset+\\2]', sCode) sCode = re.sub(r"\b(select|exclude|define|define_from|rewrite|add_morph|change_meta)[(][\\]-(\d+)", 'g_\\1(lToken[nLastToken-\\2+1]', sCode) sCode = re.sub(r"\b(tag_before|tag_after)[(][\\](\d+)", 'g_\\1(lToken[nTokenOffset+\\2], dTags', sCode) sCode = re.sub(r"\b(tag_before|tag_after)[(][\\]-(\d+)", 'g_\\1(lToken[nLastToken-\\2+1], dTags', sCode) sCode = re.sub(r"\bspace_after[(][\\](\d+)", 'g_space_between_tokens(lToken[nTokenOffset+\\1], lToken[nTokenOffset+\\1+1]', sCode) @@ -56,12 +56,12 @@ sCode = re.sub(r"\bbefore\(\s*", 'look(sSentence[:lToken[1+nTokenOffset]["nStart"]], ', sCode) # before(sCode) sCode = re.sub(r"\bafter\(\s*", 'look(sSentence[lToken[nLastToken]["nEnd"]:], ', sCode) # after(sCode) sCode = re.sub(r"\bbefore0\(\s*", 'look(sSentence0[:lToken[1+nTokenOffset]["nStart"]], ', sCode) # before0(sCode) sCode = re.sub(r"\bafter0\(\s*", 'look(sSentence[lToken[nLastToken]["nEnd"]:], ', sCode) # after0(sCode) sCode = re.sub(r"\banalyseWord[(]", 'analyse(', sCode) - sCode = re.sub(r"\bcheckAgreement[(]\\(\d+), *\\(\d+)", 'g_checkAgreement(lToken[nTokenOffset+\\1], lToken[nTokenOffset+\\2]', sCode) - sCode = re.sub(r"\bcheckAgreement[(]\\(\d+), *\\-(\d+)", 'g_checkAgreement(lToken[nTokenOffset+\\1], lToken[nLastToken-\\2+1]', sCode) + sCode = re.sub(r"\bagreement[(]\\(\d+), *\\(\d+)", 'g_agreement(lToken[nTokenOffset+\\1], lToken[nTokenOffset+\\2]', sCode) + sCode = re.sub(r"\bagreement[(]\\(\d+), *\\-(\d+)", 'g_agreement(lToken[nTokenOffset+\\1], lToken[nLastToken-\\2+1]', sCode) sCode = re.sub(r"[\\](\d+)", 'lToken[nTokenOffset+\\1]["sValue"]', sCode) sCode = re.sub(r"[\\]-(\d+)", 'lToken[nLastToken-\\1+1]["sValue"]', sCode) sCode = re.sub(r">1", 'lToken[nLastToken+1]["sValue"]', sCode) sCode = re.sub(r"<1", 'lToken[nTokenOffset]["sValue"]', sCode) return sCode Index: gc_core/js/lang_core/gc_functions.js ================================================================== --- gc_core/js/lang_core/gc_functions.js +++ gc_core/js/lang_core/gc_functions.js @@ -106,11 +106,11 @@ } //////// Analyse groups for regex rules -function displayInfo (dTokenPos, aWord) { +function info (dTokenPos, aWord) { // for debugging: info of word if (!aWord) { console.log("> nothing to find"); return true; } Index: gc_core/py/lang_core/gc_functions.py ================================================================== --- gc_core/py/lang_core/gc_functions.py +++ gc_core/py/lang_core/gc_functions.py @@ -93,11 +93,11 @@ #### Analyse groups for regex rules -def displayInfo (dTokenPos, tWord): +def info (dTokenPos, tWord): "for debugging: retrieve info of word" if not tWord: echo("> nothing to find") return True lMorph = _oSpellChecker.getMorph(tWord[1]) Index: gc_lang/fr/modules-js/cregex.js ================================================================== --- gc_lang/fr/modules-js/cregex.js +++ gc_lang/fr/modules-js/cregex.js @@ -84,11 +84,11 @@ getLemmaOfMorph: function (sMorph) { return this._zLemma.exec(sMorph)[1]; }, - checkAgreement: function (l1, l2) { + agreement: function (l1, l2) { // check number agreement if (!this.mbInv(l1) && !this.mbInv(l2)) { if (this.mbSg(l1) && !this.mbSg(l2)) { return false; } Index: gc_lang/fr/modules-js/gce_analyseur.js ================================================================== --- gc_lang/fr/modules-js/gce_analyseur.js +++ gc_lang/fr/modules-js/gce_analyseur.js @@ -19,11 +19,11 @@ function apposition (sWord1, sWord2) { // returns true if nom + nom (no agreement required) return sWord2.length < 2 || (cregex.mbNomNotAdj(gc_engine.oSpellChecker.getMorph(sWord2)) && cregex.mbPpasNomNotAdj(gc_engine.oSpellChecker.getMorph(sWord1))); } -function g_checkAgreement (oToken1, oToken2, bNotOnlyNames=true) { +function g_agreement (oToken1, oToken2, bNotOnlyNames=true) { // check agreement between and let lMorph1 = oToken1.hasOwnProperty("lMorph") ? oToken1["lMorph"] : gc_engine.oSpellChecker.getMorph(oToken1["sValue"]); if (lMorph1.length === 0) { return true; } @@ -32,11 +32,11 @@ return true; } if (bNotOnlyNames && !(cregex.mbAdj(lMorph2) || cregex.mbAdjNb(lMorph1))) { return false; } - return cregex.checkAgreement(lMorph1, lMorph2); + return cregex.agreement(lMorph1, lMorph2); } function mbUnit (s) { if (/[µ\/⁰¹²³⁴⁵⁶⁷⁸⁹Ωℓ·]/.test(s)) { return true; Index: gc_lang/fr/modules/cregex.py ================================================================== --- gc_lang/fr/modules/cregex.py +++ gc_lang/fr/modules/cregex.py @@ -83,11 +83,11 @@ def getLemmaOfMorph (s): "return lemma in morphology " return Lemma.search(s).group(1) -def checkAgreement (l1, l2): +def agreement (l1, l2): "returns True if agreement in gender and number is possible between morphologies and " # check number agreement if not mbInv(l1) and not mbInv(l2): if mbSg(l1) and not mbSg(l2): return False Index: gc_lang/fr/modules/gce_analyseur.py ================================================================== --- gc_lang/fr/modules/gce_analyseur.py +++ gc_lang/fr/modules/gce_analyseur.py @@ -17,21 +17,21 @@ def apposition (sWord1, sWord2): "returns True if nom + nom (no agreement required)" return len(sWord2) < 2 or (cr.mbNomNotAdj(_oSpellChecker.getMorph(sWord2)) and cr.mbPpasNomNotAdj(_oSpellChecker.getMorph(sWord1))) -def g_checkAgreement (dToken1, dToken2, bNotOnlyNames=True): +def g_agreement (dToken1, dToken2, bNotOnlyNames=True): "check agreement between and " lMorph1 = dToken1["lMorph"] if "lMorph" in dToken1 else _oSpellChecker.getMorph(dToken1["sValue"]) if not lMorph1: return True lMorph2 = dToken2["lMorph"] if "lMorph" in dToken2 else _oSpellChecker.getMorph(dToken2["sValue"]) if not lMorph2: return True if bNotOnlyNames and not (cr.mbAdj(lMorph2) or cr.mbAdjNb(lMorph1)): return False - return cr.checkAgreement(lMorph1, lMorph2) + return cr.agreement(lMorph1, lMorph2) _zUnitSpecial = re.compile("[µ/⁰¹²³⁴⁵⁶⁷⁸⁹Ωℓ·]") _zUnitNumbers = re.compile("[0-9]") Index: gc_lang/fr/rules.grx ================================================================== --- gc_lang/fr/rules.grx +++ gc_lang/fr/rules.grx @@ -22980,11 +22980,11 @@ <<- /gn/ ( (morph(\2, ":[NA].*:m", ":[fe]") and morph(\3, ":[NA].*:f", "*")) or (morph(\2, ":[NA].*:f", ":[me]") and morph(\3, ":[NA].*:m", "*")) ) and not apposition(\2, \3) -3>> =switchGender(\3, True) && Accord de genre erroné avec « \2 ». <<- /gn/ __also__ and hasFemForm(\2) -2>> =switchGender(\2) && Accord de genre erroné avec « \3 ». <<- /gn/ morph(\2, ":[NA].*:[pi]", ":G") and morph(\3, ":[NA].*:s", "*") and not apposition(\2, \3) and not (value(>1, "|et|,|") and morph(>2, ":A")) -3>> =suggPlur(\3) && Accord de nombre erroné avec « \1 \2 » : « \3 » devrait être au pluriel. - <<- not morph(\3, ":G|>a/") and checkAgreement(\2, \3) =>> =exclude(\3, ":V") + <<- not morph(\3, ":G|>a/") and agreement(\2, \3) =>> =exclude(\3, ":V") TEST: faire table rase des passions {{inutile}} ->> inutiles TEST: à bonne distance des {{chiens}} {{méchante}} TEST: des hommes {{attaquée}} TEST: des femmes {{agressé}} @@ -27878,11 +27878,11 @@ || ([>affirmer|>croire|>déclarer|>désirer|>détester|>dire|>estimer|>imaginer|>penser|>préférer|>savoir|>souhaiter|>vouloir]) || être [devenu+e|redevenu+e|resté+e|demeuré+e] *WORD *WORD [que|qu’] [un|le|ce|cet|une|la|ma|ta|sa|cette|l’|mon|ton|son|notre|votre|leur|les|ces|mes|tes|ses|nos|vos|leurs|quelques|plusieurs|$:B] *WORD ?[ne|n’]¿ ?[en|y]¿ || ([>affirmer|>croire|>déclarer|>désirer|>détester|>dire|>estimer|>imaginer|>penser|>préférer|>savoir|>souhaiter|>vouloir]) || avoir [été|semblé|paru] *WORD - <<- /ppas/ checkAgreement(\1, \-1) !-1>> + <<- /ppas/ agreement(\1, \-1) !-1>> *WORD [que|qu’] $:M ?[ne|n’]¿ || ([>affirmer|>croire|>déclarer|>désirer|>détester|>dire|>estimer|>imaginer|>penser|>préférer|>savoir|>souhaiter|>vouloir]) || [être|devenir|redevenir|rester|paraître|paraitre|sembler] *WORD *WORD [que|qu’] $:M ?[ne|n’]¿ @@ -27889,11 +27889,11 @@ || ([>affirmer|>croire|>déclarer|>désirer|>détester|>dire|>estimer|>imaginer|>penser|>préférer|>savoir|>souhaiter|>vouloir]) || être [devenu+e|redevenu+e|resté+e|demeuré+e] *WORD *WORD [que|qu’] $:M ?[ne|n’]¿ || ([>affirmer|>croire|>déclarer|>désirer|>détester|>dire|>estimer|>imaginer|>penser|>préférer|>savoir|>souhaiter|>vouloir]) || avoir [été|semblé|paru] *WORD - <<- /ppas/ checkAgreement(\1, \-1) !-1>> + <<- /ppas/ agreement(\1, \-1) !-1>> __ppas_sujet_être_accord_singulier__ [|,|(|/_start_] [un|le|ce|cet] (*WORD) ?qui¿ ?[ne|n’]¿ ?[en|y]¿ (/_VE_) @:[AQ]¬:(?:[GWM]|[me]:[si]) [|,|(|/_start_] [un|le|ce|cet] (*WORD) ?qui¿ ?[ne|n’]¿ ?[en|y]¿ (/_LVED_) ?/_LVE_¿ ?/_LVE_¿ ?/_LVE_¿ ?/_LVE_¿ /_LVEF_ @:[AQ]¬:(?:[GWM]|[me]:[si]) @@ -30891,11 +30891,11 @@ __conj_le_la_leur_nom__ [le|la|l’|leur] *WORD @:V¬:(?:3s|P|Q|Y|3p!|G|M) <<- /conj/ not tag(\2, "_enum_") and morph(<1, ":C||>,", ":[YP]") and morph(\2, ":[NA].*:[si]", ":G") and not ( (value(\2, "|dizaine|douzaine|quinzaine|vingtaine|trentaine|quarantaine|cinquantaine|soixantaine|centaine|majorité|minorité|millier|partie|poignée|tas|paquet|moitié|") - or tag_before(\1, "_ni_") or value(<1, "|et|ou|")) and morph(\3, ":3?p") ) and not checkAgreement(\2, \3) + or tag_before(\1, "_ni_") or value(<1, "|et|ou|")) and morph(\3, ":3?p") ) and not agreement(\2, \3) and not ( morph(\2, "(?:[123][sp]|P)") and not value(<1, "||,|") ) >>> <<- /conj/ not tag(\-1, "_ngn_") and morph(\3, ":A.*:p") or (morph(\3, ":N.*:p") and morph(\2, ":A")) -3>> =suggVerb(\3, ":3s", suggSing) && Accord avec “\1 \2…” incorrect. Conjugaison erronée ou accord nom/adjectif incorrect. <<- /conj/ __else__ -3>> =suggVerb(\3, ":3s") && Conjugaison erronée. Accord avec “\1 \2…”. Le verbe devrait être à la 3ᵉ personne du singulier. @@ -30940,19 +30940,19 @@ __conj_det_sing_nom__ [un|ce|cet|mon|ton|son|notre|votre] *WORD @:[123][sp]¬:(?:3s|P|Y|3p!|G|M) <<- /conj/ not tag(\2, "_enum_") and morph(<1, ":C||>,", ":[YP]") and morph(\2, ":[NA].*:[me]:[si]", ":G") and not ( (value(\2, "|dizaine|douzaine|quinzaine|vingtaine|trentaine|quarantaine|cinquantaine|soixantaine|centaine|majorité|minorité|millier|partie|poignée|tas|paquet|moitié|nombre|") - or tag_before(\1, "_ni_") or value(<1, "|et|ou|")) and morph(\3, ":3?p") ) and not checkAgreement(\2, \3) >>> + or tag_before(\1, "_ni_") or value(<1, "|et|ou|")) and morph(\3, ":3?p") ) and not agreement(\2, \3) >>> <<- /conj/ not tag(\-1, "_ngn_") and morph(\3, ":A.*:p") or (morph(\3, ":N.*:p") and morph(\2, ":A")) -3>> =suggVerb(\3, ":3s", suggSing) && Accord avec “\1 \2…” incorrect. Conjugaison erronée ou accord nom/adjectif incorrect. <<- /conj/ __else__ -3>> =suggVerb(\3, ":3s") && Conjugaison erronée. Accord avec “\1 \2…”. Le verbe devrait être à la 3ᵉ personne du singulier. [une|cette|mon|ton|son|ma|ta|sa|notre|votre] *WORD @:[123][sp]¬:(?:3s|P|Y|3p!|G|M) <<- /conj/ not tag(\2, "_enum_") and morph(<1, ":C||>,", ":[YP]") and morph(\2, ":[NA].*:[fe]:[si]", ":G") and not ( (value(\2, "|dizaine|douzaine|quinzaine|vingtaine|trentaine|quarantaine|cinquantaine|soixantaine|centaine|majorité|minorité|millier|partie|poignée|tas|paquet|moitié|") - or tag_before(\1, "_ni_") or value(<1, "|et|ou|")) and morph(\3, ":3?p") ) and not checkAgreement(\2, \3) >>> + or tag_before(\1, "_ni_") or value(<1, "|et|ou|")) and morph(\3, ":3?p") ) and not agreement(\2, \3) >>> <<- /conj/ not tag(\-1, "_ngn_") and morph(\3, ":A.*:p") or (morph(\3, ":N.*:p") and morph(\2, ":A")) -3>> =suggVerb(\3, ":3s", suggSing) && Accord avec “\1 \2…” incorrect. Conjugaison erronée ou accord nom/adjectif incorrect. <<- /conj/ __else__ -3>> =suggVerb(\3, ":3s") && Conjugaison erronée. Accord avec “\1 \2…”. Le verbe devrait être à la 3ᵉ personne du singulier. [un|une|ce|cet|cette|mon|ton|son|ma|ta|sa|notre|votre] *WORD qui @:V¬:(?:3s|P|3p!|G|M) @@ -31294,11 +31294,11 @@ __conj_les_nom__ les @:[NA].*:[pi]¬:V0 @:V¬:(?:3p|P|Y|G|M) <<- /conj/ morph(<1, ":Cs||>,") and not ( morph(\3, ":3s") and before("(?i)\\b(?:l[ea] |l’|une? |ce(?:tte|t|) |[mts](?:on|a) |[nv]otre ).+ entre .+ et ") ) - and not checkAgreement(\2, \3) + and not agreement(\2, \3) and not ( morph(\2, "(?:[123][sp]|P)") and not value(<1, "||,|") ) >>> <<- /conj/ not tag(\-1, "_ngn_") and morph(\3, ":A.*:s") or (morph(\3, ":N.*:s") and morph(\2, ":A")) -3>> =suggVerb(\3, ":3p", suggPlur) && Accord avec “\1 \2…” incorrect. Conjugaison erronée ou accord nom/adjectif incorrect. <<- /conj/ __else__ -3>> =suggVerb(\3, ":3p") && Conjugaison erronée. Accord avec “\1 \2…”. Le verbe devrait être à la 3ᵉ personne du pluriel. @@ -31348,29 +31348,29 @@ __conj_certains_certaines_plusieurs_nom__ [certains|maints] @:[NA].*:[pi] @:V¬:(?:3p|P|Y|G|M) <<- /conj/ morph(<1, ":Cs||>,") and not( morph(\3, ":3s") and before("(?i)\\b(?:l[ea] |l’|une? |ce(?:tte|t|) |[mts](?:on|a) |[nv]otre ).+ entre .+ et ") ) - and not checkAgreement(\2, \3) + and not agreement(\2, \3) and not ( morph(\2, "(?:[123][sp]|P)") and not value(<1, "||,|") ) >>> <<- /conj/ not tag(\-1, "_ngn_") and morph(\3, ":A.*:s") or (morph(\3, ":N.*:s") and morph(\2, ":A")) -3>> =suggVerb(\3, ":3p", suggMasPlur) && Accord avec “\1 \2…” incorrect. Conjugaison erronée ou accord nom/adjectif incorrect. <<- /conj/ __else__ -3>> =suggVerb(\3, ":3p") && Conjugaison erronée. Accord avec “\1 \2…”. Le verbe devrait être à la 3ᵉ personne du pluriel. [certaines|maintes] @:[NA].*:[pi] @:V¬:(?:3p|P|Y|G|M) <<- /conj/ morph(<1, ":Cs||>,") and not( morph(\3, ":3s") and before("(?i)\\b(?:l[ea] |l’|une? |ce(?:tte|t|) |[mts](?:on|a) |[nv]otre ).+ entre .+ et ") ) - and not checkAgreement(\2, \3) + and not agreement(\2, \3) and not ( morph(\2, "(?:[123][sp]|P)") and not value(<1, "||,|") ) >>> <<- /conj/ not tag(\-1, "_ngn_") and morph(\3, ":A.*:s") or (morph(\3, ":N.*:s") and morph(\2, ":A")) -3>> =suggVerb(\3, ":3p", suggFemPlur) && Accord avec “\1 \2…” incorrect. Conjugaison erronée ou accord nom/adjectif incorrect. <<- /conj/ __else__ -3>> =suggVerb(\3, ":3p") && Conjugaison erronée. Accord avec “\1 \2…”. Le verbe devrait être à la 3ᵉ personne du pluriel. plusieurs @:[NA].*:[pi] @:V¬:(?:3p|P|Y|G|M) <<- /conj/ morph(<1, ":Cs||>,") and not( morph(\3, ":3s") and before("(?i)\\b(?:l[ea] |l’|une? |ce(?:tte|t|) |[mts](?:on|a) |[nv]otre ).+ entre .+ et ") ) - and not checkAgreement(\2, \3) + and not agreement(\2, \3) and not ( morph(\2, "(?:[123][sp]|P)") and not value(<1, "||,|") ) >>> <<- /conj/ not tag(\-1, "_ngn_") and morph(\3, ":A.*:s") or (morph(\3, ":N.*:s") and morph(\2, ":A")) -3>> =suggVerb(\3, ":3p", suggPlur) && Accord avec “\1 \2…” incorrect. Conjugaison erronée ou accord nom/adjectif incorrect. <<- /conj/ __else__ -3>> =suggVerb(\3, ":3p") && Conjugaison erronée. Accord avec “\1 \2…”. Le verbe devrait être à la 3ᵉ personne du pluriel. @@ -31397,11 +31397,11 @@ __conj_des_nom__ [|,|(] des @:[NA].*:[pi] @:V¬:(?:3p|P|G|Q|Y|A.*:[pi]|V[23].*:Y) <<- /conj/ morph(>1, ":(?:R|D.*:p)|>au/||>,") >>> <<- /conj/ not morph(\4, ":[NA]") -4>> =suggVerb(\4, ":3p") && Conjugaison erronée. Accord avec “\2 \3…”. Le verbe devrait être à la 3ᵉ personne du pluriel. - <<- /conj/ __else__ and not checkAgreement(\3, \4) -4>> =suggVerb(\4, ":3p", suggPlur) && Conjugaison erronée. Accord avec “\2 \3…”. Le verbe devrait être à la 3ᵉ personne du pluriel. + <<- /conj/ __else__ and not agreement(\3, \4) -4>> =suggVerb(\4, ":3p", suggPlur) && Conjugaison erronée. Accord avec “\2 \3…”. Le verbe devrait être à la 3ᵉ personne du pluriel. [|,|(] des @:[NA].*:[pi] qui @:V¬:(?:3p|P|G) <<- /conj/ -5>> =suggVerb(\5, ":3p") && Conjugaison erronée. Accord avec “\2 \3 \4…”. Le verbe devrait être à la 3ᵉ personne du pluriel. *WORD des @:[NA].*:[pi] qui @:V¬:(?:3p|P|G) Index: misc/grammalecte.sublime-syntax ================================================================== --- misc/grammalecte.sublime-syntax +++ misc/grammalecte.sublime-syntax @@ -58,11 +58,11 @@ scope: keyword.python - match: '\b(?:True|False|None)\b' scope: constant.language - - match: '\b(?:spell|morph|morphVC|stem|tag|value|space_after|textarea0?\w*|before0?\w*|after0?\w*|word|option|define|define_from|select|exclude|analyse\w*|tag_\w+|apposition|is[A-Z]\w+|checkAgreement|rewrite|checkD\w+|getD\w+|has[A-Z]\w+|sugg[A-Z]\w+|switch[A-Z]\w+|ceOrCet|formatN\w+|mbUnit)\b' + - match: '\b(?:spell|morph|morphVC|stem|tag|value|space_after|textarea0?\w*|before0?\w*|after0?\w*|word|option|define|define_from|select|exclude|analyse\w*|tag_\w+|apposition|is[A-Z]\w+|agreement|rewrite|checkD\w+|getD\w+|has[A-Z]\w+|sugg[A-Z]\w+|switch[A-Z]\w+|ceOrCet|formatN\w+|mbUnit)\b' scope: entity.name.function - match: '\b(?:replace|endswith|startswith|search|upper|lower|capitalize|strip|rstrip|is(?:alpha|upper|lower|digit|title))\b' scope: support.function