Forráskód Böngészése

Introduced the ALLOCDEF mechanism

erikb 38 éve
szülő
commit
1378e479b5
2 módosított fájl, 41 hozzáadás és 21 törlés
  1. 13 12
      lang/cem/cemcom/Files
  2. 28 9
      lang/cem/cemcom/Makefile.erik

+ 13 - 12
lang/cem/cemcom/Files

@@ -22,16 +22,16 @@ ch7bin.c
 ch7mon.c
 class.h
 code.c
-code.h
+code.str
 conversion.c
 cstoper.c
 dataflow.c
 declar.g
 declarator.c
-declarator.h
+declar.str
 decspecs.c
-decspecs.h
-def.h
+decspecs.str
+def.str
 domacro.c
 dumpidf.c
 em.c
@@ -40,13 +40,13 @@ emcode.def
 error.c
 eval.c
 expr.c
-expr.h
+expr.str
 expression.g
 faulty.h
 field.c
-field.h
+field.str
 idf.c
-idf.h
+idf.str
 init.c
 input.c
 input.h
@@ -55,8 +55,9 @@ ival.c
 label.c
 label.h
 level.h
-macro.h
+macro.str
 main.c
+make.allocd
 make.emfun
 make.emmac
 make.hfiles
@@ -74,7 +75,7 @@ sizes.h
 skip.c
 specials.h
 stack.c
-stack.h
+stack.str
 statement.g
 stb.c
 storage.c
@@ -82,13 +83,13 @@ storage.h
 string.c
 string.h
 struct.c
-struct.h
+struct.str
 switch.c
-switch.h
+switch.str
 system.c
 system.h
 tab.c
 tokenname.c
 tokenname.h
 type.c
-type.h
+type.str

+ 28 - 9
lang/cem/cemcom/Makefile.erik

@@ -44,6 +44,8 @@ GOBJ =	char.o symbol2str.o next.o writeem.o
 
 # generated source files
 GSRC =	char.c symbol2str.c next.c writeem.c \
+	code.h declar.h decspecs.h def.h expr.h field.h \
+	idf.h macro.h stack.h struct.h switch.h type.h \
 	writeem.h
 
 # .h files generated by `make hfiles'; PLEASE KEEP THIS UP-TO-DATE!
@@ -59,8 +61,12 @@ GENERATED = tab tokenfile.g Lpars.h LLfiles LL.output lint.out \
 	print Xref lxref hfiles cfiles
 
 # include files containing ALLOCDEF specifications
-NEXTFILES = code.h declarator.h decspecs.h def.h expr.h field.h \
-	idf.h macro.h stack.h struct.h switch.h type.h
+NEXTFILES = code.str declarator.str decspecs.str def.str expr.str field.str \
+	idf.str macro.str stack.str struct.str switch.str type.str
+
+.SUFFIXES: .str .h
+.str.h:
+	./make.allocd <$*.str >$*.h
 
 all:	cc
 
@@ -95,6 +101,19 @@ char.c:	tab char.tab
 next.c:	make.next $(NEXTFILES)
 	./make.next $(NEXTFILES) >next.c
 
+code.h:		make.allocd
+declar.h:	make.allocd
+decspecs.h:	make.allocd
+def.h:		make.allocd
+expr.h:		make.allocd
+field.h:	make.allocd
+idf.h:		make.allocd
+macro.h:	make.allocd
+stack.h:	make.allocd
+struct.h:	make.allocd
+switch.h:	make.allocd
+type.h:		make.allocd
+
 writeem.c: make.emfun emcode.def
 	./make.emfun emcode.def >writeem.c
 
@@ -165,18 +184,18 @@ sim:	cfiles
 	$(SIM) $(SIMFLAGS) `sources $(COBJ)` $(GSRC) $(LSRC)
 
 #AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO
-main.o: LLlex.h Lpars.h alloc.h arith.h bufsiz.h debug.h declarator.h idf.h input.h inputtype.h level.h maxincl.h myalloc.h nobitfield.h nopp.h spec_arith.h specials.h system.h target_sizes.h tokenname.h type.h use_tmp.h
-idf.o: LLlex.h Lpars.h align.h alloc.h arith.h assert.h botch_free.h debug.h declarator.h decspecs.h def.h idf.h idfsize.h label.h level.h nobitfield.h nopp.h sizes.h spec_arith.h specials.h stack.h storage.h struct.h type.h
-declarator.o: Lpars.h alloc.h arith.h botch_free.h declarator.h expr.h idf.h label.h nobitfield.h nopp.h sizes.h spec_arith.h storage.h type.h
+main.o: LLlex.h Lpars.h alloc.h arith.h bufsiz.h debug.h declar.h idf.h input.h inputtype.h level.h maxincl.h myalloc.h nobitfield.h nopp.h spec_arith.h specials.h system.h target_sizes.h tokenname.h type.h use_tmp.h
+idf.o: LLlex.h Lpars.h align.h alloc.h arith.h assert.h botch_free.h debug.h declar.h decspecs.h def.h idf.h idfsize.h label.h level.h nobitfield.h nopp.h sizes.h spec_arith.h specials.h stack.h storage.h struct.h type.h
+declarator.o: Lpars.h alloc.h arith.h botch_free.h declar.h expr.h idf.h label.h nobitfield.h nopp.h sizes.h spec_arith.h storage.h type.h
 decspecs.o: Lpars.h arith.h decspecs.h def.h level.h nobitfield.h spec_arith.h type.h
 struct.o: LLlex.h Lpars.h align.h arith.h assert.h botch_free.h debug.h def.h field.h idf.h level.h nobitfield.h nopp.h sizes.h spec_arith.h stack.h storage.h struct.h type.h
-expr.o: LLlex.h Lpars.h alloc.h arith.h botch_free.h declarator.h decspecs.h def.h expr.h idf.h label.h nobitfield.h nopp.h sizes.h spec_arith.h storage.h type.h
+expr.o: LLlex.h Lpars.h alloc.h arith.h botch_free.h declar.h decspecs.h def.h expr.h idf.h label.h nobitfield.h nopp.h sizes.h spec_arith.h storage.h type.h
 ch7.o: Lpars.h arith.h assert.h debug.h def.h expr.h idf.h label.h nobitfield.h nopp.h spec_arith.h struct.h type.h
 ch7bin.o: Lpars.h arith.h botch_free.h expr.h idf.h label.h nobitfield.h nopp.h spec_arith.h storage.h struct.h type.h
 cstoper.o: Lpars.h arith.h expr.h idf.h label.h nobitfield.h nopp.h sizes.h spec_arith.h target_sizes.h type.h
 arith.o: Lpars.h alloc.h arith.h botch_free.h expr.h field.h idf.h label.h mes.h nobitfield.h nopp.h spec_arith.h storage.h type.h
 alloc.o: alloc.h assert.h debug.h myalloc.h system.h
-code.o: LLlex.h Lpars.h alloc.h arith.h assert.h atw.h botch_free.h code.h dataflow.h debug.h declarator.h decspecs.h def.h em.h expr.h idf.h label.h level.h mes.h nobitfield.h nopp.h proc_intf.h sizes.h spec_arith.h specials.h stack.h storage.h type.h use_tmp.h writeem.h
+code.o: LLlex.h Lpars.h alloc.h arith.h assert.h atw.h botch_free.h code.h dataflow.h debug.h declar.h decspecs.h def.h em.h expr.h idf.h label.h level.h mes.h nobitfield.h nopp.h proc_intf.h sizes.h spec_arith.h specials.h stack.h storage.h type.h use_tmp.h writeem.h
 dumpidf.o: Lpars.h arith.h debug.h def.h expr.h field.h idf.h label.h nobitfield.h nopp.h spec_arith.h stack.h struct.h type.h
 error.o: LLlex.h arith.h debug.h em.h errout.h expr.h label.h nopp.h proc_intf.h spec_arith.h string.h system.h tokenname.h use_tmp.h writeem.h
 field.o: Lpars.h arith.h assert.h code.h debug.h em.h expr.h field.h idf.h label.h nobitfield.h nopp.h proc_intf.h sizes.h spec_arith.h type.h writeem.h
@@ -205,10 +224,10 @@ dataflow.o: dataflow.h
 system.o: inputtype.h system.h
 string.o: arith.h nopp.h spec_arith.h str_params.h string.h system.h
 tokenfile.o: Lpars.h
-declar.o: LLlex.h Lpars.h arith.h debug.h declarator.h decspecs.h def.h expr.h field.h idf.h label.h nobitfield.h nopp.h sizes.h spec_arith.h struct.h type.h
+declar.o: LLlex.h Lpars.h arith.h debug.h declar.h decspecs.h def.h expr.h field.h idf.h label.h nobitfield.h nopp.h sizes.h spec_arith.h struct.h type.h
 statement.o: LLlex.h Lpars.h arith.h botch_free.h code.h debug.h def.h em.h expr.h idf.h label.h nobitfield.h nopp.h proc_intf.h spec_arith.h stack.h storage.h type.h writeem.h
 expression.o: LLlex.h Lpars.h arith.h expr.h idf.h label.h nobitfield.h nopp.h spec_arith.h type.h
-program.o: LLlex.h Lpars.h alloc.h arith.h code.h declarator.h decspecs.h def.h expr.h idf.h label.h nobitfield.h nopp.h spec_arith.h type.h
+program.o: LLlex.h Lpars.h alloc.h arith.h code.h declar.h decspecs.h def.h expr.h idf.h label.h nobitfield.h nopp.h spec_arith.h type.h
 Lpars.o: Lpars.h
 char.o: class.h
 symbol2str.o: Lpars.h