1
0
forked from GitHub/gf-rgl

merged lang.labels with uddeps.labels, just leaving the latter, but adding App functions to it. This file can now be used for documenting all syntactic functions in Lang, Translate, and App

This commit is contained in:
aarne
2016-06-05 09:17:47 +00:00
parent f5169dd04f
commit 82777f84e5
4 changed files with 102 additions and 206 deletions

View File

@@ -11,7 +11,7 @@ import Data.List
-- this creates the file absfuns.html
main = do
system "grep \" : \" ../src/abstract/*.gf ../src/translator/Extensions.gf | grep \" -- \" >absfuns.tmp"
system "grep \" : \" ../src/abstract/*.gf ../src/translator/Extensions.gf ../../examples/app/App.gf | grep \" -- \" >absfuns.tmp"
funs <- readFile "absfuns.tmp" >>= return . lines
deps <- readFile "../src/uddeps.labels" >>= return . lines
let depmap = M.fromListWith (\x y -> x ++ [";"] ++ y) [(fun,deps) | fun:deps <- map words deps]
@@ -45,7 +45,12 @@ named f = f ++ "''<a name=\"" ++ f ++ "\"></a>''"
italics e = "//" ++ map (\c -> case c of '[' -> '(' ; ']'->')'; _ -> c) e ++ "//"
putStrLnIf = putStrLn
addLink fs =
let m = last fs ; abstract = case m of "Extensions" -> "translator/" ; _ -> "abstract/"
let
m = last fs
abstract = case m of
"App" -> "../../examples/app/"
"Extensions" -> "translator/"
_ -> "abstract/"
in init fs ++ ["[" ++ m ++ " ../src/" ++ abstract ++ m ++ ".gf]"]
-- for tab separated generation