[Haskell-cafe] parsec get line number of lexems

Olivier Duhart olivier.duhart at gmail.com
Sun Jul 17 16:50:27 UTC 2016


hello,

I am experimenting with parsec.
I am building a very simple language.
I have a (almost) wholy funcrionning language : syntactic check, AST building and byte code génération.
Now i want to improve error checking (type checking more precisely). this should be done on the  AST basis.
but in the ast i lose the line number information for precise error message. 

so my question is : is ther a way to get the line numbers at parsers level ? i would then store it in the ast for semantic check purpose

thanks for your answers

Olivier


More information about the Haskell-Cafe mailing list