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
commit 2e2d928846
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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