Article 1219 of eunet.jokes:
Path: santra!tut!draken!kth!enea!mcvax!hp4nl!botter!star.cs.vu.nl!leendert@cs.vu.nl
From: leendert@cs.vu.nl (Leendert van Doorn)
Newsgroups: eunet.jokes
Subject: Ultimate compiler
Message-ID: <1572@sjoerd.cs.vu.nl>
Date: 25 Oct 88 11:48:49 GMT
Sender: leendert@cs.vu.nl
Reply-To: leendert@cs.vu.nl (Leendert v Doorn HIO)
Organization: VU Informatica, Amsterdam
Lines: 81


This article contains the source of the ultimate compiler. The compiler
is capable of compiling almost every language in a suitable manner. There
are some cases in which the compiler has an undefined behaviour. However,
these cases are very rare !

Although the compiler is very brief in its error messages, it still proves
to be very useful and efficient in a student or development environment.
The theory on which the compiler is based, will surely amaze you, and may
simplify the works of many compiler writers. Figures show that the compiler
is capable of doing a perfect job in 99% of the cases.

Please send bug reports and or comments to the authors.


#include	<sys/types.h>
#include	<sys/timeb.h>

char	*Errors[] = {
		"ERROR 54ax1F",			/* IBM */
		"syntax error",
		"Compilation aborted: too many errors",
		"syntax error",
		"Fatal error: no source file",
		"syntax error",
		"Fatal error: expression causes compiler to loop",
		0,				/* generate core dump */
		"Fatal error: template not found",
		"syntax error",
		"Fatal error: faulty register move",
		"syntax error",
		"out of tree space; simplify expression",
		"syntax error",
		"register allocation error",
		"syntax error",
		"bad bdty",
		"syntax error",
		"bad op type in walkf",
		"syntax error",
		"stack overflow",
		"syntax error",
		"unknown opcode: 0x13FF",
		0,
		"scopes nested too deep",
		0,
		"parameter stack overflow",
		"syntax error",
		"compiler takes size of function",
		"syntax error",
		"insane structure member list",
		"syntax error",
		"too many local variables",
		0,
		"nidcl error",
		"syntax error",
		"symbol table full",
		"syntax error",
		"bad option: x",
		0,
		"bad AR_?? action",
		"syntax error",
		"Ran out of memory (savestr)",
		"syntax error",
		"gummy structure",
	};

main()
{
	struct	timeb	tm;


	ftime(&tm);
	srand(getpid() ^ (int) tm.millitm);
	sleep(2);
	puts(Errors[rand() % (sizeof Errors / sizeof *Errors)]);
	exit(13);
}

-- 
Maarten Litmaath                                         <maart@cs.vu.nl>
Leendert van Doorn 			   		 <leendert@cs.vu.nl>


