
Hi, All. I have a compiler written in Parsec and Haskell for a DSL. It's quite rudimentary since I made it for my own use only. I would like to make it useable by a slightly wider circle. For this, I need better error reporting. Currently, it terminates after finding one syntax error. I would like to detect as many syntax errors as possible and report them before terminating. Are there any "best practices" examples of how to do this available? It seems like something many people would have solved already. Cheers, David ____________________ David F. Place Owner, Panpipes Ho! LLC http://panpipesho.com d@vidplace.com

Hello I'm not sure trapping multiple errors is readily achievable with Parsec - I think you would want to do this with 'error correction' so you can log an error but then continue parsing. You could probably add your own error correction strategy but it would likely make the parsers convoluted. Doaitse Swierstra's parser combinators have error correction. Best wishes Stephen
participants (2)
-
David Place
-
Stephen Tetley