mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 19:22:50 -06:00
Added srg0006: A grammar with a cycle caused by an empty production.
This commit is contained in:
@@ -88,7 +88,7 @@ stateGFCC = mkGFCC . mkCanon2gfcc . stateGrammarST
|
||||
|
||||
-- * Grammar filtering
|
||||
|
||||
-- | Removes all directly cyclic productions.
|
||||
-- | Removes all directly and indirectly cyclic productions.
|
||||
removeCycles :: CFRules -> CFRules
|
||||
removeCycles = groupProds . removeCycles_ . ungroupProds
|
||||
where removeCycles_ rs = [r | r@(CFRule c rhs _) <- rs, rhs /= [Cat c]]
|
||||
|
||||
Reference in New Issue
Block a user