introduced the em_code(3L) and em_mes(3L) modules
This commit is contained in:
parent
1afbf0e20f
commit
80155f7b4c
23 changed files with 99 additions and 177 deletions
|
@ -34,9 +34,6 @@ decspecs.str
|
||||||
def.str
|
def.str
|
||||||
domacro.c
|
domacro.c
|
||||||
dumpidf.c
|
dumpidf.c
|
||||||
em.c
|
|
||||||
em.h
|
|
||||||
emcode.def
|
|
||||||
error.c
|
error.c
|
||||||
eval.c
|
eval.c
|
||||||
expr.c
|
expr.c
|
||||||
|
@ -58,8 +55,6 @@ level.h
|
||||||
macro.str
|
macro.str
|
||||||
main.c
|
main.c
|
||||||
make.allocd
|
make.allocd
|
||||||
make.emfun
|
|
||||||
make.emmac
|
|
||||||
make.hfiles
|
make.hfiles
|
||||||
make.next
|
make.next
|
||||||
make.tokcase
|
make.tokcase
|
||||||
|
|
|
@ -189,8 +189,12 @@ go_on: /* rescan, the following character has been read */
|
||||||
case '<':
|
case '<':
|
||||||
if (AccFileSpecifier) {
|
if (AccFileSpecifier) {
|
||||||
PushBack(); /* pushback nch */
|
PushBack(); /* pushback nch */
|
||||||
ptok->tk_str =
|
ptok->tk_bts =
|
||||||
string_token("file specifier", '>');
|
string_token(
|
||||||
|
"file specifier",
|
||||||
|
'>',
|
||||||
|
&(ptok->tk_len)
|
||||||
|
);
|
||||||
return ptok->tk_symb = FILESPECIFIER;
|
return ptok->tk_symb = FILESPECIFIER;
|
||||||
}
|
}
|
||||||
if (nch == '<')
|
if (nch == '<')
|
||||||
|
@ -310,6 +314,8 @@ go_on: /* rescan, the following character has been read */
|
||||||
}
|
}
|
||||||
if (ch == '\\') {
|
if (ch == '\\') {
|
||||||
LoadChar(ch);
|
LoadChar(ch);
|
||||||
|
if (ch == '\n')
|
||||||
|
LineNumber++;
|
||||||
ch = quoted(ch);
|
ch = quoted(ch);
|
||||||
}
|
}
|
||||||
val = val*256 + ch;
|
val = val*256 + ch;
|
||||||
|
@ -323,7 +329,7 @@ go_on: /* rescan, the following character has been read */
|
||||||
return ptok->tk_symb = INTEGER;
|
return ptok->tk_symb = INTEGER;
|
||||||
}
|
}
|
||||||
case STSTR: /* string */
|
case STSTR: /* string */
|
||||||
ptok->tk_str = string_token("string", '"');
|
ptok->tk_bts = string_token("string", '"', &(ptok->tk_len));
|
||||||
return ptok->tk_symb = STRING;
|
return ptok->tk_symb = STRING;
|
||||||
case STNUM: /* a numeric constant */
|
case STNUM: /* a numeric constant */
|
||||||
{
|
{
|
||||||
|
@ -466,8 +472,9 @@ skipcomment()
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
string_token(nm, stop_char)
|
string_token(nm, stop_char, plen)
|
||||||
char *nm;
|
char *nm;
|
||||||
|
int *plen;
|
||||||
{
|
{
|
||||||
register int ch;
|
register int ch;
|
||||||
register int str_size;
|
register int str_size;
|
||||||
|
@ -486,28 +493,18 @@ string_token(nm, stop_char)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (ch == '\\') {
|
if (ch == '\\') {
|
||||||
register int nch;
|
LoadChar(ch);
|
||||||
|
if (ch == '\n')
|
||||||
LoadChar(nch);
|
|
||||||
if (nch == '\n') {
|
|
||||||
LineNumber++;
|
LineNumber++;
|
||||||
LoadChar(ch);
|
ch = quoted(ch);
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
str[pos++] = '\\';
|
|
||||||
if (pos == str_size)
|
|
||||||
str = Srealloc(str,
|
|
||||||
str_size += RSTRSIZE);
|
|
||||||
ch = nch;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
str[pos++] = ch;
|
str[pos++] = ch;
|
||||||
if (pos == str_size)
|
if (pos == str_size)
|
||||||
str = Srealloc(str, str_size += RSTRSIZE);
|
str = Srealloc(str, str_size += RSTRSIZE);
|
||||||
LoadChar(ch);
|
LoadChar(ch);
|
||||||
}
|
}
|
||||||
str[pos++] = '\0';
|
str[pos++] = '\0'; /* for filenames etc. */
|
||||||
|
*plen = pos;
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,10 @@ struct token {
|
||||||
unsigned int tok_line; /* the line it (probably) comes from */
|
unsigned int tok_line; /* the line it (probably) comes from */
|
||||||
union {
|
union {
|
||||||
struct idf *tok_idf; /* for IDENTIFIER & TYPE_IDENTIFIER */
|
struct idf *tok_idf; /* for IDENTIFIER & TYPE_IDENTIFIER */
|
||||||
char *tok_str; /* for STRING: text */
|
struct { /* for STRING */
|
||||||
|
char *tok_bts; /* row of bytes */
|
||||||
|
int tok_len; /* length of row of bytes */
|
||||||
|
} tok_string;
|
||||||
struct { /* for INTEGER */
|
struct { /* for INTEGER */
|
||||||
int tok_fund; /* INT or LONG */
|
int tok_fund; /* INT or LONG */
|
||||||
arith tok_ival;
|
arith tok_ival;
|
||||||
|
@ -26,7 +29,8 @@ struct token {
|
||||||
#define tk_file tok_file
|
#define tk_file tok_file
|
||||||
#define tk_line tok_line
|
#define tk_line tok_line
|
||||||
#define tk_idf tok_data.tok_idf
|
#define tk_idf tok_data.tok_idf
|
||||||
#define tk_str tok_data.tok_str
|
#define tk_bts tok_data.tok_string.tok_bts
|
||||||
|
#define tk_len tok_data.tok_string.tok_len
|
||||||
#define tk_fund tok_data.tok_integer.tok_fund
|
#define tk_fund tok_data.tok_integer.tok_fund
|
||||||
#define tk_ival tok_data.tok_integer.tok_ival
|
#define tk_ival tok_data.tok_integer.tok_ival
|
||||||
#define tk_fval tok_data.tok_fval
|
#define tk_fval tok_data.tok_fval
|
||||||
|
|
|
@ -37,7 +37,8 @@ insert_token(tk)
|
||||||
dot.tk_idf = str2idf("int");
|
dot.tk_idf = str2idf("int");
|
||||||
break;
|
break;
|
||||||
case STRING:
|
case STRING:
|
||||||
dot.tk_str = Salloc("", 1);
|
dot.tk_bts = Salloc("", 1);
|
||||||
|
dot.tk_len = 1;
|
||||||
break;
|
break;
|
||||||
case INTEGER:
|
case INTEGER:
|
||||||
dot.tk_fund = INT;
|
dot.tk_fund = INT;
|
||||||
|
|
|
@ -9,7 +9,9 @@ EM_INCLUDES =$(EM)/h# # directory containing EM interface definition
|
||||||
|
|
||||||
# Libraries
|
# Libraries
|
||||||
SYSLIB = /user1/erikb/em/lib/libsystem.a
|
SYSLIB = /user1/erikb/em/lib/libsystem.a
|
||||||
LIBS = $(SYSLIB)
|
EMLIB = /user1/erikb/em/lib/libemk.a
|
||||||
|
EMMESLIB = /user1/erikb/em/lib/libem_mes.a
|
||||||
|
LIBS = $(EMMESLIB) $(EMLIB) $(SYSLIB)
|
||||||
LIB_INCLUDES = /user1/erikb/em/h
|
LIB_INCLUDES = /user1/erikb/em/h
|
||||||
|
|
||||||
# Where to install the compiler and its driver
|
# Where to install the compiler and its driver
|
||||||
|
@ -42,23 +44,22 @@ COBJ = main.o idf.o declarator.o decspecs.o struct.o \
|
||||||
input.o domacro.o replace.o init.o options.o \
|
input.o domacro.o replace.o init.o options.o \
|
||||||
scan.o skip.o stack.o type.o ch7mon.o label.o eval.o \
|
scan.o skip.o stack.o type.o ch7mon.o label.o eval.o \
|
||||||
switch.o storage.o ival.o conversion.o \
|
switch.o storage.o ival.o conversion.o \
|
||||||
em.o blocks.o dataflow.o string.o
|
blocks.o dataflow.o string.o
|
||||||
|
|
||||||
# Objects of other generated C files
|
# Objects of other generated C files
|
||||||
GOBJ = char.o symbol2str.o next.o writeem.o
|
GOBJ = char.o symbol2str.o next.o
|
||||||
|
|
||||||
# generated source files
|
# generated source files
|
||||||
GSRC = char.c symbol2str.c next.c writeem.c \
|
GSRC = char.c symbol2str.c next.c \
|
||||||
code.h declar.h decspecs.h def.h expr.h field.h \
|
code.h declar.h decspecs.h def.h expr.h field.h \
|
||||||
idf.h macro.h stack.h struct.h switch.h type.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!
|
# .h files generated by `make hfiles'; PLEASE KEEP THIS UP-TO-DATE!
|
||||||
GHSRC = botch_free.h dataflow.h debug.h density.h errout.h \
|
GHSRC = botch_free.h dataflow.h debug.h density.h errout.h \
|
||||||
idepth.h idfsize.h ifdepth.h inputtype.h inumlength.h lapbuf.h \
|
idepth.h idfsize.h ifdepth.h inputtype.h inumlength.h lapbuf.h \
|
||||||
maxincl.h myalloc.h nobitfield.h nopp.h \
|
maxincl.h myalloc.h nobitfield.h nopp.h \
|
||||||
nparams.h numsize.h parbufsize.h pathlength.h predefine.h \
|
nparams.h numsize.h parbufsize.h pathlength.h predefine.h \
|
||||||
proc_intf.h strsize.h target_sizes.h textsize.h use_tmp.h \
|
strsize.h target_sizes.h textsize.h use_tmp.h \
|
||||||
str_params.h spec_arith.h
|
str_params.h spec_arith.h
|
||||||
|
|
||||||
# Other generated files, for 'make clean' only
|
# Other generated files, for 'make clean' only
|
||||||
|
@ -119,12 +120,6 @@ struct.h: make.allocd
|
||||||
switch.h: make.allocd
|
switch.h: make.allocd
|
||||||
type.h: make.allocd
|
type.h: make.allocd
|
||||||
|
|
||||||
writeem.c: make.emfun emcode.def
|
|
||||||
./make.emfun emcode.def >writeem.c
|
|
||||||
|
|
||||||
writeem.h: make.emmac emcode.def
|
|
||||||
./make.emmac emcode.def >writeem.h
|
|
||||||
|
|
||||||
# Objects needed for 'main'
|
# Objects needed for 'main'
|
||||||
OBJ = $(COBJ) $(LOBJ) $(GOBJ)
|
OBJ = $(COBJ) $(LOBJ) $(GOBJ)
|
||||||
|
|
||||||
|
@ -199,40 +194,38 @@ ch7.o: Lpars.h arith.h assert.h debug.h def.h expr.h idf.h label.h nobitfield.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
|
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
|
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
|
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
|
alloc.o: alloc.h assert.h debug.h myalloc.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
|
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 expr.h idf.h label.h level.h mes.h nobitfield.h nopp.h sizes.h spec_arith.h specials.h stack.h storage.h type.h use_tmp.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
|
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 tokenname.h use_tmp.h writeem.h
|
error.o: LLlex.h arith.h debug.h errout.h expr.h label.h nopp.h spec_arith.h string.h tokenname.h use_tmp.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
|
field.o: Lpars.h arith.h assert.h code.h debug.h expr.h field.h idf.h label.h nobitfield.h nopp.h sizes.h spec_arith.h type.h
|
||||||
tokenname.o: LLlex.h Lpars.h arith.h idf.h nopp.h spec_arith.h tokenname.h
|
tokenname.o: LLlex.h Lpars.h arith.h idf.h nopp.h spec_arith.h tokenname.h
|
||||||
LLlex.o: LLlex.h Lpars.h alloc.h arith.h assert.h class.h debug.h def.h idf.h idfsize.h input.h nopp.h numsize.h sizes.h spec_arith.h strsize.h
|
LLlex.o: LLlex.h Lpars.h alloc.h arith.h assert.h class.h debug.h def.h idf.h idfsize.h input.h nopp.h numsize.h sizes.h spec_arith.h strsize.h
|
||||||
LLmessage.o: LLlex.h Lpars.h alloc.h arith.h idf.h nopp.h spec_arith.h
|
LLmessage.o: LLlex.h Lpars.h alloc.h arith.h idf.h nopp.h spec_arith.h
|
||||||
input.o: LLlex.h alloc.h arith.h assert.h debug.h idepth.h input.h inputtype.h interface.h nopp.h pathlength.h spec_arith.h
|
input.o: LLlex.h alloc.h arith.h assert.h debug.h idepth.h input.h inputtype.h interface.h nopp.h pathlength.h spec_arith.h
|
||||||
domacro.o: LLlex.h Lpars.h alloc.h arith.h assert.h botch_free.h class.h debug.h idf.h idfsize.h ifdepth.h input.h interface.h macro.h nopp.h nparams.h parbufsize.h spec_arith.h storage.h textsize.h
|
domacro.o: LLlex.h Lpars.h alloc.h arith.h assert.h botch_free.h class.h debug.h idf.h idfsize.h ifdepth.h input.h interface.h macro.h nopp.h nparams.h parbufsize.h spec_arith.h storage.h textsize.h
|
||||||
replace.o: LLlex.h alloc.h arith.h assert.h class.h debug.h idf.h input.h interface.h macro.h nopp.h pathlength.h spec_arith.h string.h strsize.h
|
replace.o: LLlex.h alloc.h arith.h assert.h class.h debug.h idf.h input.h interface.h macro.h nopp.h pathlength.h spec_arith.h string.h strsize.h
|
||||||
init.o: alloc.h class.h idf.h interface.h macro.h nopp.h predefine.h string.h
|
init.o: alloc.h class.h idf.h interface.h macro.h nopp.h predefine.h string.h
|
||||||
options.o: align.h arith.h class.h idf.h idfsize.h macro.h maxincl.h nobitfield.h nopp.h sizes.h spec_arith.h storage.h
|
options.o: align.h arith.h class.h idf.h idfsize.h macro.h maxincl.h nobitfield.h nopp.h sizes.h spec_arith.h storage.h
|
||||||
scan.o: class.h idf.h input.h interface.h lapbuf.h macro.h nopp.h nparams.h
|
scan.o: class.h idf.h input.h interface.h lapbuf.h macro.h nopp.h nparams.h
|
||||||
skip.o: LLlex.h arith.h class.h input.h interface.h nopp.h spec_arith.h
|
skip.o: LLlex.h arith.h class.h input.h interface.h nopp.h spec_arith.h
|
||||||
stack.o: Lpars.h alloc.h arith.h botch_free.h debug.h def.h em.h idf.h level.h mes.h nobitfield.h nopp.h proc_intf.h spec_arith.h stack.h storage.h struct.h type.h use_tmp.h writeem.h
|
stack.o: Lpars.h alloc.h arith.h botch_free.h debug.h def.h idf.h level.h mes.h nobitfield.h nopp.h spec_arith.h stack.h storage.h struct.h type.h use_tmp.h
|
||||||
type.o: Lpars.h align.h alloc.h arith.h def.h idf.h nobitfield.h nopp.h sizes.h spec_arith.h type.h
|
type.o: Lpars.h align.h alloc.h arith.h def.h idf.h nobitfield.h nopp.h sizes.h spec_arith.h type.h
|
||||||
ch7mon.o: Lpars.h arith.h botch_free.h def.h expr.h idf.h label.h nobitfield.h nopp.h spec_arith.h storage.h type.h
|
ch7mon.o: Lpars.h arith.h botch_free.h def.h expr.h idf.h label.h nobitfield.h nopp.h spec_arith.h storage.h type.h
|
||||||
label.o: Lpars.h arith.h def.h idf.h label.h level.h nobitfield.h nopp.h spec_arith.h type.h
|
label.o: Lpars.h arith.h def.h idf.h label.h level.h nobitfield.h nopp.h spec_arith.h type.h
|
||||||
eval.o: Lpars.h align.h arith.h assert.h atw.h code.h dataflow.h debug.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 stack.h string.h type.h writeem.h
|
eval.o: Lpars.h align.h arith.h assert.h atw.h code.h dataflow.h debug.h def.h expr.h idf.h label.h level.h mes.h nobitfield.h nopp.h sizes.h spec_arith.h stack.h string.h type.h
|
||||||
switch.o: arith.h assert.h botch_free.h code.h debug.h density.h em.h expr.h idf.h label.h nobitfield.h nopp.h proc_intf.h spec_arith.h storage.h switch.h type.h writeem.h
|
switch.o: Lpars.h arith.h assert.h botch_free.h code.h debug.h density.h expr.h idf.h label.h nobitfield.h nopp.h spec_arith.h storage.h switch.h type.h
|
||||||
storage.o: alloc.h assert.h botch_free.h debug.h storage.h
|
storage.o: alloc.h assert.h botch_free.h debug.h storage.h
|
||||||
ival.o: Lpars.h align.h arith.h assert.h class.h debug.h def.h em.h expr.h field.h idf.h label.h level.h nobitfield.h nopp.h proc_intf.h sizes.h spec_arith.h string.h struct.h type.h writeem.h
|
ival.o: Lpars.h align.h arith.h assert.h class.h debug.h def.h expr.h field.h idf.h label.h level.h nobitfield.h nopp.h sizes.h spec_arith.h string.h struct.h type.h
|
||||||
conversion.o: Lpars.h arith.h em.h nobitfield.h proc_intf.h sizes.h spec_arith.h type.h writeem.h
|
conversion.o: Lpars.h arith.h nobitfield.h sizes.h spec_arith.h type.h
|
||||||
em.o: arith.h em.h label.h proc_intf.h spec_arith.h writeem.h
|
blocks.o: arith.h atw.h sizes.h spec_arith.h
|
||||||
blocks.o: arith.h atw.h em.h proc_intf.h sizes.h spec_arith.h writeem.h
|
|
||||||
dataflow.o: dataflow.h
|
dataflow.o: dataflow.h
|
||||||
string.o: arith.h nopp.h spec_arith.h str_params.h string.h
|
string.o: arith.h nopp.h spec_arith.h str_params.h string.h
|
||||||
tokenfile.o: Lpars.h
|
tokenfile.o: Lpars.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
|
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
|
statement.o: LLlex.h Lpars.h arith.h botch_free.h code.h debug.h def.h expr.h idf.h label.h nobitfield.h nopp.h spec_arith.h stack.h storage.h type.h
|
||||||
expression.o: LLlex.h Lpars.h arith.h expr.h idf.h label.h nobitfield.h nopp.h spec_arith.h type.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 declar.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
|
Lpars.o: Lpars.h
|
||||||
char.o: class.h
|
char.o: class.h
|
||||||
symbol2str.o: Lpars.h
|
symbol2str.o: Lpars.h
|
||||||
writeem.o: arith.h em.h label.h proc_intf.h spec_arith.h writeem.h
|
|
||||||
|
|
|
@ -95,10 +95,6 @@
|
||||||
#define DEBUG 1 /* perform various self-tests */
|
#define DEBUG 1 /* perform various self-tests */
|
||||||
|
|
||||||
|
|
||||||
!File: proc_intf.h
|
|
||||||
#define PROC_INTF 1 /* compile with procedural EM interface */
|
|
||||||
|
|
||||||
|
|
||||||
!File: use_tmp.h
|
!File: use_tmp.h
|
||||||
#define USE_TMP 1 /* collect exa, exp, ina and inp commands
|
#define USE_TMP 1 /* collect exa, exp, ina and inp commands
|
||||||
and let them precede the rest of
|
and let them precede the rest of
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
#ifndef SPECIAL_ARITHMETICS
|
#ifndef SPECIAL_ARITHMETICS
|
||||||
|
|
||||||
#define arith long /* native */
|
#include <em_arith.h> /* obtain definition of "arith" */
|
||||||
|
|
||||||
#else SPECIAL_ARITHMETICS
|
#else SPECIAL_ARITHMETICS
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
/* $Header$ */
|
/* $Header$ */
|
||||||
/* A S M */
|
/* A S M */
|
||||||
|
|
||||||
asm_seen(s)
|
asm_seen(s, l)
|
||||||
char *s;
|
char *s;
|
||||||
|
int l;
|
||||||
{
|
{
|
||||||
/* 'asm' '(' string ')' ';'
|
/* 'asm' '(' string ')' ';'
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* $Header$ */
|
/* $Header$ */
|
||||||
/* B L O C K S T O R I N G A N D L O A D I N G */
|
/* B L O C K S T O R I N G A N D L O A D I N G */
|
||||||
|
|
||||||
#include "em.h"
|
#include <em.h>
|
||||||
#include "arith.h"
|
#include "arith.h"
|
||||||
#include "sizes.h"
|
#include "sizes.h"
|
||||||
#include "atw.h"
|
#include "atw.h"
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
/* $Header$ */
|
/* $Header$ */
|
||||||
/* C O D E - G E N E R A T I N G R O U T I N E S */
|
/* C O D E - G E N E R A T I N G R O U T I N E S */
|
||||||
|
|
||||||
|
#include <em.h>
|
||||||
|
|
||||||
#include "dataflow.h"
|
#include "dataflow.h"
|
||||||
#include "use_tmp.h"
|
#include "use_tmp.h"
|
||||||
#include "botch_free.h"
|
#include "botch_free.h"
|
||||||
|
@ -15,7 +17,6 @@
|
||||||
#include "expr.h"
|
#include "expr.h"
|
||||||
#include "sizes.h"
|
#include "sizes.h"
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
#include "em.h"
|
|
||||||
#include "level.h"
|
#include "level.h"
|
||||||
#include "decspecs.h"
|
#include "decspecs.h"
|
||||||
#include "declar.h"
|
#include "declar.h"
|
||||||
|
@ -113,13 +114,13 @@ code_scope(text, def)
|
||||||
if (fund == FUNCTION)
|
if (fund == FUNCTION)
|
||||||
C_exp(text);
|
C_exp(text);
|
||||||
else
|
else
|
||||||
C_exa(text);
|
C_exa_dnam(text);
|
||||||
break;
|
break;
|
||||||
case STATIC:
|
case STATIC:
|
||||||
if (fund == FUNCTION)
|
if (fund == FUNCTION)
|
||||||
C_inp(text);
|
C_inp(text);
|
||||||
else
|
else
|
||||||
C_ina(text);
|
C_ina_dnam(text);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -175,7 +176,10 @@ begin_proc(name, def) /* to be called when entering a procedure */
|
||||||
if (strcmp(last_fn_given, FileName) != 0) {
|
if (strcmp(last_fn_given, FileName) != 0) {
|
||||||
/* previous function came from other file */
|
/* previous function came from other file */
|
||||||
C_df_dlb(file_name_label = data_label());
|
C_df_dlb(file_name_label = data_label());
|
||||||
C_con_scon(last_fn_given = FileName, (arith)0);
|
C_con_scon(
|
||||||
|
last_fn_given = FileName,
|
||||||
|
(arith)(strlen(FileName) + 1)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
/* enable debug trace of EM source */
|
/* enable debug trace of EM source */
|
||||||
C_fil_dlb(file_name_label, (arith)0);
|
C_fil_dlb(file_name_label, (arith)0);
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/* $Header$ */
|
/* $Header$ */
|
||||||
/* C O N V E R S I O N - C O D E G E N E R A T O R */
|
/* C O N V E R S I O N - C O D E G E N E R A T O R */
|
||||||
|
|
||||||
|
#include <em.h>
|
||||||
#include "arith.h"
|
#include "arith.h"
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
#include "em.h"
|
|
||||||
#include "sizes.h"
|
#include "sizes.h"
|
||||||
#include "Lpars.h"
|
#include "Lpars.h"
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,7 @@ do_include()
|
||||||
|
|
||||||
AccFileSpecifier = 1;
|
AccFileSpecifier = 1;
|
||||||
if (((tok = GetToken(&tk)) == FILESPECIFIER) || tok == STRING)
|
if (((tok = GetToken(&tk)) == FILESPECIFIER) || tok == STRING)
|
||||||
filenm = tk.tk_str;
|
filenm = tk.tk_bts;
|
||||||
else {
|
else {
|
||||||
lexerror("bad include syntax");
|
lexerror("bad include syntax");
|
||||||
filenm = (char *)0;
|
filenm = (char *)0;
|
||||||
|
@ -393,7 +393,7 @@ do_line(l)
|
||||||
LineNumber = l;
|
LineNumber = l;
|
||||||
/* is there a filespecifier? */
|
/* is there a filespecifier? */
|
||||||
if (GetToken(&tk) == STRING)
|
if (GetToken(&tk) == STRING)
|
||||||
FileName = tk.tk_str;
|
FileName = tk.tk_bts;
|
||||||
SkipRestOfLine();
|
SkipRestOfLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -652,7 +652,7 @@ domacro()
|
||||||
}
|
}
|
||||||
LineNumber = tk.tk_ival;
|
LineNumber = tk.tk_ival;
|
||||||
if ((tok = GetToken(&tk)) == STRING)
|
if ((tok = GetToken(&tk)) == STRING)
|
||||||
FileName = tk.tk_str;
|
FileName = tk.tk_bts;
|
||||||
else
|
else
|
||||||
if (tok != EOI) {
|
if (tok != EOI) {
|
||||||
error("illegal # line");
|
error("illegal # line");
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
/* E R R O R A N D D I A G N O S T I C R O U T I N E S */
|
/* E R R O R A N D D I A G N O S T I C R O U T I N E S */
|
||||||
|
|
||||||
#include <system.h>
|
#include <system.h>
|
||||||
|
#include <em.h>
|
||||||
|
|
||||||
#include "nopp.h"
|
#include "nopp.h"
|
||||||
#include "use_tmp.h"
|
#include "use_tmp.h"
|
||||||
#include "errout.h"
|
#include "errout.h"
|
||||||
|
@ -13,7 +15,6 @@
|
||||||
#include "label.h"
|
#include "label.h"
|
||||||
#include "expr.h"
|
#include "expr.h"
|
||||||
#include "LLlex.h"
|
#include "LLlex.h"
|
||||||
#include "em.h"
|
|
||||||
|
|
||||||
/* This file contains the (non-portable) error-message and diagnostic
|
/* This file contains the (non-portable) error-message and diagnostic
|
||||||
functions. Beware, they are called with a variable number of
|
functions. Beware, they are called with a variable number of
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
compare()
|
compare()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <em.h>
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "nobitfield.h"
|
#include "nobitfield.h"
|
||||||
|
|
||||||
|
@ -32,7 +34,6 @@
|
||||||
#include "align.h"
|
#include "align.h"
|
||||||
#include "mes.h"
|
#include "mes.h"
|
||||||
#include "atw.h"
|
#include "atw.h"
|
||||||
#include "em.h"
|
|
||||||
|
|
||||||
#define CRASH() crash("EVAL: CRASH at line %u", __LINE__)
|
#define CRASH() crash("EVAL: CRASH at line %u", __LINE__)
|
||||||
#define roundup(n) ((n) < word_size ? word_size : (n))
|
#define roundup(n) ((n) < word_size ? word_size : (n))
|
||||||
|
@ -90,7 +91,7 @@ EVAL(expr, val, code, true_label, false_label)
|
||||||
label datlab = data_label();
|
label datlab = data_label();
|
||||||
|
|
||||||
C_df_dlb(datlab);
|
C_df_dlb(datlab);
|
||||||
C_con_scon(expr->SG_VALUE, (arith)0);
|
C_con_scon(expr->SG_VALUE, (arith)expr->SG_LEN);
|
||||||
C_lae_dlb(datlab, (arith)0);
|
C_lae_dlb(datlab, (arith)0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -200,7 +200,8 @@ string2expr(expr)
|
||||||
expr->ex_type = string_type;
|
expr->ex_type = string_type;
|
||||||
expr->ex_lvalue = 0;
|
expr->ex_lvalue = 0;
|
||||||
expr->ex_class = String;
|
expr->ex_class = String;
|
||||||
expr->SG_VALUE = dot.tk_str;
|
expr->SG_VALUE = dot.tk_bts;
|
||||||
|
expr->SG_LEN = dot.tk_len;
|
||||||
expr->SG_DATLAB = 0;
|
expr->SG_DATLAB = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,8 @@ struct value {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct string {
|
struct string {
|
||||||
char *sg_value; /* string of characters repr. the constant */
|
char *sg_value; /* row of bytes repr. the constant */
|
||||||
|
int sg_len; /* length of the row */
|
||||||
label sg_datlab; /* global data-label */
|
label sg_datlab; /* global data-label */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,6 +56,7 @@ struct expr {
|
||||||
#define VL_VALUE ex_object.ex_value.vl_value
|
#define VL_VALUE ex_object.ex_value.vl_value
|
||||||
#define VL_IDF ex_object.ex_value.vl_idf
|
#define VL_IDF ex_object.ex_value.vl_idf
|
||||||
#define SG_VALUE ex_object.ex_string.sg_value
|
#define SG_VALUE ex_object.ex_string.sg_value
|
||||||
|
#define SG_LEN ex_object.ex_string.sg_len
|
||||||
#define SG_DATLAB ex_object.ex_string.sg_datlab
|
#define SG_DATLAB ex_object.ex_string.sg_datlab
|
||||||
#define FL_VALUE ex_object.ex_float.fl_value
|
#define FL_VALUE ex_object.ex_float.fl_value
|
||||||
#define FL_DATLAB ex_object.ex_float.fl_datlab
|
#define FL_DATLAB ex_object.ex_float.fl_datlab
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
#include "nobitfield.h"
|
#include "nobitfield.h"
|
||||||
|
|
||||||
#ifndef NOBITFIELD
|
#ifndef NOBITFIELD
|
||||||
|
#include <em.h>
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
#include "arith.h"
|
#include "arith.h"
|
||||||
|
@ -16,7 +18,6 @@
|
||||||
#include "sizes.h"
|
#include "sizes.h"
|
||||||
#include "Lpars.h"
|
#include "Lpars.h"
|
||||||
#include "field.h"
|
#include "field.h"
|
||||||
#include "em.h"
|
|
||||||
|
|
||||||
arith tmp_pointer_var(); /* eval.c */
|
arith tmp_pointer_var(); /* eval.c */
|
||||||
char *symbol2str(); /* symbol2str.c */
|
char *symbol2str(); /* symbol2str.c */
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
/* $Header$ */
|
/* $Header$ */
|
||||||
/* CODE FOR THE INITIALISATION OF GLOBAL VARIABLES */
|
/* CODE FOR THE INITIALISATION OF GLOBAL VARIABLES */
|
||||||
|
|
||||||
|
#include <em.h>
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "nobitfield.h"
|
#include "nobitfield.h"
|
||||||
|
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "em.h"
|
|
||||||
#include "arith.h"
|
#include "arith.h"
|
||||||
#include "align.h"
|
#include "align.h"
|
||||||
#include "label.h"
|
#include "label.h"
|
||||||
|
@ -48,7 +49,7 @@ do_ival(tpp, expr)
|
||||||
*/
|
*/
|
||||||
while (strings != 0) {
|
while (strings != 0) {
|
||||||
C_df_dlb(strings->SG_DATLAB);
|
C_df_dlb(strings->SG_DATLAB);
|
||||||
C_con_scon(strings->SG_VALUE, (arith)0);
|
C_con_scon(strings->SG_VALUE, (arith)strings->SG_LEN);
|
||||||
strings = strings->next;
|
strings = strings->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,32 +98,25 @@ IVAL(tpp, expr)
|
||||||
*/
|
*/
|
||||||
if (tp->tp_up->tp_fund == CHAR && expr->ex_class == String)
|
if (tp->tp_up->tp_fund == CHAR && expr->ex_class == String)
|
||||||
init_string(tpp, expr);
|
init_string(tpp, expr);
|
||||||
else {
|
else /* " int i[24] = 12;" */
|
||||||
/* " int i[24] = 12;" */
|
|
||||||
check_and_pad(expr, tpp);
|
check_and_pad(expr, tpp);
|
||||||
}
|
|
||||||
return 0; /* nothing left */
|
return 0; /* nothing left */
|
||||||
case STRUCT:
|
case STRUCT:
|
||||||
/* struct initialisation */
|
/* struct initialisation */
|
||||||
if (valid_type(tp, "struct") == 0)
|
if (valid_type(tp, "struct") == 0)
|
||||||
return 0;
|
return 0;
|
||||||
if (ISCOMMA(expr)) {
|
if (ISCOMMA(expr)) /* list of initialisation expressions */
|
||||||
/* list of initialisation expressions */
|
|
||||||
return do_struct(expr, tp);
|
return do_struct(expr, tp);
|
||||||
}
|
|
||||||
/* "struct foo f = 12;" */
|
/* "struct foo f = 12;" */
|
||||||
check_and_pad(expr, tpp);
|
check_and_pad(expr, tpp);
|
||||||
return 0;
|
return 0;
|
||||||
case UNION:
|
case UNION:
|
||||||
/* sorry, but .... */
|
|
||||||
error("union initialisation not allowed");
|
error("union initialisation not allowed");
|
||||||
return 0;
|
return 0;
|
||||||
case ERRONEOUS:
|
case ERRONEOUS:
|
||||||
return 0;
|
return 0;
|
||||||
default:
|
default: /* fundamental type */
|
||||||
/* fundamental type */
|
if (ISCOMMA(expr)) { /* " int i = {12};" */
|
||||||
if (ISCOMMA(expr)) {
|
|
||||||
/* " int i = {12};" */
|
|
||||||
if (IVAL(tpp, expr->OP_LEFT) != 0)
|
if (IVAL(tpp, expr->OP_LEFT) != 0)
|
||||||
too_many_initialisers(expr);
|
too_many_initialisers(expr);
|
||||||
/* return remainings of the list for the
|
/* return remainings of the list for the
|
||||||
|
@ -500,7 +494,7 @@ check_ival(expr, type)
|
||||||
{
|
{
|
||||||
label datlab = data_label();
|
label datlab = data_label();
|
||||||
|
|
||||||
C_ina_pt(datlab);
|
C_ina_dlb(datlab);
|
||||||
C_con_dlb(datlab, (arith)0);
|
C_con_dlb(datlab, (arith)0);
|
||||||
expr->SG_DATLAB = datlab;
|
expr->SG_DATLAB = datlab;
|
||||||
store_string(expr);
|
store_string(expr);
|
||||||
|
@ -557,8 +551,6 @@ check_ival(expr, type)
|
||||||
|
|
||||||
/* init_string() initialises an array of characters by specifying
|
/* init_string() initialises an array of characters by specifying
|
||||||
a string constant.
|
a string constant.
|
||||||
Escaped characters should be converted into its corresponding
|
|
||||||
ASCII character value. E.g. '\000' -> (char) 0.
|
|
||||||
Alignment is taken care of.
|
Alignment is taken care of.
|
||||||
*/
|
*/
|
||||||
init_string(tpp, expr)
|
init_string(tpp, expr)
|
||||||
|
@ -570,7 +562,7 @@ init_string(tpp, expr)
|
||||||
char *s = expr->SG_VALUE;
|
char *s = expr->SG_VALUE;
|
||||||
arith ntopad;
|
arith ntopad;
|
||||||
|
|
||||||
length = prepare_string(s);
|
length = expr->SG_LEN;
|
||||||
if (tp->tp_size == (arith)-1) {
|
if (tp->tp_size == (arith)-1) {
|
||||||
/* set the dimension */
|
/* set the dimension */
|
||||||
tp = *tpp = construct_type(ARRAY, tp->tp_up, length);
|
tp = *tpp = construct_type(ARRAY, tp->tp_up, length);
|
||||||
|
@ -593,73 +585,6 @@ init_string(tpp, expr)
|
||||||
con_byte(0);
|
con_byte(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepare_string() strips the escaped characters of a
|
|
||||||
string and replaces them by the ascii characters they stand for.
|
|
||||||
The ascii length of the resulting string is returned, including the
|
|
||||||
terminating null-character.
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
prepare_string(str)
|
|
||||||
register char *str;
|
|
||||||
{
|
|
||||||
register char *t = str;
|
|
||||||
register count = 1; /* there's always a null at the end ! */
|
|
||||||
|
|
||||||
while (*str) {
|
|
||||||
count++;
|
|
||||||
if (*str == '\\') {
|
|
||||||
switch (*++str) {
|
|
||||||
case 'b':
|
|
||||||
*t++ = '\b';
|
|
||||||
str++;
|
|
||||||
break;
|
|
||||||
case 'f':
|
|
||||||
*t++ = '\f';
|
|
||||||
str++;
|
|
||||||
break;
|
|
||||||
case 'n':
|
|
||||||
*t++ = '\n';
|
|
||||||
str++;
|
|
||||||
break;
|
|
||||||
case 'r':
|
|
||||||
*t++ = '\r';
|
|
||||||
str++;
|
|
||||||
break;
|
|
||||||
case 't':
|
|
||||||
*t++ = '\t';
|
|
||||||
str++;
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* octal value of: */
|
|
||||||
case '0':
|
|
||||||
case '1':
|
|
||||||
case '2':
|
|
||||||
case '3':
|
|
||||||
case '4':
|
|
||||||
case '5':
|
|
||||||
case '6':
|
|
||||||
case '7':
|
|
||||||
{
|
|
||||||
register cnt = 0, oct = 0;
|
|
||||||
|
|
||||||
do
|
|
||||||
oct = oct * 8 + *str - '0';
|
|
||||||
while (is_oct(*++str) && ++cnt < 3);
|
|
||||||
*t++ = (char) oct;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
*t++ = *str++;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
*t++ = *str++;
|
|
||||||
}
|
|
||||||
*t = '\0'; /* don't forget this one !!! */
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef NOBITFIELD
|
#ifndef NOBITFIELD
|
||||||
/* put_bf() takes care of the initialisation of (bit-)field
|
/* put_bf() takes care of the initialisation of (bit-)field
|
||||||
selectors of a struct: each time such an initialisation takes place,
|
selectors of a struct: each time such an initialisation takes place,
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
/* $Header$ */
|
/* $Header$ */
|
||||||
/* L A B E L D E F I N I T I O N */
|
/* L A B E L D E F I N I T I O N */
|
||||||
|
|
||||||
#define label unsigned int
|
#include <em_label.h> /* obtain definition of "label" */
|
||||||
|
|
||||||
#define NO_LABEL (label) 0
|
#define NO_LABEL (label) 0
|
||||||
|
|
||||||
extern label lab_count;
|
extern label lab_count;
|
||||||
|
|
|
@ -321,31 +321,24 @@ preprocess()
|
||||||
printf("\n#line %ld \"%s\"\n",
|
printf("\n#line %ld \"%s\"\n",
|
||||||
lastlineno, lastfilenm);
|
lastlineno, lastfilenm);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (DOT) {
|
switch (DOT) {
|
||||||
|
|
||||||
case IDENTIFIER:
|
case IDENTIFIER:
|
||||||
case TYPE_IDENTIFIER:
|
case TYPE_IDENTIFIER:
|
||||||
printf(dot.tk_idf->id_text);
|
printf(dot.tk_idf->id_text);
|
||||||
printf(" ");
|
printf(" ");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STRING:
|
case STRING:
|
||||||
printf("\"%s\" ", dot.tk_str);
|
printf("\"%s\" ", dot.tk_bts);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INTEGER:
|
case INTEGER:
|
||||||
printf("%ld ", dot.tk_ival);
|
printf("%ld ", dot.tk_ival);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FLOATING:
|
case FLOATING:
|
||||||
printf("%s ", dot.tk_fval);
|
printf("%s ", dot.tk_fval);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EOI:
|
case EOI:
|
||||||
case EOF:
|
case EOF:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
default: /* very expensive... */
|
default: /* very expensive... */
|
||||||
printf("%s ", symbol2str(DOT));
|
printf("%s ", symbol2str(DOT));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
/* DERIVED FROM $Header$ */
|
/* DERIVED FROM $Header$ */
|
||||||
/* S T A C K / U N S T A C K R O U T I N E S */
|
/* S T A C K / U N S T A C K R O U T I N E S */
|
||||||
|
|
||||||
|
#include <system.h>
|
||||||
|
#include <em.h>
|
||||||
|
#include <em_reg.h>
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "use_tmp.h"
|
#include "use_tmp.h"
|
||||||
#include "botch_free.h"
|
#include "botch_free.h"
|
||||||
|
|
||||||
#include <system.h>
|
|
||||||
#include "alloc.h"
|
#include "alloc.h"
|
||||||
#include "Lpars.h"
|
#include "Lpars.h"
|
||||||
#include "arith.h"
|
#include "arith.h"
|
||||||
|
@ -17,7 +20,6 @@
|
||||||
#include "storage.h"
|
#include "storage.h"
|
||||||
#include "level.h"
|
#include "level.h"
|
||||||
#include "mes.h"
|
#include "mes.h"
|
||||||
#include "em.h"
|
|
||||||
|
|
||||||
/* #include <em_reg.h> */
|
/* #include <em_reg.h> */
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
/* STATEMENT SYNTAX PARSER */
|
/* STATEMENT SYNTAX PARSER */
|
||||||
|
|
||||||
{
|
{
|
||||||
|
#include <em.h>
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "botch_free.h"
|
#include "botch_free.h"
|
||||||
|
|
||||||
|
@ -13,7 +15,6 @@
|
||||||
#include "expr.h"
|
#include "expr.h"
|
||||||
#include "code.h"
|
#include "code.h"
|
||||||
#include "storage.h"
|
#include "storage.h"
|
||||||
#include "em.h"
|
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
#include "def.h"
|
#include "def.h"
|
||||||
|
|
||||||
|
@ -386,16 +387,18 @@ compound_statement(arith *nbytes;):
|
||||||
;
|
;
|
||||||
|
|
||||||
asm_statement
|
asm_statement
|
||||||
{ char *asm_string;
|
{ char *asm_bts;
|
||||||
|
int asm_len;
|
||||||
}
|
}
|
||||||
:
|
:
|
||||||
ASM
|
ASM
|
||||||
'('
|
'('
|
||||||
STRING
|
STRING
|
||||||
{ asm_string = dot.tk_str;
|
{ asm_bts = dot.tk_bts;
|
||||||
|
asm_len = dot.tk_len;
|
||||||
}
|
}
|
||||||
')'
|
')'
|
||||||
';'
|
';'
|
||||||
{ asm_seen(asm_string);
|
{ asm_seen(asm_bts, asm_len);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
/* $Header$ */
|
/* $Header$ */
|
||||||
/* S W I T C H - S T A T E M E N T A D M I N I S T R A T I O N */
|
/* S W I T C H - S T A T E M E N T A D M I N I S T R A T I O N */
|
||||||
|
|
||||||
|
#include <em.h>
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "botch_free.h"
|
#include "botch_free.h"
|
||||||
#include "density.h"
|
#include "density.h"
|
||||||
|
@ -15,7 +17,6 @@
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
#include "expr.h"
|
#include "expr.h"
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
#include "em.h"
|
|
||||||
|
|
||||||
extern char options[];
|
extern char options[];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue