🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lsi
Article #1021

Re: 1986 Berkeley tools: Preprocessor problem w/ Meg input file

#1021
From: Nai Chi Lee
Date: Sun, 13 Mar 1988 02:29
28 lines
1238 bytes
In article <192@enlog.Wichita.NCR.COM>, dlandis@enlog.Wichita.NCR.COM (Dave Landis) writes:
> 
> INPUTS:  INIT OP1 OP2 SWR MACK;
> OUTPUTS: WAIT MINIT MRD SACK MWR DLI;
> 
> -- Define the encoding for the processor operations
> -- The C preprocessor does textual substitions on these macros.
> #define OP  OP1 OP2
> #define NOP   0   0
> .
> .
> I get the error message
> 
> 	"unexpected token IDENTIFIER on line 6"

The reason is: Meg don't know what in the world is "#define" !

You must run "cpp" (the C-preprocessor) on your input file 
to perform those "#define" subsitution first. Do it like this:

	/lib/cpp -P in-file-name > temp-file
	meg -e temp-file > out-file-name

--
Nai Chi Lee

"It is difficult to make something foolproof because fools are so ingenious."
[Anon]
Technical Details
Message-ID: <1043@sbcs.sunysb.edu>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!linus!philabs!sbcs!nclee
References: <192@enlog.Wichita.NCR.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!linus!philabs!sbcs!nclee
From: nclee@sbcs.sunysb.edu (Nai Chi Lee)
Newsgroups: comp.lsi
Subject: Re: 1986 Berkeley tools:  Preprocessor problem w/ Meg input file
Message-ID: <1043@sbcs.sunysb.edu>
Date: 13 Mar 88 02:29:21 GMT
References: <192@enlog.Wichita.NCR.COM>
Organization: State University of New York at Stony Brook
Lines: 28
Keywords: Meg, Preprocessor
Summary: run "cpp" first