Rename SRG categories after preprocessing, since pp may introduce illegal category names.

This commit is contained in:
bjorn
2008-06-22 20:28:39 +00:00
parent 8ffd695a12
commit 6ebf615655
2 changed files with 17 additions and 9 deletions

View File

@@ -169,9 +169,9 @@ removeLeftRecursion gr
retainedLeftRecursive = filter (isLeftRecursive . NonTerminal) $ Set.toList retained
mkCat :: CFSymbol -> CFSymbol -> Cat
mkCat x y = showSymbol x ++ "-" ++ showSymbol y
where showSymbol = symbol id show
mkCat :: CFSymbol -> CFSymbol -> Cat
mkCat x y = showSymbol x ++ "-" ++ showSymbol y
where showSymbol = symbol id show
-- | Get the sets of mutually recursive non-terminals for a grammar.
mutRecCats :: Bool -- ^ If true, all categories will be in some set.