some small changes, asm() yields error message
authordick <none@none>
Sat, 13 Dec 1986 20:57:40 +0000 (20:57 +0000)
committerdick <none@none>
Sat, 13 Dec 1986 20:57:40 +0000 (20:57 +0000)
lang/cem/cemcom/Makefile.erik
lang/cem/cemcom/asm.c
lang/cem/cemcom/options
lang/cem/cemcom/program.g
lang/cem/cemcom/statement.g

index d7f9352..de577f4 100644 (file)
@@ -2,42 +2,45 @@
 #      M A K E F I L E   F O R   A C K   C - C O M P I L E R
 
 # Machine and environ dependent definitions
-EM = /usr/em#                          # ACK tree on this machine
-DESTINATION = /user1/$$USER/bin#               # where to put the stuff
-MKDEP = $(EM)/bin/mkdep#                       # dependency generator
+EMHOME =       /usr/em#                        # ACK tree on this machine
+DESTINATION =  /user1/$$USER/bin#              # where to put the stuff
+MKDEP =                $(EMHOME)/bin/mkdep#            # dependency generator
 MAP =
-#MAP = -DInsertFile=ins_file -DInsertText=ins_text#    # bug in m68k2 back end
-SIM = /user1/dick/bin/sim#                     # Dicks sim program
-LINT = /usr/new/lint
+#MAP = -DInsertFile=ins_file -DInsertText=ins_text# bug in m68k2 back end
+SIM =          /user1/dick/bin/sim#            # Dicks sim program
+LINT =         /usr/new/lint
 
 # Libraries and EM interface definitions
-SYSLIB = $(EM)/modules/lib/libsystem.a
-EMKLIB = $(EM)/modules/lib/libemk.a
-EMELIB = $(EM)/modules/lib/libeme.a
-STRLIB = $(EM)/modules/lib/libstr.a
-PRTLIB = $(EM)/modules/lib/libprint.a
-EMMESLIB = $(EM)/modules/lib/libem_mes.a
-INPLIB = $(EM)/modules/lib/libinput.a
-#CH3LIB = $(EM)/modules/lib/libch3.a
+SYSLIB =       $(EMHOME)/modules/lib/libsystem.a
+EMKLIB =       $(EMHOME)/modules/lib/libemk.a
+EMELIB =       $(EMHOME)/modules/lib/libeme.a
+STRLIB =       $(EMHOME)/modules/lib/libstr.a
+PRTLIB =       $(EMHOME)/modules/lib/libprint.a
+EMMESLIB =     $(EMHOME)/modules/lib/libem_mes.a
+INPLIB =       $(EMHOME)/modules/lib/libinput.a
+#CH3LIB =      $(EMHOME)/modules/lib/libch3.a
 CH3LIB =
-LIBS = $(INPLIB) $(CH3LIB) $(EMMESLIB) $(EMKLIB) $(PRTLIB) $(STRLIB) $(SYSLIB)
-ELIBS = $(INPLIB) $(CH3LIB) $(EMMESLIB) $(EMELIB) $(PRTLIB) $(STRLIB) $(SYSLIB)
-LIB_INCLUDES = -I$(EM)/modules/h -I$(EM)/modules/pkg
-EM_INCLUDES = -I$(EM)/h
-SYSLLIB = $(EM)/modules/lib/llib-lsys.ln
-EMKLLIB = $(EM)/modules/lib/llib-lemk.ln
-EMELLIB = $(EM)/modules/lib/llib-leme.ln
-STRLLIB = $(EM)/modules/lib/llib-lstr.ln
-PRTLLIB = $(EM)/modules/lib/llib-lprint.ln
-EMMESLLIB = $(EM)/modules/lib/llib-lmes.ln
-INPLLIB = $(EM)/modules/lib/llib-linput.ln
-CH3LLIB = $(EM)/modules/lib/llib-lch3.ln
+LIBS =         $(INPLIB) $(CH3LIB) $(EMMESLIB) $(EMKLIB) \
+               $(PRTLIB) $(STRLIB) $(SYSLIB)
+ELIBS =                $(INPLIB) $(CH3LIB) $(EMMESLIB) $(EMELIB) \
+               $(PRTLIB) $(STRLIB) $(SYSLIB)
+LIB_INCLUDES = -I$(EMHOME)/modules/h -I$(EMHOME)/modules/pkg
+EM_INCLUDES =  -I$(EMHOME)/h
+SYSLLIB =      $(EMHOME)/modules/lib/llib-lsys.ln
+EMKLLIB =      $(EMHOME)/modules/lib/llib-lemk.ln
+EMELLIB =      $(EMHOME)/modules/lib/llib-leme.ln
+STRLLIB =      $(EMHOME)/modules/lib/llib-lstr.ln
+PRTLLIB =      $(EMHOME)/modules/lib/llib-lprint.ln
+EMMESLLIB =    $(EMHOME)/modules/lib/llib-lmes.ln
+INPLLIB =      $(EMHOME)/modules/lib/llib-linput.ln
+CH3LLIB =      $(EMHOME)/modules/lib/llib-lch3.ln
 LINTLIBS =
-#LINTLIBS = $(CH3LLIB) $(INPLLIB) $(EMMESLLIB) $(EMKLLIB) $(PRTLLIB) $(STRLLIB) $(SYSLLIB)
+#LINTLIBS =    $(CH3LLIB) $(INPLLIB) $(EMMESLLIB) $(EMKLLIB) \
+#              $(PRTLLIB) $(STRLLIB) $(SYSLLIB)
 
 # Where to install the compiler and its driver
-CEMCOM = $(DESTINATION)/cemcom
-DRIVER = $(DESTINATION)/cem
+CEMCOM =       $(DESTINATION)/cemcom
+DRIVER =       $(DESTINATION)/cem
 
 # What C compiler to use and how
 # CC = $(ACK) -.c
@@ -46,12 +49,12 @@ DRIVER = $(DESTINATION)/cem
 COPTIONS =
 
 # What parser generator to use and how
-GEN = $(EM)/bin/LLgen
-GENOPTIONS = -vv
+GEN =          $(EMHOME)/bin/LLgen
+GENOPTIONS =   -vv
 
 # Special #defines during compilation
-CDEFS =        $(MAP) $(EM_INCLUDES) $(LIB_INCLUDES)
-CFLAGS = $(CDEFS) $(COPTIONS) -O#      # we cannot pass the COPTIONS to lint!
+CDEFS =                $(MAP) $(EM_INCLUDES) $(LIB_INCLUDES)
+CFLAGS =       $(CDEFS) $(COPTIONS) -O# we cannot pass the COPTIONS to lint!
 
 # Grammar files and their objects
 LSRC = tokenfile.g declar.g statement.g expression.g program.g
@@ -76,7 +79,7 @@ GSRC =        char.c symbol2str.c next.c \
        idf.h macro.h stack.h stmt.h struct.h switch.h type.h
 
 # .h files generated by `make hfiles'; PLEASE KEEP THIS UP-TO-DATE!
-GHSRC =        botch_free.h dataflow.h debug.h density.h errout.h \
+GHSRC = botch_free.h dataflow.h debug.h density.h errout.h \
        idepth.h idfsize.h ifdepth.h inputtype.h inumlength.h lapbuf.h \
        maxincl.h myalloc.h nobitfield.h nofloat.h nopp.h \
        nparams.h numsize.h parbufsize.h pathlength.h \
@@ -159,7 +162,7 @@ install: main cem
        cp main $(CEMCOM)
        cp cem $(DRIVER)
 
-print:         files
+print: files
        pr `cat files` > print
 
 tags:  cfiles
index 3b8cd1f..56f02e4 100644 (file)
@@ -1,11 +1,12 @@
 /* $Header$ */
 /*             A S M                   */
 
-asm_seen(s, l)
+code_asm(s, l)
        char *s;
        int l;
 {
        /*      'asm' '(' string ')' ';'
        */
-       warning("\"asm(\"%s\")\" instruction skipped", s);
+       s = s; l = l;
+       error("\"asm instruction not implemented", s);
 }
index d1faf7c..0dce7fa 100644 (file)
@@ -6,7 +6,7 @@ I       expand include table with directory name following
 M      set identifier length
 n      don't generate register messages
 p      generate linenumbers and filename indications
-       while generating compact EM code
+       while generating EM code
 P      in running the preprocessor do not output '# line' lines
 R      restricted C
 T      take path following as directory for storing temporary file(s)
index c44b44e..91b4602 100644 (file)
@@ -89,7 +89,7 @@ program:
        the declaration in a way different from most other languages:
        e.g., rather than defining x as a pointer-to-integer, it defines
        *x as an integer and lets the compiler deduce that x is actually
-       pointer-to-integer.  This has profound consequences, but for the
+       pointer-to-integer.  This has profound consequences, both for the
        structure of an identifier definition and for the compiler.
        
        A definition starts with a decl_specifiers, which contains things
index 4109ba0..466bec8 100644 (file)
@@ -393,6 +393,6 @@ asm_statement
                }
        ')'
        ';'
-               {       asm_seen(asm_bts, asm_len);
+               {       code_asm(asm_bts, asm_len);
                }
 ;