Skip to content
Snippets Groups Projects
Commit d73b51ee authored by Hans-Peter Deifel's avatar Hans-Peter Deifel
Browse files

Correctly handle --dump-json option of 'search'

parent 9eeddcd0
Branches
No related tags found
No related merge requests found
...@@ -86,12 +86,12 @@ main = do ...@@ -86,12 +86,12 @@ main = do
json <- traverse BS.readFile (sseGraphJsonFile opts) json <- traverse BS.readFile (sseGraphJsonFile opts)
case JSON.parseFile <$> json of case JSON.parseFile <$> json of
-- Don't do any comparision between graphs -- Don't do any comparision between graphs
Nothing -> void (driver (dumpJSON opts) (eliminateEpsilons opts) (mockupExecutable opts)) Nothing -> void (driver (eliminateEpsilons opts) (dumpJSON opts) (mockupExecutable opts))
Just (Left e) -> do Just (Left e) -> do
hPutStrLn stderr $ "Could not parse sse graph json: " <> e hPutStrLn stderr $ "Could not parse sse graph json: " <> e
exitFailure exitFailure
Just (Right graph1) -> do Just (Right graph1) -> do
graph2 <- driver (dumpJSON opts) (eliminateEpsilons opts) (mockupExecutable opts) graph2 <- driver (eliminateEpsilons opts) (dumpJSON opts) (mockupExecutable opts)
if (not (isDeterministic (graph1^._graph)) || not (isDeterministic (graph2^._graph))) then do if (not (isDeterministic (graph1^._graph)) || not (isDeterministic (graph2^._graph))) then do
hPutStrLn stderr $ "One of the graphs is not deterministic" hPutStrLn stderr $ "One of the graphs is not deterministic"
exitFailure exitFailure
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment