diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2016-11-16 16:30:46 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2016-11-18 07:25:00 +0100 |
commit | be39ab9fdbaba118ece1dcc3e064c8452fcdd277 (patch) | |
tree | 4436de46028c2a984f6ee27f0fc80b263ebc1448 /doc/generate-docs.tes | |
parent | b44a4bae7d5c1098709dfaffd122263e0f4c5bc6 (diff) | |
download | sciteco-be39ab9fdbaba118ece1dcc3e064c8452fcdd277.tar.gz |
the manual generator (generator-docs.tes) has been cleaned up and is now called tedoc.tes
* some code simplifications
* it now supports command line arguments via getopt.tes.
* the -C flag enabled C/C++ mode.
By default tedoc parses SciTECO code which means it can be used
to document macro packages as well.
* Therefore it is installed as a separate tool now.
It may be used as a Groff preprocessor for third-party macro
authors to generate (wo)man pages.
* there's a man page tedoc.tes(1)
* The troff placeholder macro is now called ".TEDOC".
* Help topics can now be specified after the starting comment /*$ or !*$.
Topics have been defined for all built-in commands.
Diffstat (limited to 'doc/generate-docs.tes')
-rwxr-xr-x | doc/generate-docs.tes | 153 |
1 files changed, 0 insertions, 153 deletions
diff --git a/doc/generate-docs.tes b/doc/generate-docs.tes deleted file mode 100755 index ee4820c..0000000 --- a/doc/generate-docs.tes +++ /dev/null @@ -1,153 +0,0 @@ -#!/usr/bin/sciteco -m -! ./generate-docs.tes <output> <input> <sources> ! - -! - Preprocess a manpage template, inserting a SciTECO command reference. - - The .COMMANDS request is replaced with Troff markup generated from code - comments in <sources>. - - The comments support a small but powerful markup for documenting - TECO commands: - * comments start with /*$ - * all lines until first empty line are command syntax descriptions - * text followed by "--" is a short description - * variable values and characters of syntactic significance should be - detected automatically - * alternatives are denoted by "|" - * every line is an alternative - * return values may be specified after "->" - * the remaining text is the verbose command description - * <name> denotes a variable from the syntax description - * empty lines introduce paragraphs - * lines beginning with "-" are unordered lists - * lines beginning with numbers and dot ("1.", "2.", etc.) are - ordered lists - * the above transformations are only preprocessing, so that - Troff requests, escapes and tman macros may also be used. -! - -@[format_header]{ - fd--S .U.f :L"S.|Z'U.t Q.f,Q.tXa Q.f,Q.tD I - - ebQ#tm I\# GENERATED FROM Q.#sc (\.#sc): -.SS Qa -a-10"N I - ' eq.[header] -j<fr - -.br -;> -j<sMA;.u.t 1ua<."=1;'-a"A|1;'-a"V-1ua1;'r> qa"Sq.tj|.,q.txa.,q.td i -.SCITECO_TOPIC "Qa" -.B Qa -'> -j<s[MC];.u.t-s[.,q.t-1xa .-1,q.td i -.RI [ Qa ] -> -j<fr->\(->;> -j<sMCM[|MC];.u.t <-a"C|-a-|"N1;''r> .,q.txa .,q.td eqa<fr| | ;> eq.[header]i -.IR Qa -> -j<frS - -;>j<fr -S -;>j<fs - - -;> -j 0a-10"=d' -zj-a-10"=-d' - ebQ#tm g.[header]i -. - -} - -@[format_body]{ - i.LP -<fr - - -. -.LP -;> - j<fs --S -.IP \(bu 4 -;>j<s -MD.S; 0L I.IP FSS 4 -> - ! set margin for list paragraphs ! - j 0U.n< - Z-.-3"<1;' - .,.+3:S.LP"S Q.n">0L I.RE - 0U.n' | .,.+3:S.IP"S Q.n"=0L I.RS - %.n' ' ' - :L; - > Q.n"> ZJ I -.RE ' - j<s<MC>;-di --s<-di -.I > - j<frS - -;>j<fr -S -;> - ebQ#tm g.ci -. -. - -} - -! process command-line options ! -LR 0X#ou 2LR 0X#tm EBQ#tm EB L -[.f - <:L;R 0X.f EBQ.f EB L> -].f --EF - -I\# -\# AUTOGENERATED FROM Q#tm -\# DO NOT EDIT MANUALLY!!! -\# - - -! find insertion point ! -FS -.COMMANDS - - - -< -< - ! extract comment ! - 2EB EQ* HX.#sc 2EB - s/*$; .-3u.#sc s*/ q.#sc+3,.-2x.ceq.c - ! q.#sc= ! - <fs - - -;> - j<fs -[S,]*[M[ , ],] -;> - j<0a-13"=df>'0a-10"=df>'0a- "=df>'0a- "=df>';> - zj<-a-13"=-df>'-a-10"=-df>'-a- "=-df>'-a- "=-df>';> - - ! extract header ! - h:fd - -"Fzj'0,.x.[header]0,.d - - eq.[header] - :M[format_header] - eq.c - :M[format_body] -> -EF -Q*-1"=1;' -> - -EWQ#ou -EX |