430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
|
print(" parsing rules...")
global dDEF
lLine = []
lRuleLine = []
lTest = []
lOpt = []
zBookmark = re.compile("^!!+")
for i, sLine in enumerate(lRules, 1):
if sLine.startswith('#END'):
printBookmark(0, "BREAK BY #END", i)
break
elif sLine.startswith("#"):
pass
elif sLine.startswith("DEF:"):
m = re.match("DEF: +([a-zA-Z_][a-zA-Z_0-9]*) +(.+)$", sLine.strip())
if m:
dDEF["{"+m.group(1)+"}"] = m.group(2)
else:
print("Error in definition: ", end="")
print(sLine.strip())
|
>
>
>
>
>
>
|
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
|
print(" parsing rules...")
global dDEF
lLine = []
lRuleLine = []
lTest = []
lOpt = []
zBookmark = re.compile("^!!+")
zGraphLink = re.compile(r"^@@@@GRAPHLINK>(\w+)@@@@")
for i, sLine in enumerate(lRules, 1):
if sLine.startswith('#END'):
printBookmark(0, "BREAK BY #END", i)
break
elif sLine.startswith("#"):
pass
elif sLine.startswith("@@@@"):
m = re.match(r"^@@@@GRAPHLINK>(\w+)@@@@", sLine.strip())
if m:
#lRuleLine.append(["@GRAPHLINK", m.group(1)])
printBookmark(1, "@GRAPHLINK: " + m.group(1), i)
elif sLine.startswith("DEF:"):
m = re.match("DEF: +([a-zA-Z_][a-zA-Z_0-9]*) +(.+)$", sLine.strip())
if m:
dDEF["{"+m.group(1)+"}"] = m.group(2)
else:
print("Error in definition: ", end="")
print(sLine.strip())
|