diff --git a/src/compiler/api/GF/Command/Commands.hs b/src/compiler/api/GF/Command/Commands.hs index 517a4f961..bc6fdb168 100644 --- a/src/compiler/api/GF/Command/Commands.hs +++ b/src/compiler/api/GF/Command/Commands.hs @@ -59,6 +59,7 @@ pgfCommands = Map.fromList [ exec = needPGF $ \ opts arg pgf -> do let es = toExprs arg let langs = optLangs pgf opts + let gizaAlignment = error "TODO: gizaAlignment" if isOpt "giza" opts then do let giz = map (gizaAlignment pgf (head $ langs, head $ tail $ langs)) es @@ -524,6 +525,10 @@ pgfCommands = Map.fromList [ let abslabels = valStrOpts "abslabels" (valStrOpts "file" "" opts) opts let cnclabels = valStrOpts "cnclabels" "" opts let outp = valStrOpts "output" "dot" opts + let graphvizDependencyTree = error "TODO: graphvizDependencyTree" + let getDepLabels = error "TODO: getDepLabels" + let getCncDepLabels = error "TODO: getCncDepLabels" + let conlls2latexDoc = error "TODO: conlls2latexDoc" mlab <- case abslabels of "" -> return Nothing _ -> (Just . getDepLabels) `fmap` restricted (readFile abslabels) @@ -785,9 +790,9 @@ pgfCommands = Map.fromList [ fromParse1 opts (s,po) = case po of ParseOk ts -> fromExprs (isOpt "show_probs" opts) (takeOptNum opts ts) - ParseFailed i t -> pipeMessage $ "The parser failed at position " + ParseFailed i -> pipeMessage $ "The parser failed at position " ++ show i ++": " - ++ show t + ++ show (takeWhile (not.isSpace) (drop i s)) ParseIncomplete -> pipeMessage "The sentence is not complete" optLins pgf opts ts = concatMap (optLin pgf opts) ts diff --git a/src/compiler/api/GF/Compile/ExampleBased.hs b/src/compiler/api/GF/Compile/ExampleBased.hs index 1580b5937..979afa2e7 100644 --- a/src/compiler/api/GF/Compile/ExampleBased.hs +++ b/src/compiler/api/GF/Compile/ExampleBased.hs @@ -38,7 +38,7 @@ convertFile conf src file = do appn "(" let typ = maybe (error "no valid cat") id $ readType cat ws <- case parse lang typ ex of - ParseFailed _ _ -> do + ParseFailed _ -> do appv ("WARNING: cannot parse example " ++ ex) return [] ParseIncomplete -> diff --git a/src/compiler/api/GF/Compile/GrammarToPGF.hs b/src/compiler/api/GF/Compile/GrammarToPGF.hs index a19da3661..8783e5a08 100644 --- a/src/compiler/api/GF/Compile/GrammarToPGF.hs +++ b/src/compiler/api/GF/Compile/GrammarToPGF.hs @@ -5,7 +5,7 @@ import GF.Compile.GeneratePMCFG import GF.Compile.GenerateBC import GF.Compile.OptimizePGF -import PGF2 hiding (mkType) +import PGF2 hiding (mkType,showIdent) import PGF2.Transactions import GF.Grammar.Predef import GF.Grammar.Grammar hiding (Production)