mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-06 17:52:51 -06:00
Removed cycles when building SRGs, to avoid getting left-recursive grammars.
This commit is contained in:
@@ -74,7 +74,7 @@ makeSimpleSRG :: Ident -- ^ Grammar name
|
||||
-> CGrammar -- ^ A context-free grammar
|
||||
-> SRG
|
||||
makeSimpleSRG
|
||||
= makeSRG_ (removeLeftRecursion . removeIdenticalRules . removeEmptyCats)
|
||||
= makeSRG_ (removeLeftRecursion . removeIdenticalRules . removeEmptyCats . removeCycles)
|
||||
|
||||
-- | Create a SRG preserving the names, profiles and probabilities of the
|
||||
-- input grammar. The returned grammar may be left-recursive.
|
||||
|
||||
Reference in New Issue
Block a user