summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorodanoburu <bcclaro@gmail.com>2018-04-14 19:22:01 -0300
committerodanoburu <bcclaro@gmail.com>2018-04-14 19:22:01 -0300
commit7d89d0b4425f7bd31dc4887055ace2ef6127db69 (patch)
tree32fff2b290f1f607d217dc5d2087fb5c09468aab
parent69a19442939eadb0978c5ef2032d35bf2550560f (diff)
parent2036ffe06db7df5fb39543a25396a04384d8aba3 (diff)
Merge remote-tracking branch 'upstream/master' into por
-rw-r--r--src/runtime/c/pgf/parser.c1
-rw-r--r--src/runtime/haskell-bind/PGF2.hsc3
-rw-r--r--src/runtime/haskell-bind/pgf2.cabal10
3 files changed, 8 insertions, 6 deletions
diff --git a/src/runtime/c/pgf/parser.c b/src/runtime/c/pgf/parser.c
index 2650e2618..d12852a71 100644
--- a/src/runtime/c/pgf/parser.c
+++ b/src/runtime/c/pgf/parser.c
@@ -1236,6 +1236,7 @@ pgf_new_parse_state(PgfParsing* ps, size_t start_offset,
PgfLexiconIdxEntry* entry = gu_buf_extend(state->lexicon_idx);
entry->idx = seq->idx;
entry->offset = state->start_offset;
+ entry->sym_idx= 0;
}
// Add non-epsilon lexical rules to the bottom up index
diff --git a/src/runtime/haskell-bind/PGF2.hsc b/src/runtime/haskell-bind/PGF2.hsc
index 409283981..fb3672c0f 100644
--- a/src/runtime/haskell-bind/PGF2.hsc
+++ b/src/runtime/haskell-bind/PGF2.hsc
@@ -542,7 +542,7 @@ parseWithHeuristics :: Concr -- ^ the language with which we parse
-- If a literal has been recognized then the output should
-- be Just (expr,probability,end_offset)
-> ParseOutput
-parseWithHeuristics lang (Type ctype _) sent heuristic callbacks =
+parseWithHeuristics lang (Type ctype touchType) sent heuristic callbacks =
unsafePerformIO $
do exprPl <- gu_new_pool
parsePl <- gu_new_pool
@@ -550,6 +550,7 @@ parseWithHeuristics lang (Type ctype _) sent heuristic callbacks =
sent <- newUtf8CString sent parsePl
callbacks_map <- mkCallbacksMap (concr lang) callbacks parsePl
enum <- pgf_parse_with_heuristics (concr lang) ctype sent heuristic callbacks_map exn parsePl exprPl
+ touchType
failed <- gu_exn_is_raised exn
if failed
then do is_parse_error <- gu_exn_caught exn gu_exn_type_PgfParseError
diff --git a/src/runtime/haskell-bind/pgf2.cabal b/src/runtime/haskell-bind/pgf2.cabal
index 34a4392a9..178f15023 100644
--- a/src/runtime/haskell-bind/pgf2.cabal
+++ b/src/runtime/haskell-bind/pgf2.cabal
@@ -1,13 +1,13 @@
name: pgf2
version: 0.1.0.0
--- synopsis:
--- description:
+-- synopsis:
+-- description:
homepage: http://www.grammaticalframework.org
license: LGPL-3
--license-file: LICENSE
author: Krasimir Angelov, Inari
-maintainer:
--- copyright:
+maintainer:
+-- copyright:
category: Language
build-type: Simple
extra-source-files: README
@@ -20,7 +20,7 @@ library
other-modules: PGF2.FFI, PGF2.Expr, PGF2.Type, SG.FFI
build-depends: base >=4.3,
containers, pretty
- -- hs-source-dirs:
+ -- hs-source-dirs:
default-language: Haskell2010
build-tools: hsc2hs