haskell - Parsing complex files with Parsec -


i parse files several sequences of data (same number of column, same content, ...) haskell. data sequences delimited keywords before , after.

begin 1   882 2   809 3   435 4   197 5   229 6   425 ... end  begin 1   235 623 684 2   871 699 557 3   918 686 49 4   53  564 906 5   246 344 501 6   929 138 474 ... end 

my problem after several tests parsec, have impression parsec rather made parse file line line , not whole file.

is parsec right way make want or should consider other tool happy or alex ?

is there website (or other ressource) providing examples of parsing complex text files parsec ?


note : example give very simple one. things more tricky in files many more keywords , combinations.

the format you've described wouldn't hard @ handle in parsec.

as learning how use it: first step should avoid whatever guide gave impression parsec worked line-by-line. recommend chapter 16 of real world haskell place started, , once you're comfortable basics reference material @ http://hackage.haskell.org/package/parsec clear.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -