Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File generated will not have extra quotes #6

Merged
merged 1 commit into from
May 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions HaLeX_lib/Language/HaLex/FaAsDiGraph.hs
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,20 @@ tographviz' ndfa@(Ndfa v q s z delta) name shape orientation
showElemsListPerLine [] = ""
showElemsListPerLine (h:t) = ((showString h) "\n ") ++ (showElemsListPerLine t)

showStates qs = ["\"" ++ (showState q) ++ "\"" ++
" [shape=" ++ shape ++" , label=\"" ++ (showState q) ++ "\" ,color=black];"
showStates qs = [ (showState q) ++
" [shape=" ++ shape ++" , label=" ++ (showState q) ++ " ,color=black];"
| q <- qs
, not (ndfaIsStDead delta v z q ) || deadSt
, not (ndfaIsSyncState delta v z q) || syncSt]

showInitialStates ss = map showInitialState ss

showInitialState s = "\"" ++ (showState s)
++ "\" [shape=" ++ shape ++ " , label= \"" ++ (showState s)
++ "\", color=green];\n "
showInitialState s = (showState s)
++ " [shape=" ++ shape ++ " , label= " ++ (showState s)
++ " , color=green];\n "

-- showFinalStates' :: Show a => [a] -> [String]
showFinalStates' zs = [ "\"" ++ (showState z) ++ "\" [shape=double" ++ shape ++" , color=red];"
showFinalStates' zs = [ (showState z) ++ " [shape=double" ++ shape ++" , color=red];"
| z <- zs ]


Expand All @@ -117,8 +117,8 @@ tographviz' ndfa@(Ndfa v q s z delta) name shape orientation
mirroredInitialStates xs (n+1)

createInitialArrows [] [] = " "
createInitialArrows (x:xs) (y:ys) = x ++ " -> \"" ++ (showState y) ++
"\" [color = green];\n" ++
createInitialArrows (x:xs) (y:ys) = x ++ " -> " ++ (showState y) ++
" [color = green];\n" ++
createInitialArrows xs ys


Expand Down