Sdf2HaskellContentsIndex
Main
Portability portable
Stability experimental
Maintainer Ralf Laemmel, Joost Visser
Contents
Main program
IO wrapper and option handling
Description
This module is part of Sdf2Haskell, a tool for generating Haskell code from an SDF grammar. This module contains the main program.
Synopsis
main :: IO ()
analyzeSdf :: SDF -> IO ()
sdf2hsWrap :: (ATermConvertible a, ATermConvertible b, Pretty b) => ((String, OutputKind) -> a -> IO (Either b [CfgProd])) -> IO ()
printModule :: HsModule -> String
data OptionsSdf2Hs = OptionsSdf2Hs {
fin :: String
fout :: String
format :: String
mod_name :: String
outputKind :: OutputKind
}
data OutputKind
= Syntax
| Pretty
| CFG
defaultOptionsSdf2Hs :: OptionsSdf2Hs
parseOptions :: String -> [String] -> OptionsSdf2Hs
sdf2hsUsage :: String -> String
Main program
main :: IO ()
Main program
analyzeSdf :: SDF -> IO ()
Show some metrics about the incoming SDF grammar.
IO wrapper and option handling
sdf2hsWrap :: (ATermConvertible a, ATermConvertible b, Pretty b) => ((String, OutputKind) -> a -> IO (Either b [CfgProd])) -> IO ()
IO wrapper.
printModule :: HsModule -> String
Turn generated Haskell module into a string.
data OptionsSdf2Hs
Record to hold the various options.
Constructors
OptionsSdf2Hs
fin :: String
fout :: String
format :: String
mod_name :: String
outputKind :: OutputKind
data OutputKind
Constructors
Syntax
Pretty
CFG
defaultOptionsSdf2Hs :: OptionsSdf2Hs
Default options.
parseOptions :: String -> [String] -> OptionsSdf2Hs
Parse the supplied options.
sdf2hsUsage :: String -> String
Synthesize usage message.
Produced by Haddock version 0.6