Changes In Branch rg Through [655e0c4bf5] Excluding Merge-Ins
This is equivalent to a diff from 86f910ec5e to 655e0c4bf5
2018-06-13
| ||
08:19 | [fr] faire/vouloir +Vinfi check-in: 80b12e1e04 user: olr tags: trunk, fr | |
07:57 | [core] gc engine: dictionary of tokens position for disambiguation check-in: ff58bafc4d user: olr tags: core, rg | |
06:02 | [misc] SublimeText theme update check-in: 655e0c4bf5 user: olr tags: misc, rg | |
06:01 | [build] graph builder: add some decoration check-in: 291571d101 user: olr tags: build, rg | |
05:46 | merge trunk check-in: 168628b7ae user: olr tags: rg | |
2018-06-11
| ||
18:27 | [fr] faux positifs: en x secondes check-in: 86f910ec5e user: olr tags: trunk, fr | |
2018-06-10
| ||
11:04 | [fx] gc panel ui, tooltip: go to the db in debug mode check-in: 5033db6633 user: olr tags: trunk, fx | |
Modified compile_rules.py from [1ea2b6d97a] to [856372255b].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | + | import re import traceback import json import compile_rules_js_convert as jsconv import compile_rules_graph as crg dDEF = {} lFUNCTIONS = [] aRULESET = set() # set of rule-ids to check if there is several rules with the same id nRULEWITHOUTNAME = 0 |
︙ | |||
108 109 110 111 112 113 114 | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | - + + + + + + + + + | def createRule (s, nIdLine, sLang, bParagraph, dOptPriority): "returns rule as list [option name, regex, bCaseInsensitive, identifier, list of actions]" global dJSREGEXES global nRULEWITHOUTNAME |
︙ | |||
341 342 343 344 345 346 347 | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | + - - + + | print("# Unknown action at line " + sIdAction) return None def _calcRulesStats (lRules): d = {'=':0, '~': 0, '-': 0, '>': 0} for aRule in lRules: if aRule[0] != "@@@@": |
︙ | |||
430 431 432 433 434 435 436 | 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 | - - - + + + + - + - - + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + - + + | except: print("Error. Rules file in project [" + sLang + "] not found.") exit() # removing comments, zeroing empty lines, creating definitions, storing tests, merging rule lines print(" parsing rules...") global dDEF |
︙ | |||
547 548 549 550 551 552 553 554 555 | 579 580 581 582 583 584 585 586 587 588 589 590 591 | + + + + | "gctests": sGCTests, "gctestsJS": sGCTestsJS, "paragraph_rules": mergeRulesByOption(lParagraphRules), "sentence_rules": mergeRulesByOption(lSentenceRules), "paragraph_rules_JS": jsconv.writeRulesToJSArray(mergeRulesByOption(lParagraphRulesJS)), "sentence_rules_JS": jsconv.writeRulesToJSArray(mergeRulesByOption(lSentenceRulesJS)) } d.update(dOptions) # compile graph rules d2 = crg.make(lGraphRule, sLang, bJavaScript) d.update(d2) return d |
Added compile_rules_graph.py version [e76a1b508a].