matrix-market-attoparsec alternatives and similar packages
Based on the "Parsing" category.
Alternatively, view matrix-market-attoparsec alternatives based on common mentions on social networks and blogs.
-
megaparsec
Industrial-strength monadic parser combinator library -
attoparsec
A fast Haskell library for parsing ByteStrings -
Earley
Parsing all context-free grammars using Earley's algorithm in Haskell. -
trifecta
Parser combinators with highlighting, slicing, layout, literate comments, Clang-style diagnostics and the kitchen sink -
replace-megaparsec
Stream editing with Haskell Megaparsec parsers -
parser-combinators
Lightweight package providing commonly useful parser combinators -
descriptive
Self-describing consumers/parsers; forms, cmd-line args, JSON, etc. -
scanner
Fast non-backtracking incremental combinator parsing for bytestrings -
pipes-aeson
Encode and decode JSON streams using Aeson and Pipes. -
weighted-regexp
Regular Expression Matching in Haskell -
pipes-attoparsec
Utilities to convert a parser into a pipe -
parsec-free
Parsec API encoded as a deeply-embedded DSL, for debugging and analysis -
gcodehs
GCode parser, pretty-printer and processing utils -
incremental-parser
Haskell parsing combinator liibrary that can be fed the input and emit the parsed output incrementally -
data-stm32
ARM SVD and CubeMX XML parser and pretty printer for STM32 family -
hsemail
Haskell Parsec parsers for the syntax defined in RFC2821 and 2822 -
inchworm
Simple parser combinators for lexical analysis. -
replace-attoparsec
Stream editing with Haskell Attoparsec parsers -
parsec-parsers
Orphan instances so you can use `parsers` with `parsec`. -
parsers-megaparsec
`parsers` instances for Megaparsec -
attoparsec-parsec
An Attoparsec compatibility layer for Parsec -
record-syntax
A library for parsing and processing the Haskell syntax sprinkled with anonymous records -
attoparsec-expr
Port of parsec's expression parser to attoparsec. -
fuzzy-dates
Automatically detect and parse dates in many different formats -
syntactical
Haskell library for distfix expression parsing -
parsimony
Haskell parser combinators derived from Parsec -
streaming-binary
Incremental serialization and deserialization of Haskell values. -
hspec-parsec
Hspec expectations for testing Parsec parsers -
antlrc
Haskell binding to the ANTLR parser generator C runtime library http://www.antlr.org/wiki/display/ANTLR3/ANTLR3+Code+Generation+-+C -
attoparsec-data
Parsers for the standard Haskell data types -
bytearray-parsing
Parsing of bytearray-based data
Learn any GitHub repo in 59 seconds
Do you think we are missing an alternative of matrix-market-attoparsec or a related project?
README
matrix-market-attoparsec
Attoparsec parser for the NIST Matrix Market format [0].
The library also contains functions for serializing matrix data to text file.
User guide
The module Data.Matrix.MatrixMarket
exports the user interface:
readMatrix :: FilePath -> IO (Matrix S.Scientific)
readArray :: FilePath -> IO (Array S.Scientific)
writeMatrix :: Show a => FilePath -> Matrix a -> IO ()
writeArray :: Show a => FilePath -> Array a -> IO ()
The first two functions contain the parsing logic, and make use of scientific
for parsing numerical data in scientific notation.
As of version 0.1.1 there are also intermediate functions @readMatrix'@, @readArray'@, @writeMatrix'@ and @writeArray'@ that do not touch the filesystem but (de-)serialize from/to lazy ByteString.
Naming convention
We follow the MatrixMarket format definitions, by which a "Matrix" is sparse and stored in coordinate format (row, column, entry), whereas an "Array" is a dense grid of numbers, stored in column-oriented form. Algebraic vectors, such as the right-hand sides of equation systems, are stored as n-by-1 Arrays.
Testing
test/LibSpec.hs
contains a simple read/write/read sanity test for the included Matrix Marked data files (fidapm05.mtx
and fidapm05_rhs1.mtx
):
m0 <- readMatrix fname -- load original
writeMatrix ftemp m0 -- save as temp
m1 <- readMatrix ftemp -- load temp
m0 `shouldBe` m1 -- compare temp with original