Grammalecte  Check-in [c4eb507f6d]

Overview
Comment:[build] new command for future graph rules
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | build
Files: files | file ages | folders
SHA3-256: c4eb507f6d82a2d6c53a174ffcc00e385af8d2608d9d51def30f52b1db5c6a3c
User & Date: olr on 2018-02-21 11:53:37
Other Links: manifest | tags
Context
2018-02-21
19:13
[graphspell][py] new functions: getLemma() and countWordsOccurrences() check-in: d205a5a601 user: olr tags: graphspell, trunk
11:53
[build] new command for future graph rules check-in: c4eb507f6d user: olr tags: build, trunk
2018-02-20
13:51
[server] use gc wrapper check-in: a7e5364e1d user: olr tags: server, trunk
Changes

Modified compile_rules.py from [9bd1433006] to [b3cfeb04f1].

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