Overview
Comment: | [build][core] nLastToken for all functions |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | core | build | rg |
Files: | files | file ages | folders |
SHA3-256: |
ea518aa42c820465575598f28aae354b |
User & Date: | olr on 2018-08-11 20:53:44 |
Other Links: | branch diff | manifest | tags |
Context
2018-08-12
| ||
05:57 | [build] graph builder: check rule name duplicates check-in: 9050daae5c user: olr tags: build, rg | |
2018-08-11
| ||
20:53 | [build][core] nLastToken for all functions check-in: ea518aa42c user: olr tags: core, build, rg | |
19:22 | [fr] conversion: regex rules -> graph rules check-in: e620deee31 user: olr tags: fr, rg | |
Changes
Modified compile_rules_graph.py from [cb7c6efd58] to [c17a046226].
︙ | |||
139 140 141 142 143 144 145 | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | - - - + + + | if sAction: sActionId = sRuleName + "__b" + str(iActionBlock) + "_l" + str(iLine) + "_a" + str(iAction) + "_" + str(len(lToken)) aAction = createAction(sActionId, sAction, nPriority, dOptPriority, len(lToken), dPos) if aAction: dACTIONS[sActionId] = aAction lResult = list(lToken) lResult.extend(["##"+str(iLine), sActionId]) |
︙ | |||
400 401 402 403 404 405 406 | 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | - + - + - + | print(" creating callables...") sPyCallables = "# generated code, do not edit\n" #sJSCallables = "// generated code, do not edit\nconst oEvalFunc = {\n" for sFuncName, sReturn in dFUNCTIONS.items(): if sFuncName.startswith("_g_cond_"): # condition sParams = "lToken, nTokenOffset, nLastToken, sCountry, bCondMemo, dTags, sSentence, sSentence0" elif sFuncName.startswith("g_msg_"): # message |
︙ |
Modified gc_core/py/lang_core/gc_engine.py from [2cdea3f901] to [74dc3a8b69].
︙ | |||
803 804 805 806 807 808 809 | 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 | - + | nTokenEnd = nTokenOffset + eAct[1] if eAct[1] > 0 else nLastToken + eAct[1] self._tagAndPrepareTokenForRewriting(sWhat, nTokenStart, nTokenEnd, nTokenOffset, nLastToken, eAct[2], bDebug) bChange = True elif cActionType == "=": # disambiguation if bDebug: print(" DISAMBIGUATOR:\n ", dRule[sRuleId]) |
︙ | |||
862 863 864 865 866 867 868 | 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 | - + | elif sSugg == "_": lSugg = [] else: lSugg = self._expand(sSugg, nTokenOffset, nLastToken).split("|") if bCaseSvty and lSugg and self.lToken[iFirstToken]["sValue"][0:1].isupper(): lSugg = list(map(lambda s: s[0:1].upper()+s[1:], lSugg)) # Message |
︙ | |||
934 935 936 937 938 939 940 | 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 | - + | if nTokenRewriteEnd - nTokenRewriteStart == 0: self.lToken[nTokenRewriteStart]["sNewValue"] = "_" else: for i in range(nTokenRewriteStart, nTokenRewriteEnd+1): self.lToken[i]["sNewValue"] = "_" else: if sWhat.startswith("="): |
︙ |