308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
|
# new rule group
m = re.match("__(\\w+)(!\\d|)__", sLine)
if m:
sRuleName = m.group(1)
iActionBlock = 1
nPriority = int(m.group(2)[1:]) if m.group(2) else -1
else:
print("Error at rule group: ", sLine, " -- line:", i)
break
elif re.search("^ +<<- ", sLine) or sLine.startswith(" ") \
or re.search("^ +#", sLine) or re.search(r"^ [-~=>/](?:\d\.?(?::\.?\d+|)|)>> ", sLine) :
# actions
sActions += " " + sLine.strip()
elif re.match("[ ]*$", sLine):
# empty line to end merging
if not lTokenLine:
|
|
|
|
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
|
# new rule group
m = re.match("__(\\w+)(!\\d|)__", sLine)
if m:
sRuleName = m.group(1)
iActionBlock = 1
nPriority = int(m.group(2)[1:]) if m.group(2) else -1
else:
print("Syntax error in rule group: ", sLine, " -- line:", i)
exit()
elif re.search("^ +<<- ", sLine) or sLine.startswith(" ") \
or re.search("^ +#", sLine) or re.search(r"^ [-~=>/](?:\d\.?(?::\.?\d+|)|)>> ", sLine) :
# actions
sActions += " " + sLine.strip()
elif re.match("[ ]*$", sLine):
# empty line to end merging
if not lTokenLine:
|