Overview
| Comment: | [build] use rule id instead of line id for callables |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk | build | major_change |
| Files: | files | file ages | folders |
| SHA3-256: |
f746aaf996f110268010bf8e0e409c5c |
| User & Date: | olr on 2017-05-13 07:49:20 |
| Other Links: | manifest | tags |
Context
|
2017-05-13
| ||
| 07:52 | [fr] renommage de règles check-in: 7591e79cfd user: olr tags: trunk, fr | |
| 07:49 | [build] use rule id instead of line id for callables check-in: f746aaf996 user: olr tags: trunk, build, major_change | |
| 07:35 | [fr] processeur de texte: dans ces cas-là check-in: 6838ca1ac2 user: olr tags: trunk, fr | |
Changes
Modified compile_rules.py from [d1b7f6f58e] to [e2df43feb0].
| ︙ | |||
180 181 182 183 184 185 186 | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | - + + |
cWordLimitLeft = m.group('borders_and_case')[0]
cCaseMode = m.group('borders_and_case')[1]
cWordLimitRight = m.group('borders_and_case')[2]
sOption = m.group('option')[1:] if m.group('option') else False
if m.group('ruleid'):
sRuleId = m.group('ruleid')[1:-1]
if sRuleId in RULESET:
|
| ︙ | |||
265 266 267 268 269 270 271 | 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | - + |
for x in re.finditer("\(\?:[^)]*\([[\w -]", sRegex):
print("# Warning: groups inside non grouping parenthesis in regex at line " + sLineId)
#### PARSE ACTIONS
lActions = []
nAction = 1
for sAction in s.split(" <<- "):
|
| ︙ | |||
288 289 290 291 292 293 294 | 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | - + - + |
print("# No action at line " + sIdAction)
return None
#### CONDITION
sCondition = sAction[:m.start()].strip()
if sCondition:
sCondition = prepareFunction(sCondition)
|
| ︙ | |||
318 319 320 321 322 323 324 | 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | - + - + |
sURL = ""
mURL = re.search("[|] *(https?://.*)", sMsg)
if mURL:
sURL = mURL.group(1).strip()
sMsg = sMsg[:mURL.start(0)].strip()
if sMsg[0:1] == "=":
sMsg = prepareFunction(sMsg[1:])
|
| ︙ | |||
346 347 348 349 350 351 352 | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | - + - - + + - + - - + + - - + + |
for x in re.finditer(r"\\(\d+)", sAction):
if int(x.group(1)) > nGroup:
print("# Error in groups in replacement at line " + sIdAction + " ("+str(nGroup)+" groups only)")
if re.search("[.]\\w+[(]", sAction):
print("# Error in action at line " + sIdAction + ": This action looks like code. Line should begin with =")
if cAction == "-":
|
| ︙ |