Commit 61df3d2d authored by Philipp Meyer's avatar Philipp Meyer
Browse files

Changed options for the input format

parent b00594bd
...@@ -8,7 +8,6 @@ import System.IO ...@@ -8,7 +8,6 @@ import System.IO
import System.Console.GetOpt import System.Console.GetOpt
import Control.Monad import Control.Monad
import Control.Applicative import Control.Applicative
import Data.Char (toUpper)
import Parser import Parser
import qualified Parser.PNET as PNET import qualified Parser.PNET as PNET
...@@ -40,14 +39,17 @@ startOptions = Options { inputFormat = PNET ...@@ -40,14 +39,17 @@ startOptions = Options { inputFormat = PNET
options :: [ OptDescr (Options -> Either String Options) ] options :: [ OptDescr (Options -> Either String Options) ]
options = options =
[ Option "f" ["format"] [ Option "" ["pnet"]
(ReqArg (\arg opt -> (NoArg (\opt -> Right opt { inputFormat = PNET }))
case reads (map toUpper arg) of "Use the pnet input format"
[(format, "")] -> Right opt { inputFormat = format }
_ -> Left ("invalid input format `" ++ arg ++ "'\n")) , Option "" ["lola"]
"FORMAT") (NoArg (\opt -> Right opt { inputFormat = LOLA }))
("Input format (possible values=\"pnet\", \"lola\", \"tpn\"\n" ++ "Use the lola input format"
" default=\"pnet\")")
, Option "" ["tpn"]
(NoArg (\opt -> Right opt { inputFormat = TPN }))
"Use the tpn input format"
, Option "" ["termination"] , Option "" ["termination"]
(NoArg (\opt -> Right opt { proveTermination = True })) (NoArg (\opt -> Right opt { proveTermination = True }))
......
Supports Markdown
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