Overview
Comment: | [build][core] hability to set limits for underlining to the other side of selected tokens |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | core | build | rg |
Files: | files | file ages | folders |
SHA3-256: |
2ee32e3e27651a76818d559d9ba6c450 |
User & Date: | olr on 2018-07-12 09:28:43 |
Other Links: | branch diff | manifest | tags |
Context
2018-07-12
| ||
11:31 | [fr] conversion: regex rules -> graph rules check-in: 0a7fd06f07 user: olr tags: fr, rg | |
09:28 | [build][core] hability to set limits for underlining to the other side of selected tokens check-in: 2ee32e3e27 user: olr tags: core, build, rg | |
2018-07-11
| ||
17:09 | [fr] correction de quelques tests check-in: 5b6de299a1 user: olr tags: fr, rg | |
Changes
Modified compile_rules_graph.py from [75ffc0f9db] to [2c76153ce9].
︙ | |||
121 122 123 124 125 126 127 128 129 130 131 132 133 134 | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | + + | sActionId = sRuleName + "__b" + str(iActionBlock) + "_a" + str(iAction) + "_" + str(len(lToken)) aAction = createAction(sActionId, sAction, nPriority, len(lToken), dPos) if aAction: dACTIONS[sActionId] = aAction lResult = list(lToken) lResult.extend(["##"+str(iLine), sActionId]) yield lResult else: print(" # Error on action at line:", iLine) def changeReferenceToken (sText, dPos): "change group reference in <sText> with values in <dPos>" for i in range(len(dPos), 0, -1): sText = sText.replace("\\"+str(i), "\\"+str(dPos[i])) return sText |
︙ | |||
154 155 156 157 158 159 160 | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | - + - + + + - - + + + + + | # Option sOption = False m = re.match("/(\\w+)/", sAction) if m: sOption = m.group(1) sAction = sAction[m.end():].strip() # valid action? |
︙ | |||
258 259 260 261 262 263 264 | 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | - + | if "define" in sAction and not re.search(r"define\(\\\d+ *, *\[.*\] *\)", sAction): print("# Error in action at line " + sActionId + ": second argument for <define> must be a list of strings") sAction = prepareFunction(sAction) dFUNCTIONS["_g_d_"+sActionId] = sAction sAction = "_g_d_"+sActionId return [sOption, sCondition, cAction, sAction] else: |
︙ |
Modified gc_core/py/lang_core/gc_engine.py from [1a91db6e13] to [b5abe0de9e].
︙ | |||
747 748 749 750 751 752 753 | 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 | - + - - - + + + | # Sentence Tag [ option, condition, "/", replacement/suggestion/action, iTokenStart, iTokenEnd ] # Test [ option, condition, ">", "" ] if not sOption or dOptions.get(sOption, False): bCondMemo = not sFuncCond or globals()[sFuncCond](self.lToken, nTokenOffset, nLastToken, sCountry, bCondMemo, self.dTags, self.sSentence, self.sSentence0) if bCondMemo: if cActionType == "-": # grammar error |
︙ |
Modified gc_lang/fr/rules.grx from [f0f36d47ef] to [1d6e0a2575].
︙ | |||
2692 2693 2694 2695 2696 2697 2698 | 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 | - + | !!!! Apostrophe manquante (2) !! __typo_apostrophe_manquante_audace__ <start> [L|D|S|N|C|J|M|T|Ç] ~^[aeéiouhAEÉIOUHyîèêôûYÎÈÊÔÛ] |
︙ |