We planned to upgrade GitLab and Mattermost to the latest version this Friday morning (early). You may experience some downtime!

Commit 518817be authored by John van Groningen's avatar John van Groningen

remove ignored !'s

parent 6c09d75d
......@@ -27,9 +27,9 @@ newTree :== Leaf { funName= ""
insertIntoTree :: !Definition !Tree -> Tree
inTree :: !String !Tree -> Bool
isLeafEmpty :: !Tree -> Bool
showTree :: !Tree -> !String
fillTree :: !Int !Tree -> !Tree
inBoom :: !String !Tree -> !String
showTree :: !Tree -> String
fillTree :: !Int !Tree -> Tree
inBoom :: !String !Tree -> String
sizeTree :: !Tree -> Int
depthTree :: !Tree -> Int
searchTree :: !String !Tree -> !String
searchTree :: !String !Tree -> String
......@@ -47,7 +47,7 @@ inTree x (Leaf e) = e.funName==x
inTree x (Node l e r) = e.funName==x || (x<e.funName && inTree x l) || (x>e.funName && inTree x r)
// Similar to inTree, more a test-function
inBoom :: !String !Tree -> !String
inBoom :: !String !Tree -> String
inBoom x b=:(Leaf e)
| (inTree x b) = x
| otherwise = "dacht het niet LEAF"
......@@ -61,14 +61,14 @@ isLeafEmpty (Leaf e) = e.funName==""
isLeafEmpty (Node _ e _) = e.funName==""
// Test function... Writes the Tree to stderr
showTree :: !Tree -> !String
showTree :: !Tree -> String
showTree b=:(Node l e r)
| e.funName == "" = "*"
| otherwise = "<<-"+++(showTree l)+++"->>" +++"<<"+++ e.funName +++ ">>" +++ "<<-"+++(showTree r)+++"->>"
showTree b=:(Leaf e) = e.funName
// Test function.. fills the tree with numbers 0 to n
fillTree :: !Int !Tree -> !Tree
fillTree :: !Int !Tree -> Tree
fillTree n b=:(Node _ _ _)
| n==0 = b
| otherwise = fillTree (n-1) (insertIntoTree ({funName=toString n,funDef=toString n +++" def"}) b)
......@@ -87,7 +87,7 @@ depthTree (Leaf _) = 1
depthTree (Node l _ r) = max (depthTree l+1) (depthTree r+1)
// Find a definition-name in the Tree and returns the definition, that should be showed in the tooltip
searchTree :: !String !Tree -> !String
searchTree :: !String !Tree -> String
searchTree x (Leaf e)
| ((x==" ") || (x=="\t") || (x=="")) = "space or tab"
| e.funName==x = e.funDef
......
......@@ -4,4 +4,4 @@ import StdFile, searchtree
import StdString
readFileInTree :: !*env -> (!Tree,!*env) | FileEnv env
spitDclDoor :: !String !*env -> !*env | FileEnv env
spitDclDoor :: !String !*env -> *env | FileEnv env
......@@ -50,7 +50,7 @@ readline f
/* Removes \n character from a line,
if True, check whether the \n is present, if not just remove last character */
removeNl :: !String !Bool -> !String
removeNl :: !String !Bool -> String
removeNl s doCheck
# length = size s
| doCheck = if (s%(length,length)=="\n") (s%(0,length-2)) s
......@@ -97,14 +97,14 @@ findNextLines f s inComment keepNlChar
| otherwise = (s, nextLine, f, inComment)
// returns the definition name from string s
getDefName :: !String -> !String
getDefName :: !String -> String
getDefName s
# n = findFirstBlank 0 s
# s = if (n==(-1)) "" (s%(0,n-1))
= removeBraces 0 s
// removes the ()-braces for infix operators
removeBraces :: !Int !String -> !String
removeBraces :: !Int !String -> String
removeBraces i s
# c = s%(i,i)
| (i>size s) = s
......@@ -164,7 +164,7 @@ isAlphaSpace c
= ((isAlphanum c) || (c==' ') || (c=='\t'))
// Remove the blanks from the string to optimise the layout in the tooltip
removeBlanks :: !Int !String -> !String
removeBlanks :: !Int !String -> String
removeBlanks i s
# c = s%(i,i)
| (i>size s) = s
......@@ -190,7 +190,7 @@ isBlankLine s
/* Run through the dcl-file to collect definitions
Called externally to create a defs.def file.
Currently sends the data to stderr. The generated file can be renamed to defs.def*/
spitDclDoor :: !String !*env -> !*env | FileEnv env
spitDclDoor :: !String !*env -> *env | FileEnv env
spitDclDoor s filesEnv
# (_,filesEnv) = accFiles (openDcl (applicationpath s)) filesEnv
= filesEnv
......@@ -206,7 +206,7 @@ where
# (_,filesEnv) = fclose f filesEnv
= (True,filesEnv)
where
initDcl :: !*File -> !*File
initDcl :: !*File -> *File
initDcl f
# (line,f) = readline f
| (line == "EOF") = f
......@@ -215,7 +215,7 @@ where
= f
// Physically run through the dcl-file
processDcl :: !*File !String !Bool -> !*File
processDcl :: !*File !String !Bool -> *File
processDcl f s inComment
# (s, inComment) = parseDef s inComment
# d = getDefName s
......@@ -228,7 +228,7 @@ processDcl f s inComment
| otherwise = processDcl f nextLine inComment
// Write the found definitions to a file
writeDefToFile :: !*File !String -> !*File
writeDefToFile :: !*File !String -> *File
writeDefToFile f s
# (fn,fd,dl) = validateDefinition s
# fn = if ((fn=="") && (fn=="")) fn fn //(trace_n fd fn)
......@@ -236,7 +236,7 @@ writeDefToFile f s
= f
// Write the classfunctions in the list to file
writeListToFile :: !*File [String] -> !*File
writeListToFile :: !*File [String] -> *File
writeListToFile f []
= f
writeListToFile f [h:t]
......@@ -309,7 +309,7 @@ writeClassFunctions i defList className s
| otherwise = writeClassFunctions (n+2) defList className s
// parse the classfunctions
parseClassFunctions :: !Int !String -> !String
parseClassFunctions :: !Int !String -> String
parseClassFunctions i s
# n = (findInString i s "\n")+1
# cc = s%(n+1,n+2)
......@@ -325,7 +325,7 @@ isSeparator s
| otherwise = False
// Move the code-block one blank left
decreaseLevel :: !Int !String -> !String
decreaseLevel :: !Int !String -> String
decreaseLevel i s
# n = findInString i s "\n"
| (n==(-1)) = s
......@@ -333,7 +333,7 @@ decreaseLevel i s
| otherwise = decreaseLevel (n+3) (s%(0,n+1)+++s%(n+3,size s))
// Move the code-block one blank right
increaseLevel :: !Int !String -> !String
increaseLevel :: !Int !String -> String
increaseLevel i s
# n = findInString i s "\n"
| (n==(-1)) = s
......@@ -341,7 +341,7 @@ increaseLevel i s
| otherwise = increaseLevel (n+3) (s%(0,n+1)+++" "+++s%(n+2,size s))
/* Returns the start-index of fs, if fs is a part of in ss, -1 if it is not */
findInString :: !Int !String !String -> !Int
findInString :: !Int !String !String -> Int
findInString i ss fs
| (i+size fs>size ss) = -1
| ((ss%(i,i+size fs-1)==fs) && (i==0)) = 0
......@@ -349,7 +349,7 @@ findInString i ss fs
| otherwise = findInString (i+1) ss fs
// is the line of a type that must not be searched for, or must be removed.
isSpecialType :: !String -> !Bool
isSpecialType :: !String -> Bool
isSpecialType s
| ((s=="definition") // no definition module name definition
|| (s=="from") // no imports
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment