diff options
| author | Krasimir Angelov <kr.angelov@gmail.com> | 2017-09-25 13:23:53 +0200 |
|---|---|---|
| committer | Krasimir Angelov <kr.angelov@gmail.com> | 2017-09-25 13:23:53 +0200 |
| commit | d79ac5687024252eb03a0bfe567f2b9d239546f9 (patch) | |
| tree | 40cd33524383146f5bca3c62ff2f8b1906fe987d /src/runtime/haskell-bind/PGF2/FFI.hsc | |
| parent | d103fe675564cf9ab19280d2eb580842f520f717 (diff) | |
handle productions in the internal creation API
Diffstat (limited to 'src/runtime/haskell-bind/PGF2/FFI.hsc')
| -rw-r--r-- | src/runtime/haskell-bind/PGF2/FFI.hsc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/runtime/haskell-bind/PGF2/FFI.hsc b/src/runtime/haskell-bind/PGF2/FFI.hsc index e6846b66a..1ed145160 100644 --- a/src/runtime/haskell-bind/PGF2/FFI.hsc +++ b/src/runtime/haskell-bind/PGF2/FFI.hsc @@ -38,6 +38,7 @@ data GuMap data GuMapItor data GuHasher data GuSeq +data GuBuf data GuPool type GuVariant = Ptr () type GuHash = (#type GuHash) @@ -112,6 +113,9 @@ foreign import ccall unsafe "gu/utf8.h gu_utf8_encode" foreign import ccall unsafe "gu/seq.h gu_make_seq" gu_make_seq :: CSizeT -> CSizeT -> Ptr GuPool -> IO (Ptr GuSeq) +foreign import ccall unsafe "gu/seq.h gu_make_buf" + gu_make_buf :: CSizeT -> Ptr GuPool -> IO (Ptr GuBuf) + foreign import ccall unsafe "gu/map.h gu_make_map" gu_make_map :: CSizeT -> Ptr GuHasher -> CSizeT -> Ptr a -> CSizeT -> Ptr GuPool -> IO (Ptr GuMap) @@ -127,6 +131,9 @@ foreign import ccall "gu/map.h gu_map_iter" foreign import ccall unsafe "gu/hash.h &gu_int_hasher" gu_int_hasher :: Ptr GuHasher +foreign import ccall unsafe "gu/hash.h &gu_addr_hasher" + gu_addr_hasher :: Ptr GuHasher + foreign import ccall unsafe "gu/hash.h &gu_string_hasher" gu_string_hasher :: Ptr GuHasher @@ -227,6 +234,9 @@ data PgfGraphvizOptions type PgfBindType = (#type PgfBindType) data PgfAbsFun data PgfAbsCat +data PgfCCat +data PgfCncFun +data PgfProductionApply foreign import ccall "pgf/pgf.h pgf_read" pgf_read :: CString -> Ptr GuPool -> Ptr GuExn -> IO (Ptr PgfPGF) @@ -471,3 +481,12 @@ foreign import ccall "pgf/graphviz.h pgf_graphviz_parse_tree" foreign import ccall "pgf/graphviz.h pgf_graphviz_word_alignment" pgf_graphviz_word_alignment :: Ptr (Ptr PgfConcr) -> CSizeT -> PgfExpr -> Ptr PgfGraphvizOptions -> Ptr GuOut -> Ptr GuExn -> IO () + +foreign import ccall "pgf/data.h pgf_parser_index" + pgf_parser_index :: Ptr PgfConcr -> Ptr PgfCCat -> GuVariant -> (#type bool) -> Ptr GuPool -> IO () + +foreign import ccall "pgf/data.h pgf_lzr_index" + pgf_lzr_index :: Ptr PgfConcr -> Ptr PgfCCat -> GuVariant -> (#type bool) -> Ptr GuPool -> IO () + +foreign import ccall "pgf/data.h pgf_production_is_lexical" + pgf_production_is_lexical :: Ptr PgfProductionApply -> Ptr GuBuf -> Ptr GuPool -> IO (#type bool) |
