1
0
forked from GitHub/gf-core

Fixed several things, e.g. tokenizer.

This commit is contained in:
aarne
2003-11-03 16:27:55 +00:00
parent 2728e6e7ce
commit 94326929b1
18 changed files with 133 additions and 69 deletions

View File

@@ -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