language-pig alternatives and similar packages
Based on the "Language" category.
Alternatively, view language-pig alternatives based on common mentions on social networks and blogs.
-
stylish-haskell
DISCONTINUED. Haskell code prettifier [Moved to: https://github.com/haskell/stylish-haskell] -
ministg
Ministg is an interpreter for a high-level, small-step, operational semantics for the STG machine.
WorkOS - The modern identity platform for B2B SaaS
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of language-pig or a related project?
README
language-pig
Parser and pretty printer for the Apache Pig scripting language (http://pig.apache.org/). The current version is implemented using Parsec parser combinators.
Install
Cabal project, now on hackage, so the usual
cabal install language-pig
Or from source
git clone ...
cd language-pig
cabal install
Use
Parse an expression:
parseString :: [Char] -> Root
Returns an AST (type Root is the root node).
Parse a file:
parseFile :: FilePath -> IO PigFile
PigFile contains the Root (of AST) and the file name. If you want just the AST, parseFileForAST would do it.
Pretty print the produced tree:
putStrLn $ prettyPrint tree
So to round it up, if you want to parse and pretty print the parsed AST of a Pig file (using Control.Applicative (<$>))
prettyPrint <$> parseFileForAST "example.pig" >>= putStrLn