home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-04-10 | 131.3 KB | 3,598 lines |
- Newsgroups: comp.sources.unix
- From: ross@spam.adelaide.edu.au (Ross Williams)
- Subject: v26i122: funnelweb - a tool for literate programming in C, Part02/20
- Sender: unix-sources-moderator@vix.com
- Approved: paul@vix.com
-
- Submitted-By: ross@spam.adelaide.edu.au (Ross Williams)
- Posting-Number: Volume 26, Issue 122
- Archive-Name: funnelweb/part02
-
- [ several files in this archive will unpack with the wrong size, due to
- length restrictions in NNTP. --vix ]
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 2 (of 20)."
- # Contents: admin/vms_bld.com answers/an03.lis answers/sc02.lis
- # answers/sc03.lis answers/sc04.lis answers/sc05.lis
- # answers/sc06.lis answers/sc08.lis answers/sc12.lis
- # answers/sc19.lis answers/sc20.lis answers/sc25.lis
- # answers/sc26.lis hackman/h_manual.toc sources/analyse.h
- # sources/as.c sources/clock.c sources/command.h sources/data.c
- # sources/dump.h sources/help_gnu.h sources/lister.h sources/main.c
- # sources/mapper.h sources/parser.h sources/scanner.h
- # sources/section.c sources/tangle.h sources/weave.h tests/ex16.fw
- # tests/generate.fw tests/hi09.fw tests/hi10.fw tests/pr08.fw
- # tests/pr09.fw tests/sc10.fw tests/sc11.fw userman/u_manual.log
- # Wrapped by vixie@gw.home.vix.com on Sun Apr 11 11:00:09 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'admin/vms_bld.com' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'admin/vms_bld.com'\"
- else
- echo shar: Extracting \"'admin/vms_bld.com'\" \(3808 characters\)
- sed "s/^X//" >'admin/vms_bld.com' <<'END_OF_FILE'
- X$! VMSBUILD.COM Build the Funnelweb program under VMS
- X$!
- X$! J Begg VSM Software Services 11-Feb-1992 jeremy@vsm.com.au
- X$!
- X$! set verify
- X$ set noon
- X$ say = "write sys$output"
- X$ sts = 1
- X$
- X$!
- X$! Make sure we are in the sources directory -- Assumes this procedure is in
- X$! the same directory as the sources.
- X$!
- X$ cur_def = f$env("DEFAULT")
- X$ proc = f$env("PROCEDURE")
- X$ procnam = proc - f$parse(proc,,,"VERSION")
- X$ procdir = proc - f$parse(proc,,,"NAME") -
- X - f$parse(proc,,,"TYPE") -
- X - f$parse(proc,,,"VERSION")
- X$ sourcedir = procdir - "ADMIN]" + "SOURCES]"
- X$ if f$search(sourcedir+"WEAVE.C").eqs.""
- X$ then
- X$ say "It would appear that the FunnelWeb sources have not been"
- X$ say "loaded into the correct directory. Please move them into"
- X$ say " ", procdir
- X$ say "then re-execute this procedure."
- X$ goto Exit
- X$ endif
- X$
- X$ set default 'sourcedir'
- X
- X$ show default
- X$
- X$!
- X$! Check for VAX C, use GNU C if VAX C is not found
- X$!
- X$ if f$search("SYS$SYSTEM:VAXC.EXE").nes.""
- X$ then
- X$ say " Using VAX C. If you prefer to use GNU C, edit the file"
- X$ say " ",procnam
- X$ say " as instructed therein."
- X$ use_VAXC = "true"
- X$ else
- X$ say " VAX C not found -- using GNU C."
- X$ use_VAXC = "false"
- X$ endif
- X$
- X$!*************************************************************************
- X$! UNCOMMENT the following line to force use of VAX C !*
- X$! use_VAXC = "true" !*
- X$! UNCOMMENT the following line to force use of GNU C !*
- X$! use_VAXC = "false" !*
- X$!*************************************************************************
- X$!
- X$! Set up the appropriate symbols
- X$!
- X$ if use_VAXC
- X$ then
- X$ cc = "CC"
- X$ cflags = "/DEBUG/WARN/NOOPT/LIST"
- X$ else
- X$ cc = "GCC"
- X$ cflags = " -g -Wall"
- X$ endif
- X$
- X$ link = "link"
- X$
- X$!
- X$! An object library is used to hold .OBJ files along the way.
- X$!
- X$ if f$search("FUNNELWEB.OLB").eqs."" then $ lib/cre/obj funnelweb.olb
- X$
- X$ if "''p1'" .eqs. "LINK" then $ goto Done_Compile
- X$!
- X$! Search for .C files, compiling same.
- X$!
- X$ old_src = ""
- X$ filecount = 0
- X$ skiptofile = ""
- X$ if "''p1'" .nes. ""
- X$ then
- X$ skiptofile = "$USERS:[ROSS.FWDIR.SOURCES]''p1'"
- X$ endif
- X$Compile:
- X$ src = f$search("*.C")
- X$ if src.eqs."" then $ goto Done_Compile
- X$ if src.eqs.old_src then $ goto Done_Compile
- X$ srcnam = src - f$parse(src,,,"TYPE") - f$parse(src,,,"VERSION")
- X$ if srcnam .lts. skiptofile
- X$ then
- X$ write sys$output "Skipping ''srcnam'"
- X$ goto Compile
- X$ endif
- X$ say "Compiling ",srcnam
- X$ 'cc 'cflags 'srcnam
- X$ if .not.$status then $ goto Compile_Failed
- X$ lib/repl funnelweb 'srcnam
- X$ deletx 'srcnam'.obj;
- X$ goto Compile
- X$
- X$Compile_Failed:
- X$ sts = $status
- X$ say "Build of FunnelWeb aborted because compile failed for file:"
- X$ say src
- X$ goto Exit
- X$
- X$Done_Compile:
- X$ say "Linking..."
- X$ cur_exe = f$search("FUNNELWEB.EXE")
- X$ !Jeremy's link: link/debug/map/full funnelweb/opt
- X$ link funnelweb/library/include=main,sys$input:/opt/exe='procdir'fw.exe
- sys$share:vaxcrtl/share
- X$ if $status then $ goto Exit
- X$ sts = $status
- X$ say "Build of FunnelWeb aborted in Link phase"
- X$ if f$search("FUNNELWEB.EXE").nes.cur_exe then $ delete funnelweb.exe;
- X$
- X$Exit:
- X$ set default 'cur_def'
- X$ exit sts
- END_OF_FILE
- if test 3808 -ne `wc -c <'admin/vms_bld.com'`; then
- echo shar: \"'admin/vms_bld.com'\" unpacked with wrong size!
- fi
- # end of 'admin/vms_bld.com'
- fi
- if test -f 'answers/an03.lis' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'answers/an03.lis'\"
- else
- echo shar: Extracting \"'answers/an03.lis'\" \(3720 characters\)
- sed "s/^X//" >'answers/an03.lis' <<'END_OF_FILE'
- XFUNNELWEB LISTING FILE
- X======================
- X
- X
- Global Local| Input File
- X------------+-------------------------------------------------------------------
- X 1 1| AN03: Test semantics checking of macros.
- X 2 2|
- X 3 3| First define some macros to call.
- X 4 4| @$@<Zero@>@Z@M@{@}
- X 5 5| @$@<One@>@(@1@)@Z@M@{@}
- X 6 6| @$@<Two@>@(@2@)@Z@M@{@}
- X 7 7|
- X 8 8| 1. Test call to undefined macro.
- X 9 9| @$@<Sloth1@>@Z==@{@<Walrus@>@}
- X Error|...................^Call to undefined macro.
- X 10 10|
- X 11 11| 2. Test calls with wrong number of parameters.
- X 12 12| @$@<Sloth2@>@Z==@{
- X 13 13| @<Zero@>
- X 14 14| @<Zero@>@(@)
- X Error|.^Call has 1 parameter, but the macro
- X |.^definition at line 4 specifies 0 parameters.
- X |.^Note: If your call looks like this: @<Macro@>@(@) then you
- X |.^should be aware that FunnelWeb treats this as a call with
- X |.^a single parameter consisting of the empty string. This
- X |.^is a consequence of parameter delimiters @"@" being optional.
- X 15 15| @<Zero@>@(@,@)
- X Error|.^Call has 2 parameters, but the macro
- X |.^definition at line 4 specifies 0 parameters.
- X 16 16| @<One@>
- X Error|.^Call has 0 parameters, but the macro
- X |.^definition at line 5 specifies 1 parameter.
- X 17 17| @<One@>@(@)
- X 18 18| @<One@>@(Walrus@,@)
- X Error|.^Call has 2 parameters, but the macro
- X |.^definition at line 5 specifies 1 parameter.
- X 19 19| @<Two@>@(Sloth@)
- X Error|.^Call has 1 parameter, but the macro
- X |.^definition at line 6 specifies 2 parameters.
- X 20 20| @}
- X 21 21|
- X 22 22| 3. Test call to file macro.
- X 23 23| @O@<deleteme.txt@>@{@}
- X |.^This file macro is called one or more times.
- X |.^Each call has been flagged with an error message.
- X 24 24| @$@<Teapot@>@Z@{@<deleteme.txt@>@}
- X Error|.................^Calls to file macros are not allowed.
- X |.................^Reason: It should be possible to comment out a
- X |.................^file macro without a big fuss. Calling a file macro
- X |.................^just tangles it up in the macro structure,
- X |.................^making it more difficult to comment out later.
- X 25 25|
- X 26 26| 4. Test macro never used and has <special>Z.
- X 27 27| @$@<Elephant@>@Z@{@}
- X 28 28|
- X 29 29| 5. Test macro often used and has <special>M.
- X 30 30| @$@<Giraffe@>@M@{@}
- X 31 31| @$@<Use Giraffe@>@Z@{@<Giraffe@>@<Giraffe@>@}
- X 32 32|
- X 33 33| 6. Test macro never used and no <special>Z
- X 34 34| @$@<Zebra@>@{@}
- X Error|.^This macro is never used (and has no @Z).
- X 35 35|
- X 36 36| 7. Test multiply used and no <special>M.
- X 37 37| @$@<Monkey@>@{@}
- X Error|.^This macro is used more than once (and has no @M).
- X 38 38| @$@<Use Monkey@>@Z@{@<Monkey@>@<Monkey@>@}
- X 39 39|
- X 40 40| 8. Test directly recursive macro.
- X 41 41| @$@<Who do ya call?@>@{@<Who do ya call?@>@}
- X Error|.^This macro has an infinite expansion.
- X 42 42|
- X 43 43| 9. Test indirectly recursive macro.
- X 44 44| @$@<X@>@M@{@<Y@>@}
- X Error|.^This macro has an infinite expansion.
- X 45 45| @$@<Y@>@{@<X@>@}
- X Error|.^This macro has an infinite expansion.
- X 46 46|
- X 47 47| 10. Test callers of recursive macros.
- X 48 48| @$@<Z@>@Z@{@<X@>@}
- X Error|.^This macro has an infinite expansion.
- X | <End-Of-File>
- X------------+-------------------------------------------------------------------
- X
- There were 13 Errors.
- END_OF_FILE
- if test 3720 -ne `wc -c <'answers/an03.lis'`; then
- echo shar: \"'answers/an03.lis'\" unpacked with wrong size!
- fi
- # end of 'answers/an03.lis'
- fi
- if test -f 'answers/sc02.lis' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'answers/sc02.lis'\"
- else
- echo shar: Extracting \"'answers/sc02.lis'\" \(1817 characters\)
- sed "s/^X//" >'answers/sc02.lis' <<'END_OF_FILE'
- XFUNNELWEB LISTING FILE
- X======================
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X+-------------------------------------------------+------------------+
- X
- X
- X=========================== Start of LINE LIST DUMP ============================
- X
- Globl Local| Text
- X-----------+--------------------------------------------------------------------
- X00001 00001| <End-Of-File><010>
- X-----------+--------------------------------------------------------------------
- Globl Local| Text
- X
- X============================ End of LINE LIST DUMP =============================
- X
- X
- X=========================== Start of TOKEN LIST DUMP ===========================
- X
- Summary: There are 1 tokens in the token list.
- X
- Line[Column]: Token Description
- X-------------------------------
- X
- X0001[01]: End Of File.
- X============================ End of TOKEN LIST DUMP ============================
- X
- X
- X========================== Start of MACRO TABLE DUMP ===========================
- X
- X
- X=========================== End of MACRO TABLE DUMP ============================
- X
- X
- X========================= Start of DOCUMENT LIST DUMP ==========================
- X
- X
- X========================== End of DOCUMENT LIST DUMP ===========================
- X
- XE: No macros defined.
- XE: No output files specified.
- X
- Global Local| Input File
- X------------+-------------------------------------------------------------------
- X | <End-Of-File>
- X Warning|.^Input file is empty (not a byte in syte)!
- X------------+-------------------------------------------------------------------
- X
- There were 2 Errors and 1 Warning.
- END_OF_FILE
- if test 1817 -ne `wc -c <'answers/sc02.lis'`; then
- echo shar: \"'answers/sc02.lis'\" unpacked with wrong size!
- fi
- # end of 'answers/sc02.lis'
- fi
- if test -f 'answers/sc03.lis' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'answers/sc03.lis'\"
- else
- echo shar: Extracting \"'answers/sc03.lis'\" \(1994 characters\)
- sed "s/^X//" >'answers/sc03.lis' <<'END_OF_FILE'
- XFUNNELWEB LISTING FILE
- X======================
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 0A | . |
- X+-------------------------------------------------+------------------+
- X
- X
- X=========================== Start of LINE LIST DUMP ============================
- X
- Globl Local| Text
- X-----------+--------------------------------------------------------------------
- X00001 00001| <010>
- X00002 00002| <End-Of-File><010>
- X-----------+--------------------------------------------------------------------
- Globl Local| Text
- X
- X============================ End of LINE LIST DUMP =============================
- X
- X
- X=========================== Start of TOKEN LIST DUMP ===========================
- X
- Summary: There are 2 tokens in the token list.
- X
- Line[Column]: Token Description
- X-------------------------------
- X
- X0001[01]: Text. Text scrap[White]="<010>
- X"
- X0002[01]: End Of File.
- X============================ End of TOKEN LIST DUMP ============================
- X
- X
- X========================== Start of MACRO TABLE DUMP ===========================
- X
- X
- X=========================== End of MACRO TABLE DUMP ============================
- X
- X
- X========================= Start of DOCUMENT LIST DUMP ==========================
- X
- X
- TEXT COMPONENT: Pos(L,C)=(1,1).
- X
- X-- Start of Text Scrap List --
- Text scrap[White]="<010>
- X"
- X--- End of Text Scrap List ---
- X
- X
- X========================== End of DOCUMENT LIST DUMP ===========================
- X
- XE: No macros defined.
- XE: No output files specified.
- X
- Global Local| Input File
- X------------+-------------------------------------------------------------------
- X.................
- X------------+-------------------------------------------------------------------
- X
- There were 2 Errors.
- END_OF_FILE
- if test 1994 -ne `wc -c <'answers/sc03.lis'`; then
- echo shar: \"'answers/sc03.lis'\" unpacked with wrong size!
- fi
- # end of 'answers/sc03.lis'
- fi
- if test -f 'answers/sc04.lis' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'answers/sc04.lis'\"
- else
- echo shar: Extracting \"'answers/sc04.lis'\" \(2025 characters\)
- sed "s/^X//" >'answers/sc04.lis' <<'END_OF_FILE'
- XFUNNELWEB LISTING FILE
- X======================
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 0A 0A | .. |
- X+-------------------------------------------------+------------------+
- X
- X
- X=========================== Start of LINE LIST DUMP ============================
- X
- Globl Local| Text
- X-----------+--------------------------------------------------------------------
- X00001 00001| <010>
- X00002 00002| <010>
- X00003 00003| <End-Of-File><010>
- X-----------+--------------------------------------------------------------------
- Globl Local| Text
- X
- X============================ End of LINE LIST DUMP =============================
- X
- X
- X=========================== Start of TOKEN LIST DUMP ===========================
- X
- Summary: There are 2 tokens in the token list.
- X
- Line[Column]: Token Description
- X-------------------------------
- X
- X0001[01]: Text. Text scrap[White]="<010>
- X<010>
- X"
- X0003[01]: End Of File.
- X============================ End of TOKEN LIST DUMP ============================
- X
- X
- X========================== Start of MACRO TABLE DUMP ===========================
- X
- X
- X=========================== End of MACRO TABLE DUMP ============================
- X
- X
- X========================= Start of DOCUMENT LIST DUMP ==========================
- X
- X
- TEXT COMPONENT: Pos(L,C)=(1,1).
- X
- X-- Start of Text Scrap List --
- Text scrap[White]="<010>
- X<010>
- X"
- X--- End of Text Scrap List ---
- X
- X
- X========================== End of DOCUMENT LIST DUMP ===========================
- X
- XE: No macros defined.
- XE: No output files specified.
- X
- Global Local| Input File
- X------------+-------------------------------------------------------------------
- X.................
- X------------+-------------------------------------------------------------------
- X
- There were 2 Errors.
- END_OF_FILE
- if test 2025 -ne `wc -c <'answers/sc04.lis'`; then
- echo shar: \"'answers/sc04.lis'\" unpacked with wrong size!
- fi
- # end of 'answers/sc04.lis'
- fi
- if test -f 'answers/sc05.lis' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'answers/sc05.lis'\"
- else
- echo shar: Extracting \"'answers/sc05.lis'\" \(2474 characters\)
- sed "s/^X//" >'answers/sc05.lis' <<'END_OF_FILE'
- XFUNNELWEB LISTING FILE
- X======================
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 53 43 30 35 3A 20 54 68 69 73 20 69 6E 70 75 74 | SC05: This input |
- X| 20 66 69 6C 65 20 63 6F 6E 74 61 69 6E 73 20 61 | file contains a |
- X| 20 73 69 6E 67 6C 65 20 6C 69 6E 65 20 63 6F 6E | single line con |
- X| 74 61 69 6E 69 6E 67 20 74 68 69 73 20 74 65 78 | taining this tex |
- X| 74 21 0A | t!. |
- X+-------------------------------------------------+------------------+
- X
- X
- X=========================== Start of LINE LIST DUMP ============================
- X
- Globl Local| Text
- X-----------+--------------------------------------------------------------------
- X00001 00001| SC05: This input file contains a single line containing this text!<010>
- X00002 00002| <End-Of-File><010>
- X-----------+--------------------------------------------------------------------
- Globl Local| Text
- X
- X============================ End of LINE LIST DUMP =============================
- X
- X
- X=========================== Start of TOKEN LIST DUMP ===========================
- X
- Summary: There are 2 tokens in the token list.
- X
- Line[Column]: Token Description
- X-------------------------------
- X
- X0001[01]: Text. Text scrap[Grey]="SC05: This input file contains a single line containing this text!<010>
- X"
- X0002[01]: End Of File.
- X============================ End of TOKEN LIST DUMP ============================
- X
- X
- X========================== Start of MACRO TABLE DUMP ===========================
- X
- X
- X=========================== End of MACRO TABLE DUMP ============================
- X
- X
- X========================= Start of DOCUMENT LIST DUMP ==========================
- X
- X
- TEXT COMPONENT: Pos(L,C)=(1,1).
- X
- X-- Start of Text Scrap List --
- Text scrap[Grey]="SC05: This input file contains a single line containing this text!<010>
- X"
- X--- End of Text Scrap List ---
- X
- X
- X========================== End of DOCUMENT LIST DUMP ===========================
- X
- XE: No macros defined.
- XE: No output files specified.
- X
- Global Local| Input File
- X------------+-------------------------------------------------------------------
- X.................
- X------------+-------------------------------------------------------------------
- X
- There were 2 Errors.
- END_OF_FILE
- if test 2474 -ne `wc -c <'answers/sc05.lis'`; then
- echo shar: \"'answers/sc05.lis'\" unpacked with wrong size!
- fi
- # end of 'answers/sc05.lis'
- fi
- if test -f 'answers/sc06.lis' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'answers/sc06.lis'\"
- else
- echo shar: Extracting \"'answers/sc06.lis'\" \(3423 characters\)
- sed "s/^X//" >'answers/sc06.lis' <<'END_OF_FILE'
- XFUNNELWEB LISTING FILE
- X======================
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 53 43 30 36 3A 20 54 65 73 74 20 46 75 6E 6E 65 | SC06: Test Funne |
- X| 6C 57 65 62 20 6F 6E 20 61 20 66 69 6C 65 20 77 | lWeb on a file w |
- X| 68 6F 73 65 20 6C 61 73 74 20 6C 69 6E 65 20 69 | hose last line i |
- X| 73 20 6E 6F 74 20 74 65 72 6D 69 6E 61 74 65 64 | s not terminated |
- X| 20 70 72 6F 70 65 72 6C 79 0A 77 69 74 68 20 61 | properly.with a |
- X| 6E 20 65 6E 64 20 6F 66 20 6C 69 6E 65 20 6D 61 | n end of line ma |
- X| 72 6B 65 72 2E 0A 0A 48 65 72 65 20 69 73 20 74 | rker...Here is t |
- X| 68 65 20 69 6D 70 72 6F 70 65 72 20 74 65 72 6D | he improper term |
- X| 69 6E 61 74 69 6F 6E 21 2D 2D 2D 2D 3E | ination!----> |
- X+-------------------------------------------------+------------------+
- X
- X
- X=========================== Start of LINE LIST DUMP ============================
- X
- Globl Local| Text
- X-----------+--------------------------------------------------------------------
- X00001 00001| SC06: Test FunnelWeb on a file whose last line is not terminated properly<010>
- X00002 00002| with an end of line marker.<010>
- X00003 00003| <010>
- X00004 00004| Here is the improper termination!----><010>
- X00005 00005| <End-Of-File><010>
- X-----------+--------------------------------------------------------------------
- Globl Local| Text
- X
- X============================ End of LINE LIST DUMP =============================
- X
- X
- X=========================== Start of TOKEN LIST DUMP ===========================
- X
- Summary: There are 2 tokens in the token list.
- X
- Line[Column]: Token Description
- X-------------------------------
- X
- X0001[01]: Text. Text scrap[Grey]="SC06: Test FunnelWeb on a file whose last line is not terminated properly<010>
- with an end of line marker.<010>
- X<010>
- Here is the improper termination!----><010>
- X"
- X0005[01]: End Of File.
- X============================ End of TOKEN LIST DUMP ============================
- X
- X
- X========================== Start of MACRO TABLE DUMP ===========================
- X
- X
- X=========================== End of MACRO TABLE DUMP ============================
- X
- X
- X========================= Start of DOCUMENT LIST DUMP ==========================
- X
- X
- TEXT COMPONENT: Pos(L,C)=(1,1).
- X
- X-- Start of Text Scrap List --
- Text scrap[Grey]="SC06: Test FunnelWeb on a file whose last line is not terminated properly<010>
- with an end of line marker.<010>
- X<010>
- Here is the improper termination!----><010>
- X"
- X--- End of Text Scrap List ---
- X
- X
- X========================== End of DOCUMENT LIST DUMP ===========================
- X
- XE: No macros defined.
- XE: No output files specified.
- X
- Global Local| Input File
- X------------+-------------------------------------------------------------------
- X 1 1| SC06: Test FunnelWeb on a file whose last line is not terminated properly
- X 2 2| with an end of line marker.
- X 3 3|
- X 4 4| Here is the improper termination!---->
- X | <End-Of-File>
- X Warning|.^The last line of the input file was terminated by EOF.
- X |.^An EOL was inserted at the end of the last line.
- X------------+-------------------------------------------------------------------
- X
- There were 2 Errors and 1 Warning.
- END_OF_FILE
- if test 3423 -ne `wc -c <'answers/sc06.lis'`; then
- echo shar: \"'answers/sc06.lis'\" unpacked with wrong size!
- fi
- # end of 'answers/sc06.lis'
- fi
- if test -f 'answers/sc08.lis' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'answers/sc08.lis'\"
- else
- echo shar: Extracting \"'answers/sc08.lis'\" \(4200 characters\)
- sed "s/^X//" >'answers/sc08.lis' <<'END_OF_FILE'
- XFUNNELWEB LISTING FILE
- X======================
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 53 43 30 38 3A 20 44 65 74 65 63 74 69 6F 6E 20 | SC08: Detection |
- X| 6F 66 20 74 72 61 69 6C 69 6E 67 20 73 70 61 63 | of trailing spac |
- X| 65 73 2E 0A 0A 54 68 69 73 20 6C 69 6E 65 20 68 | es...This line h |
- X| 61 73 20 7A 65 72 6F 20 20 74 72 61 69 6C 69 6E | as zero trailin |
- X| 67 20 73 70 61 63 65 73 20 7C 0A 54 68 69 73 20 | g spaces |.This |
- X| 6C 69 6E 65 20 68 61 73 20 6F 6E 65 20 20 20 74 | line has one t |
- X| 72 61 69 6C 69 6E 67 20 73 70 61 63 65 20 20 7C | railing space | |
- X| 20 0A 54 68 69 73 20 6C 69 6E 65 20 68 61 73 20 | .This line has |
- X| 74 77 6F 20 20 20 74 72 61 69 6C 69 6E 67 20 73 | two trailing s |
- X| 70 61 63 65 73 20 7C 20 20 0A 54 68 69 73 20 6C | paces | .This l |
- X| 69 6E 65 20 68 61 73 20 74 68 72 65 65 20 74 72 | ine has three tr |
- X| 61 69 6C 69 6E 67 20 73 70 61 63 65 73 20 7C 20 | ailing spaces | |
- X| 20 20 0A | . |
- X+-------------------------------------------------+------------------+
- X
- X
- X=========================== Start of LINE LIST DUMP ============================
- X
- Globl Local| Text
- X-----------+--------------------------------------------------------------------
- X00001 00001| SC08: Detection of trailing spaces.<010>
- X00002 00002| <010>
- X00003 00003| This line has zero trailing spaces |<010>
- X00004 00004| This line has one trailing space | <010>
- X00005 00005| This line has two trailing spaces | <010>
- X00006 00006| This line has three trailing spaces | <010>
- X00007 00007| <End-Of-File><010>
- X-----------+--------------------------------------------------------------------
- Globl Local| Text
- X
- X============================ End of LINE LIST DUMP =============================
- X
- X
- X=========================== Start of TOKEN LIST DUMP ===========================
- X
- Summary: There are 2 tokens in the token list.
- X
- Line[Column]: Token Description
- X-------------------------------
- X
- X0001[01]: Text. Text scrap[Grey]="SC08: Detection of trailing spaces.<010>
- X<010>
- This line has zero trailing spaces |<010>
- This line has one trailing space | <010>
- This line has two trailing spaces | <010>
- This line has three trailing spaces | <010>
- X"
- X0007[01]: End Of File.
- X============================ End of TOKEN LIST DUMP ============================
- X
- X
- X========================== Start of MACRO TABLE DUMP ===========================
- X
- X
- X=========================== End of MACRO TABLE DUMP ============================
- X
- X
- X========================= Start of DOCUMENT LIST DUMP ==========================
- X
- X
- TEXT COMPONENT: Pos(L,C)=(1,1).
- X
- X-- Start of Text Scrap List --
- Text scrap[Grey]="SC08: Detection of trailing spaces.<010>
- X<010>
- This line has zero trailing spaces |<010>
- This line has one trailing space | <010>
- This line has two trailing spaces | <010>
- This line has three trailing spaces | <010>
- X"
- X--- End of Text Scrap List ---
- X
- X
- X========================== End of DOCUMENT LIST DUMP ===========================
- X
- XE: No macros defined.
- XE: No output files specified.
- X
- Global Local| Input File
- X------------+-------------------------------------------------------------------
- X 1 1| SC08: Detection of trailing spaces.
- X 2 2|
- X 3 3| This line has zero trailing spaces |
- X 4 4| This line has one trailing space |
- X Warning|......................................^Line has trailing spaces up to and including this space.
- X 5 5| This line has two trailing spaces |
- X Warning|.......................................^Line has trailing spaces up to and including this space.
- X 6 6| This line has three trailing spaces |
- X Warning|........................................^Line has trailing spaces up to and including this space.
- X | <End-Of-File>
- X------------+-------------------------------------------------------------------
- X
- There were 2 Errors and 3 Warnings.
- END_OF_FILE
- if test 4200 -ne `wc -c <'answers/sc08.lis'`; then
- echo shar: \"'answers/sc08.lis'\" unpacked with wrong size!
- fi
- # end of 'answers/sc08.lis'
- fi
- if test -f 'answers/sc12.lis' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'answers/sc12.lis'\"
- else
- echo shar: Extracting \"'answers/sc12.lis'\" \(3243 characters\)
- sed "s/^X//" >'answers/sc12.lis' <<'END_OF_FILE'
- XFUNNELWEB LISTING FILE
- X======================
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 53 43 31 32 3A 20 49 6E 63 6C 75 64 65 20 66 69 | SC12: Include fi |
- X| 6C 65 20 63 61 6E 6E 6F 74 20 62 65 20 66 6F 75 | le cannot be fou |
- X| 6E 64 2E 0A 54 65 73 74 20 70 65 72 73 6F 6E 3A | nd..Test person: |
- X| 20 44 4F 4E 54 20 63 72 65 61 74 65 20 73 63 31 | DONT create sc1 |
- X| 32 61 2E 69 6E 63 2E 20 49 74 20 69 73 20 6E 6F | 2a.inc. It is no |
- X| 74 20 73 75 70 70 6F 73 65 64 20 74 6F 20 65 78 | t supposed to ex |
- X| 69 73 74 21 0A 54 68 65 20 66 6F 6C 6C 6F 77 69 | ist!.The followi |
- X| 6E 67 20 69 6E 63 6C 75 64 65 20 73 68 6F 75 6C | ng include shoul |
- X| 64 20 79 69 65 6C 64 20 61 20 22 66 69 6C 65 20 | d yield a "file |
- X| 6E 6F 74 20 66 6F 75 6E 64 20 65 72 72 6F 72 2E | not found error. |
- X| 22 0A 0A 40 69 20 73 63 31 32 61 2E 69 6E 63 0A | "..@i sc12a.inc. |
- X| 0A | . |
- X+-------------------------------------------------+------------------+
- X
- X
- X=========================== Start of LINE LIST DUMP ============================
- X
- Globl Local| Text
- X-----------+--------------------------------------------------------------------
- X00001 00001| SC12: Include file cannot be found.<010>
- X00002 00002| Test person: DONT create sc12a.inc. It is not supposed to exist!<010>
- X00003 00003| The following include should yield a "file not found error."<010>
- X00004 00004| <010>
- X00005 00005| @i sc12a.inc<010>
- X00006 00006| <010>
- X00007 00007| <End-Of-File><010>
- X-----------+--------------------------------------------------------------------
- Globl Local| Text
- X
- X============================ End of LINE LIST DUMP =============================
- X
- X
- X=========================== Start of TOKEN LIST DUMP ===========================
- X
- Summary: There are 3 tokens in the token list.
- X
- Line[Column]: Token Description
- X-------------------------------
- X
- X0001[01]: Text. Text scrap[Grey]="SC12: Include file cannot be found.<010>
- Test person: DONT create sc12a.inc. It is not supposed to exist!<010>
- The following include should yield a "file not found error."<010>
- X<010>
- X"
- X0006[01]: Text. Text scrap[White]="<010>
- X"
- X0007[01]: End Of File.
- X============================ End of TOKEN LIST DUMP ============================
- X
- Macro table dump skipped (Parser was not invoked).
- Document list dump skipped (Parser was not invoked).
- X
- Global Local| Input File
- X------------+-------------------------------------------------------------------
- X 1 1| SC12: Include file cannot be found.
- X 2 2| Test person: DONT create sc12a.inc. It is not supposed to exist!
- X 3 3| The following include should yield a "file not found error."
- X 4 4|
- X 5 5| @i sc12a.inc
- X Error|....^Error opening include file.
- X |....^The include file's expanded name was "<<Suppressed>>".
- X 6 6|
- X | <End-Of-File>
- X------------+-------------------------------------------------------------------
- X
- There was 1 Error.
- END_OF_FILE
- if test 3243 -ne `wc -c <'answers/sc12.lis'`; then
- echo shar: \"'answers/sc12.lis'\" unpacked with wrong size!
- fi
- # end of 'answers/sc12.lis'
- fi
- if test -f 'answers/sc19.lis' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'answers/sc19.lis'\"
- else
- echo shar: Extracting \"'answers/sc19.lis'\" \(3855 characters\)
- sed "s/^X//" >'answers/sc19.lis' <<'END_OF_FILE'
- XFUNNELWEB LISTING FILE
- X======================
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 53 43 31 39 3A 20 54 65 73 74 20 3C 73 70 65 63 | SC19: Test <spec |
- X| 69 61 6C 3E 2D 0A 0A 31 2E 20 54 65 73 74 20 74 | ial>-..1. Test t |
- X| 68 61 74 20 65 72 72 6F 72 20 69 73 20 66 6C 61 | hat error is fla |
- X| 67 67 65 64 20 69 66 20 73 65 71 75 65 6E 63 65 | gged if sequence |
- X| 20 69 73 20 6E 6F 74 20 61 74 20 74 68 65 20 65 | is not at the e |
- X| 6E 64 20 6F 66 20 61 20 6C 69 6E 65 2E 0A 0A 54 | nd of a line...T |
- X| 68 69 73 20 69 73 20 61 20 6C 69 6E 65 20 63 6F | his is a line co |
- X| 6E 74 61 69 6E 69 6E 67 20 40 2D 20 74 68 65 20 | ntaining @- the |
- X| 65 6E 64 20 6F 66 20 6C 69 6E 65 20 73 75 70 70 | end of line supp |
- X| 72 65 73 73 6F 72 2E 0A 0A 32 2E 20 54 65 73 74 | ressor...2. Test |
- X| 20 74 68 65 20 73 65 71 75 65 6E 63 65 20 66 6F | the sequence fo |
- X| 6C 6C 6F 77 65 64 20 62 79 20 74 72 61 69 6C 69 | llowed by traili |
- X| 6E 67 20 62 6C 61 6E 6B 73 2E 0A 0A 20 20 20 20 | ng blanks... |
- X| 20 40 2D 20 20 20 0A 0A | @- .. |
- X+-------------------------------------------------+------------------+
- X
- X
- X=========================== Start of LINE LIST DUMP ============================
- X
- Globl Local| Text
- X-----------+--------------------------------------------------------------------
- X00001 00001| SC19: Test <special>-<010>
- X00002 00002| <010>
- X00003 00003| 1. Test that error is flagged if sequence is not at the end of a line.<010>
- X00004 00004| <010>
- X00005 00005| This is a line containing @- the end of line suppressor.<010>
- X00006 00006| <010>
- X00007 00007| 2. Test the sequence followed by trailing blanks.<010>
- X00008 00008| <010>
- X00009 00009| @- <010>
- X00010 00010| <010>
- X00011 00011| <End-Of-File><010>
- X-----------+--------------------------------------------------------------------
- Globl Local| Text
- X
- X============================ End of LINE LIST DUMP =============================
- X
- X
- X=========================== Start of TOKEN LIST DUMP ===========================
- X
- Summary: There are 4 tokens in the token list.
- X
- Line[Column]: Token Description
- X-------------------------------
- X
- X0001[01]: Text. Text scrap[Grey]="SC19: Test <special>-<010>
- X<010>
- X1. Test that error is flagged if sequence is not at the end of a line.<010>
- X<010>
- This is a line containing "
- X0005[29]: Text. Text scrap[Grey]=" the end of line suppressor.<010>
- X<010>
- X2. Test the sequence followed by trailing blanks.<010>
- X<010>
- X "
- X0009[08]: Text. Text scrap[White]=" <010>
- X<010>
- X"
- X0011[01]: End Of File.
- X============================ End of TOKEN LIST DUMP ============================
- X
- Macro table dump skipped (Parser was not invoked).
- Document list dump skipped (Parser was not invoked).
- X
- Global Local| Input File
- X------------+-------------------------------------------------------------------
- X 1 1| SC19: Test <special>-
- X 2 2|
- X 3 3| 1. Test that error is flagged if sequence is not at the end of a line.
- X 4 4|
- X 5 5| This is a line containing @- the end of line suppressor.
- X Error|...........................^Suppress EOL sequence is legal only at the end of a line.
- X 6 6|
- X 7 7| 2. Test the sequence followed by trailing blanks.
- X 8 8|
- X 9 9| @-
- X Error|......^Suppress EOL sequence is legal only at the end of a line.
- X Warning|..........^Line has trailing spaces up to and including this space.
- X 10 10|
- X | <End-Of-File>
- X------------+-------------------------------------------------------------------
- X
- There were 2 Errors and 1 Warning.
- END_OF_FILE
- if test 3855 -ne `wc -c <'answers/sc19.lis'`; then
- echo shar: \"'answers/sc19.lis'\" unpacked with wrong size!
- fi
- # end of 'answers/sc19.lis'
- fi
- if test -f 'answers/sc20.lis' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'answers/sc20.lis'\"
- else
- echo shar: Extracting \"'answers/sc20.lis'\" \(3985 characters\)
- sed "s/^X//" >'answers/sc20.lis' <<'END_OF_FILE'
- XFUNNELWEB LISTING FILE
- X======================
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 53 43 32 30 3A 20 54 65 73 74 20 40 21 0A 0A 31 | SC20: Test @!..1 |
- X| 2E 20 54 65 73 74 20 61 74 20 74 68 65 20 73 74 | . Test at the st |
- X| 61 72 74 20 6F 66 20 61 20 6C 69 6E 65 2E 0A 0A | art of a line... |
- X| 40 21 20 54 68 69 73 20 69 73 20 61 20 63 6F 6D | @! This is a com |
- X| 6D 65 6E 74 20 61 6E 64 20 77 65 20 63 61 6E 20 | ment and we can |
- X| 73 74 69 63 6B 20 61 6E 79 20 73 6F 72 74 20 6F | stick any sort o |
- X| 66 20 72 75 62 62 69 73 68 20 69 6E 20 69 74 2E | f rubbish in it. |
- X| 0A 40 21 20 40 23 20 40 69 20 40 5E 64 73 3B 61 | .@! @# @i @^ds;a |
- X| 66 3B 6C 73 64 6D 66 3B 6C 61 6E 64 20 6F 74 68 | f;lsdmf;land oth |
- X| 65 72 20 40 20 72 75 62 62 69 73 68 2E 0A 0A 32 | er @ rubbish...2 |
- X| 2E 20 54 65 73 74 20 68 61 6C 66 77 61 79 20 74 | . Test halfway t |
- X| 68 72 6F 75 67 68 20 61 20 6C 69 6E 65 2E 0A 0A | hrough a line... |
- X| 54 68 69 73 20 69 73 20 61 20 6C 69 6E 65 20 40 | This is a line @ |
- X| 21 20 77 68 6F 73 65 20 73 65 63 6F 6E 64 20 68 | ! whose second h |
- X| 61 6C 66 20 6E 65 76 65 72 20 73 65 65 73 20 74 | alf never sees t |
- X| 68 65 20 64 61 79 6C 69 67 68 74 2E 20 40 69 20 | he daylight. @i |
- X| 40 3C 0A 0A | @<.. |
- X+-------------------------------------------------+------------------+
- X
- X
- X=========================== Start of LINE LIST DUMP ============================
- X
- Globl Local| Text
- X-----------+--------------------------------------------------------------------
- X00001 00001| SC20: Test @!<010>
- X00002 00002| <010>
- X00003 00003| 1. Test at the start of a line.<010>
- X00004 00004| <010>
- X00005 00005| @! This is a comment and we can stick any sort of rubbish in it.<010>
- X00006 00006| @! @# @i @^ds;af;lsdmf;land other @ rubbish.<010>
- X00007 00007| <010>
- X00008 00008| 2. Test halfway through a line.<010>
- X00009 00009| <010>
- X00010 00010| This is a line @! whose second half never sees the daylight. @i @<<010>
- X00011 00011| <010>
- X00012 00012| <End-Of-File><010>
- X-----------+--------------------------------------------------------------------
- Globl Local| Text
- X
- X============================ End of LINE LIST DUMP =============================
- X
- X
- X=========================== Start of TOKEN LIST DUMP ===========================
- X
- Summary: There are 5 tokens in the token list.
- X
- Line[Column]: Token Description
- X-------------------------------
- X
- X0001[01]: Text. Text scrap[Grey]="SC20: Test "
- X0002[01]: Text. Text scrap[Grey]="<010>
- X1. Test at the start of a line.<010>
- X<010>
- X"
- X0007[01]: Text. Text scrap[Grey]="<010>
- X2. Test halfway through a line.<010>
- X<010>
- This is a line "
- X0011[01]: Text. Text scrap[White]="<010>
- X"
- X0012[01]: End Of File.
- X============================ End of TOKEN LIST DUMP ============================
- X
- X
- X========================== Start of MACRO TABLE DUMP ===========================
- X
- X
- X=========================== End of MACRO TABLE DUMP ============================
- X
- X
- X========================= Start of DOCUMENT LIST DUMP ==========================
- X
- X
- TEXT COMPONENT: Pos(L,C)=(1,1).
- X
- X-- Start of Text Scrap List --
- Text scrap[Grey]="SC20: Test "
- Text scrap[Grey]="<010>
- X1. Test at the start of a line.<010>
- X<010>
- X"
- Text scrap[Grey]="<010>
- X2. Test halfway through a line.<010>
- X<010>
- This is a line "
- Text scrap[White]="<010>
- X"
- X--- End of Text Scrap List ---
- X
- X
- X========================== End of DOCUMENT LIST DUMP ===========================
- X
- XE: No macros defined.
- XE: No output files specified.
- X
- Global Local| Input File
- X------------+-------------------------------------------------------------------
- X.................
- X------------+-------------------------------------------------------------------
- X
- There were 2 Errors.
- END_OF_FILE
- if test 3985 -ne `wc -c <'answers/sc20.lis'`; then
- echo shar: \"'answers/sc20.lis'\" unpacked with wrong size!
- fi
- # end of 'answers/sc20.lis'
- fi
- if test -f 'answers/sc25.lis' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'answers/sc25.lis'\"
- else
- echo shar: Extracting \"'answers/sc25.lis'\" \(3489 characters\)
- sed "s/^X//" >'answers/sc25.lis' <<'END_OF_FILE'
- XFUNNELWEB LISTING FILE
- X======================
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 53 43 32 35 3A 20 54 65 73 74 20 73 79 6E 74 61 | SC25: Test synta |
- X| 78 20 63 68 65 63 6B 69 6E 67 20 6F 66 20 6E 65 | x checking of ne |
- X| 77 20 70 61 67 65 20 74 79 70 65 73 65 74 74 65 | w page typesette |
- X| 72 20 64 69 72 65 63 74 69 76 65 2E 0A 0A 31 2E | r directive...1. |
- X| 20 4D 61 6B 65 20 73 75 72 65 20 74 68 61 74 20 | Make sure that |
- X| 61 20 6C 65 67 61 6C 20 6E 65 77 20 70 61 67 65 | a legal new page |
- X| 20 64 69 72 65 63 74 69 76 65 20 69 73 20 4F 4B | directive is OK |
- X| 2E 0A 40 74 20 6E 65 77 5F 70 61 67 65 0A 0A 32 | ..@t new_page..2 |
- X| 2E 20 43 68 65 63 6B 20 74 68 61 74 20 69 74 20 | . Check that it |
- X| 64 6F 65 73 6E 27 74 20 73 74 61 6E 64 20 66 6F | doesn't stand fo |
- X| 72 20 61 6E 79 20 6E 6F 6E 73 65 6E 73 65 2E 0A | r any nonsense.. |
- X| 40 74 20 6E 65 77 5F 70 61 67 65 20 6E 6F 6E 73 | @t new_page nons |
- X| 65 6E 73 65 0A 0A | ense.. |
- X+-------------------------------------------------+------------------+
- X
- X
- X=========================== Start of LINE LIST DUMP ============================
- X
- Globl Local| Text
- X-----------+--------------------------------------------------------------------
- X00001 00001| SC25: Test syntax checking of new page typesetter directive.<010>
- X00002 00002| <010>
- X00003 00003| 1. Make sure that a legal new page directive is OK.<010>
- X00004 00004| @t new_page<010>
- X00005 00005| <010>
- X00006 00006| 2. Check that it doesn't stand for any nonsense.<010>
- X00007 00007| @t new_page nonsense<010>
- X00008 00008| <010>
- X00009 00009| <End-Of-File><010>
- X-----------+--------------------------------------------------------------------
- Globl Local| Text
- X
- X============================ End of LINE LIST DUMP =============================
- X
- X
- X=========================== Start of TOKEN LIST DUMP ===========================
- X
- Summary: There are 5 tokens in the token list.
- X
- Line[Column]: Token Description
- X-------------------------------
- X
- X0001[01]: Text. Text scrap[Grey]="SC25: Test syntax checking of new page typesetter directive.<010>
- X<010>
- X1. Make sure that a legal new page directive is OK.<010>
- X"
- X0004[01]: @t.. Newpage.
- X0005[01]: Text. Text scrap[Grey]="<010>
- X2. Check that it doesn't stand for any nonsense.<010>
- X"
- X0008[01]: Text. Text scrap[White]="<010>
- X"
- X0009[01]: End Of File.
- X============================ End of TOKEN LIST DUMP ============================
- X
- Macro table dump skipped (Parser was not invoked).
- Document list dump skipped (Parser was not invoked).
- X
- Global Local| Input File
- X------------+-------------------------------------------------------------------
- X 1 1| SC25: Test syntax checking of new page typesetter directive.
- X 2 2|
- X 3 3| 1. Make sure that a legal new page directive is OK.
- X 4 4| @t new_page
- X 5 5|
- X 6 6| 2. Check that it doesn't stand for any nonsense.
- X 7 7| @t new_page nonsense
- X Error|.............^The new_page directive does not take arguments.
- X |.............^Directive ignored.
- X 8 8|
- X | <End-Of-File>
- X------------+-------------------------------------------------------------------
- X
- There was 1 Error.
- END_OF_FILE
- if test 3489 -ne `wc -c <'answers/sc25.lis'`; then
- echo shar: \"'answers/sc25.lis'\" unpacked with wrong size!
- fi
- # end of 'answers/sc25.lis'
- fi
- if test -f 'answers/sc26.lis' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'answers/sc26.lis'\"
- else
- echo shar: Extracting \"'answers/sc26.lis'\" \(3738 characters\)
- sed "s/^X//" >'answers/sc26.lis' <<'END_OF_FILE'
- XFUNNELWEB LISTING FILE
- X======================
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 53 43 32 36 3A 20 54 65 73 74 20 73 79 6E 74 61 | SC26: Test synta |
- X| 78 20 63 68 65 63 6B 69 6E 67 20 6F 66 20 74 61 | x checking of ta |
- X| 62 6C 65 20 6F 66 20 63 6F 6E 74 65 6E 74 73 20 | ble of contents |
- X| 74 79 70 65 73 65 74 74 69 6E 67 20 70 72 61 67 | typesetting prag |
- X| 6D 61 2E 0A 0A 31 2E 20 4D 61 6B 65 20 73 75 72 | ma...1. Make sur |
- X| 65 20 74 68 61 74 20 61 20 6C 65 67 61 6C 20 74 | e that a legal t |
- X| 61 62 6C 65 20 6F 66 20 63 6F 6E 74 65 6E 74 73 | able of contents |
- X| 20 64 69 72 65 63 74 69 76 65 20 69 73 20 4F 4B | directive is OK |
- X| 2E 0A 40 74 20 74 61 62 6C 65 5F 6F 66 5F 63 6F | ..@t table_of_co |
- X| 6E 74 65 6E 74 73 0A 0A 32 2E 20 43 68 65 63 6B | ntents..2. Check |
- X| 20 74 68 61 74 20 69 74 20 64 6F 65 73 6E 27 74 | that it doesn't |
- X| 20 73 74 61 6E 64 20 66 6F 72 20 61 6E 79 20 6E | stand for any n |
- X| 6F 6E 73 65 6E 73 65 2E 0A 40 74 20 74 61 62 6C | onsense..@t tabl |
- X| 65 5F 6F 66 5F 63 6F 6E 74 65 6E 74 73 20 6E 6F | e_of_contents no |
- X| 6E 73 65 6E 73 65 0A 0A | nsense.. |
- X+-------------------------------------------------+------------------+
- X
- X
- X=========================== Start of LINE LIST DUMP ============================
- X
- Globl Local| Text
- X-----------+--------------------------------------------------------------------
- X00001 00001| SC26: Test syntax checking of table of contents typesetting pragma.<010>
- X00002 00002| <010>
- X00003 00003| 1. Make sure that a legal table of contents directive is OK.<010>
- X00004 00004| @t table_of_contents<010>
- X00005 00005| <010>
- X00006 00006| 2. Check that it doesn't stand for any nonsense.<010>
- X00007 00007| @t table_of_contents nonsense<010>
- X00008 00008| <010>
- X00009 00009| <End-Of-File><010>
- X-----------+--------------------------------------------------------------------
- Globl Local| Text
- X
- X============================ End of LINE LIST DUMP =============================
- X
- X
- X=========================== Start of TOKEN LIST DUMP ===========================
- X
- Summary: There are 5 tokens in the token list.
- X
- Line[Column]: Token Description
- X-------------------------------
- X
- X0001[01]: Text. Text scrap[Grey]="SC26: Test syntax checking of table of contents typesetting pragma.<010>
- X<010>
- X1. Make sure that a legal table of contents directive is OK.<010>
- X"
- X0004[01]: @t.. TOC.
- X0005[01]: Text. Text scrap[Grey]="<010>
- X2. Check that it doesn't stand for any nonsense.<010>
- X"
- X0008[01]: Text. Text scrap[White]="<010>
- X"
- X0009[01]: End Of File.
- X============================ End of TOKEN LIST DUMP ============================
- X
- Macro table dump skipped (Parser was not invoked).
- Document list dump skipped (Parser was not invoked).
- X
- Global Local| Input File
- X------------+-------------------------------------------------------------------
- X 1 1| SC26: Test syntax checking of table of contents typesetting pragma.
- X 2 2|
- X 3 3| 1. Make sure that a legal table of contents directive is OK.
- X 4 4| @t table_of_contents
- X 5 5|
- X 6 6| 2. Check that it doesn't stand for any nonsense.
- X 7 7| @t table_of_contents nonsense
- X Error|......................^The table_of_contents directive does not take arguments.
- X |......................^Directive ignored.
- X 8 8|
- X | <End-Of-File>
- X------------+-------------------------------------------------------------------
- X
- There was 1 Error.
- END_OF_FILE
- if test 3738 -ne `wc -c <'answers/sc26.lis'`; then
- echo shar: \"'answers/sc26.lis'\" unpacked with wrong size!
- fi
- # end of 'answers/sc26.lis'
- fi
- if test -f 'hackman/h_manual.toc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'hackman/h_manual.toc'\"
- else
- echo shar: Extracting \"'hackman/h_manual.toc'\" \(4096 characters\)
- sed "s/^X//" >'hackman/h_manual.toc' <<'END_OF_FILE'
- X\contentsline {chapter}{Preface}{5}
- X\contentsline {chapter}{Acknowledgements}{7}
- X\contentsline {chapter}{Presentation Notes}{9}
- X\contentsline {chapter}{\numberline {1}FunnelWeb Design}{11}
- X\contentsline {section}{\numberline {1.1}Motivation for FunnelWeb}{11}
- X\contentsline {section}{\numberline {1.2}Indentation}{12}
- X\contentsline {section}{\numberline {1.3}Review of FunnelWeb Syntax}{14}
- X\contentsline {subsection}{\numberline {1.3.1}Review of Macro Definition Syntax}{14}
- X\contentsline {subsection}{\numberline {1.3.2}Review of Macro Call Syntax}{16}
- X\contentsline {subsection}{\numberline {1.3.3}Review of Parameterized Macro Call Syntax}{16}
- X\contentsline {section}{\numberline {1.4}Document Structuring}{16}
- X\contentsline {section}{\numberline {1.5}Discussion of Some Miscellaneous Issues}{18}
- X\contentsline {section}{\numberline {1.6}Automated Regression Testing}{18}
- X\contentsline {section}{\numberline {1.7}Command Line Interface}{18}
- X\contentsline {section}{\numberline {1.8}File Name Management}{19}
- X\contentsline {subsection}{\numberline {1.8.1}Filename Extensions}{20}
- X\contentsline {subsection}{\numberline {1.8.2}Filename Inheritance}{20}
- X\contentsline {subsection}{\numberline {1.8.3}Portable Structure of File Names}{21}
- X\contentsline {section}{\numberline {1.9}Specifying Constraints on the Number of Instantiations}{22}
- X\contentsline {section}{\numberline {1.10}The Relationship Between Document Structure and Macro Structure}{23}
- X\contentsline {section}{\numberline {1.11}Diagnostic Messages}{25}
- X\contentsline {section}{\numberline {1.12}Summary}{25}
- X\contentsline {chapter}{\numberline {2}FunnelWeb Implementation}{27}
- X\contentsline {section}{\numberline {2.1}Introduction}{27}
- X\contentsline {section}{\numberline {2.2}History of FunnelWeb Implementations}{27}
- X\contentsline {section}{\numberline {2.3}Why FunnelWeb Wasn't Used to Write Itself}{28}
- X\contentsline {section}{\numberline {2.4}Coding Style}{28}
- X\contentsline {section}{\numberline {2.5}Use of Memory}{29}
- X\contentsline {section}{\numberline {2.6}The Heap}{29}
- X\contentsline {section}{\numberline {2.7}The Stack}{30}
- X\contentsline {section}{\numberline {2.8}Static Variables}{30}
- X\contentsline {section}{\numberline {2.9}Implementing Text Indentation}{30}
- X\contentsline {chapter}{\numberline {3}FunnelWeb Modification}{35}
- X\contentsline {section}{\numberline {3.1}Introduction}{35}
- X\contentsline {section}{\numberline {3.2}The Danger of Modifying Languages}{35}
- X\contentsline {section}{\numberline {3.3}Authority vs User Security}{36}
- X\contentsline {section}{\numberline {3.4}What I Want to Protect}{37}
- X\contentsline {section}{\numberline {3.5}Modifying the Manuals}{38}
- X\contentsline {section}{\numberline {3.6}How Copyright Law Works}{38}
- X\contentsline {section}{\numberline {3.7}Management of the Official FunnelWeb}{39}
- X\contentsline {section}{\numberline {3.8}A GNU Version?}{41}
- X\contentsline {section}{\numberline {3.9}Summary}{41}
- X\contentsline {chapter}{\numberline {4}FunnelWeb Future}{43}
- X\contentsline {section}{\numberline {4.1}Documentation}{43}
- X\contentsline {section}{\numberline {4.2}Command Line Interface}{43}
- X\contentsline {section}{\numberline {4.3}Shell Interpreter}{43}
- X\contentsline {section}{\numberline {4.4}Language Design}{44}
- X\contentsline {section}{\numberline {4.5}Scanner/Mapper}{44}
- X\contentsline {section}{\numberline {4.6}Parser}{45}
- X\contentsline {section}{\numberline {4.7}Analyser}{45}
- X\contentsline {section}{\numberline {4.8}Tangle}{45}
- X\contentsline {section}{\numberline {4.9}Weave}{45}
- X\contentsline {section}{\numberline {4.10}Lister}{46}
- X\contentsline {section}{\numberline {4.11}Diagnostics}{47}
- X\contentsline {section}{\numberline {4.12}Speed}{47}
- X\contentsline {section}{\numberline {4.13}Correctness}{47}
- X\contentsline {section}{\numberline {4.14}Test Suite}{47}
- X\contentsline {section}{\numberline {4.15}Machine-Specific Changes}{48}
- X\contentsline {section}{\numberline {4.16}Summary}{48}
- X\contentsline {chapter}{\numberline {A}GNU General Public License Version 2}{49}
- X\contentsline {chapter}{\numberline {B}References}{57}
- X\contentsline {chapter}{Index}{57}
- END_OF_FILE
- if test 4096 -ne `wc -c <'hackman/h_manual.toc'`; then
- echo shar: \"'hackman/h_manual.toc'\" unpacked with wrong size!
- fi
- # end of 'hackman/h_manual.toc'
- fi
- if test -f 'sources/analyse.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sources/analyse.h'\"
- else
- echo shar: Extracting \"'sources/analyse.h'\" \(2852 characters\)
- sed "s/^X//" >'sources/analyse.h' <<'END_OF_FILE'
- X/*##############################################################################
- X
- XFUNNNELWEB COPYRIGHT
- X====================
- XFunnelWeb is a literate-programming macro preprocessor.
- X
- Copyright (C) 1992 Ross N. Williams.
- X
- X Ross N. Williams
- X ross@spam.adelaide.edu.au
- X 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X
- This program is free software; you can redistribute it and/or modify
- it under the terms of Version 2 of the GNU General Public License as
- published by the Free Software Foundation.
- X
- This program is distributed WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See Version 2 of the GNU General Public License for more details.
- X
- You should have received a copy of Version 2 of the GNU General Public
- License along with this program. If not, you can FTP the license from
- prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- Section 2a of the license requires that all changes to this file be
- recorded prominently in this file. Please record all changes here.
- X
- Programmers:
- X RNW Ross N. Williams ross@spam.adelaide.edu.au
- X
- Changes:
- X 07-May-1992 RNW Program prepared for release under GNU GPL V2.
- X
- X##############################################################################*/
- X
- X
- X/******************************************************************************/
- X/* ANALYSE.H */
- X/******************************************************************************/
- X/* */
- X/* This package exports a single function called analyse() that should be */
- X/* invoked just after the parser has finished. The scanner and parser */
- X/* serve only to construct a structured representation of the input file in */
- X/* memory; they do not critique it beyond syntax. In contrast, analyse() */
- X/* analyses the representation, checking it for "semantic" errors. Any */
- X/* problems that are found are sent to the lister package with appropriate */
- X/* positioning information so that the messages appear at exactly the right */
- X/* spot in the listing. */
- X/* */
- X/******************************************************************************/
- X
- X#include "style.h"
- X
- X/******************************************************************************/
- X
- XEXPORT void analyse P_((void));
- X
- X/******************************************************************************/
- X/* End of ANALYSE.H */
- X/******************************************************************************/
- END_OF_FILE
- if test 2852 -ne `wc -c <'sources/analyse.h'`; then
- echo shar: \"'sources/analyse.h'\" unpacked with wrong size!
- fi
- # end of 'sources/analyse.h'
- fi
- if test -f 'sources/as.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sources/as.c'\"
- else
- echo shar: Extracting \"'sources/as.c'\" \(2208 characters\)
- sed "s/^X//" >'sources/as.c' <<'END_OF_FILE'
- X/*##############################################################################
- X
- XFUNNNELWEB COPYRIGHT
- X====================
- XFunnelWeb is a literate-programming macro preprocessor.
- X
- Copyright (C) 1992 Ross N. Williams.
- X
- X Ross N. Williams
- X ross@spam.adelaide.edu.au
- X 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X
- This program is free software; you can redistribute it and/or modify
- it under the terms of Version 2 of the GNU General Public License as
- published by the Free Software Foundation.
- X
- This program is distributed WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See Version 2 of the GNU General Public License for more details.
- X
- You should have received a copy of Version 2 of the GNU General Public
- License along with this program. If not, you can FTP the license from
- prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- Section 2a of the license requires that all changes to this file be
- recorded prominently in this file. Please record all changes here.
- X
- Programmers:
- X RNW Ross N. Williams ross@spam.adelaide.edu.au
- X
- Changes:
- X 07-May-1992 RNW Program prepared for release under GNU GPL V2.
- X
- X##############################################################################*/
- X
- X
- X/******************************************************************************/
- X/* AS.C */
- X/******************************************************************************/
- X
- X#include "style.h"
- X
- X#include "as.h"
- X#include "machin.h"
- X
- X/******************************************************************************/
- X
- XEXPORT void as_bomb(message)
- char *message;
- X{
- X fprintf(stderr,"%s\n",message);
- X fprintf(stderr,"An assertion has failed! See the line above.\n");
- X fprintf(stderr,"Press return to abort FunnelWeb>\n"); (void) getchar();
- X exit(EXIT_FAILURE);
- X}
- X
- X/******************************************************************************/
- X/* AS.C */
- X/******************************************************************************/
- END_OF_FILE
- if test 2208 -ne `wc -c <'sources/as.c'`; then
- echo shar: \"'sources/as.c'\" unpacked with wrong size!
- fi
- # end of 'sources/as.c'
- fi
- if test -f 'sources/clock.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sources/clock.c'\"
- else
- echo shar: Extracting \"'sources/clock.c'\" \(3834 characters\)
- sed "s/^X//" >'sources/clock.c' <<'END_OF_FILE'
- X/*##############################################################################
- X
- XFUNNNELWEB COPYRIGHT
- X====================
- XFunnelWeb is a literate-programming macro preprocessor.
- X
- Copyright (C) 1992 Ross N. Williams.
- X
- X Ross N. Williams
- X ross@spam.adelaide.edu.au
- X 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X
- This program is free software; you can redistribute it and/or modify
- it under the terms of Version 2 of the GNU General Public License as
- published by the Free Software Foundation.
- X
- This program is distributed WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See Version 2 of the GNU General Public License for more details.
- X
- You should have received a copy of Version 2 of the GNU General Public
- License along with this program. If not, you can FTP the license from
- prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- Section 2a of the license requires that all changes to this file be
- recorded prominently in this file. Please record all changes here.
- X
- Programmers:
- X RNW Ross N. Williams ross@spam.adelaide.edu.au
- X
- Changes:
- X 07-May-1992 RNW Program prepared for release under GNU GPL V2.
- X
- X##############################################################################*/
- X
- X
- X/******************************************************************************/
- X/* CLOCK.C */
- X/******************************************************************************/
- X
- X#include "style.h"
- X
- X#include "as.h"
- X#include "clock.h"
- X#include "machin.h"
- X
- X/******************************************************************************/
- X
- X#define MAGIC_HEAD (565854L)
- X#define MAGIC_TAIL (256194L)
- X
- X/******************************************************************************/
- X
- LOCAL void ck_check P_((p_ck_t));
- LOCAL void ck_check(p_ck)
- p_ck_t p_ck;
- X{
- X as_cold(p_ck!=NULL,"ck_check: Clock pointer is NULL.");
- X as_cold(p_ck->ck_mhead==MAGIC_HEAD,
- X "ck_check: Magic number at head of record is incorrect.");
- X as_cold(p_ck->ck_mtail==MAGIC_TAIL,
- X "ck_check: Magic number at tail of record is incorrect.");
- X}
- X
- X/******************************************************************************/
- X
- XEXPORT void ck_ini(p_ck)
- p_ck_t p_ck;
- X{
- X p_ck->ck_mhead = MAGIC_HEAD;
- X p_ck->ck_run = FALSE;
- X p_ck->ck_csum = 0.0;
- X p_ck->ck_rsum = 0.0;
- X /* ck_csta and ck_rsta are undefined in a stopped clock. */
- X p_ck->ck_mtail = MAGIC_TAIL;
- X}
- X
- X/******************************************************************************/
- X
- XEXPORT void ck_start(p_ck)
- p_ck_t p_ck;
- X{
- X ck_check(p_ck);
- X as_cold(!p_ck->ck_run,"ck_start: Clock is already running!");
- X p_ck->ck_run = TRUE;
- X p_ck->ck_csta = tim_cpu();
- X p_ck->ck_rsta = tim_real();
- X}
- X
- X/******************************************************************************/
- X
- XEXPORT void ck_stop(p_ck)
- p_ck_t p_ck;
- X{
- X ck_check(p_ck);
- X as_cold(p_ck->ck_run,"ck_stop: Clock is already stopped!");
- X p_ck->ck_run = FALSE;
- X p_ck->ck_csum += tim_cpu () - p_ck->ck_csta;
- X p_ck->ck_rsum += tim_real() - p_ck->ck_rsta;
- X}
- X
- X/******************************************************************************/
- X
- XEXPORT float ck_cpu(p_ck)
- p_ck_t p_ck;
- X{
- X ck_check(p_ck);
- X as_cold(!p_ck->ck_run,"ck_cpu: Clock is running.");
- X return p_ck->ck_csum;
- X}
- X
- X/******************************************************************************/
- X
- XEXPORT float ck_real(p_ck)
- p_ck_t p_ck;
- X{
- X ck_check(p_ck);
- X as_cold(!p_ck->ck_run,"ck_real: Clock is running.");
- X return p_ck->ck_rsum;
- X}
- X
- X/******************************************************************************/
- X/* End of CLOCK.H */
- X/******************************************************************************/
- END_OF_FILE
- if test 3834 -ne `wc -c <'sources/clock.c'`; then
- echo shar: \"'sources/clock.c'\" unpacked with wrong size!
- fi
- # end of 'sources/clock.c'
- fi
- if test -f 'sources/command.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sources/command.h'\"
- else
- echo shar: Extracting \"'sources/command.h'\" \(2770 characters\)
- sed "s/^X//" >'sources/command.h' <<'END_OF_FILE'
- X/*##############################################################################
- X
- XFUNNNELWEB COPYRIGHT
- X====================
- XFunnelWeb is a literate-programming macro preprocessor.
- X
- Copyright (C) 1992 Ross N. Williams.
- X
- X Ross N. Williams
- X ross@spam.adelaide.edu.au
- X 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X
- This program is free software; you can redistribute it and/or modify
- it under the terms of Version 2 of the GNU General Public License as
- published by the Free Software Foundation.
- X
- This program is distributed WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See Version 2 of the GNU General Public License for more details.
- X
- You should have received a copy of Version 2 of the GNU General Public
- License along with this program. If not, you can FTP the license from
- prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- Section 2a of the license requires that all changes to this file be
- recorded prominently in this file. Please record all changes here.
- X
- Programmers:
- X RNW Ross N. Williams ross@spam.adelaide.edu.au
- X
- Changes:
- X 07-May-1992 RNW Program prepared for release under GNU GPL V2.
- X
- X##############################################################################*/
- X
- X
- X/******************************************************************************/
- X/* COMMAND.H */
- X/******************************************************************************/
- X/* */
- X/* The command package is the mover and shaker of FunnelWeb. It exports a */
- X/* single function, whose argument is the command line given to FunnelWeb */
- X/* when it is invoked at the operating system level. The command package */
- X/* routine examines the command line and executes it, possibly invoking a */
- X/* mini-interpreter or calling the different component of FunnelWeb in turn */
- X/* (e.g. the parser). */
- X/* */
- X/******************************************************************************/
- X
- X#include "style.h"
- X#include "machin.h"
- X
- X/******************************************************************************/
- X
- void command P_((p_cl_t));
- X/* Executes the command line which is passed as the argument. */
- X
- X/******************************************************************************/
- X/* End of COMMAND.H */
- X/******************************************************************************/
- END_OF_FILE
- if test 2770 -ne `wc -c <'sources/command.h'`; then
- echo shar: \"'sources/command.h'\" unpacked with wrong size!
- fi
- # end of 'sources/command.h'
- fi
- if test -f 'sources/data.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sources/data.c'\"
- else
- echo shar: Extracting \"'sources/data.c'\" \(2023 characters\)
- sed "s/^X//" >'sources/data.c' <<'END_OF_FILE'
- X/*##############################################################################
- X
- XFUNNNELWEB COPYRIGHT
- X====================
- XFunnelWeb is a literate-programming macro preprocessor.
- X
- Copyright (C) 1992 Ross N. Williams.
- X
- X Ross N. Williams
- X ross@spam.adelaide.edu.au
- X 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X
- This program is free software; you can redistribute it and/or modify
- it under the terms of Version 2 of the GNU General Public License as
- published by the Free Software Foundation.
- X
- This program is distributed WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See Version 2 of the GNU General Public License for more details.
- X
- You should have received a copy of Version 2 of the GNU General Public
- License along with this program. If not, you can FTP the license from
- prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- Section 2a of the license requires that all changes to this file be
- recorded prominently in this file. Please record all changes here.
- X
- Programmers:
- X RNW Ross N. Williams ross@spam.adelaide.edu.au
- X
- Changes:
- X 07-May-1992 RNW Program prepared for release under GNU GPL V2.
- X
- X##############################################################################*/
- X
- X
- X/******************************************************************************/
- X/* DATA.C */
- X/******************************************************************************/
- X
- X/* The following definition causes the definitions in data.h to be treated */
- X/* as real meaty declarations and not wimpy "external" ones. */
- X#define EXTERN
- X
- X#include "data.h"
- X
- X/******************************************************************************/
- X/* End of DATA.C */
- X/******************************************************************************/
- END_OF_FILE
- if test 2023 -ne `wc -c <'sources/data.c'`; then
- echo shar: \"'sources/data.c'\" unpacked with wrong size!
- fi
- # end of 'sources/data.c'
- fi
- if test -f 'sources/dump.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sources/dump.h'\"
- else
- echo shar: Extracting \"'sources/dump.h'\" \(3416 characters\)
- sed "s/^X//" >'sources/dump.h' <<'END_OF_FILE'
- X/*##############################################################################
- X
- XFUNNNELWEB COPYRIGHT
- X====================
- XFunnelWeb is a literate-programming macro preprocessor.
- X
- Copyright (C) 1992 Ross N. Williams.
- X
- X Ross N. Williams
- X ross@spam.adelaide.edu.au
- X 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X
- This program is free software; you can redistribute it and/or modify
- it under the terms of Version 2 of the GNU General Public License as
- published by the Free Software Foundation.
- X
- This program is distributed WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See Version 2 of the GNU General Public License for more details.
- X
- You should have received a copy of Version 2 of the GNU General Public
- License along with this program. If not, you can FTP the license from
- prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- Section 2a of the license requires that all changes to this file be
- recorded prominently in this file. Please record all changes here.
- X
- Programmers:
- X RNW Ross N. Williams ross@spam.adelaide.edu.au
- X
- Changes:
- X 07-May-1992 RNW Program prepared for release under GNU GPL V2.
- X
- X##############################################################################*/
- X
- X
- X/******************************************************************************/
- X/* DUMP.H */
- X/******************************************************************************/
- X/* */
- X/* This package contains functions that dump text representations of */
- X/* FunnelWeb data structures. Each function accepts a wf stream on which it */
- X/* writes its text representation. These functions are used in testing and */
- X/* debugging only and are not used ordinarily in the program. */
- X/* */
- X/******************************************************************************/
- X
- X#include "style.h"
- X
- X#include "clock.h"
- X#include "writfile.h"
- X
- X/******************************************************************************/
- X
- XEXPORT void dm_mem P_((p_wf_t,char *,ulong));
- X/* Writes a hex and ascii dump of the specified block of memory to the */
- X/* specified stream. */
- X
- XEXPORT void dm_lnls P_((p_wf_t));
- X/* Dumps a text representation of the global line list to the given stream. */
- X
- XEXPORT void dm_tkls P_((p_wf_t));
- X/* Dumps a text representation of the global token list to the given stream. */
- X
- XEXPORT void dm_matb P_((p_wf_t));
- X/* Dumps a text representation of the macro table to the given stream. */
- X
- XEXPORT void dm_dcls P_((p_wf_t));
- X/* Dumps a text representation of the document list to the given stream. */
- X
- XEXPORT void dm_times P_((p_wf_t,p_ck_t,p_ck_t,p_ck_t,p_ck_t,
- X p_ck_t,p_ck_t,p_ck_t,p_ck_t,p_ck_t));
- X/* Dumps a text representation of the execution times to the given stream. */
- X
- X/******************************************************************************/
- X/* End of DUMP.H */
- X/******************************************************************************/
- END_OF_FILE
- if test 3416 -ne `wc -c <'sources/dump.h'`; then
- echo shar: \"'sources/dump.h'\" unpacked with wrong size!
- fi
- # end of 'sources/dump.h'
- fi
- if test -f 'sources/help_gnu.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sources/help_gnu.h'\"
- else
- echo shar: Extracting \"'sources/help_gnu.h'\" \(2621 characters\)
- sed "s/^X//" >'sources/help_gnu.h' <<'END_OF_FILE'
- X/*##############################################################################
- X
- XFUNNNELWEB COPYRIGHT
- X====================
- XFunnelWeb is a literate-programming macro preprocessor.
- X
- Copyright (C) 1992 Ross N. Williams.
- X
- X Ross N. Williams
- X ross@spam.adelaide.edu.au
- X 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X
- This program is free software; you can redistribute it and/or modify
- it under the terms of Version 2 of the GNU General Public License as
- published by the Free Software Foundation.
- X
- This program is distributed WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See Version 2 of the GNU General Public License for more details.
- X
- You should have received a copy of Version 2 of the GNU General Public
- License along with this program. If not, you can FTP the license from
- prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- Section 2a of the license requires that all changes to this file be
- recorded prominently in this file. Please record all changes here.
- X
- Programmers:
- X RNW Ross N. Williams ross@spam.adelaide.edu.au
- X
- Changes:
- X 07-May-1992 RNW Program prepared for release under GNU GPL V2.
- X
- X##############################################################################*/
- X
- X
- X/******************************************************************************/
- X/* HELP_GNU.H */
- X/******************************************************************************/
- X/* */
- X/* This module is used solely by the help module, and is really part of the */
- X/* help module, but has been separated out because THINK C on the Macintosh */
- X/* couldn't cope with more than 32K of code in one module. */
- X/* */
- X/******************************************************************************/
- X
- X#include "style.h"
- X
- X/******************************************************************************/
- X
- XEXPORT void hel_gnu P_((void (*)(char *)));
- X/* Writes out the GNU General Public License Version 2 using the specified */
- X/* output function. */
- X
- X/******************************************************************************/
- X/* End of HELP_GNU.H */
- X/******************************************************************************/
- END_OF_FILE
- if test 2621 -ne `wc -c <'sources/help_gnu.h'`; then
- echo shar: \"'sources/help_gnu.h'\" unpacked with wrong size!
- fi
- # end of 'sources/help_gnu.h'
- fi
- if test -f 'sources/lister.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sources/lister.h'\"
- else
- echo shar: Extracting \"'sources/lister.h'\" \(3396 characters\)
- sed "s/^X//" >'sources/lister.h' <<'END_OF_FILE'
- X/*##############################################################################
- X
- XFUNNNELWEB COPYRIGHT
- X====================
- XFunnelWeb is a literate-programming macro preprocessor.
- X
- Copyright (C) 1992 Ross N. Williams.
- X
- X Ross N. Williams
- X ross@spam.adelaide.edu.au
- X 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X
- This program is free software; you can redistribute it and/or modify
- it under the terms of Version 2 of the GNU General Public License as
- published by the Free Software Foundation.
- X
- This program is distributed WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See Version 2 of the GNU General Public License for more details.
- X
- You should have received a copy of Version 2 of the GNU General Public
- License along with this program. If not, you can FTP the license from
- prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- Section 2a of the license requires that all changes to this file be
- recorded prominently in this file. Please record all changes here.
- X
- Programmers:
- X RNW Ross N. Williams ross@spam.adelaide.edu.au
- X
- Changes:
- X 07-May-1992 RNW Program prepared for release under GNU GPL V2.
- X
- X##############################################################################*/
- X
- X
- X/******************************************************************************/
- X/* LISTER.H */
- X/******************************************************************************/
- X
- X#include "style.h"
- X
- X#include "data.h"
- X
- X/******************************************************************************/
- X
- XEXPORT void lr_ini P_((void));
- X/* Initialize the lister. Calling this function destroys all the lister */
- X/* package's old internal data structures and sets them to a well-defined */
- X/* initial state (empty) and prepares the lister for the incoming messages. */
- X/* This function may be called at any time and many times. */
- X
- XEXPORT void lr_mes P_((ps_t *,char *));
- XEXPORT void lr_war P_((ps_t *,char *));
- XEXPORT void lr_err P_((ps_t *,char *));
- XEXPORT void lr_sev P_((ps_t *,char *));
- X/* The functions above allow the user to record four different kinds of */
- X/* messages and to specify exactly where in the listing each message is to */
- X/* appear. */
- X
- XEXPORT void lr_gen P_((p_wf_t,uword));
- X/* Merges the global structure line_list with the message table stored by the */
- X/* lister package and writes the resultant listing to the p_wf_t stream. */
- X/* The second parameter is the number of lines of context around each */
- X/* diagnostic. The lister does not write the entire input file out. It only */
- X/* writes input lines near a diagnostic. The context argument specifies the */
- X/* number of lines that should be written around each diagnostic. */
- X/* Note: A context of 100 is special and means that no lines should be */
- X/* omitted in between diagnostics. */
- X
- X/******************************************************************************/
- X/* End of LISTER.H */
- X/******************************************************************************/
- X
- END_OF_FILE
- if test 3396 -ne `wc -c <'sources/lister.h'`; then
- echo shar: \"'sources/lister.h'\" unpacked with wrong size!
- fi
- # end of 'sources/lister.h'
- fi
- if test -f 'sources/main.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sources/main.c'\"
- else
- echo shar: Extracting \"'sources/main.c'\" \(4072 characters\)
- sed "s/^X//" >'sources/main.c' <<'END_OF_FILE'
- X/*##############################################################################
- X
- XFUNNNELWEB COPYRIGHT
- X====================
- XFunnelWeb is a literate-programming macro preprocessor.
- X
- Copyright (C) 1992 Ross N. Williams.
- X
- X Ross N. Williams
- X ross@spam.adelaide.edu.au
- X 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X
- This program is free software; you can redistribute it and/or modify
- it under the terms of Version 2 of the GNU General Public License as
- published by the Free Software Foundation.
- X
- This program is distributed WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See Version 2 of the GNU General Public License for more details.
- X
- You should have received a copy of Version 2 of the GNU General Public
- License along with this program. If not, you can FTP the license from
- prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- Section 2a of the license requires that all changes to this file be
- recorded prominently in this file. Please record all changes here.
- X
- Programmers:
- X RNW Ross N. Williams ross@spam.adelaide.edu.au
- X
- Changes:
- X 07-May-1992 RNW Program prepared for release under GNU GPL V2.
- X
- X##############################################################################*/
- X
- X
- X/******************************************************************************/
- X/* MAIN.C */
- X/******************************************************************************/
- X
- X#include "style.h"
- X
- X#include "as.h"
- X#include "command.h"
- X#include "data.h"
- X#include "machin.h"
- X#include "memory.h"
- X
- X/******************************************************************************/
- X
- X/* The following variables should really be local to main. However, some */
- X/* compilers have a problem with this and so it has been declared here. */
- LOCVAR char *p_comline;
- LOCVAR ulong sum_all;
- X
- X/******************************************************************************/
- X
- LOCAL void minimain P_((int,char **));
- LOCAL void minimain(argc,argv)
- X/* Some compilers generate buggy code for main() and so this minimain */
- X/* function has been created to take the heat off main(). */
- int argc;
- char **argv;
- X{
- X /* The principal concern of this main() function is to execute FunnelWeb and */
- X /* to ensure that the correct return status is returned to the OS. So it */
- X /* seems appropriate to zero all the global diagnostic counters here. */
- X sum_fat=sum_sev=sum_err=sum_war=0;
- X
- X /* Some compilers place a low limit on the total amount of statics. So we */
- X /* have to allocate space for a command line. */
- X p_comline=(char *) mm_perm((size_t) COMLINE_MAX+1);
- X
- X /* Obtaining the command line is highly machine specific and so it has been */
- X /* delegated to a function in the non-portable "machin". Just in case argc */
- X /* and argv are to be used, we hand them in too. The result of all this is a */
- X /* standard FunnelWeb command line string in the variable 'comline'. */
- X getcline(argc,argv,p_comline);
- X
- X /* Execute the command line. */
- X command(p_comline);
- X
- X /* Exit to the operating system with an appropriate status code. */
- X sum_all=sum_war+sum_err+sum_sev+sum_fat;
- X if (sum_all>0)
- X exit(EXIT_FAILURE);
- X else
- X exit(EXIT_SUCCESS);
- X}
- X
- X/******************************************************************************/
- X
- int main(argc,argv)
- int argc;
- char *argv[];
- X{
- X /* We don't put anything into the function main() because some compilers */
- X /* generate incorrect code for main, especially with local variables. */
- X minimain(argc,argv);
- X
- X /* Keep GCC warnings happy. */
- X as_bomb("Main program dropped through.");
- X return 0;
- X}
- X
- X/******************************************************************************/
- X/* End of MAIN.C */
- X/******************************************************************************/
- END_OF_FILE
- if test 4072 -ne `wc -c <'sources/main.c'`; then
- echo shar: \"'sources/main.c'\" unpacked with wrong size!
- fi
- # end of 'sources/main.c'
- fi
- if test -f 'sources/mapper.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sources/mapper.h'\"
- else
- echo shar: Extracting \"'sources/mapper.h'\" \(3520 characters\)
- sed "s/^X//" >'sources/mapper.h' <<'END_OF_FILE'
- X/*##############################################################################
- X
- XFUNNNELWEB COPYRIGHT
- X====================
- XFunnelWeb is a literate-programming macro preprocessor.
- X
- Copyright (C) 1992 Ross N. Williams.
- X
- X Ross N. Williams
- X ross@spam.adelaide.edu.au
- X 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X
- This program is free software; you can redistribute it and/or modify
- it under the terms of Version 2 of the GNU General Public License as
- published by the Free Software Foundation.
- X
- This program is distributed WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See Version 2 of the GNU General Public License for more details.
- X
- You should have received a copy of Version 2 of the GNU General Public
- License along with this program. If not, you can FTP the license from
- prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- Section 2a of the license requires that all changes to this file be
- recorded prominently in this file. Please record all changes here.
- X
- Programmers:
- X RNW Ross N. Williams ross@spam.adelaide.edu.au
- X
- Changes:
- X 07-May-1992 RNW Program prepared for release under GNU GPL V2.
- X
- X##############################################################################*/
- X
- X
- X/******************************************************************************/
- X/* MAPPER.H */
- X/******************************************************************************/
- X/* */
- X/* The mapper is the first of FunnelWeb's four front end processors: (mapper, */
- X/* scanner, parser, analyser). The sole task of the mapper is, given the */
- X/* name of a file, to create an image of that file in memory. This approach */
- X/* is not wasteful of memory at all because FunnelWeb requires random access */
- X/* to each input file at all times anyway so it can scramble the text around. */
- X/* */
- X/******************************************************************************/
- X
- X#include "style.h"
- X
- X/******************************************************************************/
- X
- XEXPORT char *map_file P_((char *,char **,ulong *));
- X/* Allocates a block of memory and places a Unix text stream representation */
- X/* (with EOL marking end of line and no character marking end of file) of the */
- X/* file 'p_name' in the block of memory. Returns a pointer to the address and */
- X/* len of the file in the mem block in the parameters (pp_mem and p_length). */
- X/* Returns NULL upon success or a pointer to an error message string upon */
- X/* failure. Note: Parameters are: p_name, pp_mem, p_length. */
- X/* Note: Allocates enough memory so that there is guaranteed to be at least */
- X/* two extra bytes of spare memory at the end of the mapped file. The */
- X/* scanner uses this space to put EOL and EOF characters. */
- X/* Note: The mapper grabs its memory using mm_temp, so it can be recycled */
- X/* as part of a call to mm_zapt. */
- X
- X/******************************************************************************/
- X/* End of MAPPER.H */
- X/******************************************************************************/
- END_OF_FILE
- if test 3520 -ne `wc -c <'sources/mapper.h'`; then
- echo shar: \"'sources/mapper.h'\" unpacked with wrong size!
- fi
- # end of 'sources/mapper.h'
- fi
- if test -f 'sources/parser.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sources/parser.h'\"
- else
- echo shar: Extracting \"'sources/parser.h'\" \(3175 characters\)
- sed "s/^X//" >'sources/parser.h' <<'END_OF_FILE'
- X/*##############################################################################
- X
- XFUNNNELWEB COPYRIGHT
- X====================
- XFunnelWeb is a literate-programming macro preprocessor.
- X
- Copyright (C) 1992 Ross N. Williams.
- X
- X Ross N. Williams
- X ross@spam.adelaide.edu.au
- X 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X
- This program is free software; you can redistribute it and/or modify
- it under the terms of Version 2 of the GNU General Public License as
- published by the Free Software Foundation.
- X
- This program is distributed WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See Version 2 of the GNU General Public License for more details.
- X
- You should have received a copy of Version 2 of the GNU General Public
- License along with this program. If not, you can FTP the license from
- prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- Section 2a of the license requires that all changes to this file be
- recorded prominently in this file. Please record all changes here.
- X
- Programmers:
- X RNW Ross N. Williams ross@spam.adelaide.edu.au
- X
- Changes:
- X 07-May-1992 RNW Program prepared for release under GNU GPL V2.
- X
- X##############################################################################*/
- X
- X
- X/******************************************************************************/
- X/* PARSER.H */
- X/******************************************************************************/
- X/* */
- X/* The FunnelWeb parser parses the tokens in the global token list and */
- X/* constructs a macro table and a document list. These two data structures */
- X/* give structured views of the input document which are used later by tangle */
- X/* and weave. If the parser detects any errors it sends them to the lister */
- X/* package. If any errors have occurred, the output of the parser should not */
- X/* be used. */
- X/* */
- X/* IN : token_list - List of tokens to be parsed. */
- X/* OUT: macro_table - Table of macros parsed. */
- X/* file_table - Table indicating which macros are attached to files. */
- X/* document_list - List giving a structured view of the document. */
- X/* Also sends diagnostic messages to the lister. */
- X/* */
- X/******************************************************************************/
- X
- X#include "style.h"
- X
- X/******************************************************************************/
- X
- XEXPORT void parser P_((void));
- X
- X/******************************************************************************/
- X/* End of PARSER.H */
- X/******************************************************************************/
- END_OF_FILE
- if test 3175 -ne `wc -c <'sources/parser.h'`; then
- echo shar: \"'sources/parser.h'\" unpacked with wrong size!
- fi
- # end of 'sources/parser.h'
- fi
- if test -f 'sources/scanner.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sources/scanner.h'\"
- else
- echo shar: Extracting \"'sources/scanner.h'\" \(3205 characters\)
- sed "s/^X//" >'sources/scanner.h' <<'END_OF_FILE'
- X/*##############################################################################
- X
- XFUNNNELWEB COPYRIGHT
- X====================
- XFunnelWeb is a literate-programming macro preprocessor.
- X
- Copyright (C) 1992 Ross N. Williams.
- X
- X Ross N. Williams
- X ross@spam.adelaide.edu.au
- X 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X
- This program is free software; you can redistribute it and/or modify
- it under the terms of Version 2 of the GNU General Public License as
- published by the Free Software Foundation.
- X
- This program is distributed WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See Version 2 of the GNU General Public License for more details.
- X
- You should have received a copy of Version 2 of the GNU General Public
- License along with this program. If not, you can FTP the license from
- prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- Section 2a of the license requires that all changes to this file be
- recorded prominently in this file. Please record all changes here.
- X
- Programmers:
- X RNW Ross N. Williams ross@spam.adelaide.edu.au
- X
- Changes:
- X 07-May-1992 RNW Program prepared for release under GNU GPL V2.
- X
- X##############################################################################*/
- X
- X
- X/******************************************************************************/
- X/* SCANNER.H */
- X/******************************************************************************/
- X/* */
- X/* This package contains the scanner. When called (though the only exported */
- X/* routine below), the scanner maps in the file whose filename is given in */
- X/* the global option.op_f_s variable. The scanner scans the file, mapping in */
- X/* any included files, and builds two lists in the global list variables */
- X/* 'line_list' and 'token_list'. The line list contains a list of the lines */
- X/* of the input. The token list contains a tokenized form of the input, which */
- X/* is used by the parser. The scanner also sends diagnostics to the lister */
- X/* package which has the effect of possibly incrementing the global error */
- X/* counters num_*. See data.h for more information on data structures. */
- X/* */
- X/******************************************************************************/
- X
- X#include "style.h"
- X
- X#include "clock.h"
- X
- X/******************************************************************************/
- X
- XEXPORT void scanner P_((p_ck_t,p_ck_t));
- X/* The arguments are first a mapper clock, and second a scanner clock. The */
- X/* scanner should turn off the scanner clock and turn on the mapper clock */
- X/* when calling the mapper. */
- X
- X/******************************************************************************/
- X/* End of SCANNER.H */
- X/******************************************************************************/
- END_OF_FILE
- if test 3205 -ne `wc -c <'sources/scanner.h'`; then
- echo shar: \"'sources/scanner.h'\" unpacked with wrong size!
- fi
- # end of 'sources/scanner.h'
- fi
- if test -f 'sources/section.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sources/section.c'\"
- else
- echo shar: Extracting \"'sources/section.c'\" \(4315 characters\)
- sed "s/^X//" >'sources/section.c' <<'END_OF_FILE'
- X/*##############################################################################
- X
- XFUNNNELWEB COPYRIGHT
- X====================
- XFunnelWeb is a literate-programming macro preprocessor.
- X
- Copyright (C) 1992 Ross N. Williams.
- X
- X Ross N. Williams
- X ross@spam.adelaide.edu.au
- X 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X
- This program is free software; you can redistribute it and/or modify
- it under the terms of Version 2 of the GNU General Public License as
- published by the Free Software Foundation.
- X
- This program is distributed WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See Version 2 of the GNU General Public License for more details.
- X
- You should have received a copy of Version 2 of the GNU General Public
- License along with this program. If not, you can FTP the license from
- prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- Section 2a of the license requires that all changes to this file be
- recorded prominently in this file. Please record all changes here.
- X
- Programmers:
- X RNW Ross N. Williams ross@spam.adelaide.edu.au
- X
- Changes:
- X 07-May-1992 RNW Program prepared for release under GNU GPL V2.
- X
- X##############################################################################*/
- X
- X
- X/******************************************************************************/
- X/* SECTION.C */
- X/******************************************************************************/
- X
- X#include "style.h"
- X
- X#include "as.h"
- X#include "section.h"
- X
- X/******************************************************************************/
- X
- X#define MAGIC (89201129L) /* Magic number detects uninitialized sections. */
- X#define SECMAX (30000L) /* Maximum value of a single level's section num. */
- X
- X/******************************************************************************/
- X
- LOCAL void sn_chk P_((p_sn_t));
- LOCAL void sn_chk(p_sn)
- X/* Checks that the given section object has a legal internal state. */
- p_sn_t p_sn;
- X{
- X ubyte i;
- X
- X as_cold(p_sn->sn_magic==MAGIC,"sn_chk: Section has bad magic number.");
- X as_cold(p_sn->sn_lev<=SECLEV_MAX,
- X "sn_chk: Section has bad level number.");
- X for (i=1;i<=p_sn->sn_lev;i++)
- X as_cold(p_sn->sn_num[i]>0,
- X "sn_chk: Section has zero hierarchical number.");
- X}
- X
- X/******************************************************************************/
- X
- XEXPORT void sn_ini(p_sn)
- p_sn_t p_sn;
- X{
- X p_sn->sn_magic = MAGIC;
- X p_sn->sn_lev = 0;
- X}
- X
- X/******************************************************************************/
- X
- XEXPORT void sn_set(p_sn,level)
- p_sn_t p_sn;
- ubyte level;
- X{
- X ubyte i;
- X sn_chk(p_sn);
- X as_cold(level>0 && level<=SECLEV_MAX,
- X "sn_set: Specified level is too high.");
- X p_sn->sn_lev=level;
- X for(i=1;i<=level;i++)
- X p_sn->sn_num[i]=1;
- X}
- X
- X/******************************************************************************/
- X
- XEXPORT void sn_inc (p_sn,lev)
- p_sn_t p_sn;
- ubyte lev;
- X{
- X sn_chk(p_sn);
- X
- X /* Check the parameter level. */
- X as_cold(1<=lev && lev<=SECLEV_MAX,"sn_inc: Bad level number specified.");
- X
- X /* Check that we are not skipping a hierarchical level. */
- X as_cold(lev<=p_sn->sn_lev+1,"sn_inc: Discountinuous level increment.");
- X
- X /* Actually increment the section. */
- X if (lev==p_sn->sn_lev+1) p_sn->sn_num[lev]=0;
- X p_sn->sn_lev=lev;
- X p_sn->sn_num[lev]++;
- X
- X /* Check that the section number hasn't got too big. */
- X as_cold(p_sn->sn_num[lev]<=SECMAX,"sn_inc: Section number is too large.");
- X}
- X
- X/******************************************************************************/
- X
- XEXPORT ubyte sn_lev(p_sn)
- p_sn_t p_sn;
- X{
- X sn_chk(p_sn);
- X return p_sn->sn_lev;
- X}
- X
- X/******************************************************************************/
- X
- XEXPORT void sn_str(p_sn,s)
- p_sn_t p_sn;
- char *s;
- X{
- X char t[20];
- X ubyte i;
- X
- X sn_chk(p_sn);
- X
- X s[0]=EOS;
- X for (i=1;i<=p_sn->sn_lev;i++)
- X {
- X if (i>1) strcat(s,".");
- X sprintf(t,"%u",(unsigned) p_sn->sn_num[i]);
- X strcat(s,t);
- X }
- X}
- X
- X/******************************************************************************/
- X/* End of SECTION.C */
- X/******************************************************************************/
- X
- END_OF_FILE
- if test 4315 -ne `wc -c <'sources/section.c'`; then
- echo shar: \"'sources/section.c'\" unpacked with wrong size!
- fi
- # end of 'sources/section.c'
- fi
- if test -f 'sources/tangle.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sources/tangle.h'\"
- else
- echo shar: Extracting \"'sources/tangle.h'\" \(2395 characters\)
- sed "s/^X//" >'sources/tangle.h' <<'END_OF_FILE'
- X/*##############################################################################
- X
- XFUNNNELWEB COPYRIGHT
- X====================
- XFunnelWeb is a literate-programming macro preprocessor.
- X
- Copyright (C) 1992 Ross N. Williams.
- X
- X Ross N. Williams
- X ross@spam.adelaide.edu.au
- X 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X
- This program is free software; you can redistribute it and/or modify
- it under the terms of Version 2 of the GNU General Public License as
- published by the Free Software Foundation.
- X
- This program is distributed WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See Version 2 of the GNU General Public License for more details.
- X
- You should have received a copy of Version 2 of the GNU General Public
- License along with this program. If not, you can FTP the license from
- prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- Section 2a of the license requires that all changes to this file be
- recorded prominently in this file. Please record all changes here.
- X
- Programmers:
- X RNW Ross N. Williams ross@spam.adelaide.edu.au
- X
- Changes:
- X 07-May-1992 RNW Program prepared for release under GNU GPL V2.
- X
- X##############################################################################*/
- X
- X
- X/******************************************************************************/
- X/* TANGLE.H */
- X/******************************************************************************/
- X/* */
- X/* This package exports a single function "tangle" that generates all the */
- X/* product files for FunnelWeb. */
- X/* */
- X/******************************************************************************/
- X
- X#include "style.h"
- X
- X/******************************************************************************/
- X
- XEXPORT void tangle P_((void));
- X/* Generate product files. */
- X
- X/******************************************************************************/
- X/* End of TANGLE.H */
- X/******************************************************************************/
- END_OF_FILE
- if test 2395 -ne `wc -c <'sources/tangle.h'`; then
- echo shar: \"'sources/tangle.h'\" unpacked with wrong size!
- fi
- # end of 'sources/tangle.h'
- fi
- if test -f 'sources/weave.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sources/weave.h'\"
- else
- echo shar: Extracting \"'sources/weave.h'\" \(2364 characters\)
- sed "s/^X//" >'sources/weave.h' <<'END_OF_FILE'
- X/*##############################################################################
- X
- XFUNNNELWEB COPYRIGHT
- X====================
- XFunnelWeb is a literate-programming macro preprocessor.
- X
- Copyright (C) 1992 Ross N. Williams.
- X
- X Ross N. Williams
- X ross@spam.adelaide.edu.au
- X 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X
- This program is free software; you can redistribute it and/or modify
- it under the terms of Version 2 of the GNU General Public License as
- published by the Free Software Foundation.
- X
- This program is distributed WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See Version 2 of the GNU General Public License for more details.
- X
- You should have received a copy of Version 2 of the GNU General Public
- License along with this program. If not, you can FTP the license from
- prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- Section 2a of the license requires that all changes to this file be
- recorded prominently in this file. Please record all changes here.
- X
- Programmers:
- X RNW Ross N. Williams ross@spam.adelaide.edu.au
- X
- Changes:
- X 07-May-1992 RNW Program prepared for release under GNU GPL V2.
- X
- X##############################################################################*/
- X
- X
- X/******************************************************************************/
- X/* WEAVE.H */
- X/******************************************************************************/
- X/* */
- X/* This package exports a single function "weave" that generates the typeset */
- X/* output file. */
- X/* */
- X/******************************************************************************/
- X
- X#include "style.h"
- X
- X/******************************************************************************/
- X
- XEXPORT void weave P_((void));
- X
- X/******************************************************************************/
- X/* End of WEAVE.H */
- X/******************************************************************************/
- END_OF_FILE
- if test 2364 -ne `wc -c <'sources/weave.h'`; then
- echo shar: \"'sources/weave.h'\" unpacked with wrong size!
- fi
- # end of 'sources/weave.h'
- fi
- if test -f 'tests/ex16.fw' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tests/ex16.fw'\"
- else
- echo shar: Extracting \"'tests/ex16.fw'\" \(2150 characters\)
- sed "s/^X//" >'tests/ex16.fw' <<'END_OF_FILE'
- X@!---------------------------------------!
- X@! Start of FunnelWeb Example .fw File !
- X@!---------------------------------------!
- X
- X@t vskip 40 mm
- X@t title titlefont centre "Powers:"
- X@t title titlefont centre "An Example of"
- X@t title titlefont centre "A Short"
- X@t title titlefont centre "FunnelWeb .fw File"
- X@t vskip 10 mm
- X@t title smalltitlefont centre "by Ross Williams"
- X@t title smalltitlefont centre "26 January 1992"
- X@t vskip 20 mm
- X@t table_of_contents
- X
- X@A@<FunnelWeb Example Program@>
- X
- This program writes out each of the first @{p@} powers of the first @{n@}
- integers. These constant parameters are located here so that they are easy to
- change.
- X
- X@$@<Constants@>==@{@-
- n : constant natural := 10; -- How many numbers? (Ans: [1,n]).
- p : constant natural := 5; -- How many powers? (Ans: [1,p]).@}
- X
- X@B Here is the outline of the program. This FunnelWeb file generates a single
- Ada output file called @{Power.ada@}. The main program consists of a loop that
- iterates once for each number to be written out.
- X
- X@O@<ex16.out@>==@{@-
- X@<Pull in packages@>
- X
- procedure example is
- X @<Constants@>
- begin -- example
- X for i in 1..n loop
- X @<Write out the first p powers of i on a single line@>
- X end loop;
- end example;
- X@}
- X
- X@B In this section, we pull in the packages that this program needs to run. In
- fact, all we need is the IO package so that we can write out the results. To use
- the IO package, we first of all need to haul it in (@{with text_io@}) and then
- we need to make all its identifiers visible at the top level (@{use text_io@}).
- X
- X@$@<Pull in packages@>==@{with text_io; use text_io;@}
- X
- X@B Here is the bit that writes out the first @{p@} powers of @{i@}. The power
- values are calculated incrementally in @{ip@} to avoid the use of the
- exponentiation operator.
- X
- X@$@<Write out the first p powers of i on a single line@>==@{@-
- declare
- X ip : natural := 1;
- begin
- X for power in 1..p loop
- X ip:=ip*i;
- X put(natural'image(ip) & " ");
- X end loop;
- X new_line;
- end;@}
- X
- X@!---------------------------------------!
- X@! End of FunnelWeb Example .fw File !
- X@!---------------------------------------!
- END_OF_FILE
- if test 2150 -ne `wc -c <'tests/ex16.fw'`; then
- echo shar: \"'tests/ex16.fw'\" unpacked with wrong size!
- fi
- # end of 'tests/ex16.fw'
- fi
- if test -f 'tests/generate.fw' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tests/generate.fw'\"
- else
- echo shar: Extracting \"'tests/generate.fw'\" \(2192 characters\)
- sed "s/^X//" >'tests/generate.fw' <<'END_OF_FILE'
- Generate.Web
- X============
- Some of the FunnelWeb tests require input files that contain control
- characters, improperly terminated lines, and other special constructs
- designed to test FunnelWeb's capacity to deal with anything that could
- arise in an input text file.
- X
- Unfortunately, by their very nature, these constructs tend to be vulnerable
- to file transfer programs and other utilities (e.g. FIXEOLS!) that take it
- upon themselves to "fix up" various problems with text files.
- X
- The solution adopted here is to totally avoid the problem by using FunnelWeb
- itself to generate these awkward test files. The following output file
- macro definitions achieve this.
- X
- This FunnelWeb file should be fed into FunnelWeb before testing begins.
- X
- X@!------------------------------------------------------------------------------
- X
- X@O@<sc06.fw@>==@{@-
- SC06: Test FunnelWeb on a file whose last line is not terminated properly
- with an end of line marker.
- X
- Here is the improper termination!---->@}
- X
- X@!------------------------------------------------------------------------------
- X
- X@O@<sc08.fw@>==@{@-
- SC08: Detection of trailing spaces.
- X
- This line has zero trailing spaces |
- This line has one trailing space | @+@-
- This line has two trailing spaces | @+@-
- This line has three trailing spaces | @+@-
- X@}
- X
- X@!------------------------------------------------------------------------------
- X
- X@O@<sc09.fw@>==@{@-
- SC09: Detection of control characters.
- X
- SC09.1 Test that control characters are detected and replaced by "?".
- SC09.2 Test non printable that has a mnemonic.
- X
- There is a tab between these two bars |@^D(009)| which should come out as "?".
- The above error message should contain the mnemonic "HT".
- X
- SC09.3 Test non printable that has no mnemonic.
- X
- There is a non-mnemonic control character between these bars |@^D(234)|.
- X@}
- X
- X@!------------------------------------------------------------------------------
- X
- X@O@<sc13e.fwi@>==@{@-
- This is the include file for test SC13e. The test is to see how FunnelWeb
- copes with an include file that has an improperly terminated last line.
- X
- Here is the improper termination!---->@}
- X
- X@!------------------------------------------------------------------------------
- END_OF_FILE
- if test 2192 -ne `wc -c <'tests/generate.fw'`; then
- echo shar: \"'tests/generate.fw'\" unpacked with wrong size!
- fi
- # end of 'tests/generate.fw'
- fi
- if test -f 'tests/hi09.fw' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tests/hi09.fw'\"
- else
- echo shar: Extracting \"'tests/hi09.fw'\" \(2869 characters\)
- sed "s/^X//" >'tests/hi09.fw' <<'END_OF_FILE'
- HI09: This example demonstrates how FunnelWeb can be used to create generics
- X in languages that do not already provide them.
- X
- X@! We have to set the output line length limit up to cater for Barry Dwyer's
- X@! rather horizontal coding style.
- X@p maximum_output_line_length = 100
- X
- X@O@<hi09.out@>==@{
- X@<Generic Set Module@>@(NaryTree@,NaryTreeSet@)
- X@}
- X
- X@$@<Generic Set Module@>@(@2@)==@{@-
- X@! @1 is the base type, @2 is the set type.
- X[inherit ('@1'), environment ('@2')]
- X
- module @2;
- X
- type @2 = ^@2Record;
- X @2Record = record
- X Member: @1;
- X Next: @2;
- X end;
- X
- procedure Null@2 (var Result: @2);
- begin new (Result);
- Result^.Member := (- MaxInt)::@1;
- Result^.Next := nil end;
- X
- function IsNull@2 (S: @2): boolean;
- begin IsNull@2 := S^.Member::integer = - MaxInt end;
- X
- procedure ForEach@1 (S: @2; procedure DoIt (i: @1));
- var ThisS, NextS: @2;
- begin ThisS := S;
- while ThisS^.Member::integer <> - MaxInt do
- X begin NextS := ThisS^.Next;
- X DoIt (ThisS^.Member);
- X ThisS := NextS end;
- end;
- X
- function First@1 (S: @2): @1;
- begin First@1 := S^.Member end;
- X
- function Is@1InSet (i: @1; S: @2): boolean;
- X procedure TestEquals (j: @1);
- X begin if Equal@1 (i, j) then Is@1InSet := true; end;
- begin Is@1InSet := false; ForEach@1 (S, TestEquals); end;
- X
- function Includes@2 (S1, S2: @2): boolean;
- var Result: boolean;
- X procedure TestIfInS1 (i: @1);
- X begin if Result then if not Is@1InSet (i, S1) then Result := false; end;
- begin Result := true;
- XForEach@1 (S2, TestIfInS1);
- Includes@2 := Result end;
- X
- function Disjoint@2s (S1, S2: @2): boolean;
- var Result: boolean;
- X procedure TestIfInS1 (i: @1);
- X begin if Result then if Is@1InSet (i, S1) then Result := false; end;
- begin Result := true;
- XForEach@1 (S2, TestIfInS1);
- Disjoint@2s := Result end;
- X
- function Equal@2 (S1, S2: @2): boolean;
- begin
- XEqual@2 := Includes@2 (S1, S2) and Includes@2 (S2, S1);
- end;
- X
- procedure Insert@1 (i: @1; var S: @2);
- var This, Pred, Succ: @2;
- begin
- if not Is@1InSet (i, S) then
- X begin
- X Pred := nil; Succ := S;
- X while Succ^.Member::integer > i::integer do begin
- X Pred := Succ; Succ := Succ^.Next end;
- X if Succ^.Member::integer < i::integer then begin
- X new (This); This^.Next := Succ; This^.Member := i;
- X if Pred <> nil then Pred^.Next := This else S := This;
- X end;
- X end;
- end;
- X
- procedure Insert@1s (S1: @2; var S2: @2);
- var This, Pred, Succ: @2;
- X procedure Add@1 (i: @1);
- X begin Insert@1 (i, S2) end;
- begin
- XForEach@1 (S1, Add@1);
- end;
- X
- procedure Remove@1 (i: @1; var S: @2);
- var Pred, This: @2;
- begin
- Pred := nil; This := S;
- while not Equal@1 (This^.Member, i) do begin
- X Pred := This; This := This^.Next end;
- if Pred <> nil then Pred^.Next := This^.Next else S := This^.Next;
- Dispose (This);
- end;
- X
- procedure Dispose@2 (var S: @2);
- var Old: @2;
- begin
- while S <> nil do begin Old := S; S := S^.Next; Dispose (Old) end;
- end;
- X
- end.
- X@}
- X
- END_OF_FILE
- if test 2869 -ne `wc -c <'tests/hi09.fw'`; then
- echo shar: \"'tests/hi09.fw'\" unpacked with wrong size!
- fi
- # end of 'tests/hi09.fw'
- fi
- if test -f 'tests/hi10.fw' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tests/hi10.fw'\"
- else
- echo shar: Extracting \"'tests/hi10.fw'\" \(2635 characters\)
- sed "s/^X//" >'tests/hi10.fw' <<'END_OF_FILE'
- HI10: This example gives examples of heavily and lightly documented pieces
- X of code.
- X
- X@O@<hi10.out@>==@{
- X@<Set p to the length of the longest plateau in sorted array b[1..N]@>
- X
- X@<Function comp@>
- X@}
- X
- X@A@<Calculation of the longest plateau in array b@>
- X
- This section contains a solution to a problem outlined in section 16.3 of
- the book @/The Science of Programming@/ by David Gries[Gries81].
- X
- X@B Given a sorted array @{b[1..N]@} of integers, we wish to determine the
- X@/length@/ of the longest run of identically valued elements in the array.
- This problem is defined by the following precondition and postcondition.
- X
- X@$@<Precondition@>==@{/* Pre: sorted(b). */@}
- X@$@<Postcondition@>==@{@-
- X/* Post: sorted(b) and p is the length of the longest run in b[1..N]. */@}
- X
- X@B We approach a solution to the problem by deciding to try the approach of
- scanning through the array one element at a time maintaining a useful
- invariant through each iteration. A loop variable
- array index @{i@} is created for this purpose. The bound function is
- X@{N-i@}. Here is the invariant.
- X
- X@$@<Invariant@>==@{@-
- X/* Invariant: sorted(b) and 1<=i<=N and */
- X/* p is len of longest run in b[1..i]. */@}
- X
- X@B Establishing the invariant above in the initial, degenerate case is easy.
- X
- X@$@<Establish the plateau loop invariant initially@>==@{i=1; p=1;@}
- X
- X@B At this stage, we have the following loop structure. Note that when both
- the invariant and @{i != N@} are true, the postcondition holds and the loop
- can terminate.
- X
- X@$@<Set p to the length of the longest plateau in sorted array b[1..N]@>==@{@-
- X@<Precondition@>
- X@<Establish the plateau loop invariant initially@>
- while (i != N)
- X {
- X @<Invariant@>
- X @<Loop body@>
- X }
- X@<Postcondition@>
- X@}
- X
- X@B Now there remains only the loop body whose sole task is to increase @{i@}
- X(and so decrease the value of the bound function) while maintaining the
- invariant. If @{p@} is the length of the longest run
- seen so far (i.e. in b[1..i]), then, because the array is sorted,
- the extension of our array range to
- X@{b[1..i+1]@} can only result in an increase in @{p@} if the new element
- terminates a run of length @{p+1@}. The increase can be at most 1. Because
- the array is sorted, we need
- only compare the endpoints of this possible run to see if it exists. This
- is performed as shown below.
- X
- X@$@<Loop body@>==@{i++; if (b[i] != b[i-p]) p++;@}
- X
- X
- X
- X
- X
- X@A The following function compares two C~strings and returns TRUE iff they
- are identical.
- X
- X@$@<Function comp@>==@{@-
- bool comp(p,q)
- char *p,*q;
- X{
- X while (TRUE)
- X {
- X if (*p != *q ) return FALSE;
- X if (*p == '\0') return TRUE;
- X p++; q++;
- X }
- X}
- X@}
- END_OF_FILE
- if test 2635 -ne `wc -c <'tests/hi10.fw'`; then
- echo shar: \"'tests/hi10.fw'\" unpacked with wrong size!
- fi
- # end of 'tests/hi10.fw'
- fi
- if test -f 'tests/pr08.fw' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tests/pr08.fw'\"
- else
- echo shar: Extracting \"'tests/pr08.fw'\" \(2839 characters\)
- sed "s/^X//" >'tests/pr08.fw' <<'END_OF_FILE'
- PR08: Test semantic checking of macro definitions.
- X
- Trip parser to be sure that we won't get any output files!
- X@>
- X
- X1. File macro has parameters. Error.
- X@O@<Sloth 1@>@(@3@)@{Walrus@}
- X@A@<Error recovery point@>
- X
- X2. File macro is additive. Error.
- X@O@<Sloth 2@>+=@{Walrus@}
- X@A@<Error recovery point@>
- X
- X3. File macro has too long a name. The test name has 1200 characters. Err.
- Note: This test can't test the error message if the maximum length of a
- macro name is less than the maximum length of a file name as the name
- error is caught first.
- X@p maximum_input_line_length = infinity
- X@O@<1234567890(elided by comp.sources.unix moderator)1234567890@>@{@}
- X@A@<Error recovery point@>
- X
- X4. File macro has zero or many attributes. Error.
- X@O@<Sloth 3@>@Z@{Walrus@}
- X@A@<Error recovery point@>
- X
- X@O@<Sloth 4@>@M@{Walrus@}
- X@A@<Error recovery point@>
- X
- X@O@<Sloth 5@>@Z@M@{Walrus@}
- X@A@<Error recovery point@>
- X
- X5. Previous definition is full, current is additive.
- X@$@<Walrus 1@>==@{Sloth@}
- X@$@<Walrus 1@>+=@{Aardvark@}
- X@A@<Error recovery point@>
- X
- X6. Previous definition is additive, current is full.
- X@$@<Walrus 2@>+=@{Sloth@}
- X@$@<Walrus 2@>==@{Aardvark@}
- X@A@<Error recovery point@>
- X
- X7. Non-first body part of partial has parameter.
- X@$@<Unicorn@>@(@3@)+=@{Turkey@}
- X@$@<Unicorn@>@(@3@)+=@{Turkey@}
- X@A@<Error recovery point@>
- X
- X8. Zero or many attributes on non-first body part of additive.
- X@$@<Elephant@>@Z@M+=@{Turkey@}
- X@$@<Elephant@>@Z@M+=@{Turkey@}
- X@A@<Error recovery point@>
- X
- X9. Check that non-existent formal parameters are caught.
- X
- X@$@<Zero@>@Z@{Sloth@1Walrus@}
- X@A@<Error recovery point@>
- X
- X@$@<One@>@(@1@)@Z@{Sloth@2Walrus@}
- X@A@<Error recovery point@>
- X
- X@$@<Many@>@(@7@)@Z@{Sloth@8Walrus@}
- X@A@<Error recovery point@>
- END_OF_FILE
- if test 2839 -ne `wc -c <'tests/pr08.fw'`; then
- echo shar: \"'tests/pr08.fw'\" unpacked with wrong size!
- fi
- # end of 'tests/pr08.fw'
- fi
- if test -f 'tests/pr09.fw' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tests/pr09.fw'\"
- else
- echo shar: Extracting \"'tests/pr09.fw'\" \(2046 characters\)
- sed "s/^X//" >'tests/pr09.fw' <<'END_OF_FILE'
- PR09: Test calls and actual parameter lists.
- X
- XFirst trip up the parser so we don't get any further.
- X@>
- X
- Now define some macros to call. No error.
- X
- X@$@<Zero@>@{@}
- X@$@<One@>@(@1@)@{@}
- X@$@<Two@>@(@2@)@{@}
- X@$@<Three@>@(@3@)@{@}
- X@$@<Nine@>@(@9@)@{@}
- X@$@#"@{@}
- X
- The following test calls should NOT generate any errors.
- X
- X@$@<Macro containing the test macro calls.@>==@{
- X1. Test macro call with no parameter list.
- X@<Zero@>
- X
- X2. Test macro call with quick name.
- X@#"
- X
- X3. Test macro call with one parameter.
- X@<One@>@(Toucan@)
- X
- X4. Test macro call with many parameters.
- X@<Two@>@(Toucan@,Teapot@)
- X@<Three@>@(Toucan@,Teapot@,Walrus@)
- X@<Nine@>@(Toucan@,Teapot@,Walrus@,
- X Toucan@,Teapot@,Walrus@,
- X Toucan@,Teapot@,Walrus@)
- X
- X5. Test macro calls with double quotes on parameters.
- X@<One@>@( @"Toucan@"@)
- X@<Two@>@(@"Toucan@" @, @"Teapot@"@)
- X@<Three@>@(@"Toucan@" @,
- X @"Teapot@" @,
- X @"Walrus@" @)
- X@<Nine@>@( @"Toucan@" @, @"Teapot@" @, @"Walrus@" @,
- X @"Toucan@" @, @"Teapot@" @, @"Walrus@" @,
- X @"Toucan@" @, @"Teapot@" @, @"Walrus@" @)
- X
- X7. Test macro calls with mixed double quotes on parameters.
- X@<Two@>@(@"Toucan@" @,Teapot@)
- X@<Three@>@(@"Toucan@" @,
- X @"Teapot@" @,Walrus@)
- X@<Nine@>@( @"Toucan@" @, @"Teapot@" @, Walrus @,
- X @"Toucan@" @, Teapot @, @"Walrus@" @,
- X @"Toucan@" @, @"Teapot@" @, @"Walrus@" @)
- X
- X@} @! End of macro definition enclosing all these legal tests.
- X
- X8. Test macro calls with a variety of syntax errors in parameter list.
- X@$@<Error1@>@{
- X@<Zero@>@(
- X@}
- X@A@<Error recovery point@>
- X
- X@$@<Error2@>@{
- X@<Zero@>@)
- X@}
- X@A@<Error recovery point@>
- X
- X@$@<Error3@>@{
- X@<One@>@(@"Toucan@)
- X@}
- X@A@<Error recovery point@>
- X
- X@$@<Error4@>@{
- X@<One@>@(@"Toucan@"@"Sloth@"@)
- X@}
- X@A@<Error recovery point@>
- X
- X@$@<Error5@>@{
- X@<Two@>@(@"Toucan@"Teapot@)
- X@}
- X@A@<Error recovery point@>
- X
- X@$@<Error6@>@{
- X@<Two@>@(@"Toucan@"Teapot
- X@}
- X@A@<Error recovery point@>
- X
- X@$@<Error7@>@{
- X@<Two@>@(@"Toucan@"Teapot
- X@<Three@>@(Toucan@,
- X @"Teapot@,Walrus
- X
- X@}
- X@A@<Error recovery point@>
- X
- END_OF_FILE
- if test 2046 -ne `wc -c <'tests/pr09.fw'`; then
- echo shar: \"'tests/pr09.fw'\" unpacked with wrong size!
- fi
- # end of 'tests/pr09.fw'
- fi
- if test -f 'tests/sc10.fw' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tests/sc10.fw'\"
- else
- echo shar: Extracting \"'tests/sc10.fw'\" \(4058 characters\)
- sed "s/^X//" >'tests/sc10.fw' <<'END_OF_FILE'
- Scanner Test: Special Sequence Recognition
- X==========================================
- This test tests to see that FunnelWeb is recognising the full set of special
- sequences.
- X
- Turn Off the Parser
- X-------------------
- XFirst we cause a deliberate scanner error so as to prevent the parser from
- generating lots of errors over the syntactic rubbish presented here.
- X
- X @
- X
- List of All Possible Special Sequences
- X--------------------------------------
- The following is a list of the default special character followed by each of
- the ASCII printables.
- X000 to 031 are unprintable control characters.
- X
- X032 @ - ILLEGAL. (Note: Hyphen is needed to avoid trailing blanks error.)
- X033 @! - Comment.
- X034 @" - Parameter delimeter.
- X035 @#X - Short name sequence.
- X@$ 036 - Define macro. Has to be at start of line.
- X037 @% - ILLEGAL.
- X038 @& - ILLEGAL.
- X039 @' - ILLEGAL.
- X040 @( - Open parameter list.
- X041 @) - Close parameter list.
- X042
- X@* - Old fashioned section marker (has to be at start of a line.).
- X043 @+ - Insert newline.
- X044 @, - Parameter separator.
- X045 @-
- X - Ignore end of line marker (has to be at end of line).
- X046 @. - ILLEGAL.
- X047 @/ - Emphasised text.
- X048 @0 - ILLEGAL.
- X049 @1 - Formal parameter 1.
- X050 @2 - Formal parameter 2.
- X051 @3 - Formal parameter 3.
- X052 @4 - Formal parameter 4.
- X053 @5 - Formal parameter 5.
- X054 @6 - Formal parameter 6.
- X055 @7 - Formal parameter 7.
- X056 @8 - Formal parameter 8.
- X057 @9 - Formal parameter 9.
- X058 @: - ILLEGAL.
- X059 @; - ILLEGAL.
- X060 @< - Open macro name.
- X061 @=@ - Set special character.
- X062 @> - Close macro name.
- X063 @? - ILLEGAL.
- X064 @@ - Insert special character into text.
- X@A 065 - New section (level 1). Must be at start of a line.
- X@B 066 - New section (level 2). Must be at start of a line.
- X@C 067 - New section (level 3). Must be at start of a line.
- X@D 068 - New section (level 4). Must be at start of a line.
- X@E 069 - New section (level 5). Must be at start of a line.
- X070 @F - ILLEGAL.
- X071 @G - ILLEGAL.
- X072 @H - ILLEGAL.
- X073 @I - Include file. Will provoke an error here though.
- X074 @J - ILLEGAL.
- X075 @K - ILLEGAL.
- X076 @L - ILLEGAL.
- X077 @M - Tags macro as being allowed to be called many times.
- X078 @N - ILLEGAL.
- X@O 079 - New macro attached to output file. Has to be at start of line.
- X080 @P - Pragma. Will cause error here though.
- X081 @Q - ILLEGAL.
- X082 @R - ILLEGAL.
- X083 @S - ILLEGAL.
- X084 @T - Typesetter directive. Will cause an error here though.
- X085 @U - ILLEGAL.
- X086 @V - ILLEGAL.
- X087 @W - ILLEGAL.
- X088 @X - ILLEGAL.
- X089 @Y - ILLEGAL.
- X090 @Z - Tags macro as being allowed to be called zero times.
- X091 @[ - ILLEGAL.
- X092 @\ - ILLEGAL.
- X093 @] - ILLEGAL.
- X094 @^D(065) - Insert control character into text
- X095 @_ - ILLEGAL.
- X096 @` - ILLEGAL.
- X@a 097 - New section (level 1). Must be at start of a line.
- X@b 098 - New section (level 1). Must be at start of a line.
- X@c 099 - New section (level 1). Must be at start of a line.
- X@d 100 - New section (level 1). Must be at start of a line.
- X@e 101 - New section (level 1). Must be at start of a line.
- X102 @f - ILLEGAL.
- X103 @g - ILLEGAL.
- X104 @h - ILLEGAL.
- X105 @i - Include file. Will provoke an error here though.
- X106 @j - ILLEGAL.
- X107 @k - ILLEGAL.
- X108 @l - ILLEGAL.
- X109 @m - Tags macro as being allowed to be called many times.
- X110 @n - ILLEGAL.
- X@O 111 - New macro attached to output file. Has to be at start of line.
- X112 @p - Pragma. Will cause error here though.
- X113 @q - ILLEGAL.
- X114 @r - ILLEGAL.
- X115 @s - ILLEGAL.
- X116 @t - Typesetter directive. Will cause an error here though.
- X117 @u - ILLEGAL.
- X118 @v - ILLEGAL.
- X119 @w - ILLEGAL.
- X120 @x - ILLEGAL.
- X121 @y - ILLEGAL.
- X122 @z - Tags macro as being allowed to be called zero times.
- X123 @{ - Open macro body.
- X124 @| - ILLEGAL.
- X125 @} - Close macro body.
- X126 @~ - ILLEGAL.
- X127 to 255 are not standard printable ASCII characters.
- END_OF_FILE
- if test 4058 -ne `wc -c <'tests/sc10.fw'`; then
- echo shar: \"'tests/sc10.fw'\" unpacked with wrong size!
- fi
- # end of 'tests/sc10.fw'
- fi
- if test -f 'tests/sc11.fw' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tests/sc11.fw'\"
- else
- echo shar: Extracting \"'tests/sc11.fw'\" \(2773 characters\)
- sed "s/^X//" >'tests/sc11.fw' <<'END_OF_FILE'
- SC11: Syntax of the include pragma.
- X
- X1. Test include pragma not at start of line.
- X
- X @i
- X
- X2. Test ATi not followed by a blank.
- X
- X@ix
- X
- X3. Test include filename is too long. The maximum on the Macintosh is
- X 255 but we will use a filename of over 1024 characters so as to make
- X the test portable. The actual length used is 1100 characters in the
- X filename.
- X
- X 1 (elided by comp.sources.unix moderator)7 8 9 0
- X@i 1234567890(elided by comp.sources.unix moderator)1234567890
- X
- X4. Include pragma has an empty filename. Note: Because the ATi has to be
- X followed by a blank, we have to incur a trailing blank error here in
- X order to provoke the error we really want to see.
- X
- X@i
- X
- END_OF_FILE
- if test 2773 -ne `wc -c <'tests/sc11.fw'`; then
- echo shar: \"'tests/sc11.fw'\" unpacked with wrong size!
- fi
- # end of 'tests/sc11.fw'
- fi
- if test -f 'userman/u_manual.log' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'userman/u_manual.log'\"
- else
- echo shar: Extracting \"'userman/u_manual.log'\" \(4136 characters\)
- sed "s/^X//" >'userman/u_manual.log' <<'END_OF_FILE'
- This is TeX, Version 3.0 (preloaded format=lplain 90.9.16) 27 MAY 1992 15:26
- X**&LaTeX u_manual.tex
- X(u_manual.tex
- LaTeX Version 2.09 <13 Jun 1989>
- X(:TeX-inputs:book.sty
- Document Style `book' <24 May 89>.
- X(:TeX-inputs:bk10.sty)
- X\descriptionmargin=\dimen99
- X\c@part=\count78
- X\c@chapter=\count79
- X\c@section=\count80
- X\c@subsection=\count81
- X\c@subsubsection=\count82
- X\c@paragraph=\count83
- X\c@subparagraph=\count84
- X\c@figure=\count85
- X\c@table=\count86
- X) (:TeX-inputs:titlepage.sty) [0
- X
- X
- X]
- X\@indexfile=\write3
- X
- Writing index file u_manual.idx
- X(u_manual.aux)
- X(u_ch0.tex [1] [2
- X
- X] (u_manual.toc [3] [4] [5] [6])
- X\tf@toc=\write4
- X [7] [8
- X
- X] [9] [10
- X
- X]
- Underfull \hbox (badness 10000) in paragraph at lines 137--140
- X[]\tenrm Thanks to \tenbf Barry Dwyer[][] \tenrm (\tentt dwyer@cs.adelaide.edu.
- au\tenrm ) and \tenbf Roger Bris-senden[][]
- X
- X\hbox(7.5+2.5)x426.79134, glue set 5.25278
- X.\hbox(0.0+0.0)x0.0
- X.\tenrm T
- X.\tenrm h
- X.\tenrm a
- X.\tenrm n
- X.etc.
- X
- X[11] [12
- X
- X]
- Underfull \hbox (badness 5652) in paragraph at lines 163--169
- X[]\tenbf Typesetting: \tenrm This[] doc-u-ment was pre-pared by the au-thor us-
- ing An-drew Trevor-
- X
- X\hbox(6.94444+1.94444)x426.79134, glue set 3.83969
- X.\hbox(0.0+0.0)x0.0
- X.\tenbf T
- X.\kern-0.31944
- X.\tenbf y
- X.\tenbf p
- X.etc.
- X
- X
- Underfull \hbox (badness 1117) in paragraph at lines 163--169
- X\tenrm row's[][] (\tentt akt150@cscgpo.anu.edu.au\tenrm ) im-ple-men-ta-tion (O
- z-TeX[]) of the T[]X/L[]T[]X\tenbf [Knuth84][]
- X
- X\hbox(7.5+3.01385)x426.79134, glue set 2.23746
- X.\tenrm r
- X.\tenrm o
- X.\kern-0.27779
- X.\tenrm w
- X.\tenrm '
- X.etc.
- X
- X) (u_ch1.tex [13] [14
- X
- X]
- Chapter 1.
- X[15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29]
- X[30] [31] [32] [33] [34] [35]
- Underfull \vbox (badness 4108) has occurred while \output is active
- X\vbox(682.86613+0.0)x426.79134, glue set 3.45125
- X.\glue(\topskip) 3.05556
- X.\hbox(6.94444+0.8333)x426.79134, glue set 416.29144fil
- X..\hbox(0.0+0.0)x0.0
- X..\tentt @
- X..\tentt }
- X..\hbox(0.0+0.0)x0.0
- X..\penalty 10000
- X..etc.
- X.\glue(\baselineskip) 11.1667
- X.\hbox(0.0+0.0)x0.0
- X.\glue(\parskip) 0.0
- X.etc.
- X
- X [36]
- X[37] [38]) (u_ch2.tex [39] [40
- X
- X]
- Chapter 2.
- X[41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55]
- X[56] [57] [58] [59]
- Underfull \vbox (badness 10000) has occurred while \output is active
- X\vbox(682.86613+0.0)x426.79134
- X.\glue(\topskip) 3.88889
- X.\hbox(6.11111+2.22223)x426.79134, glue set 201.0433fil
- X..\hbox(0.0+0.0)x0.0
- X..\tentt @
- X..\tentt !
- X..\penalty 10000
- X..\glue 5.24995
- X..etc.
- X.\glue(\parskip) 0.0
- X.\glue(\baselineskip) 2.83333
- X.\hbox(6.94444+1.38887)x426.79134, glue set 237.79298fil
- X..\hbox(0.0+0.0)x0.0
- X..\tentt [
- X..\tentt i
- X..\tentt n
- X..\tentt h
- X..etc.
- X.etc.
- X
- X [60]
- X[61]) (u_ch3.tex [62]
- Chapter 3.
- X[63
- X
- X] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77]
- X[78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92]
- X[93] [94] [95] [96] [97] [98] [99]) (u_ch4.tex [100]
- Chapter 4.
- X[101
- X
- X] [102] [103] [104] [105] [106]) (u_ch5.tex [107] [108
- X
- X]
- Chapter 5.
- X[109]
- Underfull \hbox (badness 10000) in paragraph at lines 163--163
- X[] []\egtrm To reg-is-ter as a
- X
- X\hbox(5.46666+1.55556)x376.79134, glue set 71.60066
- X.\hbox(0.0+0.0)x15.00002
- X.\glue -15.00002
- X.\hbox(0.0+0.0)x15.00002
- X..\glue 15.00002
- X..\glue -20.0
- X..\glue -5.0
- X..\hbox(0.0+0.0)x20.0, glue set 20.0fil
- X...\glue 0.0 plus 1.0fil
- X..\glue 5.0
- X.\penalty 0
- X.\egtrm T
- X.etc.
- X
- X[110] [111] [112]
- Underfull \hbox (badness 10000) in paragraph at lines 330--340
- X\tenrm FunnelWeb was
- X
- X\hbox(6.94444+0.0)x426.79134, glue set 215.12605
- X.\tenrm F
- X.\kern-0.83334
- X.\tenrm u
- X.\tenrm n
- X.\tenrm n
- X.etc.
- X
- X[113]) (u_cha.tex [114]
- Appendix A.
- X[115
- X
- X] [116]
- Appendix B.
- X[117
- X
- X] (u_manual.sin [118
- X
- X] [119] [120] [121] [122] [123] [124] [125] [126])
- X[127
- X
- X]) (u_manual.aux) )
- Here is how much of TeX's memory you used:
- X 244 strings out of 1960
- X 2227 string characters out of 13235
- X 43797 words of memory out of 59980
- X 2172 multiletter control sequences out of 2500
- X 20391 words of font info for 77 fonts, out of 27000 for 100
- X 14 hyphenation exceptions out of 307
- X 16i,8n,15p,190b,240s stack positions out of 200i,40n,60p,500b,600s
- X
- Output written on u_manual.dvi (128 pages, 442404 bytes).
- END_OF_FILE
- if test 4136 -ne `wc -c <'userman/u_manual.log'`; then
- echo shar: \"'userman/u_manual.log'\" unpacked with wrong size!
- fi
- # end of 'userman/u_manual.log'
- fi
- echo shar: End of archive 2 \(of 20\).
- cp /dev/null ark2isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 20 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-