formal grammar updates [backport:1.2] (#18803)

This commit is contained in:
Andreas Rumpf
2021-09-04 19:52:57 +02:00
committed by GitHub
parent 5c85e480a6
commit 2e2d928846
3 changed files with 40 additions and 48 deletions

View File

@@ -13,6 +13,7 @@ proc checkGrammarFileImpl(cache: IdentCache, config: ConfigRef) =
var stream = llStreamOpen(data)
var declaredSyms = initHashSet[string]()
var usedSyms = initHashSet[string]()
usedSyms.incl "module" # 'module' is the start rule.
if stream != nil:
declaredSyms.incl "section" # special case for 'section(RULE)' in the grammar
var