Changed copyright notice, made installation less dependent on ACK
This commit is contained in:
		
							parent
							
								
									61fad3018a
								
							
						
					
					
						commit
						6fa0e5bfb0
					
				
					 25 changed files with 129 additions and 127 deletions
				
			
		|  | @ -1,4 +1,5 @@ | ||||||
| READ_ME | READ_ME | ||||||
|  | COPYING | ||||||
| lib | lib | ||||||
| src | src | ||||||
| Makefile | Makefile | ||||||
|  |  | ||||||
							
								
								
									
										18
									
								
								util/LLgen/COPYING
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								util/LLgen/COPYING
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | ||||||
|  | Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands. | ||||||
|  | All rights reserved. | ||||||
|  | 
 | ||||||
|  | Permission to use and copy this software and its documentation for research | ||||||
|  | and educational use only is hereby granted, provided that the above copyright | ||||||
|  | notice and this permission notice appear in all copies.  No commercial use of | ||||||
|  | any kind is permitted without permission in writing from the copyright owner. | ||||||
|  | 
 | ||||||
|  | One way of obtaining such a permission is to obtain the Amsterdam Compiler | ||||||
|  | Kit.  LLgen is part of it.  The Amsterdam Compiler Kit is available from | ||||||
|  | two companies: | ||||||
|  | 
 | ||||||
|  | Transmediair Products & Support B.V.            Unipress Software | ||||||
|  | Melkweg 3                                       2025 Lincoln Highway | ||||||
|  | 3721 RG  Bilthoven                              Edison, NJ 08817 | ||||||
|  | The Netherlands                                 U.S.A. | ||||||
|  | tel: +31 30 281820                              tel: +1 908 287 2100 | ||||||
|  | fax: +31 30 292294                              fax: +1 908 287 4929 | ||||||
|  | @ -82,9 +82,9 @@ so that the compiler can generate a jump table for it. This will only be | ||||||
| done for switches that have density between | done for switches that have density between | ||||||
| \fIlow_percentage\fP and \fIhigh_percentage\fP, as explained below. | \fIlow_percentage\fP and \fIhigh_percentage\fP, as explained below. | ||||||
| Usually, compilers generate a jumptable when the density of the switch | Usually, compilers generate a jumptable when the density of the switch | ||||||
| is above a certain threshold. If you want jump tables in more cases, | is above a certain threshold. When jump tables are to be used more often, | ||||||
| set \fIhigh_percentage\fP to this threshold, and \fIlow_percentage\fP to | \fIhigh_percentage\fP must be set to this threshold, and \fIlow_percentage\fP | ||||||
| a minimum threshold. There is a time-space trade-off here. | must be set to a minimum threshold. There is a time-space trade-off here. | ||||||
| .I num | .I num | ||||||
| is the minimum number of cases in a switch for the \fB\-j\fP option to be | is the minimum number of cases in a switch for the \fB\-j\fP option to be | ||||||
| effective. The default value (if | effective. The default value (if | ||||||
|  |  | ||||||
|  | @ -1,17 +1,16 @@ | ||||||
| # $Header$
 | # $Header$
 | ||||||
| EMHOME=../.. | INSTALLDIR=/usr/local/bin | ||||||
| INSTALLDIR=$(EMHOME)/bin | LIBDIR=/usr/local/lib/LLgen | ||||||
| LIBDIR=$(EMHOME)/lib/LLgen | MANDIR=/usr/local/man/man1 | ||||||
| MANDIR=$(EMHOME)/man |  | ||||||
| 
 | 
 | ||||||
| all: | all: | ||||||
| 	cd src; make | 	cd src; make LIBDIR=$(LIBDIR) | ||||||
| 
 | 
 | ||||||
| clean: | clean: | ||||||
| 	-cd src; make clean | 	-cd src; make clean | ||||||
| 
 | 
 | ||||||
| install: | install: | ||||||
| 	cd src; make | 	cd src; make LIBDIR=$(LIBDIR) | ||||||
| 	rm -f $(INSTALLDIR)/LLgen $(LIBDIR)/rec $(LIBDIR)/incl $(MANDIR)/LLgen.1 | 	rm -f $(INSTALLDIR)/LLgen $(LIBDIR)/rec $(LIBDIR)/incl $(MANDIR)/LLgen.1 | ||||||
| 	cp src/LLgen $(INSTALLDIR)/LLgen | 	cp src/LLgen $(INSTALLDIR)/LLgen | ||||||
| 	cp lib/rec $(LIBDIR)/rec | 	cp lib/rec $(LIBDIR)/rec | ||||||
|  | @ -19,7 +18,7 @@ install: | ||||||
| 	cp LLgen.1 $(MANDIR)/LLgen.1 | 	cp LLgen.1 $(MANDIR)/LLgen.1 | ||||||
| 
 | 
 | ||||||
| firstinstall: | firstinstall: | ||||||
| 	cd src; make first | 	cd src; make LIBDIR=$(LIBDIR) first | ||||||
| 	rm -f $(INSTALLDIR)/LLgen $(LIBDIR)/rec $(LIBDIR)/incl $(MANDIR)/LLgen.1 | 	rm -f $(INSTALLDIR)/LLgen $(LIBDIR)/rec $(LIBDIR)/incl $(MANDIR)/LLgen.1 | ||||||
| 	cp src/LLgen $(INSTALLDIR)/LLgen | 	cp src/LLgen $(INSTALLDIR)/LLgen | ||||||
| 	-mkdir $(LIBDIR) | 	-mkdir $(LIBDIR) | ||||||
|  | @ -28,7 +27,7 @@ firstinstall: | ||||||
| 	cp LLgen.1 $(MANDIR)/LLgen.1 | 	cp LLgen.1 $(MANDIR)/LLgen.1 | ||||||
| 
 | 
 | ||||||
| cmp: | cmp: | ||||||
| 	cd src; make | 	cd src; make LIBDIR=$(LIBDIR) | ||||||
| 	-cmp src/LLgen $(INSTALLDIR)/LLgen | 	-cmp src/LLgen $(INSTALLDIR)/LLgen | ||||||
| 	-cmp lib/rec $(LIBDIR)/rec | 	-cmp lib/rec $(LIBDIR)/rec | ||||||
| 	-cmp lib/incl $(LIBDIR)/incl | 	-cmp lib/incl $(LIBDIR)/incl | ||||||
|  |  | ||||||
|  | @ -6,13 +6,13 @@ INSTALLDIR=$(TARGET_HOME)/bin | ||||||
| LIBDIR=$(TARGET_HOME)/lib/LLgen | LIBDIR=$(TARGET_HOME)/lib/LLgen | ||||||
| 
 | 
 | ||||||
| all: | all: | ||||||
| 	cd src; make | 	cd src; make LIBDIR=$(LIBDIR) | ||||||
| 
 | 
 | ||||||
| clean: | clean: | ||||||
| 	-cd src; make clean | 	-cd src; make clean | ||||||
| 
 | 
 | ||||||
| install: | install: | ||||||
| 	cd src; make | 	cd src; make LIBDIR=$(LIBDIR) | ||||||
| 	cp src/LLgen $(INSTALLDIR)/LLgen | 	cp src/LLgen $(INSTALLDIR)/LLgen | ||||||
| 	if [ $(DO_MACHINE_INDEP) = y ] ; \ | 	if [ $(DO_MACHINE_INDEP) = y ] ; \ | ||||||
| 	then	cp $(SRC_HOME)/util/LLgen/lib/rec $(LIBDIR)/rec ; \ | 	then	cp $(SRC_HOME)/util/LLgen/lib/rec $(LIBDIR)/rec ; \ | ||||||
|  | @ -21,7 +21,7 @@ install: | ||||||
| 	fi | 	fi | ||||||
| 
 | 
 | ||||||
| firstinstall: | firstinstall: | ||||||
| 	cd src; make first | 	cd src; make LIBDIR=$(LIBDIR) first | ||||||
| 	cp src/LLgen $(INSTALLDIR)/LLgen | 	cp src/LLgen $(INSTALLDIR)/LLgen | ||||||
| 	if [ $(DO_MACHINE_INDEP) = y ] ; \ | 	if [ $(DO_MACHINE_INDEP) = y ] ; \ | ||||||
| 	then	if [ -d $(LIBDIR) ] ; then : ; else mkdir $(LIBDIR) ; fi ; \ | 	then	if [ -d $(LIBDIR) ] ; then : ; else mkdir $(LIBDIR) ; fi ; \ | ||||||
|  | @ -31,7 +31,7 @@ firstinstall: | ||||||
| 	fi | 	fi | ||||||
| 
 | 
 | ||||||
| cmp: | cmp: | ||||||
| 	cd src; make | 	cd src; make LIBDIR=$(LIBDIR) | ||||||
| 	-cmp src/LLgen $(INSTALLDIR)/LLgen | 	-cmp src/LLgen $(INSTALLDIR)/LLgen | ||||||
| 	-cmp $(SRC_HOME)/util/LLgen/lib/rec $(LIBDIR)/rec | 	-cmp $(SRC_HOME)/util/LLgen/lib/rec $(LIBDIR)/rec | ||||||
| 	-cmp $(SRC_HOME)/util/LLgen/lib/incl $(LIBDIR)/incl | 	-cmp $(SRC_HOME)/util/LLgen/lib/incl $(LIBDIR)/incl | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /* | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands. | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  * All rights reserved. | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  |  | ||||||
|  | @ -1,25 +1,27 @@ | ||||||
| # $Header$
 | # $Header$
 | ||||||
| EMHOME=../../.. |  | ||||||
| PROF= | PROF= | ||||||
| LLOPT= # -vvv -x | LLOPT= # -vvv -x | ||||||
| INCLUDES = -I$(EMHOME)/h | INCLUDES = | ||||||
| CFLAGS=-O -DNDEBUG $(INCLUDES) $(PROF) | DEFINES = -DNDEBUG | ||||||
|  | CFLAGS=-O $(DEFINES) $(INCLUDES) $(PROF) | ||||||
| LDFLAGS= | LDFLAGS= | ||||||
| OBJECTS = main.o gencode.o compute.o LLgen.o tokens.o check.o reach.o global.o name.o sets.o Lpars.o alloc.o machdep.o cclass.o | OBJECTS = main.o gencode.o compute.o LLgen.o tokens.o check.o reach.o global.o name.o sets.o Lpars.o alloc.o machdep.o cclass.o | ||||||
| CFILES = main.c gencode.c compute.c LLgen.c tokens.c check.c reach.c global.c name.c sets.c Lpars.c alloc.c machdep.c cclass.c | CFILES = main.c gencode.c compute.c LLgen.c tokens.c check.c reach.c global.c name.c sets.c Lpars.c alloc.c machdep.c cclass.c | ||||||
| FILES =types.h tunable.h extern.h io.h sets.h tokens.g LLgen.g main.c name.c compute.c sets.c gencode.c global.c check.c reach.c alloc.c machdep.c Makefile cclass.c | FILES =types.h extern.h io.h sets.h tokens.g LLgen.g main.c name.c compute.c sets.c gencode.c global.c check.c reach.c alloc.c machdep.c Makefile cclass.c | ||||||
| GFILES = tokens.g LLgen.g | GFILES = tokens.g LLgen.g | ||||||
| LINT = lint -b -DNDEBUG -DNORCSID | LINT = lint -b $(DEFINES) -DNORCSID | ||||||
|  | 
 | ||||||
|  | LIBDIRSTR = \"$(LIBDIR)\" | ||||||
| 
 | 
 | ||||||
| all:		parser | all:		parser | ||||||
| 		@make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "PROF=$(PROF)" | 		@make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "PROF=$(PROF)" "LIBDIR=$(LIBDIR)" | ||||||
| 
 | 
 | ||||||
| parser:		$(GFILES) | parser:		$(GFILES) | ||||||
| 		LLgen $(LLOPT) $(GFILES) | 		LLgen $(LLOPT) $(GFILES) | ||||||
| 		@touch parser | 		@touch parser | ||||||
| 
 | 
 | ||||||
| first:		firstparser | first:		firstparser | ||||||
| 		@make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "PROF=$(PROF)" | 		@make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "PROF=$(PROF)" "LIBDIR=$(LIBDIR)" | ||||||
| 
 | 
 | ||||||
| firstparser: | firstparser: | ||||||
| 		cp LLgen.c.dist LLgen.c | 		cp LLgen.c.dist LLgen.c | ||||||
|  | @ -29,7 +31,7 @@ firstparser: | ||||||
| 		@touch parser | 		@touch parser | ||||||
| 
 | 
 | ||||||
| LLgen:		$(OBJECTS) | LLgen:		$(OBJECTS) | ||||||
| 		$(CC) $(PROF) $(LDFLAGS) $(OBJECTS) $(EMHOME)/modules/lib/libsystem.a -o LLgen | 		$(CC) $(PROF) $(LDFLAGS) $(OBJECTS) -o LLgen | ||||||
| 		@size LLgen | 		@size LLgen | ||||||
| 
 | 
 | ||||||
| pr :  | pr :  | ||||||
|  | @ -49,6 +51,9 @@ distr: | ||||||
| 		cp LLgen.c LLgen.c.dist | 		cp LLgen.c LLgen.c.dist | ||||||
| 		cp tokens.c tokens.c.dist | 		cp tokens.c tokens.c.dist | ||||||
| 
 | 
 | ||||||
|  | machdep.o:	machdep.c | ||||||
|  | 		$(CC) -c $(CFLAGS) -DLIBDIR=$(LIBDIRSTR) machdep.c | ||||||
|  | 
 | ||||||
| # The next lines are generated automatically
 | # The next lines are generated automatically
 | ||||||
| # AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO
 | # AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO
 | ||||||
| LLgen.o:	Lpars.h | LLgen.o:	Lpars.h | ||||||
|  | @ -76,7 +81,6 @@ gencode.o:	types.h | ||||||
| global.o:	extern.h | global.o:	extern.h | ||||||
| global.o:	io.h | global.o:	io.h | ||||||
| global.o:	types.h | global.o:	types.h | ||||||
| machdep.o:	$(EMHOME)/h/em_path.h |  | ||||||
| machdep.o:	types.h | machdep.o:	types.h | ||||||
| main.o:	extern.h | main.o:	extern.h | ||||||
| main.o:	io.h | main.o:	io.h | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /*
 | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
 | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  * All rights reserved. | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  | @ -19,7 +17,6 @@ | ||||||
| 
 | 
 | ||||||
| # include "types.h" | # include "types.h" | ||||||
| # include "extern.h" | # include "extern.h" | ||||||
| # include <local.h> |  | ||||||
| 
 | 
 | ||||||
| # ifndef NORCSID | # ifndef NORCSID | ||||||
| static string rcsid = "$Header$"; | static string rcsid = "$Header$"; | ||||||
|  | @ -68,19 +65,20 @@ new_mem(p) register p_info p; { | ||||||
| 
 | 
 | ||||||
| 	if (p->i_max >= p->i_top) {	/* No more free elements */ | 	if (p->i_max >= p->i_top) {	/* No more free elements */ | ||||||
| 		sz = p->i_size; | 		sz = p->i_size; | ||||||
| #if BIGMACHINE | 		if (sizeof(char *) > 2) { | ||||||
| 			/*
 | 			/*
 | ||||||
| 			   Do not worry about size. Just double it. | 			   Do not worry about size. Just double it. | ||||||
| 			 */ | 			 */ | ||||||
| 			p->i_size += p->i_size; | 			p->i_size += p->i_size; | ||||||
| 			if (! p->i_size) | 			if (! p->i_size) | ||||||
| 				p->i_size += p->i_incr * p->i_esize; | 				p->i_size += p->i_incr * p->i_esize; | ||||||
| #else | 			} | ||||||
|  | 		else { | ||||||
| 			/*
 | 			/*
 | ||||||
| 			   Worry about size, so only increment in chunks of i_incr. | 			   Worry about size, so only increment in chunks of i_incr. | ||||||
| 			 */ | 			 */ | ||||||
| 			p->i_size += p->i_incr * p->i_esize; | 			p->i_size += p->i_incr * p->i_esize; | ||||||
| #endif | 		} | ||||||
| 		p->i_ptr = !p->i_ptr ?  | 		p->i_ptr = !p->i_ptr ?  | ||||||
| 			alloc(p->i_size) : | 			alloc(p->i_size) : | ||||||
| 			ralloc(p->i_ptr, p->i_size); | 			ralloc(p->i_ptr, p->i_size); | ||||||
|  |  | ||||||
|  | @ -1,8 +1,9 @@ | ||||||
| /* $Header$ */ | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
 | ||||||
| /*
 |  * All rights reserved. | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  */ |  */ | ||||||
|  | 
 | ||||||
|  | /* $Header$ */ | ||||||
|  | 
 | ||||||
| #include "cclass.h" | #include "cclass.h" | ||||||
| char c_class[] = { | char c_class[] = { | ||||||
| 	0,	/* 00 */ | 	0,	/* 00 */ | ||||||
|  |  | ||||||
|  | @ -1,8 +1,9 @@ | ||||||
| /* $Header$ */ | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
 | ||||||
| /*
 |  * All rights reserved. | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  */ |  */ | ||||||
|  | 
 | ||||||
|  | /* $Header$ */ | ||||||
|  | 
 | ||||||
| extern char c_class[]; | extern char c_class[]; | ||||||
| 
 | 
 | ||||||
| #define ISLET 1 | #define ISLET 1 | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /*
 | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
 | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  * All rights reserved. | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /*
 | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
 | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  * All rights reserved. | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /*
 | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
 | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  * All rights reserved. | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  | @ -13,12 +11,12 @@ | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  * extern.h $Header$ |  * $Header$ | ||||||
|  * Miscellanious constants and |  * Miscellanious constants and | ||||||
|  * some variables that are visible in more than one file |  * some variables that are visible in more than one file | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| # define LTEXTSZ	51	/* Size of longest token */ | # define LTEXTSZ	256	/* Size of longest token */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  * options for the identifier search routine |  * options for the identifier search routine | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /*
 | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
 | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  * All rights reserved. | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /*
 | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
 | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  * All rights reserved. | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /*
 | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
 | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  * All rights reserved. | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  | @ -13,7 +11,7 @@ | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  * io.h $Header$ |  * $Header$ | ||||||
|  * Some important file names and variables |  * Some important file names and variables | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /*
 | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
 | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  * All rights reserved. | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  | @ -17,8 +15,6 @@ | ||||||
|  * Machine dependant things |  * Machine dependant things | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| # include <em_path.h> |  | ||||||
| # include "types.h" | # include "types.h" | ||||||
| 
 | 
 | ||||||
| # ifndef NORCSID | # ifndef NORCSID | ||||||
|  | @ -33,17 +29,27 @@ extern string	libpath(); | ||||||
| UNLINK(x) string x; { | UNLINK(x) string x; { | ||||||
| 	/* Must remove the file "x" */ | 	/* Must remove the file "x" */ | ||||||
| 
 | 
 | ||||||
|  | #ifdef USE_SYS | ||||||
| 	sys_remove(x);	/* systemcall to remove file */ | 	sys_remove(x);	/* systemcall to remove file */ | ||||||
|  | #else | ||||||
|  | 	unlink(x); | ||||||
|  | #endif | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| RENAME(x,y) string x,y; { | RENAME(x,y) string x,y; { | ||||||
| 	/* Must move the file "x" to the file "y" */ | 	/* Must move the file "x" to the file "y" */ | ||||||
| 
 | 
 | ||||||
|  | #ifdef USE_SYS | ||||||
| 	if(! sys_rename(x,y)) fatal(1,"Cannot rename to %s",y); | 	if(! sys_rename(x,y)) fatal(1,"Cannot rename to %s",y); | ||||||
|  | #else | ||||||
|  | 	unlink(y); | ||||||
|  | 	if (link(x,y) != 0) fatal(1,"Cannot rename to %s",y); | ||||||
|  | 	unlink(x); | ||||||
|  | #endif | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* to make it easier to patch ... */ | /* to make it easier to patch ... */ | ||||||
| char emdir[64] = EM_DIR; | char libdir[256] = LIBDIR; | ||||||
| 
 | 
 | ||||||
| string | string | ||||||
| libpath(s) string s; { | libpath(s) string s; { | ||||||
|  | @ -53,12 +59,11 @@ libpath(s) string s; { | ||||||
| 	register length; | 	register length; | ||||||
| 	p_mem alloc(); | 	p_mem alloc(); | ||||||
| 	string strcpy(), strcat(); | 	string strcpy(), strcat(); | ||||||
| 	static string subdir = "/lib/LLgen/"; |  | ||||||
| 
 | 
 | ||||||
| 	length = strlen(emdir) + strlen(subdir) + strlen(s) + 1; | 	length = strlen(libdir) + strlen(s) + 2; | ||||||
| 	p = (string) alloc((unsigned) length); | 	p = (string) alloc((unsigned) length); | ||||||
| 	strcpy(p,emdir); | 	strcpy(p,libdir); | ||||||
| 	strcat(p,subdir); | 	strcat(p,"/"); | ||||||
| 	strcat(p,s); | 	strcat(p,s); | ||||||
| 	return p; | 	return p; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /*
 | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
 | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  * All rights reserved. | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /*
 | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
 | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  * All rights reserved. | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  |  | ||||||
|  | @ -3,8 +3,11 @@ | ||||||
| #PARAMS		do not remove this line | #PARAMS		do not remove this line | ||||||
| 
 | 
 | ||||||
| SRC_DIR = $(SRC_HOME)/util/LLgen/src | SRC_DIR = $(SRC_HOME)/util/LLgen/src | ||||||
| INCLUDES = -I$(TARGET_HOME)/h -I$(TARGET_HOME)/config -I$(SRC_DIR) -I. | LIBDIR = $(TARGET_HOME)/lib/LLgen | ||||||
| CFLAGS = -DNDEBUG $(INCLUDES) $(COPTIONS) | INCLUDES = -I$(SRC_DIR) -I. | ||||||
|  | LIBDIRSTR = \"$(LIBDIR)\" | ||||||
|  | DEFINES = -DNDEBUG | ||||||
|  | CFLAGS = $(DEFINES) $(INCLUDES) $(COPTIONS) | ||||||
| LDFLAGS=$(LDOPTIONS) | LDFLAGS=$(LDOPTIONS) | ||||||
| 
 | 
 | ||||||
| LLOPT= # -vvv -x | LLOPT= # -vvv -x | ||||||
|  | @ -18,19 +21,19 @@ CSRC = $(SRC_DIR)/main.c $(SRC_DIR)/gencode.c $(SRC_DIR)/compute.c \ | ||||||
| 	$(SRC_DIR)/machdep.c $(SRC_DIR)/cclass.c | 	$(SRC_DIR)/machdep.c $(SRC_DIR)/cclass.c | ||||||
| CFILES = LLgen.c tokens.c Lpars.c $(CSRC) | CFILES = LLgen.c tokens.c Lpars.c $(CSRC) | ||||||
| GFILES = $(SRC_DIR)/tokens.g $(SRC_DIR)/LLgen.g | GFILES = $(SRC_DIR)/tokens.g $(SRC_DIR)/LLgen.g | ||||||
| FILES = $(SRC_DIR)/types.h $(SRC_DIR)/tunable.h $(SRC_DIR)/extern.h \ | FILES = $(SRC_DIR)/types.h $(SRC_DIR)/extern.h \ | ||||||
| 	$(SRC_DIR)/io.h $(SRC_DIR)/sets.h \ | 	$(SRC_DIR)/io.h $(SRC_DIR)/sets.h \ | ||||||
| 	$(GFILES) $(CSRC) $(SRC_DIR)/proto.make | 	$(GFILES) $(CSRC) $(SRC_DIR)/proto.make | ||||||
| 
 | 
 | ||||||
| all:		parser | all:		parser | ||||||
| 		@make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" | 		@make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "LIBDIR=$(LIBDIR)" | ||||||
| 
 | 
 | ||||||
| parser:		$(GFILES) | parser:		$(GFILES) | ||||||
| 		LLgen $(LLOPT) $(GFILES) | 		LLgen $(LLOPT) $(GFILES) | ||||||
| 		@touch parser | 		@touch parser | ||||||
| 
 | 
 | ||||||
| first:		firstparser | first:		firstparser | ||||||
| 		@make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" | 		@make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "LIBDIR=$(LIBDIR)" | ||||||
| 
 | 
 | ||||||
| firstparser: | firstparser: | ||||||
| 		cp $(SRC_DIR)/LLgen.c.dist LLgen.c | 		cp $(SRC_DIR)/LLgen.c.dist LLgen.c | ||||||
|  | @ -109,7 +112,7 @@ global.$(SUF):	$(SRC_DIR)/io.h | ||||||
| global.$(SUF):	$(SRC_DIR)/types.h | global.$(SUF):	$(SRC_DIR)/types.h | ||||||
| 
 | 
 | ||||||
| machdep.$(SUF):	$(SRC_DIR)/machdep.c | machdep.$(SUF):	$(SRC_DIR)/machdep.c | ||||||
| 		$(CC) -c $(CFLAGS) $(SRC_DIR)/machdep.c | 		$(CC) -c $(CFLAGS) -DUSE_SYS -DLIBDIR=$(LIBDIRSTR) $(SRC_DIR)/machdep.c | ||||||
| machdep.$(SUF):	$(SRC_DIR)/types.h | machdep.$(SUF):	$(SRC_DIR)/types.h | ||||||
| 
 | 
 | ||||||
| main.$(SUF):	$(SRC_DIR)/main.c | main.$(SUF):	$(SRC_DIR)/main.c | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /*
 | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
 | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  * All rights reserved. | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /*
 | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
 | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  * All rights reserved. | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /*
 | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
 | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  * All rights reserved. | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  | @ -13,7 +11,7 @@ | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  * sets.h $Header$ |  * $Header$ | ||||||
|  * Some macros that deal with bitsets and their size |  * Some macros that deal with bitsets and their size | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /* | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands. | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  * All rights reserved. | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /*
 | /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
 | ||||||
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. |  * All rights reserved. | ||||||
|  * See the copyright notice in the ACK home directory, in the file "Copyright". |  | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  | @ -13,7 +11,7 @@ | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  * types.h $Header$ |  * $Header$ | ||||||
|  * Type and structure definitions |  * Type and structure definitions | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue