Description
NMIS file parser.
Description
Parser for NMIS (Network Management Information System) files to record type. Main module to use is Text.Nmis and parseNmis function
README.md
NMIS file parser
- NMIS stands for Network Management Information System
This parser parses the NMIS format files to Nmis
record type
Example usage :
module Main where
import System.Environment (getArgs)
import System.IO
import Text.Megaparsec
import Text.Nmis
main :: IO ()
main = getArgs >>= parseArgs
where
parseArgs [] = putStrLn "error: you need to pass in the file path"
parseArgs (path:_) = do
contents <- readFile path
either (print . parseErrorPretty) print (parse parseNmis "" contents)