From 94326929b144913642121bef8f8ecc98feb992e7 Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 3 Nov 2003 16:27:55 +0000 Subject: Fixed several things, e.g. tokenizer. --- src/GF/Grammar/PrGrammar.hs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/GF/Grammar') diff --git a/src/GF/Grammar/PrGrammar.hs b/src/GF/Grammar/PrGrammar.hs index 03197ea02..607b766da 100644 --- a/src/GF/Grammar/PrGrammar.hs +++ b/src/GF/Grammar/PrGrammar.hs @@ -9,6 +9,8 @@ import qualified PrintGFC as C import qualified AbsGFC as A import Values import GrammarToSource + +import Option import Ident import Str @@ -97,13 +99,6 @@ prMarkedTree = prf 1 where prTree :: Tree -> [String] prTree = prMarkedTree . mapTr (\n -> (n,False)) ---- to get rig of brackets -prRefinement :: Term -> String -prRefinement t = case t of - Q m c -> prQIdent (m,c) - QC m c -> prQIdent (m,c) - _ -> prt t - -- a pretty-printer for parsable output tree2string = unlines . prprTree @@ -187,3 +182,12 @@ prExp e = case e of pr2 e = case e of App _ _ -> prParenth $ prExp e _ -> pr1 e + +-- option -strip strips qualifications +prTermOpt opts = if oElem nostripQualif opts then prt else prExp + +--- to get rid of brackets in the editor +prRefinement t = case t of + Q m c -> prQIdent (m,c) + QC m c -> prQIdent (m,c) + _ -> prt t -- cgit v1.2.3