266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
|
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
|
-
+
|
if int(x.group(1)) > nToken:
print(f"# Error in token index at line {sLineId} / {sActionId} ({nToken} tokens only)")
print(sText)
def checkIfThereIsCode (sText, sLineId, sActionId):
"check if there is code in <sText> (debugging)"
if re.search("[.]\\w+[(]|sugg\\w+[(]|\\([0-9]|\\[[0-9]", sText):
if re.search(r"[.]\w+[(]|sugg\w+[(]|\(\\[0-9]|\[(?:[0-9]:|:)", sText):
print(f"# Warning at line {sLineId} / {sActionId}: This message looks like code. Line should probably begin with =")
print(sText)
def createAction (sLineId, sActionId, sAction, nGroup):
"returns an action to perform as a tuple (condition, action type, action[, iGroup [, message, URL ]])"
m = re.search(r"([-~=>])(\d*|)>>", sAction)
|