]> thyrsus.com Git - intercal.git/commitdiff
John Cowan's changes for 0.20.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 16 Sep 1999 07:20:01 +0000 (03:20 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 26 Aug 2010 00:34:25 +0000 (20:34 -0400)
Makefile
NEWS
README [new file with mode: 0644]
src/perpetrate.c
src/pit/Makefile [new file with mode: 0644]

index 84fd848faacc13d4802dcdde6fcb4e75ce48cc04..08869630f5968a698f25219e14d040c70794ceca 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 #
 # Utility productions for the INTERCAL distribution
 #
-VERSION=0.19
+VERSION=0.20
 
 dist: intercal-$(VERSION).tar.gz
 
diff --git a/NEWS b/NEWS
index 5306717c7760c38898456e1cbd6b422e862c08ee..baf30428dbc35b1a91b2899b264511530b81e762 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,22 @@
                        NEW IN THIS RELEASE
 
+       Release 0.20 (by Eric S. Raymond) 16 September 1999
+
+  (The following changes are due to John Cowan <cowan@ccil.org>)
+
+1.  In addition to Latin-1, UTF-8 is now acceptable in source code as well.
+All the numerous currency symbols of Unicode (ISO 10646) can be used as
+big-money alternatives in their UTF-8 format.  Indeed, a random mixture of
+Latin-1 and UTF-8 also works fine; this seems very much in the spirit of
+Intercal.
+ 
+2.  Intercal has now been localized for the Ancient Roman as well as the
+Posix/C locale.  You may input numbers in Latin and write Intercal programs
+using Latin keywords.  See lexer.l for a list of equivalences.
+
+3.  The Makefile in the pit directory now works like a real Makefile, and
+won't compile anything that's already been compiled.
+ 
        Release 0.19 (by Eric S. Raymond) 16 August 1998
 
 1. Fixed a code-generation error in assignments from tail and hybrid
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..b54c085
--- /dev/null
+++ b/README
@@ -0,0 +1,129 @@
+               Release Notes for C-INTERCAL
+
+                       DISCREDITS
+
+This package is an implementation of the language INTERCAL designed by Don
+Woods and James Lyon, who have since spent more than twenty years trying to
+live it down.
+
+This implementation was created by Eric S. Raymond <esr@snark.thyrsus.com>
+during a fit of lunacy from which he has since mostly recovered.  It has
+been considerably hacked upon and improved by Steve Swales, Michael Ernst,
+Louis Howell, Brian Raiter, and others.  For detailed credits see NEWS.
+
+                       FILES
+
+The compiler itself is in the src directory.  Setting a symbol in the
+makefile will allow you to install it and its libraries and support files
+in a directory of your choice.  The doc directory contains (surprise!)
+documentation, and pit contains various examples of INTERCAL source code,
+writhing in agony.
+
+The files included are:
+
+READ.ME                        -- this file
+BUGS                   -- current bug and to-do list
+NEWS                   -- info on features and fixes new in this release
+intercal.el            -- elisp for editing INTERCAL code under GNU Emacs
+
+doc/READ.ME            -- historical notes on the docs
+doc/intercal.mm                -- the manual in groffable form
+doc/THEORY             -- some notes on the internals of the INTERCAL compiler
+
+src/Makefile           -- makefile for the INTERCAL compiler
+src/lexer.l            -- the lexical analyzer specification (in LEX)
+src/ick.y              -- the grammar specification (in YACC)
+src/ick.h              -- compilation types and defines
+src/perpetrate.c       -- main routine for compiler
+src/feh.c              -- INTERCAL-to-C code generator
+src/feh.h              -- interface to INTERCAL-to-C code generator
+src/fiddle.c           -- the INTERCAL operators
+src/lose.[ch]          -- INTERCAL compile- and run-time error handling
+src/ick-wrap.c         -- the driver for generated C-from-INTERCAL code
+src/arrgghh.c          -- option argument parsing for generated programs
+src/abcess.h           -- interface to functions linked with programs
+src/cesspool.c         -- the INTERCAL runtime support code
+src/numerals.c         -- numerals table for INTERCAL input
+src/sizes.h            -- variables defining the numeric base
+
+pit/*                  -- sample INTERCAL code; see pit/CATALOG
+
+               HOW TO GET STARTED
+
+You want a man page?  Man pages are for wimps.  To compile an INTERCAL
+program `foo.i' to executable code, just do
+
+       ick foo.i
+
+There's a -c option that leaves the generated `foo.c' in place for inspection
+(suppressing compilation to machine code), a -d option that enables verbose
+parse reporting from the yacc/bison parser, a -t option that requires strict
+INTERCAL-72 compliance (rejecting COME FROM and the extensions for bases other
+than two), a -b option that disables the INTERCAL-72 random-bug feature,
+and an -O option that enables the (hah!) optimizer.  Invoking ick -?
+prints a usage message.  Other than that, yer on yer own.
+
+Another switch affects C-INTERCAL's runtime behavior.  The `-C'
+option forces output in "clockface" mode, for superstitious users who
+believe writing "IV" upside-down offends IVPITER and would rather
+see IIII.
+
+Every INTERCAL runtime also accepts certain options at runtime (code by 
+Steve Swales).  These include [+/-]help, [+/-]traditional, and [+/-]wimpmode. 
+The help option (with either + or -) triggers a 'usage' message. The
++traditional option is presently a no-op.
+
+Steve writes: "The wimpmode option is the most interesting. I found myself
+always running my test programs with filters on both ends to work around the
+'nifty' INTERCAL number representations. This was so painful that I decided it
+would be LESS painful (and a lot less code) if I added a 'wimp' option.  With
+the +wimpmode option, the user is subjected to a humiliating message about what
+a wimp he or she is to use this mode, but after that is allowed to use
+conventional numerical notation.  While such a mode doubtless violates to some
+extent the INTERCAL philosophy, the fact that a 'unbutcher' command has been
+posted clearly indicates the need for it. Anyway... if you don't like it, don't
+use it... the default is -wimpmode (i.e. NOT wimp mode)."
+
+                       SPREADING THE BLAME
+
+There is an INTERCAL Resource Page at http://www.ccil.org/intercal
+
+The latest version of INTERCAL is also kept available at the
+Retrocomputing Museun, http://www.ccil.org/retro.
+
+There is, in addition, an occasionally active USENET newsgroup devoted to the
+language: alt.lang.intercal.
+
+                       NOTES ON THE LINUX BUILD
+
+At the top of ick.h are two defines that you may need to remove if you
+are using lex instead of flex.
+
+Many lexes export a yylineno variable, an undocumented feature that is
+not in flex (by default). If your build fails because of redecleration
+of yylineno, comment out the define of YYLINENO_BY_HAND.
+
+Some lexes also supply a yyrestart function to begin parsing a second
+file, while others automatically restart after seeing an EOF. (This is
+the case with flex.) If your build fails at link time because
+yyrestart is not defined, comment out the define of USE_YYRESTART.
+
+If you are using gcc in an non-ANSI environment, such as SunOS, it is
+strongly recommended that you add "-Wno-unused -Wimplicit" to the gcc
+command in the makefile. If you are in an ANSI environment and are
+using the current versions of gcc, flex, and bison, C-INTERCAL should
+build with no warnings.
+
+                               LICENSING
+
+C-INTERCAL is now distributed under the General Public License,
+except for the C skeleton file which is explicitly *not* GPLed
+in order to avoid the (possibly mythical) "license virus" effect.
+See the file COPYING for details on the General Public License.
+
+                               APOCALYPSE
+
+INTERCAL is fully Y2K-compliant.  Indeed, it is Y2K-obsequious, and
+loves nothing better than to be punished by relays of leather-clad, 
+spike-heeled calendricists.  Bite me and go buy your own shotgun.
+
index 7be790781fd2895e0bdf78ecb3120d2590c734d6..61dc4c2805f62fc46fa12d3eadd1b512ae070502 100644 (file)
@@ -259,10 +259,12 @@ int main(int argc, char *argv[])
             * Miss Manners lives.
             */
            if (lineno > 2)
+           {
                if (politesse == 0 || (lineno - 1) / politesse >= 5)
                    lose(E079, yylineno, (char *)NULL);
                else if (lineno / politesse < 3)
                    lose(E099, yylineno, (char *)NULL);
+           }
 
            /*
             * check if we need to magically include the system library
diff --git a/src/pit/Makefile b/src/pit/Makefile
new file mode 100644 (file)
index 0000000..67efea7
--- /dev/null
@@ -0,0 +1,149 @@
+#
+# Torture-tester for the INTERCAL compiler
+#
+
+ICK = ../src/ick -b
+
+SOURCES = \
+       ./sample.i \
+       ./beer.i \
+       ./bubble.i \
+       ./count.3i \
+       ./hail_mary.3i \
+       ./icat.i \
+       ./tests/test1.i \
+       ./tests/limits.i \
+       ./tests/limits.3i \
+       ./tests/test16bit.i \
+       ./tests/testarray.i \
+       ./tests/testcf.i \
+       ./tests/testlib2.i \
+       ./tests/test2.i \
+       ./tests/testops.3i \
+       ./tests/testops.5i \
+       ./tests/testsplat.i \
+       ./tests/testi18n.i \
+       ./pow.i \
+       ./random.i \
+       ./random2.i \
+       ./rot13.i \
+       ./rot13b.i \
+       ./iogerunds.i \
+       ./pi.i \
+       ./lib/lib2.i \
+       ./lib/numio.i \
+       ./lib/syslib.i \
+       ./lib/syslib3.i \
+       ./lib/syslib4.i \
+       ./lib/syslib5.i \
+       ./lib/syslib6.i \
+       ./lib/syslib7.i \
+       ./lib/plus.i \
+       ./primes.i \
+       ./life.i \
+       ./life2.i \
+       ./sink.i \
+       ./change.i \
+       ./iching1.i \
+       ./iching2.i \
+       ./hello.i \
+       ./ins.i \
+       ./yapp.i
+
+TARGETS = \
+       ./sample \
+       ./beer \
+       ./bubble \
+       ./count \
+       ./hail_mary \
+       ./icat \
+       ./tests/test1 \
+       ./tests/limits \
+       ./tests/limits3 \
+       ./tests/test16bit \
+       ./tests/testarray \
+       ./tests/testcf \
+       ./tests/testlib2 \
+       ./tests/test2 \
+       ./tests/testops \
+       ./tests/testops \
+       ./tests/testsplat \
+       ./tests/testi18n \
+       ./pow \
+       ./random \
+       ./random2 \
+       ./rot13 \
+       ./rot13b \
+       ./iogerunds \
+       ./pi \
+       ./lib/lib2 \
+       ./lib/numio \
+       ./lib/syslib \
+       ./lib/syslib3 \
+       ./lib/syslib4 \
+       ./lib/syslib5 \
+       ./lib/syslib6 \
+       ./lib/syslib7 \
+       ./lib/plus \
+       ./primes \
+       ./life \
+       ./life2 \
+       ./sink \
+       ./change \
+       ./iching1 \
+       ./iching2 \
+       ./hello \
+       ./ins \
+       ./yapp
+
+.SUFFIXES:     .i .3i .4i .5i .6i .7i
+
+.i:
+       $(ICK) $<
+
+.3i:
+       $(ICK) $<
+
+.4i:
+       $(ICK) $<
+
+.5i:
+       $(ICK) $<
+
+.6i:
+       $(ICK) $<
+
+.7i:
+       $(ICK) $<
+
+test: $(TARGETS)
+
+./lib/syslib3: ./lib/syslib.3i
+       cp ./lib/syslib.3i ./lib/syslib3.3i
+       $(ICK) ./lib/syslib3.3i
+
+./lib/syslib4: ./lib/syslib.4i
+       cp ./lib/syslib.4i ./lib/syslib4.4i
+       $(ICK) ./lib/syslib4.4i
+
+./lib/syslib5: ./lib/syslib.5i
+       cp ./lib/syslib.5i ./lib/syslib5.5i
+       $(ICK) ./lib/syslib5.5i
+
+./lib/syslib6: ./lib/syslib.6i
+       cp ./lib/syslib.6i ./lib/syslib6.6i
+       $(ICK) ./lib/syslib6.6i
+
+./lib/syslib7: ./lib/syslib.7i
+       cp ./lib/syslib.7i ./lib/syslib7.7i
+       $(ICK) ./lib/syslib7.7i
+
+./tests/limits3: ./tests/limits.3i
+       cp ./tests/limits.3i ./tests/limits3.3i
+       $(ICK) ./tests/limits3.3i
+
+lines:
+       wc -l $(SOURCES)
+
+clean:
+       rm -f $(TARGETS) *.c *.o lib/syslib?.?i tests/limits3.3i