1989-02-07 11:04:05 +00:00
|
|
|
/*
|
|
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
|
|
|
/* $Header$ */
|
|
|
|
/* PREPROCESSOR: PRAGMA INTERPRETER */
|
|
|
|
|
|
|
|
#include "arith.h"
|
|
|
|
#include "LLlex.h"
|
|
|
|
#include "Lpars.h"
|
|
|
|
#include "debug.h"
|
|
|
|
#include "idf.h"
|
|
|
|
#include "input.h"
|
|
|
|
#include "ifdepth.h"
|
|
|
|
#include "botch_free.h"
|
|
|
|
#include "nparams.h"
|
|
|
|
#include "parbufsize.h"
|
|
|
|
#include "textsize.h"
|
|
|
|
#include "idfsize.h"
|
|
|
|
#include "assert.h"
|
|
|
|
#include <alloc.h>
|
|
|
|
#include "class.h"
|
|
|
|
#include "macro.h"
|
|
|
|
|
|
|
|
#define P_UNKNOWN 0
|
|
|
|
#define P_FLAGS 1
|
|
|
|
|
|
|
|
struct pkey {
|
|
|
|
char *pk_name;
|
|
|
|
int pk_key;
|
|
|
|
} pragmas[] = {
|
1989-10-20 13:06:10 +00:00
|
|
|
{"cemflags", P_FLAGS},
|
1989-02-07 11:04:05 +00:00
|
|
|
{0, P_UNKNOWN}
|
|
|
|
};
|
|
|
|
|
|
|
|
extern struct idf *GetIdentifier();
|
|
|
|
|
|
|
|
do_pragma()
|
|
|
|
{
|
|
|
|
register struct pkey *pkp;
|
|
|
|
register struct idf *id;
|
|
|
|
struct token tk;
|
|
|
|
|
1989-09-19 16:13:23 +00:00
|
|
|
if ((id = GetIdentifier(1)) != (struct idf *)0) {
|
1989-02-07 11:04:05 +00:00
|
|
|
/* Lineair search - why bother ?
|
|
|
|
*/
|
|
|
|
for (pkp = &pragmas[0]; pkp->pk_key != P_UNKNOWN; pkp++)
|
|
|
|
if (strcmp(pkp->pk_name, id->id_text) == 0)
|
|
|
|
break;
|
|
|
|
|
|
|
|
switch (pkp->pk_key) {
|
|
|
|
case P_FLAGS:
|
|
|
|
if (GetToken(&tk) == STRING)
|
|
|
|
do_option(tk.tk_bts);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case P_UNKNOWN:
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
1989-10-18 13:12:31 +00:00
|
|
|
SkipToNewLine();
|
1989-02-07 11:04:05 +00:00
|
|
|
}
|
|
|
|
}
|