Overview
Comment: | [build] rule names are now mandatory [doc] update |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | build | doc |
Files: | files | file ages | folders |
SHA3-256: |
564da6fd9a651ab71eceba6bfd7d1a5b |
User & Date: | olr on 2020-04-16 17:28:26 |
Other Links: | manifest | tags |
Context
2020-04-16
| ||
19:43 | [fr] ajustements, nr: confusions don/dont, plus tôt/plutôt check-in: c11b3d912c user: olr tags: trunk, fr | |
17:28 | [build] rule names are now mandatory [doc] update check-in: 564da6fd9a user: olr tags: trunk, build, doc | |
16:36 | [build][fr] variable sContext for regex rules too [doc] update check-in: d31122ee4c user: olr tags: trunk, fr, build, doc | |
Changes
Modified compile_rules.py from [9f8d749ce1] to [ed8f69534c].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - | dDEFINITIONS = {} dDECLENSIONS = {} lFUNCTIONS = [] aRULESET = set() # set of rule-ids to check if there is several rules with the same id |
︙ | |||
134 135 136 137 138 139 140 | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 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 | - - + - - - - - - + + + + + - - - + + | print(sRegex) return 0 def createRule (s, nIdLine, sLang, bParagraph, dOptPriority): "returns rule as list [option name, regex, bCaseInsensitive, identifier, list of actions]" global dJSREGEXES |
︙ | |||
560 561 562 563 564 565 566 | 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 | - + | pass elif bGraph: lGraphRule.append([i, sLine]) # Regex rules elif re.match("[ \t]*$", sLine): # empty line pass |
︙ | |||
626 627 628 629 630 631 632 | 622 623 624 625 626 627 628 629 630 631 632 633 634 635 | - - | # JavaScript sJSCallables += " {}: function ({})".format(sFuncName, sParams) + " {\n" sJSCallables += " return " + jsconv.py2js(sReturn) + ";\n" sJSCallables += " },\n" displayStats(lParagraphRules, lSentenceRules) |
︙ |
Modified doc/syntax.txt from [d2fc6c099d] to [22d5e1895e].
︙ | |||
80 81 82 83 84 85 86 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | - + | Patterns are written with the Python syntax for regular expressions: http://docs.python.org/library/re.html There can be one or several actions for each rule, executed following the order they are written. |
︙ | |||
110 111 112 113 114 115 116 | 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 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 | - + - - - - - - - - - + + + - - - - - - - - - - + + - - - - - - - - - - - + - + - + - + - + | > `s` case sensitive > `u` uppercase allowed for lowercase characters >> i.e.: "Word" becomes "W[oO][rR][dD]" |
︙ | |||
226 227 228 229 230 231 232 | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | - + - + | " ([?!;])" @@1 ### Pattern matching Repeating pattern matching of a single rule continues after the previous matching, so instead of general multiword patterns, like |
︙ |