Overview
Comment: | [build][core] analyse tokens outside scope |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | core | build | rg |
Files: | files | file ages | folders |
SHA3-256: |
0d1b4ca419a31b1d7d8925058a887d46 |
User & Date: | olr on 2018-06-20 18:32:33 |
Other Links: | branch diff | manifest | tags |
Context
2018-06-20
| ||
19:17 | [fr] avoid regex tokens at the beginning of rules check-in: 93b1465f7d user: olr tags: fr, rg | |
18:32 | [build][core] analyse tokens outside scope check-in: 0d1b4ca419 user: olr tags: core, build, rg | |
18:30 | [fr] conversion: regex rules -> graph rules check-in: 52e8c2eb3a user: olr tags: fr, rg | |
Changes
Modified compile_rules_graph.py from [5fc68e4b07] to [c0410177dd].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - - - - + + + + | dFUNCTIONS = {} def prepareFunction (s, bTokenValue=False): s = s.replace("__also__", "bCondMemo") s = s.replace("__else__", "not bCondMemo") s = re.sub(r"(select|exclude|define)[(][\\](\d+)", 'g_\\1(lToken[\\2+nTokenOffset]', s) |
︙ | |||
331 332 333 334 335 336 337 | 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | - + | # creating file with all functions callable by rules 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_c_"): # condition |
︙ |
Modified gc_core/py/lang_core/gc_engine.py from [16c28b42e7] to [5229bc46eb].
︙ | |||
704 705 706 707 708 709 710 | 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 | - + | try: if bDebug: print("ACTION:", sRuleId) print(dRule[sRuleId]) sOption, sFuncCond, cActionType, sWhat, *eAct = dRule[sRuleId] # action in lActions: [ condition, action type, replacement/suggestion/action[, iTokenStart, iTokenEnd[, nPriority, message, URL]] ] if not sOption or dOptions.get(sOption, False): |
︙ |