From bfc7be2108b2081205eb9bc280b2f36b7c244b97 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 30 Aug 2007 15:36:34 +0000 Subject: [PATCH] Added a description and diagram to the contents page of the haddock-generated documentation --- Makefile | 14 +- docextra/description.html | 14 ++ docextra/tock-passes.svg | 398 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 425 insertions(+), 1 deletion(-) create mode 100644 docextra/description.html create mode 100644 docextra/tock-passes.svg diff --git a/Makefile b/Makefile index 68afd3c..f9ce9bf 100644 --- a/Makefile +++ b/Makefile @@ -48,9 +48,21 @@ all-cgtests: $(cgtests_targets) clean-cgtests: rm -f cgtests/cgtest?? cgtests/*.tock.* +#Haddock does allow you to customise the description section of a file, but only with more Haskell comments +#Since I want to use an HTML description (with links to SVG using object tags) I have to perform the following hack +#to use my own custom HTML description. Fixes to make the hack nicer are welcome :-) + haddock: @mkdir -p doc - haddock -o doc --html $(filter-out LexOccam.hs LexRain.hs,$(sources)) + @echo "putmycustomdocumentationhere" > .temp-haddock-file + haddock -o doc --html -p temp-haddock-file -t Tock $(filter-out LexOccam.hs LexRain.hs,$(sources)) + cp docextra/*.svg doc/ + @rm .temp-haddock-file + @grep -B 10000 putmycustomdocumentationhere doc/index.html | sed "s/putmycustomdocumentationhere//" > doc/index.html-2 + @cat docextra/description.html >> doc/index.html-2 + @grep -A 10000 putmycustomdocumentationhere doc/index.html | tail -n +2 >> doc/index.html-2 + @rm doc/index.html + @mv doc/index.html-2 doc/index.html clean: rm -f $(targets) *.o *.hi diff --git a/docextra/description.html b/docextra/description.html new file mode 100644 index 0000000..4c42840 --- /dev/null +++ b/docextra/description.html @@ -0,0 +1,14 @@ +

+This is the generated API documentation for the Tock compiler. +

+ +

Tock Passes

+

+Below is a rough diagram of the structure of Tock. On the left are the front-ends, in the middle are the common passes, and on the right are the back-ends. +

+ +

+In order to view this image you need an SVG viewer. The most recent versions of Firefox and Opera both have in-built SVG viewers. +For Internet Explorer, you will need to install the Adobe SVG Viewer. +

+
diff --git a/docextra/tock-passes.svg b/docextra/tock-passes.svg new file mode 100644 index 0000000..d6de8cd --- /dev/null +++ b/docextra/tock-passes.svg @@ -0,0 +1,398 @@ + + + + + + + + + + image/svg+xml + + + Tock Passes Diagram + 30/08/07 + + + Neil Brown + + + + + + + + + occam frontend + + + ParseOccam + + + + + + Rain frontend + + + RainParse + + + + + RainPasses + + + + + + + + Shared passes + + + SimplifyTypes + + + + + + SimplifyExprs + + + + + SimplifyProcs + + + + + Unnest + + + + + + + C++/C++CSP backend + + + GenerateCPPCSP + + + + + + + C/CIF backend + + + GenerateC + + + + +