]> thyrsus.com Git - cupl.git/commitdiff
CORC seems to work.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 19 Apr 1995 23:26:23 +0000 (23:26 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 19 Apr 1995 23:26:23 +0000 (23:26 +0000)
cupl.xml
tour.doc

index d8224ce76614f257ccd6c59e1456722a57a3757c..6441b1c57d1e6c79056382b2e5d240df9105f319 100644 (file)
--- a/cupl.xml
+++ b/cupl.xml
@@ -51,6 +51,13 @@ better-known WATFOR and WATFIV compilers, incorporating elaborate
 error-correction and trace output features using a runtime monitor.
 CORC does not appear to have supported these features.
 .P
+The only nontrivial difference between the CUPL and CORC languages
+proper was the interpretation of GO TO <label> when <label> is
+associated with a block.  In CUPL, this is a go to beginning of block;
+in CORC, it's go to end of block (which in CUPL is GO TO <block> END.
+The interpreter switches on CORC interpretation whenever it detects a
+CORC-specific word (such as NOTE) during lexing.
+.P
 .H 1 "Differences from the original CUPL"
 .P
 The most obvious differences are also the most trivial.  CUPL was
@@ -76,13 +83,13 @@ visual appearance of CUPL listings by insisting on all caps and tab-indenting
 statements.  We also preserve the *DATA mechanism for supplying
 initializations.
 .P
-More significant differences arise from differences between the word size and
-floating-point format in CUPL's original host and those of typical modern C
-implementation.  The 360 had a 36-bit word; original CUPL scalars ranged from
-1e76 to 1e-78 with nine decimal digits of precision.  The Burroughs
-1604 was documented as having a much wider range, 1e308 to 1e-308 with
-11 digits of precision; the Burroughs 220 supported 1e-49 to 1e50 with
-8 digits of precision.
+More significant differences arise from differences between the word
+size and floating-point format in CUPL's original host and those of
+typical modern C implementation.  The 360 had a 36-bit word; original
+CUPL scalars ranged from 1e76 to 1e-78 with nine decimal digits of
+precision.  As for CORC: the Burroughs 1604 was documented as having a
+much wider range, 1e308 to 1e-308 with 11 digits of precision; the
+Burroughs 220 supported 1e-49 to 1e50 with 8 digits of precision.
 .PP
 On today's typical 32-bit microprocessor such as an Intel 486, C
 floats are 32 bits and have roughly 1e+38 to 1e-38 range and 9 digits
index 753dfd926843687627666de0bdd4ea67d00d6c63..509bcd6c29bb4e2f4d4a8ec385f5e808e65feff6 100644 (file)
--- a/tour.doc
+++ b/tour.doc
@@ -1,6 +1,6 @@
-                       CUPL Implementation Notes
+                       CUPL/CORC Implementation Notes
 
-The CUPL implementation is built around YACC and LEX.  The rest is
+The CUPL/CORC implementation is built around YACC and LEX.  The rest is
 ANSI and POSIX-conformant C.
 
 The YACC grammar just builds a parse tree, which is passed to
@@ -33,7 +33,15 @@ field.
 
 There are some comments in the code which discuss the possibility of
 a back end that would emit C.   This would be easy to do if there were
-any serious corpus of CUPL code demanding to be translated.  The
+any serious corpus of CUPL/CORC code demanding to be translated.  The
 compiler back end would emit code shaped like the parse tree, which
 would then link monitor.c as runtime support.
 
+The only nontrivial difference between CUPL and CORC is the interpretation
+of GO TO <label> when <label> is associated with a block.  In CUPL, this
+is a go to beginning of block; in CORC, it's go to end of block (which in
+CUPL is GO TO <block> END.  The interpreter sets a flag when it sees any
+of the appropriate CORC-specific keywords (NOTE, BEGIN, DEC, DECREASE, EQL,
+GEQ, GTR, INC, INCREASE, INT, LEQ, LSS, NEQ, REPEAT, TITLE, UNTIL, $) during
+lexing, and execute() modifies its behavior appropriately.
+