
I don't think DDC uses alex/happy for parsing:
```
➜ ddc git:(master) find . -iname "*.y"
➜ ddc git:(master) find . -iname "*.x"
```
and there are some Parsec parsers in `packages/ddc-core/DDC/Core/Parser`.
---
Ömer Sinan Ağacan
http://osa1.net
2014-03-09 10:47 GMT+02:00 Erik de Castro Lopo
Ömer Sinan Ağacan wrote:
Does anyone have any example alex+happy programs that uses location location annotated tokens and location information of token while reporting parse errors?
I already wrote lexer and my function type is something like:
runLexer :: String -> [(Token, AlexPosn)]
where AlexPosn type contains location information. But I have no idea how can I use that in happy to parse and use location information in parse error messages. There are lots of examples in interwebs but as far as I can see none of them works on location-annotated tokens.
Also look at the DDC codebase:
Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/ _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe