I'm trying to call a Lemon based parser from Nim. I think Nim is garbage collecting the parsers state but I can't figure out why that is happening. I've created the simplest example of the issue on [github](https://github.com/drjdn/nim_lemon_calc). More info on the problem and how to run the code are at the link. There is nothing fancy going here as far as I know as it is just Nim calling into C (the AST is all C code etc.). I'm pretty new to Nim so any input would be greatly appreciated.
- Nim calling Lemon parser and SIGSEGV jdn
