GrammaticalFramework/gf-core

Incremental parsing (completion) in Haskell bindings to C runtime (PGF2)

johnjcamilleri opened this issue · 3 comments

I'm a bit confused as to the status of completion in the C runtime (with Haskell bindings).

I have looked through the archives on gf-dev (in particular this post) and the source code itself. From what I can understand, the functionality is there (I'm looking at parseWithOracle) although it is not exposed in the Haskell bindings. Or perhaps it is, but in a very non-obvious way. I thought this might be possible with parseToChart but I can't figure out how, if that's the case.

@krangelov (or someone else) could you give me some pointers? Assuming that the functionality is available in C but not properly exposed in the Haskell API, I'm willing to work on that.

Thanks Krasimir, I'll look into this. I should be able to figure it out.

Here's my first attempt (which doesn't work): https://github.com/GrammaticalFramework/gf-core/compare/pgf2-complete

I'm quite bad at reading C, and I'm trying to understand what the return type of pgf_complete should be: an enumeration of what exactly? To me it looks like it should be parse results, which is why I based my code mostly on the other parse functions.