Commit 2145d5cb authored by Thorsten Wißmann's avatar Thorsten Wißmann 🐧

Also sanitize '*' in state names

parent 90078604
......@@ -240,6 +240,8 @@ compressCoalgebra2Q = compressCoalgebra Q
compressCoalgebra2Ident :: (Show ident, Ord ident) => CoalgebraWTA ident -> CoalgebraWTA Identifier
compressCoalgebra2Ident = compressCoalgebra (\n -> Identifier (T.pack "q") (fromIntegral n))
-- | sanitize the identifier names. Currently, we don't check for naming clashes that
-- possibly arise.
sanitizeNames :: CoalgebraWTA Identifier -> CoalgebraWTA Identifier
sanitizeNames coalg = State.evalState (compressCoalgebraBy sanitizeIdent coalg) 0
where
......@@ -261,6 +263,7 @@ sanitizeNames coalg = State.evalState (compressCoalgebraBy sanitizeIdent coalg)
fixchar '"' = "_dq_"
fixchar '\'' = "_sq_"
fixchar ':' = "_col_"
fixchar '*' = "_star_"
fixchar defaultcase = [defaultcase]
-- ================ Print the copar data ================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment