clif-0.93/ 40755 1750 1750 0 7130620254 11023 5ustar korenkorenclif-0.93/example/ 40755 1750 1750 0 7130620250 12452 5ustar korenkorenclif-0.93/example/Makefile100644 1750 1750 1364 5772312540 14225 0ustar korenkorenCFLAGS=-g -O0 all : lin_main lin_server lin_read : lin_main.o lin_clnt.o lin_xdr.o cc lin_main.o lin_clnt.o lin_xdr.o -Lwork/rpc -lrpclib -o lin_read lin_write : lin_write.o lin_clnt.o lin_xdr.o cc lin_write.o lin_clnt.o lin_xdr.o -Lwork/rpc -lrpclib -o lin_write lin_main : lin_main.o lin_clnt.o lin_xdr.o cc lin_main.o lin_clnt.o lin_xdr.o -o lin_main lin_server : lin_proc.o lin_svc.o lin_xdr.o cc lin_proc.o lin_svc.o lin_xdr.o -o lin_server lin_svc.c lin_xdr.c lin_clnt.c lin.h : lin.x rpcgen lin.x lin_write.o : lin_write.c lin.h lin_main.o : lin_main.c lin.h lin_clnt.o : lin_clnt.c lin.h lin_xdr.o : lin_xdr.c lin.h lin_proc.o : lin_proc.c lin.h lin_svc.o : lin_svc.c lin.h clean: rm -f *.o lin_svc.c lin_clnt.c lin_xdr.c lin.h clif-0.93/example/apl.c100644 1750 1750 7401 6121510160 13466 0ustar korenkoren#include #include #include #include #include #include "lin.h" #ifndef O_RDONLY #define O_RDONLY 00 #endif #ifndef O_WRONLY #define O_WRONLY 01 #endif #define A_2 0.0000821 #define B 0.0017 #define EPS 1.e-3 static double tmp1,tmp2,tmp3,suma; CLIENT *cl; int *result; static int i; static remote_o_struct ros[] = {{"/dev/lc0",O_RDONLY,2}, {"/dev/lc1",O_RDONLY,2}, {"/dev/lc2",O_RDONLY,2}, {"/dev/lc3",O_RDONLY,2}, {"/dev/lc4",O_RDONLY,2}, {"/dev/lc5",O_RDONLY,2}, {"/dev/lc6",O_RDONLY,2}, {"/dev/lc7",O_RDONLY,2}, {"/dev/lc16",O_WRONLY,2}}; static remote_r_w_struct rrws[9],*res; static char server[]="air.vm.stuba.sk"; void open_termo() { if((cl = clnt_create(server,REMOTEDEVICE,REMOTEVERS,"tcp")) == NULL) { clnt_pcreateerror(server); exit(1); } for(i=0; i < 8; i++) { if((result=remote_open_1(&ros[i],cl)) == NULL) { clnt_perror(cl,server); exit(1); } if(*result == -1) { printf("bad open\n"); exit(1); } rrws[i].fd = *result; rrws[i].bytes = 2; } if((result=remote_open_1(&ros[8],cl)) == NULL) { clnt_perror(cl,server); exit(1); } if(*result == -1) { printf("bad open\n"); exit(1); } rrws[8].fd = *result; rrws[8].bytes = 2; } void read_termo(a) char **a; { double *resu; resu = (double *)a[0]; for(i=0; i < 8; i++) { if((res=remote_read_1(&rrws[i],cl)) == NULL) { clnt_perror(cl,server); exit(1); } if(res->bytes == -1) { printf("bad read\n"); exit(1); } *(short *)rrws[i].buf = *(short *)res->buf; resu[i] = 5*((double)*(short *)rrws[i].buf-2048)/1024; /* printf("%g %d\n",resu[i],*(short *)rrws[i].buf);*/ } } void write_termo(a) char **a; { short pom; double dat; dat = *(double *)a[0]; pom = (short)(2048 * dat/5); *(short *)rrws[8].buf = pom; if((result=remote_write_1(&rrws[8],cl)) == NULL) { clnt_perror(cl,server); exit(1); } if(*result == -1) { printf("bad write\n"); exit(1); } } void close_termo() { for(i=0; i < 9; i++) { if((result=remote_close_1(&rrws[i].fd,cl)) == NULL) { clnt_perror(cl,server); exit(1); } } } void mysig_handler() { } void init_wait(a) char **a; { struct itimerval cas_new, cas_old; long milisec; milisec = *(int *)a[0]; cas_new.it_interval.tv_sec=milisec/1000; cas_new.it_interval.tv_usec=(milisec % 1000)*1000; cas_new.it_value.tv_sec=milisec/1000; cas_new.it_value.tv_usec=(milisec % 1000)*1000; setitimer(ITIMER_REAL,&cas_new,&cas_old); signal(SIGALRM,mysig_handler); } double green_func(a) char **a; { int n=0; double periodic = 0; double lambda = 0.; double majorant = 0.; double x,t,l,tk; x = *(double *)a[0]; t = *(double *)a[1]; l = *(double *)a[2]; tk = *(double *)a[3]; suma = 0.; while(1) { periodic = (2*n + 1) * M_PI / (2 * l); tmp1 = sin(periodic * x); lambda = pow(periodic,(double)2) * A_2; tmp2 = exp(-lambda * (tk-t))/(2 * n + 1); #ifdef DEBUG printf("tmp2 %g\n",tmp2); #endif if(n == 0) { if(tmp2 == 0.) { majorant = 1.; } else { majorant = fabs(tmp2); } } if (fabs(tmp2) < majorant) { if(suma == 0. && n > 5) { break; } if(fabs(suma/majorant) > 1/EPS) { break; } else { majorant = majorant / 10.; } } tmp3 = tmp1 * tmp2 ; suma = suma + tmp3; n += 1; } #ifdef DEBUG printf(" suma %g\n",suma); #endif suma = 4. / M_PI * exp(-B * (tk-t)) * suma; return(suma); } void csigpause(a) char **a; { sigpause(*(int *)a[0]); } clif-0.93/example/lin.h100644 1750 1750 2026 6217617540 13517 0ustar korenkoren/* * Please do not edit this file. * It was generated using rpcgen. */ #ifndef _LIN_H_RPCGEN #define _LIN_H_RPCGEN #include typedef char *devicetype; typedef char cbuf[256]; struct remote_o_struct { devicetype device; int flags; int mode; }; typedef struct remote_o_struct remote_o_struct; struct remote_r_w_struct { int fd; cbuf buf; int bytes; }; typedef struct remote_r_w_struct remote_r_w_struct; #define REMOTEDEVICE ((unsigned long)(99)) #define REMOTEVERS ((unsigned long)(1)) #define REMOTE_OPEN ((unsigned long)(1)) extern int * remote_open_1(); #define REMOTE_CLOSE ((unsigned long)(2)) extern int * remote_close_1(); #define REMOTE_READ ((unsigned long)(3)) extern remote_r_w_struct * remote_read_1(); #define REMOTE_WRITE ((unsigned long)(4)) extern int * remote_write_1(); extern int remotedevice_1_freeresult(); /* the xdr functions */ extern bool_t xdr_devicetype(); extern bool_t xdr_cbuf(); extern bool_t xdr_remote_o_struct(); extern bool_t xdr_remote_r_w_struct(); #endif /* !_LIN_H_RPCGEN */ clif-0.93/example/lin.x100644 1750 1750 624 6000764134 13511 0ustar korenkorentypedef string devicetype<>; typedef char cbuf[256]; struct remote_o_struct { devicetype device; int flags; int mode; }; struct remote_r_w_struct { int fd; cbuf buf; int bytes; }; program REMOTEDEVICE { version REMOTEVERS { int REMOTE_OPEN(remote_o_struct)=1; int REMOTE_CLOSE(int)=2; remote_r_w_struct REMOTE_READ(remote_r_w_struct)=3; int REMOTE_WRITE(remote_r_w_struct)=4; }=1; }=99; clif-0.93/example/lin_clnt.c100644 1750 1750 3120 6217617540 14526 0ustar korenkoren/* * Please do not edit this file. * It was generated using rpcgen. */ #include "lin.h" /* Default timeout can be changed using clnt_control() */ static struct timeval TIMEOUT = { 25, 0 }; int * remote_open_1(argp, clnt) remote_o_struct *argp; CLIENT *clnt; { static int clnt_res; memset((char *)&clnt_res, 0, sizeof (clnt_res)); if (clnt_call(clnt, REMOTE_OPEN, (xdrproc_t) xdr_remote_o_struct, (caddr_t) argp, (xdrproc_t) xdr_int, (caddr_t) &clnt_res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } int * remote_close_1(argp, clnt) int *argp; CLIENT *clnt; { static int clnt_res; memset((char *)&clnt_res, 0, sizeof (clnt_res)); if (clnt_call(clnt, REMOTE_CLOSE, (xdrproc_t) xdr_int, (caddr_t) argp, (xdrproc_t) xdr_int, (caddr_t) &clnt_res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } remote_r_w_struct * remote_read_1(argp, clnt) remote_r_w_struct *argp; CLIENT *clnt; { static remote_r_w_struct clnt_res; memset((char *)&clnt_res, 0, sizeof (clnt_res)); if (clnt_call(clnt, REMOTE_READ, (xdrproc_t) xdr_remote_r_w_struct, (caddr_t) argp, (xdrproc_t) xdr_remote_r_w_struct, (caddr_t) &clnt_res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } int * remote_write_1(argp, clnt) remote_r_w_struct *argp; CLIENT *clnt; { static int clnt_res; memset((char *)&clnt_res, 0, sizeof (clnt_res)); if (clnt_call(clnt, REMOTE_WRITE, (xdrproc_t) xdr_remote_r_w_struct, (caddr_t) argp, (xdrproc_t) xdr_int, (caddr_t) &clnt_res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } clif-0.93/example/lin_main.c100644 1750 1750 2254 6000764134 14511 0ustar korenkoren#include #include #include "lin.h" #define O_RDONLY 00 #define O_WRONLY 01 main(argc,argv) int argc; char **argv; { CLIENT *cl; int *result; static int i; static short *vysl; static remote_o_struct ros; static remote_r_w_struct rrws,*res; if(argc<3) { fprintf(stderr,"usage: host device\n"); exit(0); } if((cl = clnt_create(argv[1],REMOTEDEVICE,REMOTEVERS,"tcp")) == NULL) { clnt_pcreateerror(argv[1]); exit(1); } ros.device=argv[2]; ros.flags=O_RDONLY; if((result=remote_open_1(&ros,cl)) == NULL) { clnt_perror(cl,argv[1]); exit(1); } if(*result == -1) { printf("bad open\n"); exit(1); } rrws.fd = *result; rrws.bytes = 2; for(i=0;i<100000;i++) { if((res=remote_read_1(&rrws,cl)) == NULL) { clnt_perror(cl,argv[1]); exit(1); } if(res->bytes == -1) { printf("bad read\n"); exit(1); } vysl = (short *)res->buf; printf("%d %x\n",*vysl,*vysl); } if((result=remote_close_1(&rrws.fd,cl)) == NULL) { clnt_perror(cl,argv[1]); exit(1); } } clif-0.93/example/lin_proc.c100644 1750 1750 1574 6000764134 14534 0ustar korenkoren#include #include #include "lin.h" int * remote_open_1(remote_op_struct) remote_o_struct *remote_op_struct; { static int result; result = open(remote_op_struct->device,remote_op_struct->flags,remote_op_struct->mode); return(&result); } int * remote_close_1(fd) int *fd; { static int result; result = close(*fd); return(&result); } remote_r_w_struct * remote_read_1(par) remote_r_w_struct *par; { static remote_r_w_struct result; int i; result.fd = par->fd; result.bytes = par->bytes; if(read(result.fd,result.buf,result.bytes) == -1) { result.bytes = -1; } return(&result); } int * remote_write_1(remote_w_struct) remote_r_w_struct *remote_w_struct; { static int result; result = write(remote_w_struct->fd,remote_w_struct->buf,remote_w_struct->bytes); return(&result); } clif-0.93/example/lin_svc.c100644 1750 1750 11546 6217617540 14414 0ustar korenkoren/* * Please do not edit this file. * It was generated using rpcgen. */ #include "lin.h" #include #include /* getenv, exit */ #include #include #include #include #include #include /* rlimit */ #include #ifdef DEBUG #define RPC_SVC_FG #endif #define _RPCSVC_CLOSEDOWN 120 static int _rpcpmstart; /* Started by a port monitor ? */ /* States a server can be in wrt request */ #define _IDLE 0 #define _SERVED 1 static int _rpcsvcstate = _IDLE; /* Set when a request is serviced */ static int _rpcsvccount = 0; /* Number of requests being serviced */ static void _msgout(msg) char *msg; { #ifdef RPC_SVC_FG if (_rpcpmstart) syslog(LOG_ERR, msg); else (void) fprintf(stderr, "%s\n", msg); #else syslog(LOG_ERR, msg); #endif } static void closedown(sig) int sig; { if (_rpcsvcstate == _IDLE && _rpcsvccount == 0) { extern fd_set svc_fdset; static int size; int i, openfd; struct t_info tinfo; if (!t_getinfo(0, &tinfo) && (tinfo.servtype == T_CLTS)) exit(0); if (size == 0) { struct rlimit rl; rl.rlim_max = 0; getrlimit(RLIMIT_NOFILE, &rl); if ((size = rl.rlim_max) == 0) { return; } } for (i = 0, openfd = 0; i < size && openfd < 2; i++) if (FD_ISSET(i, &svc_fdset)) openfd++; if (openfd <= 1) exit(0); } else _rpcsvcstate = _IDLE; (void) signal(SIGALRM, (void(*)()) closedown); (void) alarm(_RPCSVC_CLOSEDOWN/2); } static void remotedevice_1(rqstp, transp) struct svc_req *rqstp; register SVCXPRT *transp; { union { remote_o_struct remote_open_1_arg; int remote_close_1_arg; remote_r_w_struct remote_read_1_arg; remote_r_w_struct remote_write_1_arg; } argument; char *result; bool_t (*_xdr_argument)(), (*_xdr_result)(); char *(*local)(); _rpcsvccount++; switch (rqstp->rq_proc) { case NULLPROC: (void) svc_sendreply(transp, xdr_void, (char *)NULL); _rpcsvccount--; _rpcsvcstate = _SERVED; return; case REMOTE_OPEN: _xdr_argument = xdr_remote_o_struct; _xdr_result = xdr_int; local = (char *(*)()) remote_open_1; break; case REMOTE_CLOSE: _xdr_argument = xdr_int; _xdr_result = xdr_int; local = (char *(*)()) remote_close_1; break; case REMOTE_READ: _xdr_argument = xdr_remote_r_w_struct; _xdr_result = xdr_remote_r_w_struct; local = (char *(*)()) remote_read_1; break; case REMOTE_WRITE: _xdr_argument = xdr_remote_r_w_struct; _xdr_result = xdr_int; local = (char *(*)()) remote_write_1; break; default: svcerr_noproc(transp); _rpcsvccount--; _rpcsvcstate = _SERVED; return; } (void) memset((char *)&argument, 0, sizeof (argument)); if (!svc_getargs(transp, _xdr_argument, (caddr_t) &argument)) { svcerr_decode(transp); _rpcsvccount--; _rpcsvcstate = _SERVED; return; } result = (*local)(&argument, rqstp); if (result != NULL && !svc_sendreply(transp, _xdr_result, result)) { svcerr_systemerr(transp); } if (!svc_freeargs(transp, _xdr_argument, (caddr_t) &argument)) { _msgout("unable to free arguments"); exit(1); } _rpcsvccount--; _rpcsvcstate = _SERVED; return; } main() { pid_t pid; int i; (void) sigset(SIGPIPE, SIG_IGN); /* * If stdin looks like a TLI endpoint, we assume * that we were started by a port monitor. If * t_getstate fails with TBADF, this is not a * TLI endpoint. */ if (t_getstate(0) != -1 || t_errno != TBADF) { char *netid; struct netconfig *nconf = NULL; SVCXPRT *transp; int pmclose; _rpcpmstart = 1; openlog("lin", LOG_PID, LOG_DAEMON); if ((netid = getenv("NLSPROVIDER")) == NULL) { /* started from inetd */ pmclose = 1; } else { if ((nconf = getnetconfigent(netid)) == NULL) _msgout("cannot get transport info"); pmclose = (t_getstate(0) != T_DATAXFER); } if ((transp = svc_tli_create(0, nconf, NULL, 0, 0)) == NULL) { _msgout("cannot create server handle"); exit(1); } if (nconf) freenetconfigent(nconf); if (!svc_reg(transp, REMOTEDEVICE, REMOTEVERS, remotedevice_1, 0)) { _msgout("unable to register (REMOTEDEVICE, REMOTEVERS)."); exit(1); } if (pmclose) { (void) signal(SIGALRM, (void(*)()) closedown); (void) alarm(_RPCSVC_CLOSEDOWN/2); } svc_run(); exit(1); /* NOTREACHED */ } else { #ifndef RPC_SVC_FG int size; struct rlimit rl; pid = fork(); if (pid < 0) { perror("cannot fork"); exit(1); } if (pid) exit(0); rl.rlim_max = 0; getrlimit(RLIMIT_NOFILE, &rl); if ((size = rl.rlim_max) == 0) exit(1); for (i = 0; i < size; i++) (void) close(i); i = open("/dev/null", 2); (void) dup2(i, 1); (void) dup2(i, 2); setsid(); openlog("lin", LOG_PID, LOG_DAEMON); #endif } if (!svc_create(remotedevice_1, REMOTEDEVICE, REMOTEVERS, "netpath")) { _msgout("unable to create (REMOTEDEVICE, REMOTEVERS) for netpath."); exit(1); } svc_run(); _msgout("svc_run returned"); exit(1); /* NOTREACHED */ } clif-0.93/example/lin_write.c100644 1750 1750 2620 6000764134 14714 0ustar korenkoren#include #include #include "lin.h" #define O_RDONLY 00 #define O_WRONLY 01 main(argc,argv) int argc; char **argv; { CLIENT *cl; int *result; static int i,j; static remote_o_struct ros; static remote_r_w_struct rrws,*res; if(argc<3) { fprintf(stderr,"usage: host device\n"); exit(0); } if((cl = clnt_create(argv[1],REMOTEDEVICE,REMOTEVERS,"tcp")) == NULL) { clnt_pcreateerror(argv[1]); exit(1); } ros.device=argv[2]; ros.flags=O_WRONLY; if((result=remote_open_1(&ros,cl)) == NULL) { clnt_perror(cl,argv[1]); exit(1); } if(*result == -1) { printf("bad open\n"); exit(1); } rrws.fd = *result; rrws.bytes = 2; for(i=0;i<5;i++) { for(j=0;j<4096;j++) { *(short *)rrws.buf = (short)j; if((result=remote_write_1(&rrws,cl)) == NULL) { clnt_perror(cl,argv[1]); exit(1); } if(*result == -1) { printf("bad write\n"); exit(1); } } for(j=4095;j>=0;j--) { *(short *)rrws.buf = (short)j; if((result = remote_write_1(&rrws,cl)) == NULL) { clnt_perror(cl,argv[1]); exit(1); } if(*result == -1) { printf("bad write\n"); exit(1); } } } if((result=remote_close_1(&rrws.fd,cl)) == NULL) { clnt_perror(cl,argv[1]); exit(1); } } clif-0.93/example/lin_xdr.c100644 1750 1750 2027 6217617540 14370 0ustar korenkoren/* * Please do not edit this file. * It was generated using rpcgen. */ #include "lin.h" bool_t xdr_devicetype(xdrs, objp) register XDR *xdrs; devicetype *objp; { register long *buf; if (!xdr_string(xdrs, objp, ~0)) return (FALSE); return (TRUE); } bool_t xdr_cbuf(xdrs, objp) register XDR *xdrs; cbuf objp; { register long *buf; if (!xdr_vector(xdrs, (char *)objp, 256, sizeof (char), (xdrproc_t) xdr_char)) return (FALSE); return (TRUE); } bool_t xdr_remote_o_struct(xdrs, objp) register XDR *xdrs; remote_o_struct *objp; { register long *buf; if (!xdr_devicetype(xdrs, &objp->device)) return (FALSE); if (!xdr_int(xdrs, &objp->flags)) return (FALSE); if (!xdr_int(xdrs, &objp->mode)) return (FALSE); return (TRUE); } bool_t xdr_remote_r_w_struct(xdrs, objp) register XDR *xdrs; remote_r_w_struct *objp; { register long *buf; if (!xdr_int(xdrs, &objp->fd)) return (FALSE); if (!xdr_cbuf(xdrs, objp->buf)) return (FALSE); if (!xdr_int(xdrs, &objp->bytes)) return (FALSE); return (TRUE); } clif-0.93/tests/ 40755 1750 1750 0 7130620253 12164 5ustar korenkorenclif-0.93/tests/check-them100555 1750 1750 2276 6555172474 14245 0ustar korenkoren#! /bin/sh target=$1 rm -f test.diff core pokusny_subor *.core for file in *.ci; do if test $file = "io.ci" -o $file = "test00.ci"; then continue fi file_out=`echo $file | sed 's/\.ci//'` num=`echo $file_out | egrep test[6-9][0-9]` if test -n "$num" -a "$num" != test60; then arg="-fno-call-by-reference -fcall-by-value -fhandle-main" else arg= fi if test -f "$file_out.in"; then $target/clif $file $arg < "$file_out.in" 1>test.diff 2>/dev/null elif test -f "$file_out.out"; then $target/clif $file $arg 1>test.diff 2>/dev/null else $target/clif $file $arg fi if test $? -ne 0; then failed="$failed $file" elif test -f core; then failed="$failed $file" elif test -f *.core; then failed="$failed $file" elif test -f test.diff; then if cmp -s test.diff "$file_out.out"; then if test -f pokusny_subor; then if cmp -s pokusny_subor test_file; then : else failed="$failed $file" fi fi else failed="$failed $file" fi fi rm -f core *.core test.diff pokusny_subor echo "$file" done if test -z "$failed"; then echo "All checks successful" else echo "Failed checks were:" echo "$failed" fi clif-0.93/tests/clif.ini100644 1750 1750 14 6305505150 13633 0ustar korenkoren-Wall io.ci clif-0.93/tests/etst_em_lval100644 1750 1750 100 6514157117 14642 0ustar korenkoren#include int main () { int i = 0; (i+1)++; } clif-0.93/tests/faktor.ci100444 1750 1750 274 6500555701 14052 0ustar korenkorenint a, n; int fakt (int n) { if (n == 1) return 1; else return (fakt (n-1) * n); } printf ("zadaj n\n"); scanf ("%d", n); a = fakt (n); printf ("faktorial = %d\n", a); exit; clif-0.93/tests/faktor.in100644 1750 1750 3 6322174650 14017 0ustar korenkoren10 clif-0.93/tests/faktor.out100644 1750 1750 34 6354673300 14245 0ustar korenkorenzadaj n faktorial = 3628800 clif-0.93/tests/faktord.ci100444 1750 1750 313 6500556013 14205 0ustar korenkorendouble a, n; double fakt (double n) { if (n == 1) return 1; else return (fakt (n-1) * n); } printf ("%s\n", "zadaj n"); scanf ("%lf", n); a = fakt (n); printf ("faktorial = %g\n", a); exit; clif-0.93/tests/faktord.in100644 1750 1750 4 6322174650 14164 0ustar korenkoren170 clif-0.93/tests/faktord.out100644 1750 1750 41 6354673564 14423 0ustar korenkorenzadaj n faktorial = 7.25742e+306 clif-0.93/tests/io.ci100444 1750 1750 550 6501232053 13161 0ustar korenkorenexport_type extern int printf (); export_type extern int fprintf (); extern int scanf (); extern int fscanf (); extern int fflush (); extern int cclose (); extern int copen (); extern int chopen (); extern void chwrite (); extern void chclose (); extern void chflush (); extern double sin (); remote {intrinsic , "ttt" } h; enum { stdin, stdout, stderr }; clif-0.93/tests/test00.ci100444 1750 1750 331 6500557204 13675 0ustar korenkoren/* program testujuci nacitanie a vypisy textu */ printf ("zadaj hodnotu premennej a\n"); scanf ("%d", a); printf ("zadaj hodnotu premennej b\n"); scanf ("%d", b); c = a + b; printf ("ich sucet je: %d\n", c); exit; clif-0.93/tests/test01.ci100444 1750 1750 361 6500556102 13675 0ustar korenkoren/* program testujuci nacitanie a vypisy textu */ int a, b, c; printf ("%s\n", "zadaj hodnotu premennej a"); scanf ("%d", a); printf ("%s\n", "zadaj hodnotu premennej b"); scanf ("%d", b); c = a + b; printf ("ich sucet je: %d\n", c); exit; clif-0.93/tests/test01.in100644 1750 1750 4 6322166664 13660 0ustar korenkoren1 2 clif-0.93/tests/test01.out100644 1750 1750 104 6354673564 14131 0ustar korenkorenzadaj hodnotu premennej a zadaj hodnotu premennej b ich sucet je: 3 clif-0.93/tests/test02.ci100444 1750 1750 1064 6500501137 13715 0ustar korenkoren/* program testujuci vnaranie cyklov */ int x, y; y = 1; for (x = 1; x < 15; ++x) { printf ("teraz som v tele cyklu for %d\n", x); while (x > 5 && x < 10) { printf ("teraz som v tele cyklu while %d\n", x); if (x == 9) { printf ("teraz som v tele prvej podmienky %d\n", x); break; } if (x == 8) { printf ("teraz som v tele druhej podmienky %d\n", x); break; } x = x + y; printf ("%d\n", x); } if (x == 14) { printf ("teraz som v tele tretej podmienky %d\n", x); break; } } exit; clif-0.93/tests/test02.out100644 1750 1750 1115 6354673564 14155 0ustar korenkorenteraz som v tele cyklu for 1 teraz som v tele cyklu for 2 teraz som v tele cyklu for 3 teraz som v tele cyklu for 4 teraz som v tele cyklu for 5 teraz som v tele cyklu for 6 teraz som v tele cyklu while 6 7 teraz som v tele cyklu while 7 8 teraz som v tele cyklu while 8 teraz som v tele druhej podmienky 8 teraz som v tele cyklu for 9 teraz som v tele cyklu while 9 teraz som v tele prvej podmienky 9 teraz som v tele cyklu for 10 teraz som v tele cyklu for 11 teraz som v tele cyklu for 12 teraz som v tele cyklu for 13 teraz som v tele cyklu for 14 teraz som v tele tretej podmienky 14 clif-0.93/tests/test03.ci100444 1750 1750 343 6500501253 13674 0ustar korenkorenint x; for (x = 1; x <= 10; ++x) { printf ("teraz som vo for\n"); if (x == 5) { printf ("teraz som v IF\n"); printf ("__________________________________\n"); break; } printf ("%d\n", x); } exit; clif-0.93/tests/test03.out100644 1750 1750 217 6354673564 14140 0ustar korenkorenteraz som vo for 1 teraz som vo for 2 teraz som vo for 3 teraz som vo for 4 teraz som vo for teraz som v IF __________________________________ clif-0.93/tests/test04.ci100444 1750 1750 360 6500502240 13671 0ustar korenkorenint x; x = 1; while (x <= 10) { printf ("teraz som vo while\n"); if (x == 5) { printf ("teraz som v IF\n"); printf ("______________________________\n"); ++x; break; } printf ("%d\n" ,x); ++x; } exit; clif-0.93/tests/test04.out100644 1750 1750 225 6354673564 14140 0ustar korenkorenteraz som vo while 1 teraz som vo while 2 teraz som vo while 3 teraz som vo while 4 teraz som vo while teraz som v IF ______________________________ clif-0.93/tests/test05.ci100444 1750 1750 550 6500502304 13674 0ustar korenkorenint x; for (x = 1; x <= 10; ++x) { printf ("teraz som vo for\n"); printf ("%d\n", x); while(x >= 5 && x <= 8) { if (x == 7) { printf ("*********************************\n"); ++x; break; } printf ("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); printf ("teraz som vo while\n"); printf ("%d\n", x); ++x; } } exit; clif-0.93/tests/test05.out100644 1750 1750 426 6354673564 14144 0ustar korenkorenteraz som vo for 1 teraz som vo for 2 teraz som vo for 3 teraz som vo for 4 teraz som vo for 5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo while 5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo while 6 ********************************* teraz som vo for 9 teraz som vo for 10 clif-0.93/tests/test06.ci100444 1750 1750 450 6500502337 13702 0ustar korenkorenint x,y; for (x = 1; x <= 5; ++x) { printf ("teraz som vo for1 %d\n",x); for (y = 1; y <= 5; ++y) { if (y == 3) { printf ("***TERAZ SOM V if***\n"); continue; } printf ("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); printf ("teraz som vo for2 %d\n", y); } } exit; clif-0.93/tests/test06.out100444 1750 1750 2405 6500333407 14140 0ustar korenkorenteraz som vo for1 1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 2 ***TERAZ SOM V if*** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 5 teraz som vo for1 2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 2 ***TERAZ SOM V if*** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 5 teraz som vo for1 3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 2 ***TERAZ SOM V if*** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 5 teraz som vo for1 4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 2 ***TERAZ SOM V if*** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 5 teraz som vo for1 5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 2 ***TERAZ SOM V if*** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! teraz som vo for2 5 clif-0.93/tests/test07.ci100444 1750 1750 366 6500556167 13723 0ustar korenkorenint prva () { return 1; } int druha (int a, int b) { a = a + b; printf ("%d\n", a); return a; } int d, c; printf ("zadaj d\n"); scanf ("%d", d); /* c=prva(); */ c = druha (prva(), d); printf ("c=%d\n", c); printf ("d=%d\n", d); exit; clif-0.93/tests/test07.in100644 1750 1750 2 6322173710 13652 0ustar korenkoren1 clif-0.93/tests/test07.out100644 1750 1750 22 6354673660 14113 0ustar korenkorenzadaj d 2 c=2 d=1 clif-0.93/tests/test08.ci100444 1750 1750 60 6500556227 13670 0ustar korenkorenif (1) { printf ("A\n"); printf ("B\n"); } clif-0.93/tests/test08.in100644 1750 1750 6 6322173234 13660 0ustar korenkorenexit; clif-0.93/tests/test08.out100644 1750 1750 4 6354673660 14074 0ustar korenkorenA B clif-0.93/tests/test09.ci100444 1750 1750 140 6500556302 13702 0ustar korenkorenint a, b, c; c = 10; b = 20; a = (b = b + c); printf ("a=%d\n", a); printf ("b=%d\n", b); exit; clif-0.93/tests/test09.out100644 1750 1750 12 6354673660 14114 0ustar korenkorena=30 b=30 clif-0.93/tests/test10.ci100444 1750 1750 37 6500502652 13656 0ustar korenkorenint a, b, c; load (test00.ci); clif-0.93/tests/test10.in100644 1750 1750 4 6322173424 13650 0ustar korenkoren1 2 clif-0.93/tests/test10.out100644 1750 1750 104 6354673660 14126 0ustar korenkorenzadaj hodnotu premennej a zadaj hodnotu premennej b ich sucet je: 3 clif-0.93/tests/test11.ci100444 1750 1750 511 6500557264 13705 0ustar korenkorenint d, c, e; int prva () { return 1; } int druha (int a, int b) { printf ("d=%d\n", d); b = a + b; printf ("b=%d\n", b); printf ("d=%d\n", d); return b; } printf ("zadaj d\n"); scanf ("%d", d); /* c=prva(); */ c = druha (d = e = prva (), d); printf ("c=%d\n", c); printf ("d=%d\n", d); printf ("e=%d\n", e); exit; clif-0.93/tests/test11.in100644 1750 1750 2 6322176074 13653 0ustar korenkoren1 clif-0.93/tests/test11.out100644 1750 1750 40 6354673660 14106 0ustar korenkorenzadaj d d=1 b=2 d=2 c=2 d=2 e=1 clif-0.93/tests/test12.ci100444 1750 1750 121 6500504115 13666 0ustar korenkorenint a, i; i = 4; --i; a = ++i; printf ("i=%d\n", i); printf ("a=%d\n", a); exit; clif-0.93/tests/test12.out100644 1750 1750 10 6354673660 14104 0ustar korenkoreni=4 a=4 clif-0.93/tests/test13.ci100444 1750 1750 714 6500557334 13712 0ustar korenkorendouble a, b, c; int d, e, f; printf ("%s\n", "zadaj a"); scanf ("%lf", a); printf ("%s\n", "zadaj b"); scanf ("%lf", b); printf ("%s\n", "zadaj c"); scanf ("%lf", c); printf ("%s\n", "zadaj d"); scanf ("%d", d); printf ("%s\n", "zadaj e"); scanf ("%d", e); printf ("%s\n", "zadaj f"); scanf ("%d", f); a = a + b * e; printf ("a=%g\n", a); a = a + (int)(b * e); printf ("a=%g\n", a); f = b + c; printf ("f=%d\n", f); e = (int)a * c; printf ("e=%d\n", e); exit; clif-0.93/tests/test13.in100644 1750 1750 22 6322377564 13706 0ustar korenkoren1.1 2.1 3.1 4 5 6 clif-0.93/tests/test13.out100644 1750 1750 107 6354673754 14140 0ustar korenkorenzadaj a zadaj b zadaj c zadaj d zadaj e zadaj f a=11.6 a=21.6 f=5 e=65 clif-0.93/tests/test14.ci100444 1750 1750 277 6500561105 13706 0ustar korenkorenint a, b, c; double d, f; printf ("zadaj a\n"); scanf ("%d", a); printf ("zadaj d\n"); scanf ("%lf", d); f = b = !a; printf ("b=%d\n", b); printf ("f=%g\n", f); c = ~a; printf ("c=%d\n", c); clif-0.93/tests/test14.in100644 1750 1750 14 6322377754 13711 0ustar korenkoren1 2.3 exit; clif-0.93/tests/test14.out100644 1750 1750 35 6354673754 14121 0ustar korenkorenzadaj a zadaj d b=0 f=0 c=-2 clif-0.93/tests/test15.ci100444 1750 1750 534 6500560722 13707 0ustar korenkorenint a[3][2], b, i, j; scanf ("%d", b); a[0][0] = 1; a[0][1] = b; a[1][0] = 3; a[2][1] = 6; a[1][1] = 4; a[2][0] = 5; a[2][1] = a[0][0] * a[0][1] * a[1][0] * a[1][1] * a[2][0] * a[2][1]; printf ("%d\n", a[0][0]); printf ("%d\n", a[0][1]); printf ("%d\n", a[1][0]); printf ("%d\n", a[1][1]); printf ("%d\n", a[2][0]); printf ("%d\n", a[2][1]); exit; clif-0.93/tests/test15.in100644 1750 1750 2 6322176360 13655 0ustar korenkoren2 clif-0.93/tests/test15.out100644 1750 1750 16 6354673754 14121 0ustar korenkoren1 2 3 4 5 720 clif-0.93/tests/test16.ci100444 1750 1750 366 6500560701 13710 0ustar korenkorenint a[3][2], b, i, j; scanf ("%d", b); i = 1;j = 1; a[0][0] = 1; a[i * j][1] = b; printf("%d\n", a[i - j][0]); printf("%d\n", a[0][1]); printf("%d\n", a[1][0]); printf("%d\n", a[1][1]); printf("%d\n", a[2][0]); printf("%d\n", a[i + j][1]); exit; clif-0.93/tests/test16.in100644 1750 1750 2 6322176454 13662 0ustar korenkoren1 clif-0.93/tests/test16.out100444 1750 1750 14 6475066551 14111 0ustar korenkoren1 0 0 1 0 0 clif-0.93/tests/test17.ci100444 1750 1750 532 6500560647 13715 0ustar korenkorendouble a[3][2], b; scanf ("%lf", b); a[0][0] = 1; a[0][1] = b; a[1][0] = 3; a[2][1] = 6; a[1][1] = 4; a[2][0] = 5; a[2][1] = a[0][0] * a[0][1] * a[1][0] * a[1][1] * a[2][0] * a[2][1]; printf ("%g\n", a[0][0]); printf ("%g\n", a[0][1]); printf ("%g\n", a[1][0]); printf ("%g\n", a[1][1]); printf ("%g\n", a[2][0]); printf ("%g\n", a[2][1]); exit; clif-0.93/tests/test17.in100644 1750 1750 2 6322404514 13652 0ustar korenkoren2 clif-0.93/tests/test17.out100644 1750 1750 16 6354673754 14123 0ustar korenkoren1 2 3 4 5 720 clif-0.93/tests/test18.ci100444 1750 1750 573 6500505132 13707 0ustar korenkorenint a[5][5][5][5][5], i, j, k, l, m; a[0][0][0][0][0] = 1; a[1][1][1][1][1] = 1; a[2][2][2][2][2] = 1; a[3][3][3][3][3] = 1; a[4][4][4][4][4] = a[3][3][3][3][3]; for (i = 0; i < 5; ++i) { for (j = 0; j < 5; ++j) { for (k = 0; k < 5; ++k) { for (l = 0; l < 5; ++l) { for (m = 0; m < 5; ++m) printf ("%d\n", a[i][j][k][l][m]); } } } } exit; clif-0.93/tests/test18.out100644 1750 1750 14152 6354673754 14212 0ustar korenkoren1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 clif-0.93/tests/test19.ci100444 1750 1750 510 6500505213 13677 0ustar korenkorenint a[5][5][5][5][5]; a[0][0][0][0][0] = 1; a[1][1][1][1][1] = 1; a[2][2][2][2][2] = 1; a[3][3][3][3][3] = 1; a[4][4][4][4][4] = a[3][3][3][3][3]; printf ("%d\n", a[0][0][0][0][0]); printf ("%d\n", a[1][1][1][1][1]); printf ("%d\n", a[2][2][2][2][2]); printf ("%d\n", a[3][3][3][3][3]); printf ("%d\n", a[4][4][4][4][4]); exit; clif-0.93/tests/test19.out100644 1750 1750 12 6354673754 14121 0ustar korenkoren1 1 1 1 1 clif-0.93/tests/test20.ci100444 1750 1750 616 6500546046 13707 0ustar korenkorenint a[5][5][5][5][5]; a[0][0][0][0][0] = 1; a[1][1][1][1][1] = 1; a[2][2][2][2][2] = 1; a[3][3][3][3][3] = 1; a[4][4][4][4][4] = a[3][3][3][3][3]; int z (int b[][5][5][5][5]) { printf ("%d\n", b[0][0][0][0][0]); printf ("%d\n", b[1][1][1][1][1]); printf ("%d\n", b[2][2][2][2][2]); printf ("%d\n", b[3][3][3][3][3]); printf ("%d\n", b[4][4][4][4][4]); } printf ("zaciatok"); z (a); exit; clif-0.93/tests/test20.out100644 1750 1750 22 6354674050 14100 0ustar korenkorenzaciatok1 1 1 1 1 clif-0.93/tests/test21.ci100444 1750 1750 372 6500546021 13700 0ustar korenkorenint a[5][5][5][5][5]; a[0][0][0][0][0] = 1; a[1][1][1][1][1] = 1; a[2][2][2][2][2] = 1; a[3][3][3][3][3] = 1; a[4][4][4][4][4] = a[3][3][3][3][3]; int z (int b[][5][5][5][5]) { printf ("%d\n", b[1][1][1][1][1]); } printf ("zaciatok"); z (a); exit; clif-0.93/tests/test21.out100644 1750 1750 12 6354674050 14100 0ustar korenkorenzaciatok1 clif-0.93/tests/test22.ci100444 1750 1750 177 6500560621 13706 0ustar korenkorenint a, b; printf ("zadaj a\n"); scanf ("%d", a); printf ("zadaj b\n"); scanf ("%d", b); a = a ^ b; printf ("a=%d\n", a); exit; clif-0.93/tests/test22.in100644 1750 1750 4 6322176644 13662 0ustar korenkoren2 3 clif-0.93/tests/test22.out100644 1750 1750 24 6354674050 14104 0ustar korenkorenzadaj a zadaj b a=1 clif-0.93/tests/test23.ci100444 1750 1750 401 6500506053 13674 0ustar korenkorenenum {b, c, d} a; printf ("%d %d %d\n", b, c, d); struct x { int a; enum {x, y, z} b; float c; }; struct x xa; xa.b = y; printf ("%d\n", xa.b); enum a1 { x1, y1, z1 }; enum a1 c1, b1; b1 = x1; c1 = z1; printf ("b1=%d c1=%d\n", b1, c1); exit; clif-0.93/tests/test23.out100644 1750 1750 22 6472574137 14111 0ustar korenkoren0 1 2 1 b1=0 c1=2 clif-0.93/tests/test24.ci100444 1750 1750 141 6500545744 13710 0ustar korenkorenint i; for (i = 0; i < 100000; ++i) { /* cprintf(1,"%d",i);*/ } printf ("uz som vonku\n"); exit; clif-0.93/tests/test24.out100644 1750 1750 15 6354674240 14107 0ustar korenkorenuz som vonku clif-0.93/tests/test25.ci100444 1750 1750 121 6500556521 13702 0ustar korenkorenint i; for (i = 0; i < 3; ++i) { csuspend; } printf ("uz som vonku\n"); exit; clif-0.93/tests/test25.in100444 1750 1750 6 6500557031 13654 0ustar korenkorenexit; clif-0.93/tests/test25.out100644 1750 1750 0 6354674240 14062 0ustar korenkorenclif-0.93/tests/test26.ci100444 1750 1750 320 6500556634 13711 0ustar korenkorenint a, n; int fakt (int n) { csuspend; if (n == 1) return 1; else return (fakt (n-1) * n); } printf ("zadaj n\n"); scanf ("%d", n); csuspend; a = fakt (n); printf ("faktorial = %d\n", a); exit; clif-0.93/tests/test26.in100644 1750 1750 10 6322177320 13673 0ustar korenkoren1 exit; clif-0.93/tests/test26.out100644 1750 1750 10 6500561207 14073 0ustar korenkorenzadaj n clif-0.93/tests/test27.ci100444 1750 1750 344 6500560560 13711 0ustar korenkoren/* program testujuci nacitanie a vypisy textu */ char a, b, c; printf ("zadaj hodnotu premennej a\n"); scanf ("%c", a); printf ("zadaj hodnotu premennej b\n"); scanf ("%c", b); c = a + b; printf ("ich sucet je: %c", c); exit; clif-0.93/tests/test27.in100644 1750 1750 3 6322177510 13657 0ustar korenkorena clif-0.93/tests/test27.out100644 1750 1750 103 6354674240 14130 0ustar korenkorenzadaj hodnotu premennej a zadaj hodnotu premennej b ich sucet je: mclif-0.93/tests/test28.ci100444 1750 1750 210 6500560465 13706 0ustar korenkorenint a; printf ("%s\n", "zadaj a"); scanf ("%d", a); a ? printf ("%s\n", "true") : printf ("%s\n", "false"); printf ("%d\n", a); exit; clif-0.93/tests/test28.in100644 1750 1750 2 6322201030 13640 0ustar korenkoren1 clif-0.93/tests/test28.out100644 1750 1750 17 6354674240 14115 0ustar korenkorenzadaj a true 1 clif-0.93/tests/test29.ci100444 1750 1750 37 6500545663 13701 0ustar korenkorenprintf ("\x5c pokus\n"); exit; clif-0.93/tests/test29.out100644 1750 1750 10 6354674240 14107 0ustar korenkoren\ pokus clif-0.93/tests/test30.ci100444 1750 1750 374 6500561243 13705 0ustar korenkorenint a; printf ("input a\n"); scanf ("%d", a); { int a; { double a; printf ("input a\n"); scanf ("%lf", a); printf ("double a = %g\n", a); } a = 10; printf ("int a in block = %d\n", a); } printf ("int a = %d\n", a); exit; clif-0.93/tests/test30.in100644 1750 1750 6 6325353334 13657 0ustar korenkoren1 2.4 clif-0.93/tests/test30.out100644 1750 1750 75 6354674334 14116 0ustar korenkoreninput a input a double a = 2.4 int a in block = 10 int a = 1 clif-0.93/tests/test31.ci100444 1750 1750 565 6500560372 13712 0ustar korenkorenint d, c, e; int prva(); int druha (int a, int b) { int f; printf ("d=%d\n", d); b = a + b; printf ("b=%d\n", b); printf ("d=%d\n", d); f = prva (); printf ("f=%d\n", f); return b; } int prva () { return 1; } printf ("zadaj d\n"); scanf ("%d", d); c = druha (d = e = prva (), d); printf ("c=%d\n", c); printf ("d=%d\n", d); printf ("e=%d\n", e); exit; clif-0.93/tests/test31.in100644 1750 1750 2 6322201124 13636 0ustar korenkoren1 clif-0.93/tests/test31.out100644 1750 1750 44 6354674334 14113 0ustar korenkorenzadaj d d=1 b=2 d=2 f=1 c=2 d=2 e=1 clif-0.93/tests/test32.ci100444 1750 1750 207 6500507023 13676 0ustar korenkoren/* program testujuci nacitanie a vypisy textu */ char a, b, c; a = 'a'; b = 'b'; c = a * b; printf ("ich sucet je: %c\n", c); exit; clif-0.93/tests/test32.out100644 1750 1750 20 6354674334 14106 0ustar korenkorenich sucet je: " clif-0.93/tests/test33.ci100444 1750 1750 142 6500545562 13707 0ustar korenkorenint i; for (i = 0; i < 1000000; ++i) { /* cprintf(1,"%d",i);*/ } printf ("uz som vonku\n"); exit; clif-0.93/tests/test33.out100644 1750 1750 15 6354674334 14113 0ustar korenkorenuz som vonku clif-0.93/tests/test34.ci100444 1750 1750 312 6500545525 13706 0ustar korenkorenint i; printf ("in front\n"); { a: printf ("a "); if (10 == i) { printf ("in if "); ++i; goto b; } else ++i; goto a; b: printf ("b "); } printf ("after\n"); exit; clif-0.93/tests/test34.out100644 1750 1750 55 6354674334 14120 0ustar korenkorenin front a a a a a a a a a a a in if b after clif-0.93/tests/test35.ci100444 1750 1750 145 6500545441 13710 0ustar korenkorendouble x; for (x = 0; x < 6.3; x = x + 0.01) printf ("%g\n", x); printf ("uz som vonku\n"); exit; clif-0.93/tests/test35.out100644 1750 1750 6022 6354674334 14161 0ustar korenkoren0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.2 1.21 1.22 1.23 1.24 1.25 1.26 1.27 1.28 1.29 1.3 1.31 1.32 1.33 1.34 1.35 1.36 1.37 1.38 1.39 1.4 1.41 1.42 1.43 1.44 1.45 1.46 1.47 1.48 1.49 1.5 1.51 1.52 1.53 1.54 1.55 1.56 1.57 1.58 1.59 1.6 1.61 1.62 1.63 1.64 1.65 1.66 1.67 1.68 1.69 1.7 1.71 1.72 1.73 1.74 1.75 1.76 1.77 1.78 1.79 1.8 1.81 1.82 1.83 1.84 1.85 1.86 1.87 1.88 1.89 1.9 1.91 1.92 1.93 1.94 1.95 1.96 1.97 1.98 1.99 2 2.01 2.02 2.03 2.04 2.05 2.06 2.07 2.08 2.09 2.1 2.11 2.12 2.13 2.14 2.15 2.16 2.17 2.18 2.19 2.2 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.3 2.31 2.32 2.33 2.34 2.35 2.36 2.37 2.38 2.39 2.4 2.41 2.42 2.43 2.44 2.45 2.46 2.47 2.48 2.49 2.5 2.51 2.52 2.53 2.54 2.55 2.56 2.57 2.58 2.59 2.6 2.61 2.62 2.63 2.64 2.65 2.66 2.67 2.68 2.69 2.7 2.71 2.72 2.73 2.74 2.75 2.76 2.77 2.78 2.79 2.8 2.81 2.82 2.83 2.84 2.85 2.86 2.87 2.88 2.89 2.9 2.91 2.92 2.93 2.94 2.95 2.96 2.97 2.98 2.99 3 3.01 3.02 3.03 3.04 3.05 3.06 3.07 3.08 3.09 3.1 3.11 3.12 3.13 3.14 3.15 3.16 3.17 3.18 3.19 3.2 3.21 3.22 3.23 3.24 3.25 3.26 3.27 3.28 3.29 3.3 3.31 3.32 3.33 3.34 3.35 3.36 3.37 3.38 3.39 3.4 3.41 3.42 3.43 3.44 3.45 3.46 3.47 3.48 3.49 3.5 3.51 3.52 3.53 3.54 3.55 3.56 3.57 3.58 3.59 3.6 3.61 3.62 3.63 3.64 3.65 3.66 3.67 3.68 3.69 3.7 3.71 3.72 3.73 3.74 3.75 3.76 3.77 3.78 3.79 3.8 3.81 3.82 3.83 3.84 3.85 3.86 3.87 3.88 3.89 3.9 3.91 3.92 3.93 3.94 3.95 3.96 3.97 3.98 3.99 4 4.01 4.02 4.03 4.04 4.05 4.06 4.07 4.08 4.09 4.1 4.11 4.12 4.13 4.14 4.15 4.16 4.17 4.18 4.19 4.2 4.21 4.22 4.23 4.24 4.25 4.26 4.27 4.28 4.29 4.3 4.31 4.32 4.33 4.34 4.35 4.36 4.37 4.38 4.39 4.4 4.41 4.42 4.43 4.44 4.45 4.46 4.47 4.48 4.49 4.5 4.51 4.52 4.53 4.54 4.55 4.56 4.57 4.58 4.59 4.6 4.61 4.62 4.63 4.64 4.65 4.66 4.67 4.68 4.69 4.7 4.71 4.72 4.73 4.74 4.75 4.76 4.77 4.78 4.79 4.8 4.81 4.82 4.83 4.84 4.85 4.86 4.87 4.88 4.89 4.9 4.91 4.92 4.93 4.94 4.95 4.96 4.97 4.98 4.99 5 5.01 5.02 5.03 5.04 5.05 5.06 5.07 5.08 5.09 5.1 5.11 5.12 5.13 5.14 5.15 5.16 5.17 5.18 5.19 5.2 5.21 5.22 5.23 5.24 5.25 5.26 5.27 5.28 5.29 5.3 5.31 5.32 5.33 5.34 5.35 5.36 5.37 5.38 5.39 5.4 5.41 5.42 5.43 5.44 5.45 5.46 5.47 5.48 5.49 5.5 5.51 5.52 5.53 5.54 5.55 5.56 5.57 5.58 5.59 5.6 5.61 5.62 5.63 5.64 5.65 5.66 5.67 5.68 5.69 5.7 5.71 5.72 5.73 5.74 5.75 5.76 5.77 5.78 5.79 5.8 5.81 5.82 5.83 5.84 5.85 5.86 5.87 5.88 5.89 5.9 5.91 5.92 5.93 5.94 5.95 5.96 5.97 5.98 5.99 6 6.01 6.02 6.03 6.04 6.05 6.06 6.07 6.08 6.09 6.1 6.11 6.12 6.13 6.14 6.15 6.16 6.17 6.18 6.19 6.2 6.21 6.22 6.23 6.24 6.25 6.26 6.27 6.28 6.29 6.3 uz som vonku clif-0.93/tests/test36.ci100444 1750 1750 350 6500560334 13705 0ustar korenkorenint prva () { return 1; } int druha (int a, int b) { a = a + b; printf ("%d\n", a); return a; } float d, c; printf ("zadaj d\n"); scanf ("%f", d); c = druha (prva (), d); printf ("c=%g\n", c); printf ("d=%g\n", d); exit; clif-0.93/tests/test36.in100644 1750 1750 4 6322201674 13657 0ustar korenkoren1.7 clif-0.93/tests/test36.out100644 1750 1750 47 6354674430 14120 0ustar korenkorenzadaj d 1071225243 c=1.07123e+09 d=1.7 clif-0.93/tests/test37.ci100444 1750 1750 165 6500545327 13717 0ustar korenkorenint i; printf ("in front\n"); { a: printf ("a %d ", ++i); if (i < 100) goto a; } printf ("after\n"); exit; clif-0.93/tests/test37.out100644 1750 1750 773 6354674430 14147 0ustar korenkorenin front a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 a 11 a 12 a 13 a 14 a 15 a 16 a 17 a 18 a 19 a 20 a 21 a 22 a 23 a 24 a 25 a 26 a 27 a 28 a 29 a 30 a 31 a 32 a 33 a 34 a 35 a 36 a 37 a 38 a 39 a 40 a 41 a 42 a 43 a 44 a 45 a 46 a 47 a 48 a 49 a 50 a 51 a 52 a 53 a 54 a 55 a 56 a 57 a 58 a 59 a 60 a 61 a 62 a 63 a 64 a 65 a 66 a 67 a 68 a 69 a 70 a 71 a 72 a 73 a 74 a 75 a 76 a 77 a 78 a 79 a 80 a 81 a 82 a 83 a 84 a 85 a 86 a 87 a 88 a 89 a 90 a 91 a 92 a 93 a 94 a 95 a 96 a 97 a 98 a 99 a 100 after clif-0.93/tests/test38.ci100644 1750 1750 236 6500507533 13716 0ustar korenkorenint i; printf ("%s\n", "in front"); { goto a; printf ("%s\n", "this should be never to see"); a: printf ("%s ", "a"); } printf ("%s\n", "after"); exit; clif-0.93/tests/test38.out100644 1750 1750 21 6354674430 14112 0ustar korenkorenin front a after clif-0.93/tests/test39.ci100444 1750 1750 263 6500560303 13707 0ustar korenkorenint a (), c, d; int b (int c, int d) { return a (c, d); } int a(int c, int d) { return c + d; } scanf ("%d", c); scanf ("%d", d); c = b (c, d); printf ("%d\n", c); exit; clif-0.93/tests/test39.in100644 1750 1750 4 6322202064 13654 0ustar korenkoren1 2 clif-0.93/tests/test39.out100644 1750 1750 2 6354674430 14072 0ustar korenkoren3 clif-0.93/tests/test40.ci100444 1750 1750 274 6500560200 13675 0ustar korenkorenint a (int, int); int a (int b, int c) { return b + c; } int d, e; printf ("zadaj d\n"); scanf ("%d", d); printf ("zadaj e\n"); scanf ("%d", e); d = a (d, e); printf ("%d\n", d); exit; clif-0.93/tests/test40.in100644 1750 1750 4 6322202160 13641 0ustar korenkoren1 2 clif-0.93/tests/test40.out100644 1750 1750 22 6354674430 14104 0ustar korenkorenzadaj d zadaj e 3 clif-0.93/tests/test41.ci100444 1750 1750 631 6500560125 13701 0ustar korenkorenint a, b[10]; float c; printf ("%s\n", "input a"); scanf ("%d", b[1]); a = 4; switch (b[1]) { default: printf ("default\n"); case 1: printf ("1\n"); break; case 2|5: printf ("2|5\n"); break; case 3: printf ("3\n"); switch (a) { case 3: printf ("ok\n"); break; default: printf ("not ok\n"); } printf ("no break\n"); case 4: printf ("4\n"); break; } exit; clif-0.93/tests/test41.in100644 1750 1750 2 6322407734 13656 0ustar korenkoren7 clif-0.93/tests/test41.out100644 1750 1750 14 6354674430 14106 0ustar korenkoreninput a 2|5 clif-0.93/tests/test42.ci100444 1750 1750 603 6500510431 13674 0ustar korenkorenint a, b, c; b = 4; a = 3; c = 2; c *= b * a; printf ("24 = %d\n", c); a += 3 * 4; printf ("15 = %d\n", a); c /= 4 + 2; printf ("4 = %d\n", c); a -= 3 + 4; printf ("8 = %d\n", a); c %= 2; printf ("0 = %d\n", c); b = 1; b <<= 1; printf ("2 = %d\n", b); b >>= 1; printf ("1 = %d\n", b); b &= 1; printf ("1 = %d\n", b); b |= 0; printf ("1 = %d\n", b); b ^= 1; printf ("0 = %d\n", b); exit; clif-0.93/tests/test42.out100644 1750 1750 100 6354674524 14127 0ustar korenkoren24 = 24 15 = 15 4 = 4 8 = 8 0 = 0 2 = 2 1 = 1 1 = 1 1 = 1 0 = 0 clif-0.93/tests/test43.ci100444 1750 1750 516 6500560001 13676 0ustar korenkorenint a, b[10]; float c; printf ("%s\n", "input a"); scanf ("%d", b[1]); switch (b[1]) { default: printf ("%s\n", "default"); case 1: printf ("%s\n", "1"); break; case 2|5: printf ("%s\n", "2|5"); break; case 3: printf ("%s\n", "3"); printf ("%s\n", "no break"); case 4: printf ("%s\n", "4"); break; } default: exit; clif-0.93/tests/test43.in100644 1750 1750 2 6322410030 13637 0ustar korenkoren2 clif-0.93/tests/test43.out100644 1750 1750 22 6354674524 14113 0ustar korenkoreninput a default 1 clif-0.93/tests/test44.ci100444 1750 1750 604 6500557747 13724 0ustar korenkorenint a; int b (int a) { int b; b = 2 * a; { double a; printf ("input double a\n"); scanf ("%lf", a); printf ("double a = %g\n", a); a = a + b; printf ("double a = %g\n", a); } printf ("function a = %d\n", a); printf ("function b = %d\n", b); return b; } printf ("input int a\n"); scanf ("%d", a); a = b (a); printf ("global a = %d\n", a); exit; clif-0.93/tests/test44.in100644 1750 1750 6 6325425760 13667 0ustar korenkoren1 2.5 clif-0.93/tests/test44.out100644 1750 1750 144 6354674524 14141 0ustar korenkoreninput int a input double a double a = 2.5 double a = 4.5 function a = 1 function b = 2 global a = 2 clif-0.93/tests/test45.ci100444 1750 1750 436 6500557645 13725 0ustar korenkorenint a; printf ("input a\n"); scanf ("%d", a); if (a) { double a; printf ("input double a\n"); scanf ("%lf", a); printf ("double a = %g\n", a); } else { char a; printf ("input char a\n"); scanf ("%c", a); printf ("char a = %d\n", a); } printf ("int a = %d\n", a); exit; clif-0.93/tests/test45.in100644 1750 1750 6 6326157054 13667 0ustar korenkoren1 2.5 clif-0.93/tests/test45.out100644 1750 1750 60 6354674524 14117 0ustar korenkoreninput a input double a double a = 2.5 int a = 1 clif-0.93/tests/test46.ci100444 1750 1750 6246 6517667205 13755 0ustar korenkorenstruct c { char a; int b; } a, p[3]; struct d { char a; double b; } b; struct e { double b; char a; } c; struct f { double a; int b; char c; } d; a.a = 'a'; a.b = 10; printf ("a.a = %c a.b = %d \n", a.a, a.b); printf ("char int %d %d %d\n", sizeof (struct c), (int)&((struct c *)0)->a, (int)&((struct c *)0)->b); /*printf ("char double %d %d %d\n", sizeof (b), (int)&((struct d *)0)->a, (int)&((struct d *)0)->b); printf ("double char %d %d %d\n", sizeof (c), (int)&((struct e *)0)->b, (int)&((struct e *)0)->a);*/ printf ("double int char %d %d %d %d\n", sizeof (d), (int)&((struct f *)0)->a, (int)&((struct f *)0)->b, (int)&((struct f *)0)->c); int func (struct c a, int b) { a.b = a.b + b; return b; } printf ("%d %d %d\n", func (a, 1), a.a, a.b); b.a = 'b'; b.b = 1.5687569; double foo (struct d a, struct c b) { struct f c; c.a = a.b; c.b = b.b; c.c = a.a + b.a; printf ("%g %d %c\n", c.a, c.b, c.c); return c.b; } printf ("%g\n", foo (b, a)); p[0].a = 'a'; p[0].b = 1; p[1].a = 'b'; p[1].b = 2; p[2].a = 'c'; p[2].b = 3; printf ("%c %d %c %d %c %d\n", p[0].a, p[0].b, p[1].a, p[1].b, p[2].a, p[2].b); void bar (struct c a[]) { struct c p[3]; p[0].a = a[0].a + 1; p[0].b = a[0].b + 1; p[1].a = a[1].a + 1; p[1].b = a[1].b + 1; p[2].a = a[2].a + 1; p[2].b = a[2].b + 1; printf ("%c %d %c %d %c %d\n", p[0].a, p[0].b, p[1].a, p[1].b, p[2].a, p[2].b); } bar (p); struct { struct { int a; int b; } a[2]; struct f b[2]; int c; } x[2]; /*printf ("%d ", sizeof(x));*/ x[0].a[0].a = 1; x[0].a[0].b = 2; x[0].a[1].a = 3; x[0].a[1].b = 4; x[0].b[0].a = 5; x[0].b[0].b = 6; x[0].b[0].c = 'a'; x[0].b[1].a = 8; x[0].b[1].b = 9; x[0].b[1].c = 'b'; x[0].c = 11; x[1].a[0].a = 12; x[1].a[0].b = 13; x[1].a[1].a = 14; x[1].a[1].b = 15; x[1].b[0].a = 16; x[1].b[0].b = 17; x[1].b[0].c = 'c'; x[1].b[1].a = 19; x[1].b[1].b = 20; x[1].b[1].c = 'd'; x[1].c = 22; printf ("%d %d %d %d ", x[0].a[0].a, x[0].a[0].b, x[0].a[1].a, x[0].a[1].b); printf ("%g %d %c ", x[0].b[0].a, x[0].b[0].b, x[0].b[0].c); printf ("%g %d %c ", x[0].b[1].a, x[0].b[1].b, x[0].b[1].c); printf ("%d ", x[0].c); printf ("%d %d %d %d ", x[1].a[0].a, x[1].a[0].b, x[1].a[1].a, x[1].a[1].b); printf ("%g %d %c ", x[1].b[0].a, x[1].b[0].b, x[1].b[0].c); printf ("%g %d %c ", x[1].b[1].a, x[1].b[1].b, x[1].b[1].c); printf ("%d\n", x[1].c); void foobar () { struct { int a[2]; int b; struct f c[2]; } a[2]; a[0].a[0] = 1; a[0].a[1] = 2; a[0].b = 3; a[0].c[0].a = 4; a[0].c[0].b = 5; a[0].c[0].c = 'a'; a[0].c[1].a = 7; a[0].c[1].b = 8; a[0].c[1].c = 'b'; a[1].a[0] = 10; a[1].a[1] = 11; a[1].b = 12; a[1].c[0].a = 13; a[1].c[0].b = 14; a[1].c[0].c = 'c'; a[1].c[1].a = 16; a[1].c[1].b = 17; a[1].c[1].c = 'd'; printf ("%d %d %d ", /*sizeof(a),*/ a[0].a[0], a[0].a[1], a[0].b); printf ("%g %d %c ", a[0].c[0].a, a[0].c[0].b, a[0].c[0].c); printf ("%g %d %c ", a[0].c[1].a, a[0].c[1].b, a[0].c[1].c); printf ("%d %d %d ", a[1].a[0], a[1].a[1], a[1].b); printf ("%g %d %c ", a[1].c[0].a, a[1].c[0].b, a[1].c[0].c); printf ("%g %d %c\n", a[1].c[1].a, a[1].c[1].b, a[1].c[1].c); } foobar (); exit; clif-0.93/tests/test46.out100444 1750 1750 314 6517667514 14142 0ustar korenkorena.a = a a.b = 10 char int 8 0 4 double int char 16 0 8 12 1 97 11 1.56876 11 à 11 a 1 b 2 c 3 b 2 c 3 d 4 1 2 3 4 5 6 a 8 9 b 11 12 13 14 15 16 17 c 19 20 d 22 1 2 3 4 5 a 7 8 b 10 11 12 13 14 c 16 17 d clif-0.93/tests/test47.ci100444 1750 1750 1303 6517665743 13750 0ustar korenkorenunion a { int a; double b; } z; union a b; /*printf ("union a=%d\n", sizeof(b));*/ b.a = 1; printf ("union a a=%d\n", b.a); /*cprintf (1, "union a b=%g\n", b.b);*/ b.b = 2.4; /*cprintf (1, "union a a=%d\n", b.a);*/ printf ("union a b=%g\n", b.b); struct d { int a; double b; } c; union b { int a; struct d b; } d; /*printf ("union b=%d\n", sizeof (d)); printf ("struct d=%d\n", sizeof (c));*/ d.a = 1; printf ("union b a=%d\n", d.a); /*cprintf (1, "union b struct d a=%d\n", d.b.a); cprintf (1, "union b struct d b=%g\n", d.b.b);*/ d.b.a = 2; d.b.b = 3.4; /*cprintf (1, "union b a=%d\n", d.a);*/ printf ("union b struct d a=%d\n", d.b.a); printf ("union b struct d b=%g\n", d.b.b); exit; clif-0.93/tests/test47.out100444 1750 1750 122 6517665776 14150 0ustar korenkorenunion a a=1 union a b=2.4 union b a=1 union b struct d a=2 union b struct d b=3.4 clif-0.93/tests/test48.ci100444 1750 1750 2150 6500517136 13732 0ustar korenkorenint i; int a () { return ++i; } struct c { int a; int b; }; struct c c[4], *ps; int b[3], *p; b[1] = 2; b[2] = 1; b[a()] += 2; c[1].b = 3; c[1].b += 3; printf ("%d %d %d\n", b[1], ++b[a()], c[1].b); i = 0; p = &b[a()]; ps = &c[1]; printf ("%d %d ", *p, ps->b); int z () { struct c *p; p = &c[1]; printf ("%d\n", p->b); return 0; } z(); struct d { struct c *a; struct d *b; }; c[2].a = 10; c[2].b = 11; struct d *x, y[2]; y[0].a = ps; y[0].b = &y[0]; y[1].a = &c[2]; x = &y[1]; x->b = &y[0]; printf ("0=%d 6=%d 0=%d 6=%d 10=%d 11=%d 0=%d 6=%d 0=%d 6=%d\n", y[0].a->a, y[0].a->b, y[0].b->a->a, y[0].b->a->b, x->a->a, x->a->b, x->b->a->a, x->b->a->b, x->b->b->a->a, x->b->b->a->b); void foo (struct d *z) { struct d *y; y = z; printf ("10=%d 11=%d 0=%d 6=%d 0=%d 6=%d\n", y->a->a, y->a->b, y->b->a->a, y->b->a->b, y->b->b->a->a, y->b->b->a->b); y->a->a = 100; } foo (x); printf ("100=%d\n", x->a->a); printf ("%d=%d\n", i, *&i); int *p1; p1 = &b[2]; *p = *p1; printf ("%d=%d=%d=%d=", *p1, *p, b[2], b[1]); double *p2, d; p2 = &d; *p2 = *p1; printf ("%g\n", *p2); exit; clif-0.93/tests/test48.out100644 1750 1750 152 6476520061 14133 0ustar korenkoren4 2 6 4 6 6 0=0 6=6 0=0 6=6 10=10 11=11 0=0 6=6 0=0 6=6 10=10 11=11 0=0 6=6 0=0 6=6 100=100 1=1 2=2=2=2=2 clif-0.93/tests/test49.ci100444 1750 1750 273 6500543340 13713 0ustar korenkorenint foo (int a) { static b, c; printf ("%d ", b); b = a; printf ("%d %d ", b, c); c = b + 1; return c; } int a; while (a < 10) a = foo (a); printf ("\n"); exit; clif-0.93/tests/test49.out100644 1750 1750 75 6500050224 14103 0ustar korenkoren0 0 0 0 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 clif-0.93/tests/test50.ci100444 1750 1750 220 6501533070 13673 0ustar korenkorenint a, b; a = 1; if ((a || b) && (b || a)) printf ("true\n"); else printf ("false\n"); b = a && b + 5 + a || b; printf ("%d\n", b); exit; clif-0.93/tests/test50.out100644 1750 1750 7 6501542632 14060 0ustar korenkorentrue 1 clif-0.93/tests/test51.ci100444 1750 1750 142 6500557522 13706 0ustar korenkorendouble d, e; printf ("zadaj d\n"); scanf ("%lf", d); e = sin (d); printf ("sinus=%g\n", e); exit; clif-0.93/tests/test51.in100644 1750 1750 5 6322206340 13650 0ustar korenkoren1.57 clif-0.93/tests/test51.out100644 1750 1750 20 6354674620 14105 0ustar korenkorenzadaj d sinus=1 clif-0.93/tests/test52.ci100444 1750 1750 335 6500557103 13706 0ustar korenkorenfloat f; int a, b; scanf ("%f", f); b = copen ("pokusny_subor", "w"); printf ("handle = %d\n", b); fprintf (b, "toto je prvy pokus %f\n", f); scanf ("%d", a); fprintf (b, "%d\n", a); cclose (b); printf ("pokus\n"); exit; clif-0.93/tests/test52.in100644 1750 1750 10 6323140450 13665 0ustar korenkoren1.23 33 clif-0.93/tests/test52.out100644 1750 1750 21 6354674620 14107 0ustar korenkorenhandle = 3 pokus clif-0.93/tests/test53.ci100444 1750 1750 1434 6500544021 13723 0ustar korenkorendouble x, y; int handle; handle = chopen("fields = 6\ lower (0) = -0.5\ upper (0) = 0.5\ style (0) = 10\ lower (1) = -1.5\ upper (1) = 1.5\ style (1) = 20\ lower (2) = -3.\ upper (2) = 3.\ style (2) = 15\ lower (3) = -3.5\ upper (3) = 3.5\ style (3) = 5\ lower (4) = -4.\ upper (4) = 4.\ style (4) = 17\ lower (5) = -4.5\ upper (5) = 4.5\ style (5) = 7\ start_time = automatic\ duration_time = 256.\ w_resolution = 600 400\ print_format = point\ type = alpha\ OnLeaveW = suspend"); printf ("if the output in the graphic window is finished press a key\n"); for (x = 0; x < 6.5; x = x + 0.01) { chwrite (handle, sin (x)); chwrite (handle, sin (x)); chwrite (handle, sin (x)); chwrite (handle, sin (x)); chwrite (handle, sin (x)); chwrite (handle, sin (x)); } chclose (handle); exit; clif-0.93/tests/test54.ci100444 1750 1750 1406 6500544211 13724 0ustar korenkorendouble x, y; int handle; handle = chopen ("fields = 6\ lower (0) = -0.5\ upper (0) = 0.5\ style (0) = 10\ lower (1) = -1.5\ upper (1) = 1.5\ style (1) = 20\ lower (2) = -3.\ upper (2) = 3.\ style (2) = 15\ lower (3) = -3.5\ upper (3) = 3.5\ style (3) = 5\ lower (4) = -4.\ upper (4) = 4.\ style (4) = 17\ lower (5) = -4.5\ upper (5) = 4.5\ style (5) = 7\ start_time = 0.\ duration_time = automatic\ w_resolution = 600 400\ print_format = point\ type = alpha\ OnLeaveW = suspend"); printf ("if the output in the graphic window is finished press a key\n"); for (x = 0; x < 6.5; x = x + 0.01) { y = sin (x); chwrite (handle, y); chwrite (handle, y); chwrite (handle, y); chwrite (handle, y); chwrite (handle, y); chwrite (handle, y); } chclose (handle); exit; clif-0.93/tests/test55.ci100444 1750 1750 660 6500544315 13713 0ustar korenkorendouble x, y; int handle; handle = chopen("fields = 1\ lower (0) = -1.5\ upper (0) = 1.5\ style (0) = 10\ start_time = automatic\ duration_time = 256.\ w_resolution = 600 400\ print_format = point\ type = alpha\ OnLeaveW = suspend"); printf ("if the output in the graphic window is finished press a key\n"); for (x = 0; x < 6.5; x = x + 0.01) { y = sin (x); chwrite (handle, y); chflush (handle); } chclose (handle); exit; clif-0.93/tests/test56.ci100444 1750 1750 126 6500544360 13711 0ustar korenkorendouble x, y; for (x = 0; x < 6.5; x = x + 0.01) { printf ("%g\n", sin (x)); } exit; clif-0.93/tests/test56.out100644 1750 1750 14000 6354674620 14175 0ustar korenkoren0 0.00999983 0.0199987 0.0299955 0.0399893 0.0499792 0.059964 0.0699428 0.0799147 0.0898785 0.0998334 0.109778 0.119712 0.129634 0.139543 0.149438 0.159318 0.169182 0.17903 0.188859 0.198669 0.20846 0.21823 0.227978 0.237703 0.247404 0.257081 0.266731 0.276356 0.285952 0.29552 0.305059 0.314567 0.324043 0.333487 0.342898 0.352274 0.361615 0.37092 0.380188 0.389418 0.398609 0.40776 0.416871 0.425939 0.434966 0.443948 0.452886 0.461779 0.470626 0.479426 0.488177 0.49688 0.505533 0.514136 0.522687 0.531186 0.539632 0.548024 0.556361 0.564642 0.572867 0.581035 0.589145 0.597195 0.605186 0.613117 0.620986 0.628793 0.636537 0.644218 0.651834 0.659385 0.66687 0.674288 0.681639 0.688921 0.696135 0.703279 0.710353 0.717356 0.724287 0.731146 0.737931 0.744643 0.75128 0.757843 0.764329 0.770739 0.777072 0.783327 0.789504 0.795602 0.80162 0.807558 0.813416 0.819192 0.824886 0.830497 0.836026 0.841471 0.846832 0.852108 0.857299 0.862404 0.867423 0.872355 0.877201 0.881958 0.886627 0.891207 0.895699 0.9001 0.904412 0.908633 0.912764 0.916803 0.920751 0.924606 0.928369 0.932039 0.935616 0.939099 0.942489 0.945784 0.948985 0.95209 0.955101 0.958016 0.960835 0.963558 0.966185 0.968715 0.971148 0.973485 0.975723 0.977865 0.979908 0.981854 0.983701 0.98545 0.9871 0.988652 0.990105 0.991458 0.992713 0.993868 0.994924 0.995881 0.996738 0.997495 0.998152 0.99871 0.999168 0.999526 0.999784 0.999942 1 0.999958 0.999816 0.999574 0.999232 0.99879 0.998248 0.997606 0.996865 0.996024 0.995083 0.994043 0.992904 0.991665 0.990327 0.98889 0.987354 0.985719 0.983986 0.982154 0.980224 0.978197 0.976071 0.973848 0.971527 0.969109 0.966594 0.963983 0.961275 0.958471 0.955572 0.952576 0.949486 0.9463 0.94302 0.939645 0.936177 0.932615 0.92896 0.925212 0.921371 0.917438 0.913413 0.909297 0.905091 0.900793 0.896406 0.891929 0.887362 0.882707 0.877964 0.873133 0.868215 0.863209 0.858118 0.85294 0.847678 0.84233 0.836899 0.831383 0.825785 0.820104 0.814341 0.808496 0.802571 0.796565 0.79048 0.784316 0.778073 0.771753 0.765355 0.758881 0.752331 0.745705 0.739005 0.732231 0.725384 0.718465 0.711473 0.704411 0.697278 0.690075 0.682803 0.675463 0.668056 0.660581 0.653041 0.645435 0.637765 0.630031 0.622234 0.614374 0.606454 0.598472 0.590431 0.582331 0.574172 0.565956 0.557684 0.549355 0.540972 0.532535 0.524044 0.515501 0.506907 0.498262 0.489567 0.480823 0.472031 0.463191 0.454306 0.445375 0.436399 0.42738 0.418318 0.409214 0.400069 0.390885 0.381661 0.372399 0.3631 0.353764 0.344393 0.334988 0.325549 0.316078 0.306575 0.297041 0.287478 0.277886 0.268266 0.258619 0.248947 0.239249 0.229528 0.219784 0.210017 0.20023 0.190423 0.180596 0.170752 0.16089 0.151013 0.14112 0.131213 0.121293 0.111361 0.101418 0.0914646 0.0815022 0.0715315 0.0615537 0.0515698 0.0415807 0.0315874 0.021591 0.0115924 0.00159265 -0.00840725 -0.0184063 -0.0284035 -0.0383979 -0.0483884 -0.0583741 -0.068354 -0.078327 -0.0882922 -0.0982486 -0.108195 -0.118131 -0.128055 -0.137966 -0.147863 -0.157746 -0.167612 -0.177462 -0.187295 -0.197108 -0.206902 -0.216675 -0.226427 -0.236155 -0.245861 -0.255541 -0.265196 -0.274825 -0.284426 -0.293998 -0.303542 -0.313054 -0.322536 -0.331985 -0.341401 -0.350783 -0.36013 -0.369441 -0.378715 -0.387951 -0.397148 -0.406306 -0.415423 -0.424498 -0.433531 -0.44252 -0.451466 -0.460366 -0.46922 -0.478027 -0.486787 -0.495497 -0.504159 -0.512769 -0.521329 -0.529836 -0.538291 -0.546691 -0.555037 -0.563327 -0.571561 -0.579738 -0.587857 -0.595917 -0.603918 -0.611858 -0.619737 -0.627554 -0.635308 -0.642999 -0.650625 -0.658186 -0.665682 -0.673111 -0.680473 -0.687766 -0.694991 -0.702146 -0.709231 -0.716246 -0.723188 -0.730058 -0.736856 -0.743579 -0.750228 -0.756802 -0.763301 -0.769723 -0.776068 -0.782336 -0.788525 -0.794636 -0.800667 -0.806618 -0.812488 -0.818277 -0.823984 -0.829609 -0.835151 -0.840609 -0.845984 -0.851273 -0.856478 -0.861597 -0.86663 -0.871576 -0.876435 -0.881206 -0.885889 -0.890484 -0.894989 -0.899405 -0.903732 -0.907967 -0.912112 -0.916166 -0.920128 -0.923998 -0.927776 -0.931461 -0.935053 -0.938551 -0.941955 -0.945266 -0.948481 -0.951602 -0.954628 -0.957558 -0.960392 -0.963131 -0.965773 -0.968319 -0.970767 -0.973119 -0.975373 -0.97753 -0.979589 -0.98155 -0.983413 -0.985178 -0.986844 -0.988411 -0.98988 -0.991249 -0.99252 -0.993691 -0.994763 -0.995735 -0.996608 -0.997381 -0.998054 -0.998628 -0.999102 -0.999476 -0.999749 -0.999923 -0.999997 -0.999971 -0.999845 -0.999619 -0.999293 -0.998867 -0.998341 -0.997715 -0.99699 -0.996165 -0.99524 -0.994216 -0.993092 -0.991869 -0.990547 -0.989125 -0.987605 -0.985986 -0.984269 -0.982453 -0.980538 -0.978526 -0.976416 -0.974208 -0.971903 -0.969501 -0.967001 -0.964405 -0.961713 -0.958924 -0.95604 -0.95306 -0.949984 -0.946814 -0.943549 -0.940189 -0.936736 -0.933189 -0.929548 -0.925815 -0.921989 -0.91807 -0.91406 -0.909959 -0.905767 -0.901484 -0.897111 -0.892648 -0.888096 -0.883455 -0.878725 -0.873908 -0.869004 -0.864012 -0.858934 -0.853771 -0.848522 -0.843188 -0.837769 -0.832267 -0.826682 -0.821014 -0.815264 -0.809433 -0.80352 -0.797527 -0.791455 -0.785303 -0.779073 -0.772764 -0.766379 -0.759917 -0.753379 -0.746765 -0.740077 -0.733315 -0.72648 -0.719572 -0.712592 -0.70554 -0.698418 -0.691227 -0.683966 -0.676637 -0.66924 -0.661776 -0.654246 -0.646651 -0.638991 -0.631267 -0.62348 -0.61563 -0.607719 -0.599747 -0.591716 -0.583625 -0.575475 -0.567269 -0.559005 -0.550686 -0.542311 -0.533882 -0.5254 -0.516865 -0.508279 -0.499642 -0.490955 -0.482218 -0.473434 -0.464602 -0.455724 -0.4468 -0.437832 -0.428819 -0.419764 -0.410667 -0.401529 -0.39235 -0.383133 -0.373877 -0.364583 -0.355254 -0.345888 -0.336488 -0.327055 -0.317589 -0.308091 -0.298562 -0.289003 -0.279415 -0.2698 -0.260157 -0.250489 -0.240795 -0.231078 -0.221337 -0.211574 -0.20179 -0.191986 -0.182163 -0.172321 -0.162462 -0.152587 -0.142697 -0.132792 -0.122874 -0.112944 -0.103002 -0.0930505 -0.0830894 -0.07312 -0.0631433 -0.0531602 -0.0431719 -0.0331792 -0.0231832 -0.0131849 -0.0031853 0.00681464 0.0168139 0.0268115 0.0368064 0.0467976 0.0567841 0.066765 0.0767392 0.0867057 0.0966635 0.106612 0.116549 0.126475 0.136388 0.146288 0.156173 0.166042 0.175895 0.18573 0.195547 0.205344 0.21512 clif-0.93/tests/test57.ci100444 1750 1750 56 6500544406 13675 0ustar korenkorenprintf ("sin(1.57)=%g\n", sin (1.57)); exit; clif-0.93/tests/test57.out100644 1750 1750 14 6354675104 14114 0ustar korenkorensin(1.57)=1 clif-0.93/tests/test58.ci100444 1750 1750 1136 6503253134 13734 0ustar korenkorenfloat a, b; int *p, c[5], i, j; struct a { int a; double b; }; struct a x; int foo () { return j++; } a = 4; b = 5; printf ("%.0f %.0f\n", a, b); b = a++ + b + a; printf ("%.0f %.0f\n", a, b); for (i = 0; i < 5; ++i) c[i] = i; a = c[foo ()]++ + c[foo ()]++ + c[0]; x.a++; x.b++; printf ("2=%.0f 2=%d 1=%d 2=%d 1=%g 3=%g\n", a, c[1], x.a++, x.a, x.b++, ++x.b); p = c; printf ("%d=%d %d=%d %d=%d\n", c[0], *p, c[2], *(p + 2), c[4], *(p + 4)); printf ("%d=%d %d=%d %d=%d ", c[0], *p++, c[2], *++p--, c[4], *(p + 4)); p += 2; printf ("%d=%d\n", c[2], *p); exit; clif-0.93/tests/test58.out100444 1750 1750 75 6516116304 14112 0ustar korenkoren4 5 5 14 2=2 2=2 1=1 2=2 1=1 3=3 1=1 2=2 4=4 1=1 2=2 4=4 2=2 clif-0.93/tests/test59.ci100444 1750 1750 475 6502722457 13732 0ustar korenkorenstruct a { int a; double b; }; union b { int a; double b; }; struct a foo (struct a a) { return a; } union b bar (union b a) { return a; } struct a a, b; union b c, d; b.a = 1; b.b = 2.45; a = foo (b); printf ("1=%d 2.45=%g\n", a.a, a.b); a = b; c.a = 10; d = bar (c); printf ("10=%d\n", d.a); exit; clif-0.93/tests/test59.out100644 1750 1750 24 6502722724 14113 0ustar korenkoren1=1 2.45=2.45 10=10 clif-0.93/tests/test60.ci100444 1750 1750 743 6556575414 13730 0ustar korenkorenlong int i, j; short int k; short unsigned l; long double m; signed char c; unsigned char b; char a = 'a'; i += j++; printf ("%ld ", ++j); j = 65532; l = k = j; m += l + k + j; printf ("%hd %hu %Lg\n", k, l, m); b = a; c = a; printf ("%c=%d %c=%u %c=%d\n", a, a, b, b, c, c); short int foo (short int a) { unsigned b; long double c; c = b = a; printf (" %u %Lg", b, c); return (a + 'a'); } printf ("%hd %hd", k, k + 'a'); k = foo (k); printf (" %hd\n", k); exit; clif-0.93/tests/test60.out100444 1750 1750 101 6510014043 14100 0ustar korenkoren2 -4 65532 131060 a=97 a=97 a=97 -4 93 4294967292 4.29497e+09 93 clif-0.93/tests/test61.ci100444 1750 1750 1304 6516364727 13742 0ustar korenkorenint fakt (int n) { if (n == 1) return 1; else return (fakt (n-1) * n); } struct a { int a; double b; }; struct a a; struct a foo (struct a a) { struct a b; b.a = 1; b.b = 3.14; a.a += b.a; a.b += b.b; return a; } struct a *ptr; double bar (struct a *a, struct a b[]) { b[1].a += 1; b[1].b += 6.28; return a->b; } struct a ar[3]; int main () { struct a b; int i; printf ("n! = %d\n", fakt (10)); a.a = 1; a.b = 3.14; i = scanf ("%d %lf", &b.a, &b.b); printf ("%d %g %d\n", b.a, b.b, i); b = foo (a); printf ("2=%d 6.28=%g", b.a, b.b); ptr = &a; printf (" %g\n", bar (ptr, ar)); printf ("%d %g\n", ar[1].a, ar[1].b); return 0; } clif-0.93/tests/test61.in100644 1750 1750 6 6516457643 13675 0ustar korenkoren1 2.4 clif-0.93/tests/test61.out100644 1750 1750 57 6516457707 14125 0ustar korenkorenn! = 3628800 1 2.4 2 2=2 6.28=6.28 3.14 1 6.28 clif-0.93/tests/test62.ci100444 1750 1750 1423 6643646261 13742 0ustar korenkorentypedef int a, d; a b, c; typedef int MILES, KLICKSP (); typedef struct { double re, im; } complex; MILES distance; extern KLICKSP *metricp; complex x; complex z, *zp; /* t1, *tp1 (t2 an *tp2, respectively) should be compatible types. */ typedef struct s1 { int x; } t1, *tp1; typedef struct s2 { int x; } t2, *tp2; typedef signed int t; typedef int plain; /*struct tag { unsigned t:4; const t:5; plain r:5; };*/ void bar () { /* t f(t (t));*/ long t; } /*typedef void fv(int), (*pfv) (int); void (*signal (int, void (*)(int))) (int); fv *signal (int, fv *); pfv signal (int, pfv); */ int foo (int a, int b) { return a + b; } int main () { c += 1; b = 2 * c, c += b; printf ("%d %d\n", b, c); printf ("%d %d\n", foo (b, (b = 3, b + 2)), b); return 0; } clif-0.93/tests/test62.out100644 1750 1750 10 6555173075 14107 0ustar korenkoren2 3 7 3 clif-0.93/tests/test63.ci100644 1750 1750 3113 6637213462 13737 0ustar korenkorenint x [] = { 1, 3, 5 }; float y[4][3] = { { 1, 3, 5 }, { 2, 4, 6 }, { 3, 5, 7 } }; /* float y[4][3] = { 1, 3, 5, 2, 4, 6, 3, 5, 7}; */ float z[4][3] = { { 1 }, { 2 }, { 3 }, { 4 } }; struct { int a[3], b; } w[] = { { 1 } , 2 }; short q[4][3][2] = { { 1 }, { 2, 3 }, { 4, 5, 6 } }; typedef int A[]; A a = {1, 2}, b = {3, 4, 5}; char s[] = "abc", t[3] = "abc"; /*char s[] = { 'a', 'b', 'c', '\0' }, t [] = { 'a', 'b', 'c' };*/ char *p = "abc"; void foo () { char *s = "bcd"; static int i = 1, j[] = {1, 2, 3}; printf ("%d %d %s\n", j[i - 1], i++, s); } int main () { int i, j, k; for (i = 0; i < 3; i++) printf ("%d ", x[i]); printf ("\n%d\n", sizeof (x)); for (i = 0; i < 4; i++) { for (j = 0; j < 3; j++) printf ("%g ", y[i][j]); printf ("\n"); } printf ("%d\n", sizeof (y)); for (i = 0; i < 4; i++) { for (j = 0; j < 3; j++) printf ("%g ", z[i][j]); printf ("\n"); } printf ("%d\n", sizeof (z)); for (i = 0; i <= 1; i++) { for (j = 0; j < 3; j++) printf ("%d ", w[i].a[j]); printf ("%d\n", w[i].b); } printf ("%d\n", sizeof (w)); for (i = 0; i < 4; i++) { for (j = 0; j < 3; j++) { for (k = 0; k < 2; k++) printf ("%d ", q[i][j][k]); printf ("\n"); } printf ("\n"); } printf ("%d\n", sizeof (q)); for (i = 0; i < 2; i++) printf ("%d ", a[i]); for (i = 0; i < 3; i++) printf ("%d ", b[i]); printf ("\n"); printf ("%s %d %.3s %d %s %d\n", s, sizeof (s), t, sizeof (t), p, sizeof (p)); foo (); foo (); return 0; } clif-0.93/tests/test63.out100644 1750 1750 313 6636752543 14141 0ustar korenkoren1 3 5 12 1 3 5 2 4 6 3 5 7 0 0 0 48 1 0 0 2 0 0 3 0 0 4 0 0 48 1 0 0 0 2 0 0 0 32 1 0 0 0 0 0 2 3 0 0 0 0 4 5 6 0 0 0 0 0 0 0 0 0 48 1 2 3 4 5 abc 4 abc 3 abc 4 1 1 bcd 2 2 bcd clif-0.93/tests/test64.ci100644 1750 1750 116 7074036132 13711 0ustar korenkorenint f(int (*)(), double (*)[3]); int f(int (*)(char *), double (*)[]); exit; clif-0.93/tests/test65.ci100444 1750 1750 1366 7130604323 13734 0ustar korenkorenint a = '\''; int b = '\"'; int c = '"'; int d = '\?'; int e = '?'; int f = '\\'; int g = '\a'; int r = '\b'; int i = '\f'; int j = '\n'; int k = '\r'; int l = '\t'; int m = '\v'; int n = L'a'; int o = '\x48'; int p = '\110'; int s[] = L"abc" "def"; char t[] = "\x12\" \"3"; char u[] = "\' ' "; char v[] = "\x12" "3"; int x[] = { 1, 2, 3 }; int main () { printf ("%c %c %c %c\n", (char) a, (char) b, (char) c, (char) d); printf ("%c %c %c %c\n", (char) e, (char) f, (char) g, (char) i); printf ("%c %c %c %c %c %c %c %c\n", (char) j, (char) k, (char) l, (char) r, (char) m, (char) n, (char) o, (char) p); printf ("%s\n", s); printf ("%s\n%s" "\n%s\n", t, u, v); printf ("%d %d %d\n", x[0], x[1], x[2]); return 0; } clif-0.93/tests/test65.out100644 1750 1750 66 7127352725 14122 0ustar korenkoren' " " ? ? \   a H H a " "3 ' ' 3 1 2 3 clif-0.93/tests/test_em_format_args100644 1750 1750 52 6501321327 16166 0ustar korenkorenint a; double b; scanf ("%lf", a); exit;clif-0.93/tests/test_em_func_call100644 1750 1750 136 6500334571 15637 0ustar korenkorenint foo (int a, int b) { return a + b; } int a, b; b = foo (a); b = foo (a, a, b); exit; clif-0.93/tests/test_em_func_call.err100644 1750 1750 250 6552146517 16433 0ustar korenkorenLIB not fully supported in book-keeping tests/test_em_func_call:9: too few arguments to function `foo' tests/test_em_func_call:10: too many arguments to function `foo' clif-0.93/tests/test_em_lval100644 1750 1750 157 6520101116 14637 0ustar korenkoren int main () { int i; int *ptr; i = 0; for (i;;); (i+1)++; ptr++; ptr++ = i; *ptr++ = i; } clif-0.93/tests/test_em_lval.err100644 1750 1750 470 6636777014 15454 0ustar korenkorenLIB not fully supported in book-keeping tests/test_em_lval: In function `main': tests/test_em_lval:8: warning: statement with no effect tests/test_em_lval:10: invalid lvalue in increment tests/test_em_lval:12: invalid lvalue in assignment tests/test_em_lval:14: warning: control reaches end of non-void function clif-0.93/tests/test_em_pointer_arit100444 1750 1750 330 6502255514 16403 0ustar korenkorenint *p, c[5]; int main () { int i; for (i = 0; i < 5; i++) c[i] = i; p = &c[3]; printf ("%d %d %d %d %d\n", *(p / 3), *(p * 2), *(p << 1), *-p, *(p + 1)); p &= 2; return 0; } exit; clif-0.93/tests/test_em_pointer_arit.err100644 1750 1750 1153 6552146616 17227 0ustar korenkorenLIB not fully supported in book-keeping tests/test_em_pointer_arit: In function `main': tests/test_em_pointer_arit:11: invalid operands to binary / tests/test_em_pointer_arit:12: invalid operands to binary * tests/test_em_pointer_arit:13: invalid operands to binary << tests/test_em_pointer_arit:13: invalid type argument of `unary *' tests/test_em_pointer_arit:14: wrong type argument to unary minus tests/test_em_pointer_arit:15: warning: statement with no effect tests/test_em_pointer_arit:16: invalid operands to binary & tests/test_em_pointer_arit:18: warning: assignment makes pointer from integer without a cast clif-0.93/tests/test_em_struct100444 1750 1750 225 6500271300 15220 0ustar korenkorenstruct a { int a; struct a b; } a; struct d { struct c a; } b; enum p; void bar (enum { x, y, z } x, struct z b, enum p o) { return x; } clif-0.93/tests/test_em_struct.err100644 1750 1750 1416 6552146656 16062 0ustar korenkorenLIB not fully supported in book-keeping tests/test_em_struct:3: field `b' has incomplete type tests/test_em_struct:7: field `a' has incomplete type tests/test_em_struct:14: warning: anonymous enum declared inside parameter list tests/test_em_struct:14: warning: its scope is only this definition or declaration, tests/test_em_struct:14: warning: which is probably not what you want. tests/test_em_struct:14: local variable `x' was already declared tests/test_em_struct:14: parameter `b' has incomplete type tests/test_em_struct:14: storage size of `o' isn't known tests/test_em_struct:14: parameter `o' has incomplete type tests/test_em_struct: In function `bar': tests/test_em_struct:16: warning: `return' with a value, in function returning void void conversion not supported yet clif-0.93/tests/test_error_messages1100644 1750 1750 60 6171545340 16307 0ustar korenkorenint a () { int b[10],c; return (b[0]); } exit; clif-0.93/tests/test_error_messages1.err100644 1750 1750 253 6552146356 17131 0ustar korenkorenLIB not fully supported in book-keeping tests/test_error_messages1: In function `a': tests/test_error_messages1: warning: `b' might be used uninitialized in this function clif-0.93/tests/test_error_messages2100444 1750 1750 217 6510004563 16324 0ustar korenkorenint i; printf ("%s\n", "in front"); { goto a; printf ("%s\n", "this should be never to see"); a: } printf ("%s\n", "after"); exit; clif-0.93/tests/test_error_messages2.err100644 1750 1750 135 6552146414 17124 0ustar korenkorenLIB not fully supported in book-keeping tests/test_error_messages2:9: parse error before `}' clif-0.93/tests/test_error_messages3100644 1750 1750 74 6107221560 16310 0ustar korenkorenint a(int c[][3]); int a(int b[2][3]){ void d; return(1); } clif-0.93/tests/test_error_messages3.err100644 1750 1750 566 6552146425 17137 0ustar korenkorenLIB not fully supported in book-keeping Source line: int a(int b[2][3]){ ^ tests/test_error_messages3:2: name of formal paramter does not match previous declaration tests/test_error_messages3: In function `a': tests/test_error_messages3:3: variable or field `d' declared void tests/test_error_messages3:3: variable or field `d' declared void clif-0.93/tests/test_file100644 1750 1750 37 6323140544 14125 0ustar korenkorentoto je prvy pokus 1.230000 33 clif-0.93/doc/ 40755 1750 1750 0 7130620254 11570 5ustar korenkorenclif-0.93/doc/cimcsp94.dvi100644 1750 1750 153754 5656014760 14115 0ustar korenkoren÷ƒ’À;è TeX output 1994.11.03:1839‹ÿÿÿÿ ˹  ý®] àQ£ ýžá—ŸÃÌÈ‘…óHÖÆG®G®cmss17ëHClif–Ÿ¼ó<ò"VG® cmbx10ça“C-lik›ÿr°e“In˜terpreter“F‘þXramew˜ork“for“Scien˜ti cŽŸ’¾mlComputingŽŸ’³Edó+X«Q cmr12ÖT.–ê¨HršSŽ‘ùÌvuz“and‘¦dŸü÷xŽ“L.‘8àKore˜‘ùÌvnŸû¥2ó |{Ycmr8¸1ŽŽŽŽŽŽŽŽ ai ý¼á—‘^§Ýóò"V cmbx10ÉAbstractŽ©©ò‘°ÇóKñ`y cmr10ÄThis–ÈpapšGer“describ˜es“an“op˜en“C-likš¸ãe“in˜terpreter“ó m#½R cmss10ËClifÄ.ޤ æf‘°ÇThe–èmain“goal“of“the“dev•¸ãelopmen“t–èis“to“prepareŽ¡‘°Ça–ç!synš¸ãtactic“and“seman˜tic“framew˜ork“whic˜h“can“bGeŽ¡‘°Çeasily–vÉenricš¸ãhed“with“application“directed“syn˜tac-Ž¡‘°Çtic–wand“semanš¸ãtic“subsystems.‘#,The“in˜terpreter“con-Ž¡‘°Çtains– an“implemenš¸ãtation“of“basic“atomary“t˜ypGes.‘X…AŽ¡‘°Çfurther–òedata“abstraction“mecš¸ãhanism“allo˜ws“a“useŽ¡‘°Çof–Àn-dimensional“arraš¸ãys“of“atomary“t˜ypGe“elemen˜ts.Ž¡‘°ÇThe–¹kfunctional“abstraction“allo¸ãws“a“use“of“recur-Ž¡‘°Çsivš¸ãe–ÿvfunction“calls.‘U'P˜arameters“in“function“calls“areŽ¡‘°Çpassed–¡Îbš¸ãy“reference“and“the“in˜terpreter“arc˜hitectureŽ¡‘°Çis–½optimized“for“manipulation“with“large“ob‘Ž8jects.Ž¡‘°ÇThe–Èêinš¸ãterpreter“con˜tains“also“w˜ell-de ned“slots“forŽ¡‘°Çclien•¸ãt-serv“er–dparadigm“as“wš¸ãell“as“user“in˜terfaces“onŽ¡‘°Çv‘ÿqÇarious‘UUlev¸ãels.ŽŸ|ì‘M›žÉ1.‘¿þIn®9troQÇductionަ‘°ÇÄThere–·¸are“man¸ãy“situations“when“it“is“needed“to“pre-Ž¡‘°Çpare–d,large“programs“for“computer“in•¸ãtensiv“e‘d,infor-Ž¡‘°Çmation–òdproGcessing“and“for“conš¸ãtrol“of“tec˜hnologicalŽ¡‘°ÇproGcesses.‘í7Usually‘ÿ*ª,‘ÈÃto–~zdo“this“task“ecien¸ãtly“theŽ¡‘°Çmost–y·appropriate“w•¸ãa“y–y·is“to“dev¸ãelop“a“language.‘(“TheŽ¡‘°Çinš¸ãterpreter– žËClif“Äis“a“con˜v˜enien˜t“starting“spGeci cationŽ¡‘°Çand–UUa“tošGol“for“these“purp˜oses.Ž©æg‘°ÇThe– !general“concept“whicš¸ãh“w˜e“follo˜w“(and“is“mean˜tŽ¡‘°Çwith–RGthe“w¸ãord“óý': cmti10Çfr‘ÿ}'ameworkÄ)“is“to“prepare“in“an“opGenŽ¡‘°Çw•¸ãa“y›þ?syn“tactic˜and˜seman“tic˜structures˜with˜expres-Ž¡‘°Çsiv¸ãeness–Z°similar“as“in“the“common“programmingŽ¡‘°Çlanguages–QÓlikš¸ãe“C,“F˜OR‘ÿ*ªTRAN‘Q’etc.‘g@Then“user“canŽ¡‘°Çadd–g"synš¸ãtactic“and“seman˜tic“structures“spGeci c“to“aŽ¡‘°Çgiv•¸ãen›`¼problem.‘ ?A‘`~pGo“w“erful˜application˜directed˜lan-Ž¡‘°Çguage–®—is“easily“obtained“this“w•¸ãa“y–ÿ*ª.‘}F“rom–®—this“pGoin¸ãtŽ¡‘°Çof–Åview“ËClif“Äcould“servš¸ãe“as“an“empt˜y“or“sk˜eletal“lan-Ž¡‘°Çguage–{!in“the“same“sense“as“sk¸ãeletal“expGert“systemsŽ¡‘°Çare–ðbuild“and“subsequen¸ãtly“ lled“with“an“applica-Ž¡‘°Çtion–UUdirected“information.ަ‘°ÇOur›Hvin•¸ãten“tion˜is˜also˜driv“en˜b“y˜similar˜reasons˜asŽ¡‘°Çhad–J¸motiv‘ÿqÇated“a“dev•¸ãelopmen“t–J¸of“MA‘ÿ*ªTLAB‘Juand“sim-Ž¡‘°Çilar›Ayen•¸ãvironmen“ts˜i.e.‘Ôto˜ha“v“e˜a˜con“v“enien“t˜and˜opGenŽ¡‘°ÇtoGol–-Ëfor“manipulation“with“ob‘Ž8jects“in“large“and“op-Ž‘°ÇŸ‰ffXÅpŸ J=‘ "5Ÿý-:ó¹Aa¨cmr6¯1ŽŽ‘LܸSlo•ÃŽv‡ak›j¬T‘ÿJªec“hnical˜Univ“ersit“y–ÿJª,‘9 F“acultšÃŽy–ñèof“Mec˜hanical“En-ޤ €gineering,‘\ÅDepartmenšÃŽt–A¯of“Automatic“Con˜trol“and“Measure-Ž¡menÃŽt,‘CPN‘û¿üamestie›“¸Slob•>build“moGdules“using“di eren¸ãt“languages“andŽ¡’úb]link–õYthose“moGdules“inš¸ãto“the“ËClif“Äbut“ev˜en“more“heŽ¡’úb]can–UUadd“new“language“structures“to“ËClifÄ.ަ’úb]The–ªJnext“sections“are“organized“as“follo¸ãws:‘±in“sec-Ž¡’úb]tion–ÉZ2“wš¸ãe“describGe“main“syn˜tactic“and“seman˜tic“fea-Ž¡’úb]tures–„øof“the“ËClifÄ.‘,SIn“section“3“wš¸ãe“follo˜w“some“aspGectsŽ¡’úb]of–“Ôarcš¸ãhitecture“and“implemen˜tation“of“the“ËClif“Äsys-Ž¡’úb]tem.‘†In–^section“4“wš¸ãe“conclude“with“commen˜ts“abGoutŽ¡’úb]further›tñdev•¸ãelopmen“t˜of˜the˜in“terpreter.‘ЛA‘t§formalŽ¡’úb]de nition–ñqof“the“ËClif“Äsyn¸ãtax“is“in“appGendix“A‘ñasŽ¡’úb]wš¸ãell– !as“the“syn˜tax“of“graphics“subsystem“whic˜h“isŽ¡’úb]in–ÞrappšGendix“B.“In“app˜endix“C‘ÞTthe“instruction“set“ofŽ¡’úb]the–UUËClif“Ävirtual“mac¸ãhine“is“describGed.ŽŸ#Ó7’ýq9É2.‘¿þMain–ÕTsynš®9tactic“and“seman˜tic“features“ofŽ¡’Ethe–ÕTËClif“ÉsystemŽŸdÙ’úb]ÄThe–€isynš¸ãtax“of“ËClif“Äcan“bGe“classi ed“to“t˜w˜o“parts.Ž¡’úb]The–, rst“part“whicš¸ãh“represen˜ts“most“of“ËClif“Äsyn˜tac-Ž¡’úb]tic–q÷structures“is“a“propGer“subset“of“C‘q½language.‘%ýThisŽ¡’úb]subset–! conš¸ãtains“all“k˜ey“constructions“of“C‘ ýlanguageŽ¡’úb]except–ç\higher“tš¸ãypGe“abstractions.‘MËClif“Äcurren˜tly“doGesŽ¡’úb]not–¡¡conš¸ãtain“structures,‘´µunions“and“pGoin˜ters.‘V¬SomeŽ¡’úb]other–;sdi erences“are“caused“b¸ãy“restrictions“to“theŽ¡’úb]kš¸ãey–D0language“subsystems.‘>WF‘ÿ*ªor“example,‘æcurren˜tlyŽ¡’úb]the–“spGeci cation“of“ËClif“Äconš¸ãtains“the“program“ o˜wŽ¡’úb]con•¸ãtrol›øÍstatemen“ts˜"for",‘ O"while"˜and˜"if"˜but˜doGesŽ¡’úb]not–¼conš¸ãtain“the“"switc˜h"“and“"do“while"“spGeci ca-Ž¡’úb]tions–ïBbGecause“they“do“not“represenš¸ãt“an˜ything“newŽ¡’úb]in–’Ûthe“language“concept.‘*ZThe“latter“syn¸ãtax“can“bGeŽ¡’úb]easily–‰added“in“the“future.‘ The“C-compatible“partŽ¡’úb]of–n¯ËClif“Äconš¸ãtains“one“seman˜tic“di erence.‘½ÖP˜arame-Ž¡’úb]ters– are“passed“to“functions“b¸ãy“reference“bGecauseŽ¡’úb]according–¶#to“the“main“goal“of“ËClif“Äw¸ãe“suppGose“ma-Ž¡’úb]nipulations–«gwith“relativ¸ãely“large“ob‘Ž8jects“(matrices,Ž¡’úb]splines,‘[Ûetc.).‘oAlso–Zthe“tš¸ãypGe“c˜hec˜king“is“stronger“inŽ¡’úb]ËClif–UUÄthan“in“C.“W‘ÿ*ªe“ha•¸ãv“e–UUno“default“t¸ãypGes.ަ’úb]Another–+!part“of“ËClif“Äis“cen¸ãtered“around“the“direc-Ž¡’úb]tions–×Rof“future“dev•¸ãelopmen“t–×Rof“the“language.‘÷¿ThisŽ¡’úb]part–wcis“represen¸ãted“with“"remote"“class“of“com-Ž¡’úb]mands.‘ÿ±This–Ùøis“a“slot“to“remote“proGcedure“callsŽŽŽŽŽŽŽŒ‹* ˹  ý®] àQ£ ýB®]‘ÝÛQÄand–º®clienš¸ãt“serv˜er“paradigm.‘¡ÒW‘ÿ*ªe“ha˜v˜e“also“in“mindޤ æf‘ÝÛQspšGeci c–Âatomary“t¸ãyp˜es“as“are“arbitrary“precision“in-Ž¡‘ÝÛQtegers,–UUmatrices“and“splines.Ž©æg‘ÝÛQËClif–˜èÄis“a“m¸ãultiplatform“compiler“based“on“v‘ÿqÇariousŽ¡‘ÝÛQUNIX‘UUplatforms.ަ‘ÝÛQThe–ίinš¸ãterpreter“consists“from“t˜w˜o“main“parts:‘d|theŽ¡‘ÝÛQcompiler–û·and“the“virtual“stacš¸ãk“mac˜hine.‘ dîA‘ûJpro-Ž¡‘ÝÛQgram–`Ïfor“ËClif“Äis“a“sequence“of“zero“levš¸ãel“syn˜tacticŽ¡‘ÝÛQstructures.‘­ÖWhen–iZa“complete“zero“levš¸ãel“syn˜tacticŽ¡‘ÝÛQstructure–úáis“read“it“is“compiled“to“the“virtual“ma-Ž¡‘ÝÛQcš¸ãhine–%ŒcoGde“whic˜h“is“then“executed.‘ âmThe“debug-Ž¡‘ÝÛQging–Äand“the“user“conš¸ãtrol“o˜v˜er“a“program“execu-Ž¡‘ÝÛQtion–ƒis“realized“with“the“syncš¸ãhronous“in˜terrupt“com-Ž¡‘ÝÛQmand–TÃ"csuspGend"“and“with“an“asyncš¸ãhronous“in˜ter-Ž¡‘ÝÛQrupt–kÞhandling.‘µbIn“bGoth“cases“the“in¸ãterpreter“reactsŽ¡‘ÝÛQwith–ÏopGening“of“a“new“fully“functional“in¸ãterpreterŽ¡‘ÝÛQlev¸ãel.‘7A‘¤üuser–¥(can“ nish“the“computation“on“the“cur-Ž¡‘ÝÛQren•¸ãt›аlev“el˜with˜a˜command˜"resume"˜whic“h˜resumesŽ¡‘ÝÛQthe–UUcomputation“on“the“lo•¸ãw“er‘UUlev“el.ަ‘ÝÛQËClif–ÿƒÄhas“three“levš¸ãels“(in˜terfaces)“through“whic˜h“userŽ¡‘ÝÛQcan–yjadd“new“moGdules“and“enricš¸ãh“the“en˜vironmen˜t.Ž¡‘ÝÛQFirstly‘ÿ*ª,‘\—user–ô½can“write“functions“in“ËClif“ÄlanguageŽ¡‘ÝÛQwhicš¸ãh–Ðis“the“most“natural“and“simple“w˜a˜y‘ÿ*ª.‘áÓSec-Ž¡‘ÝÛQondly‘ÿ*ª,‘è,more–ÌâexpšGerienced“users“can“write“mo˜dules“inŽ¡‘ÝÛQF¸ãOR‘ÿ*ªTRAN–çÕor›çñC“language˜and˜link˜them˜to˜ËClif˜Äen-Ž¡‘ÝÛQvironmen¸ãt.‘ "kThis–åŒsort“of“opGenness“is“realized“viaŽ¡‘ÝÛQ"remote"–Sclass“syn¸ãtax.‘ ·ÀThe“third“and“the“mostŽ¡‘ÝÛQpGo•¸ãw“erful›Üèw“a“y˜ho“w˜to˜enric“h˜ËClif˜Äen“vironmen“t˜is˜toŽ¡‘ÝÛQcš¸ãhange–†Åthe“language“itself.‘This“is“enabled“b˜y“sys-Ž¡‘ÝÛQtematic–8Quse“of“compiler-compiler“tec¸ãhnology“[7Ž‘,“11Ž‘ 8S]Ž¡‘ÝÛQand–`careful“structural“dev•¸ãelopmen“t–`of“ËClif“Ä[9Ž‘,“10Ž‘`].Ž¡‘ÝÛQF‘ÿ*ªor–AÀexample,‘E«there“is“a“wš¸ãell“de ned“proGcedure“ho˜wŽ¡‘ÝÛQto–UUadd“a“new“atomary“t¸ãypGe“to“the“language.ަ‘ÝÛQThe–†Šgraphics“output“for“applications“in“optimalŽ¡‘ÝÛQconš¸ãtrol–ôÃand“iden˜ti cation“is“realized“with“externalŽ¡‘ÝÛQsubsystem– ïof“graphics“windoš¸ãw“c˜hannels.‘Y¥There“is“aŽ¡‘ÝÛQspšGecial–@álanguage“for“the“c¸ãhannel“sp˜eci cation,‘x,whic¸ãhŽ¡‘ÝÛQis–UUde ned“in“appGendix“B.ŽŸ Ã<‘àó•É3.‘¿þArcš®9hitecture–ÕTand“implemen˜tation“of“theŽ¡‘2ËClif‘ÕTÉsystemŽŸŽv‘ÝÛQÄAn–Þ(impGortanš¸ãt“decision“in“the“design“of“C-lik˜e“Çinter-Ž¡‘ÝÛQpr‘ÿ}'eter–>Äis“to“establish“synš¸ãtactic“and“seman˜tic“bloGc˜ksŽ¡‘ÝÛQon–fVwhic¸ãh“it“is“reasonable“to“suspGend“the“parsing“andŽ¡‘ÝÛQswitcš¸ãh–^¯to“execution.‘ÖThese“considerations“ha˜v˜e“ledŽ¡‘ÝÛQus–;!to“the“solution“where“the“in¸ãterpreter“is“clearlyŽ¡‘ÝÛQsplit–Æ»to“a“virtual“mac¸ãhine“and“to“a“language“pars-Ž¡‘ÝÛQing–UUand“coGde“generation“engine.ަ‘ÝÛQThe–æ¯virtual“mac¸ãhine“is“an“abstract“moGdel“of“com-Ž¡‘ÝÛQputer–m,with“a“loš¸ãw“lev˜el“instruction“set.‘ ¹KThe“in-Ž¡‘ÝÛQterpreter–Å[wš¸ãorks“in“an“alternating“t˜w˜o-step“moGde,Ž¡‘ÝÛQwhere––áthe“parser“translates“a“levš¸ãel“zero“syn˜tacticŽ¡‘ÝÛQblošGc¸ãk–µËand“generates“a“co˜de“for“the“virtual“ma-Ž¡‘ÝÛQc•¸ãhine.‘ÿŽSubsequen“tly–/Bthe“virtual“mac¸ãhine“executesŽŽŽ ýB®]’ÒŒçthe–«¦cošGde.‘t»The“co˜de“is“alw•¸ãa“ys–«¦ nished“with“the“in-ޤ æf’ÒŒçstruction–‡’STOP‘ÿ*ª,“whicš¸ãh“giv˜es“the“con˜trol“bac˜k“to“theŽ¡’ÒŒçparser.ŽŸæg’ÒŒçIn–|the“folloš¸ãwing“sections“w˜e“describGe“in“more“de-Ž¡’ÒŒçtail– èsome“aspGects“of“the“virtual“mac¸ãhine“and“parserŽ¡’ÒŒçdesign.ŽŸ j`’ÒŒçÉ3.1.‘¿þVirtual‘ÕTmac®9hineŽŸ4ž’ÒŒçÄDuring–proGcedure.‘(W‘ÿ*ªe“wš¸ãould“lik˜e“to“impro˜v˜eŽ¡’b]this–ðmecš¸ãhanism“with“a“pGossibilit˜y“of“concur-Ž¡’b]renš¸ãt–Ùcomputation“and“sync˜hronization“via“in-Ž¡’b]ternal–ýmecš¸ãhanism“whic˜h“w˜ould“allo˜w“the“in-Ž¡’b]terpreter–Ùto“proGceed“with“a“computation“ev¸ãenŽ¡’b]if–¦Vthe“data“from“the“remote“call“are“not“atŽ¡’b]the–+]dispGosal.‘cÊThe“inš¸ãterpreter“runs“un˜til“thereŽ¡’b]is–¸wno“reference“to“the“results“of“the“remoteŽ¡’b]call–:=and“then“blošGc¸ãks“just“b˜efore“the“ rst“suc¸ãhŽ¡’b]reference.ަ’ b\ÆŽŽŽ’b]ÄW‘ÿ*ªe–ó•suppGose“to“implemenš¸ãt“the“follo˜wing“spGe-Ž¡’b]cial–èéatomary“t•¸ãypGes:‘˜ðin“tegers–èéwith“arbitraryŽ¡’b]precision,‘j1matrices–2Òwith“a“dynamical“alloGca-Ž¡’b]tion–UUof“memory“and“splines.ަ’ b\ÆŽŽŽ’b]ÄT‘ÿ*ªo–¥alloš¸ãw“a“more“ exibilit˜y“in“language“ÇsyntaxŽ¡’b]Äw¸ãe–ˆ©propšGose“a“pro˜cedure“where“for“eac¸ãh“stageŽ¡’b]of–N×the“compiler“dev•¸ãelopmen“t–N×there“are“t•¸ãw“oŽ¡’b]compilers.‘¥×One–¼is“the“activ¸ãe“compiler“withŽ¡’b]a–G†full“seman¸ãtic“and“the“other“one“is“the“sameŽ¡’b]parser–v°but“with“a“spGecial“semanš¸ãtic“whic˜h“is“di-Ž¡’b]rected–lÕto“a“source-source“translation“to•¸ãw“ardsŽ¡’b]a–UUnew“syn¸ãtax.ŽŽŽŽŽŽŽŒ‹2Ê ˹  ý®] àQ£ ýB®]‘ìÛPÆŽŽŽ‘öÛQÄW‘ÿ*ªe– also“think“abšGout“a“p˜ossibilit¸ãy“to“conductޤ æf‘öÛQa–Æ researcš¸ãh“to˜w˜ards“a“compiler“with“a“uni edŽ¡‘öÛQparser–0wš¸ãorking“in“a“heterogeneous“en˜viron-Ž¡‘öÛQmenš¸ãt–M§with“di eren˜t“coGde“generation“parts“forŽ¡‘öÛQparticular›&en•¸ãvironmen“ts.‘bW‘ÿ*ªe˜ha“v“e˜in˜mind˜toŽ¡‘öÛQapply–Íthe“methoGds“used“in“ob‘Ž8ject“program-Ž¡‘öÛQming–to“solv¸ãe“"inheritance“anomaly"“[8Ž‘]“forŽ¡‘öÛQthis–ÂÈproblem.‘º When“w¸ãe“loGok“at“the“parserŽ¡‘öÛQconstructed–Cwith“Y‘ÿ*ªA¸ãCC‘C_it“can“bGe“seen“thatŽ¡‘öÛQparsing–•and“coGde“generation“parts“are“in¸ãter-Ž¡‘öÛQspGersed–àÏin“sucš¸ãh“a“w˜a˜y“that“it“is“not“pGossibleŽ¡‘öÛQto–Gºseparate“and“encapsulate“those“parts“fromŽ¡‘öÛQeac¸ãh–*!other.‘c`This“is“an“instance“of“inheritanceŽ¡‘öÛQanomaly–ÁÍwhicš¸ãh“can“bGe“approac˜hed“with“re-Ž¡‘öÛQcen•¸ãtly›UUdisco“v“ered˜methoGds.ŽŸaÉ‘1ÓKÉReferencesŽŸæg‘âÛRÄ[1]ŽŽ‘òiA.–®ÎV.“Aho,›Å-S.“C.“Johnson:‘$ºLR‘®·parsing,˜Com-Ž¡‘òiputing–ÔóSurv¸ãeys,›ôÛV‘ÿ*ªol.“6,˜No.“2,˜June“1974,˜pp.Ž¡‘òi99-124Ž© |6‘âÛR[2]ŽŽ‘òiA.–æfV.“Aho,‘ü–J.“D.“Ullman:‘:OThe“Theory“of“P¸ãars-Ž¡‘òiing,–z4T‘ÿ*ªranslation,“and›CkCompiling,“Pren¸ãtice˜Hall,Ž¡‘òiEnglew¸ão•Go“d›¿’Cli s,–!N.J.,“V‘ÿ*ªol.˜1,“1972,“V‘ÿ*ªol.˜2,Ž¡‘òi1973ަ‘âÛR[3]ŽŽ‘òiS.›/6Bandy•¸ãopadh“y“a“y‘ÿ*ª,‘e®V.S.˜Begw“ani,‘e®R.B.˜Mur-Ž¡‘òira¸ãy:‘nÆCompiling–ORfor“the“CRISP‘OQproGcessor,‘P†Pro-Ž¡‘òiceedings–9¼of“the“IEEE‘8ýSpring,‘òÕCOMPCON,Ž¡‘òi1987,–UUpp.“96-100ަ‘âÛR[4]ŽŽ‘òiA.D.– zBeren¸ãbaum,›ÙD.R.“Ditzel,˜H.R.“McLellan:Ž¡‘òiIn¸ãtroGduction–À£to“the“CRISP‘À~Instruction“Set“Ar-Ž¡‘òic¸ãhitecture,‘œÂProGceedings–(of“the“IEEE‘'šSpring,Ž¡‘òiCOMPCON,–UU1987,“pp.“86-90ަ‘âÛR[5]ŽŽ‘òiA.D.– zBeren¸ãbaum,›ÙD.R.“Ditzel,˜H.R.“McLellan:Ž¡‘òiArc•¸ãhitectural›ðInno“v‘ÿqÇations˜in˜the˜CRISP‘€Mi-Ž¡‘òicropro•Gcessor,‘$.Pro“ceedings–äof“the“IEEE‘ÕSpring,Ž¡‘òiCOMPCON,–UU1987,“pp.“91-95ަ‘âÛR[6]ŽŽ‘òiJ.J.–ˆùDongarra,›•âC.B.“Moler,˜J.R.“Bunc¸ãh,˜G.W.Ž¡‘òiStew•¸ãart,› p1LINP‘ÿ*ªA“CK‘6^User's‘7 Guide,˜SIAM,Ž¡‘òiPhiladelphia,‘UU1979ަ‘âÛR[7]ŽŽ‘òiS.–ˆ§C.“Johnson:‘ØlY›ÿ*ªA¸ãCC:“Y˜et“Another“CompilerŽ¡‘òiCompiler,‘Ð&Computing–Q/Science“T‘ÿ*ªec¸ãhnical“Re-Ž¡‘òipšGort–«;No.“32,‘´Bell“Lab˜oratories,‘´Murra¸ãy“Hill,Ž¡‘òiNJ–UU07974,“1975,“pp.“163-196ަ‘âÛR[8]ŽŽ‘òiD.G.–, Kafura,‘!¹R.G.“La•¸ãv“ender:‘ 6Concurren“tŽ¡‘òiOb‘Ž8ject-Orien¸ãted–O$Language“and“the“InheritanceŽ¡‘òiAnomaly‘ÿ*ª,––#ProGceedings‘‰-ISIPCALA'93,“Prague,Ž¡‘òi1993,–UUpp.“183-215ަ‘âÛR[9]ŽŽ‘ó Ÿýx䎑òiL.–®¬KoreG‘ú¸ân:‘$tThe“In¸ãterpreter“ËClifÄ,‘ÅProgrammer'sŽ¡‘òiGuide,–†ÔResearcš¸ãh‘S3RepGort,“Slo˜v‘ÿqÇak–S3T‘ÿ*ªec˜hnical“Uni-Ž¡‘òiv•¸ãersit“y–ÿ*ª,‘F“acultš¸ãy–Lof“Mec˜h.“Eng.,–Bratisla˜v‘ÿqÇa,“1994ަ‘ÝÛQ[10]ŽŽ‘ó Ÿýx䎑òiL.–íAKoreG‘ú¸ân:‘ ¡žThe“Inš¸ãterpreter“ËClifÄ,‘Ó;T‘ÿ*ªec˜hnicalŽ¡‘òiGuide,–†ÔResearcš¸ãh‘S3RepGort,“Slo˜v‘ÿqÇak–S3T‘ÿ*ªec˜hnical“Uni-Ž¡‘òiv•¸ãersit“y–ÿ*ª,‘F“acultš¸ãy–Lof“Mec˜h.“Eng.,–Bratisla˜v‘ÿqÇa,“1994ަ‘ÝÛQ[11]ŽŽ‘òiM.–WE.“Lesk,‘W„E.“Sc¸ãhmidt:‘uFLEX›W-“A˜lexical“ana-Ž¡‘òilyzer–Nhgenerator,›OËResearc¸ãh“repGort,˜Bell“LabGora-Ž¡‘òitories,–UUMurra¸ãy“Hill,“NJ,“1975,“pp.“197-210ަ‘ÝÛQ[12]ŽŽ‘òiB.– 1SerpGette,› ¾æJ.“V‘ÿ*ªuillemin,˜J.C.“Herv¸ã‘ûGe:Ž¡‘òiBigNum:‘Ž– qи::=‘ÕX¹<Ž“¸list‘‚މffŒÐŽ–^stat‘‚މffŒÐŽ“0‘ÕX¹>Ž‘ qÐ<Ž‘H¸stat‘‚މffŒÐŽ“0‘ÕX¹>ŽŽ¤ €’#¡ó¾KÈ cmsy8ºjŽ’€¸emptÃŽyŽ©·=’ÒŒç¹<Ž’Ù)_¸list‘‚މffŒÐŽ›^stat‘ÕX¹>Ž– qи::=‘ÕX¹<Ž“¸list‘‚މffŒÐŽ˜stat‘ÕX¹>Ž“<Ž‘H¸stat‘‚މffŒÐŽ˜1‘ÕX¹>ŽŽ¡’#¡ºjŽ’€¸emptÃŽyަ’ÒŒç¹<Ž’Ù)_¸stat‘‚މffŒÐŽ‘^0‘ÕX¹>Ž› qи::=–ÕXINT“¹<Ž˜¸list‘‚މffŒÐŽ‘^dekl“¹>Ž˜¸;Ž¡’#¡ºjŽ’€¸DOUBLE‘ÕX¹<Ž– qиlist‘‚މffŒÐŽ‘^dekl‘ÕX¹>Ž“¸;Ž¡’#¡ºjŽ’€¸FLOÃŽA‘ÿJªT‘ÕX¹<Ž– qиlist‘‚މffŒÐŽ‘^dekl‘ÕX¹>Ž“¸;Ž¡’#¡ºjŽ’€¸CHAR‘ÕX¹<Ž– qиlist‘‚މffŒÐŽ‘^dekl‘ÕX¹>Ž“¸;Ž¡’#¡ºjŽ’€¹<Ž’¸expr‘ÕX¹>Ž‘ qи;Ž¡’#¡ºjŽ’€¸IF–ÕX(“¹<Ž› qиexpr“¹>Ž˜¸)“¹<Ž˜¸then“¹>ŽŽ¡’#¡ºjŽ’€¸WHILE–ÕX(“¹<Ž› qиexpr“¹>Ž˜¸)“ºf“¹<Ž˜¸list‘‚މffŒÐŽ‘^stat“¹>Ž˜ºgŽ¡’#¡jŽ’€¸FÃŽOR–ÕXfor“ºf“¹<Ž› qиlist‘‚މffŒÐŽ‘^stat“¹>Ž˜ºgŽ¡’#¡jŽ’€¸READ–ÕX(“¹<Ž› qиl‘‚މffŒÐŽ‘^v‡alue“¹>Ž˜¸)“;Ž¡’#¡ºjŽ’€¸WRITE–ÕX(“¹<Ž› qиl‘‚މffŒÐŽ‘^v‡alue“¹>Ž˜¸)“;Ž¡’#¡ºjŽ’€¸PRINT‘ÕX;Ž¡’#¡ºjŽ’€¸EXIT‘ÕX;Ž¡’#¡ºjŽ’€¸INT–ÕXPRÃŽOC“¹<Ž‘ qиproŽŽ¡’#¡ºjŽ’€¸DOUBLE–ÕXPRÃŽOC“¹<Ž‘ qиproŽŽ¡’#¡ºjŽ’€¸FLO•ÃŽA‘ÿJªT›ÕXPR“OC˜¹<Ž‘ qиproŽŽ¡’#¡ºjŽ’€¸CHAR–ÕXPRÃŽOC“¹<Ž‘ qиproŽŽ¡’#¡ºjŽ’€¸V•ÃŽOID›ÕXPR“OC˜¹<Ž‘ qиproŽŽ¡’#¡ºjŽ’€¸EXPOR‘ÿJªT‘‚މffŒÐŽ–^T›ÕXREMOTE‘‚މffŒÐŽ“C˜INT˜PRÃŽOCŽ¡’ÒŒç¹<Ž’Ù)_¸idenÃŽt‘ÕX¹>Ž‘ qи(–ÕX)“;Ž¡’#¡ºjŽ’€¸EXPOR‘ÿJªT‘‚މffŒÐŽ–^T›ÕXREMOTE‘‚މffŒÐŽ“C˜DOUBLE˜PRÃŽOCŽ¡’ÒŒç¹<Ž’Ù)_¸idenÃŽt‘ÕX¹>Ž‘ qи(–ÕX)“;Ž¡’#¡ºjŽ’€¸EXPOR‘ÿJªT‘‚މffŒÐŽ–^T›ÕXREMOTE‘‚މffŒÐŽ“C˜FLO•ÃŽA‘ÿJªT˜PR“OCŽ¡’ÒŒç¹<Ž’Ù)_¸idenÃŽt‘ÕX¹>Ž‘ qи(–ÕX)“;Ž¡’#¡ºjŽ’€¸EXPOR‘ÿJªT‘‚މffŒÐŽ–^T›ÕXREMOTE‘‚މffŒÐŽ“C˜CHAR˜PRÃŽOCŽ¡’ÒŒç¹<Ž’Ù)_¸idenÃŽt‘ÕX¹>Ž‘ qи(–ÕX)“;Ž¡’#¡ºjŽ’€¸EXPOR‘ÿJªT‘‚މffŒÐŽ–^T›ÕXREMOTE‘‚މffŒÐŽ“C˜V•ÃŽOID˜PR“OCŽ¡’ÒŒç¹<Ž’Ù)_¸idenÃŽt‘ÕX¹>Ž‘ qи(–ÕX)“;Ž¡’#¡ºjŽ’€¸REMOTE‘‚މffŒÐŽ‘^C–ÕXINT“PRšÃŽOC“¹<Ž‘ qиiden˜t“¹>Ž‘ qи(“)“;Ž¡’#¡ºjŽ’€¸REMOTE‘‚މffŒÐŽ‘^C–ÕXDOUBLE“PRšÃŽOC“¹<Ž‘ qиiden˜t“¹>Ž‘ qи(“)“;Ž¡’#¡ºjŽ’€¸REMOTE‘‚މffŒÐŽ‘^C–ÕXFLOšÃŽA‘ÿJªT“PR˜OC“¹<Ž‘ qиiden˜t“¹>Ž‘ qи(“)“;Ž¡’#¡ºjŽ’€¸REMOTE‘‚މffŒÐŽ‘^C–ÕXCHAR“PRšÃŽOC“¹<Ž‘ qиiden˜t“¹>Ž‘ qи(“)“;Ž¡’#¡ºjŽ’€¸REMOTE‘‚މffŒÐŽ‘^C–ÕXVšÃŽOID“PR˜OC“¹<Ž‘ qиiden˜t“¹>Ž‘ qи(“)“;Ž¡’#¡ºjŽ’€¸CSUSPEND‘ÕX;Ž¡’#¡ºjŽ’€¸RESUME‘ÕX;Ž¡’#¡ºjŽ’€¸LOÃŽAD–ÕX(“¹<Ž› qи le‘‚މffŒÐŽ‘^name“¹>Ž˜¸);Ž¡’#¡ºjŽ’€¸;ަ’ÒŒç¹<Ž’Ù)_¸stat‘‚މffŒÐŽ‘^1‘ÕX¹>Ž– qи::=‘ÕX¹<Ž“¸expr‘ÕX¹>Ž“¸;Ž¡’#¡ºjŽ’€¸IF–ÕX(“¹<Ž› qиexpr“¹>Ž˜¸)“¹<Ž˜¸then“¹>ŽŽ¡’#¡ºjŽ’€¸WHILE–ÕX(“¹<Ž› qиexpr“¹>Ž˜¸)“ºf“¹<Ž˜¸list‘‚މffŒÐŽ‘^stat“¹>Ž˜ºgŽ¡’#¡jŽ’€¸FÃŽOR‘ÕX¹<Ž– qиfor‘ÕX¹>Ž“ºf‘ÕX¹<Ž“¸list‘‚މffŒÐŽ‘^stat‘ÕX¹>Ž“ºgŽ¡’#¡jŽ’€¸BREAK‘ÕX;Ž¡’#¡ºjŽ’€¸CONTINUE‘ÕX;Ž¡’#¡ºjŽ’€¸READ–ÕX(“¹<Ž› qиlist‘‚މffŒÐŽ‘^expr“¹>Ž˜¸)“;Ž¡’#¡ºjŽ’€¸WRITE–ÕX(“¹<Ž› qиlist‘‚މffŒÐŽ‘^expr“¹>Ž˜¸)“;Ž¡’#¡ºjŽ’€¸PRINT‘ÕX;Ž¡’#¡ºjŽ’€¸EXIT‘ÕX;Ž¡’#¡ºjŽ’€¸RETURN–ÕX(“¹<Ž› qиexpr“¹>Ž˜¸);Ž¡’#¡ºjŽ’€¸CSUSPEND‘ÕX;Ž¡’#¡ºjŽ’€¸LOÃŽAD–ÕX(“ le‘‚މffŒÐŽ‘^name“);Ž¡’#¡ºjŽ’€¸;ަ’ÒŒç¹<Ž’Ù)_¸list‘‚މffŒÐŽ‘^dekl‘ÕX¹>Ž– qи::=‘ÕX¹<Ž“¸idenÃŽt‘ÕX¹>ŽŽ¡’#¡ºjŽ’€¹<Ž’¸idenÃŽt‘ÕX¹>Ž– qи,‘ÕX¹<Ž“¸list‘‚މffŒÐŽ‘^dekl‘ÕX¹>ŽŽ¡’#¡ºjŽ’€¹<Ž’¸idenÃŽt‘ÕX¹>Ž‘ qÐ<Ž‘H¸list‘‚މffŒÐŽ›^dim‘ÕX¹>Ž– qи,‘ÕX¹<Ž“¸list‘‚މffŒÐŽ˜dekl‘ÕX¹>ŽŽ¦’ÒŒç<Ž’Ù)_¸list‘‚މffŒÐŽ›^dim‘ÕX¹>Ž– qи::=‘ÕX¹<Ž“¸list‘‚މffŒÐŽ˜dim‘ÕX¹>Ž“¸[‘ÕX¹<Ž“¸n•ÃŽum“bŽ‘ qи]Ž¡’#¡ºjŽ’€¸[‘ÕX¹<Ž› qиn•ÃŽum“bŽ˜¸]‘ÕX¹<Ž˜¸list‘‚މffŒÐŽ‘^dim‘ÕX¹>ŽŽŽŽŽŽŽŒ‹F† ˹  ý®] àQ£ ýB®]‘°Ç¹<Ž‘ M?¸then‘ÕX¹>Ž› qи::=–ÕXºf“¹<Ž˜¸list‘‚މffŒÐŽ‘^stat“¹>Ž˜<Ž‘H¸or“¹>ŽŽ¤ò–‘°Ç<Ž‘ M?¸or‘ÕX¹>Ž› qи::=–ÕXºg“¸ELSE“ºf“¹<Ž˜¸list‘‚މffŒÐŽ‘^stat“¹>Ž˜ºgŽ© €‘8GjŽ‘:£õgŽ¡‘°Ç¹<Ž‘ M?¸for‘ÕX¹>Ž› qи::=–ÕX(“¹<Ž˜¸expr“¹>Ž˜¸;“¹<Ž˜¸expr“¹>Ž˜¸;“¹<Ž˜¸expr“¹>Ž˜¸)ަ‘8GºjŽ‘:£õ¸(–ÕX;“;“)Ž¡‘°Ç¹<Ž‘ M?¸prošŽ– qи::=‘ÕX¹<Ž“¸idenÃŽt‘ÕX¹>Ž“<Ž‘H¸pro˜c1‘ÕX¹>ŽŽ¡‘°Ç<Ž‘ M?¸proŽ› qи::=–ÕX(“¹<Ž˜¸list‘‚މffŒÐŽ–^form‘‚މffŒÐŽ“param‘ÕX¹>Ž˜¸)‘ÕX¹<Ž˜¸proŽŽ¦‘8GºjŽ‘:£õ¸(–ÕX)“¹<Ž‘ qиproŽŽ¦‘8GºjŽ‘:£õ¸(–ÕX)“;Ž¡‘°Ç¹<Ž‘ M?¸proŽ› qи::=–ÕXºf“¹<Ž˜¸list‘‚މffŒÐŽ–^loŽ˜¸;‘ÕX¹<Ž˜¸proŽŽ¦‘8GºjŽ‘:£õf‘ÕX¹<Ž‘ qиproŽŽ¡‘°Ç<Ž‘ M?¸proŽ– qи::=‘ÕX¹<Ž“¸list‘‚މffŒÐŽ‘^stat‘ÕX¹>Ž“ºgŽ¡‘°Ç¹<Ž‘ M?¸list‘‚މffŒÐŽ–^form‘‚މffŒÐŽ“param‘ÕX¹>Ž› qи::=–ÕXINT“¹<Ž˜¸idenÃŽt“¹>ŽŽ¦‘8GºjŽ‘:£õ¸INT‘ÕX¹<Ž– qиidenÃŽt‘ÕX¹>Ž“¸,‘ÕX¹<Ž“¸list‘‚މffŒÐŽ–^form‘‚މffŒÐŽ“param‘ÕX¹>ŽŽ¦‘8GºjŽ‘:£õ¸DOUBLE‘ÕX¹<Ž‘ qиidenÃŽt‘ÕX¹>ŽŽ¦‘8GºjŽ‘:£õ¸DOUBLE‘ÕX¹<Ž– qиidenÃŽt‘ÕX¹>Ž“¸,‘ÕX¹<Ž“¸list‘‚މffŒÐŽ–^form‘‚މffŒÐŽ“param‘ÕX¹>ŽŽ¦‘8GºjŽ‘:£õ¸FLO•ÃŽA‘ÿJªT‘ÕX¹<Ž‘ qиiden“t‘ÕX¹>ŽŽ¦‘8GºjŽ‘:£õ¸FLO•ÃŽA‘ÿJªT‘ÕX¹<Ž› qиiden“t‘ÕX¹>Ž˜¸,‘ÕX¹<Ž˜¸list‘‚މffŒÐŽ–^form‘‚މffŒÐŽ“param‘ÕX¹>ŽŽ¦‘8GºjŽ‘:£õ¸CHAR‘ÕX¹<Ž‘ qиidenÃŽt‘ÕX¹>ŽŽ¦‘8GºjŽ‘:£õ¸CHAR‘ÕX¹<Ž– qиidenÃŽt‘ÕX¹>Ž“¸,‘ÕX¹<Ž“¸list‘‚މffŒÐŽ–^form‘‚މffŒÐŽ“param‘ÕX¹>ŽŽ¦‘8GºjŽ‘:£õ¸INT‘ÕX¹<Ž– qиidenÃŽt‘ÕX¹>Ž“<Ž‘H¸list‘‚މffŒÐŽ–^loŽŽ¦‘8GºjŽ‘:£õ¸INT‘ÕX¹<Ž– qиidenÃŽt‘ÕX¹>Ž“<Ž‘H¸list‘‚މffŒÐŽ–^loŽ‘ qи,ަ‘°Ç¹<Ž‘ M?¸list‘‚މffŒÐŽ–^form‘‚މffŒÐŽ“param‘ÕX¹>ŽŽ¦‘8GºjŽ‘:£õ¸DOUBLE‘ÕX¹<Ž– qиidenÃŽt‘ÕX¹>Ž“<Ž‘H¸list‘‚މffŒÐŽ–^loŽŽ¦‘8GºjŽ‘:£õ¸DOUBLE‘ÕX¹<Ž– qиidenÃŽt‘ÕX¹>Ž“<Ž‘H¸list‘‚މffŒÐŽ–^loŽ‘ qи,ަ‘°Ç¹<Ž‘ M?¸list‘‚މffŒÐŽ–^form‘‚މffŒÐŽ“param‘ÕX¹>ŽŽ¦‘8GºjŽ‘:£õ¸FLO•ÃŽA‘ÿJªT‘ÕX¹<Ž› qиiden“t‘ÕX¹>Ž˜<Ž‘H¸list‘‚މffŒÐŽ–^loŽŽ¦‘8GºjŽ‘:£õ¸FLO•ÃŽA‘ÿJªT‘ÕX¹<Ž› qиiden“t‘ÕX¹>Ž˜<Ž‘H¸list‘‚މffŒÐŽ–^loŽ˜¸,ަ‘°Ç¹<Ž‘ M?¸list‘‚މffŒÐŽ–^form‘‚މffŒÐŽ“param‘ÕX¹>ŽŽ¦‘8GºjŽ‘:£õ¸CHAR‘ÕX¹<Ž– qиidenÃŽt‘ÕX¹>Ž“<Ž‘H¸list‘‚މffŒÐŽ–^loŽŽ¦‘8GºjŽ‘:£õ¸CHAR‘ÕX¹<Ž– qиidenÃŽt‘ÕX¹>Ž“<Ž‘H¸list‘‚މffŒÐŽ–^loŽ‘ qи,ަ‘°Ç¹<Ž‘ M?¸list‘‚މffŒÐŽ–^form‘‚މffŒÐŽ“param‘ÕX¹>ŽŽ¡‘°Ç<Ž‘ M?¸list‘‚މffŒÐŽ–^loŽ‘ qи::=–ÕX[“]ަ‘8GºjŽ‘:£õ¸[‘ÕX¹<Ž› qиn•ÃŽum“bŽ˜¸]ަ‘8GºjŽ‘:£õ¹<Ž‘A@m¸list‘‚މffŒÐŽ–^lošŽ– qи[‘ÕX¹<Ž“¸n•ÃŽum“b˜eri‘ÕX¹>Ž‘ qи]Ž¡‘°Ç¹<Ž‘ M?¸list‘‚މffŒÐŽ–^loŽ‘ qи::=‘ÕXIDENTަ‘8GºjŽ‘:£õ¸IDENT–ÕX,“¹<Ž‘ qиlist‘‚މffŒÐŽ–^loŽŽ¡‘°Ç<Ž‘ M?¸dekl‘ÕX¹>Ž› qи::=–ÕXINT“¹<Ž˜¸list‘‚މffŒÐŽ–^loŽ˜¸;ަ‘8GºjŽ‘:£õ¸DOUBLE‘ÕX¹<Ž› qиlist‘‚މffŒÐŽ–^loŽ˜¸;ަ‘8GºjŽ‘:£õ¸FLOÃŽA‘ÿJªT‘ÕX¹<Ž› qиlist‘‚މffŒÐŽ–^loŽ˜¸;ަ‘8GºjŽ‘:£õ¸CHAR‘ÕX¹<Ž› qиlist‘‚މffŒÐŽ–^loŽ˜¸;Ž¡‘°Ç¹<Ž‘ M?¸list‘‚މffŒÐŽ–^loŽ– qи::=‘ÕX¹<Ž“¸idenÃŽt‘ÕX¹>ŽŽ¦‘8GºjŽ‘:£õ¹<Ž‘A@m¸idenÃŽt‘ÕX¹>Ž– qи,‘ÕX¹<Ž“¸list‘‚މffŒÐŽ–^loŽŽ¦‘8GºjŽ‘:£õ¹<Ž‘A@m¸idenÃŽt‘ÕX¹>Ž‘ qÐ<Ž‘H¸list‘‚މffŒÐŽ‘^dim‘ÕX¹>ŽŽ¦‘8GºjŽ‘:£õ¹<Ž‘A@m¸idenÃŽt‘ÕX¹>Ž‘ qÐ<Ž‘H¸list‘‚މffŒÐŽ›^dim‘ÕX¹>Ž– qи,‘ÕX¹<Ž“¸list‘‚މffŒÐŽ˜loŽŽ¡‘°Ç<Ž‘ M?¸call‘ÕX¹>Ž– qи::=‘ÕX¹<Ž“¸idenÃŽt‘ÕX¹>Ž“¸(‘ÕX¹<Ž“¸call1‘ÕX¹>ŽŽ¡‘°Ç<Ž‘ M?¸call1‘ÕX¹>Ž– qи::=‘ÕX¹<Ž“¸list‘‚މffŒÐŽ‘^param‘ÕX¹>Ž“¸)ަ‘8GºjŽ‘:£õ¸)ŽŽŽ ýB®]’úb]¹<Ž’þÕ¸list‘‚މffŒÐŽ‘^param‘ÕX¹>Ž– qи::=‘ÕX¹<Ž“¸expr‘ÕX¹>Ž“¸)ޤ €’,ùºjŽ’/U‹¹<Ž’5ò¸expr‘ÕX¹>Ž– qи,‘ÕX¹<Ž“¸list‘‚މffŒÐŽ‘^param‘ÕX¹>ŽŽ©n)’úb]<Ž’þÕ¸expr‘ÕX¹>Ž– qи::=‘ÕX¹<Ž“¸expr‘ÕX¹>Ž“<Ž›H¸opŽ“<Ž˜¸expr‘ÕX¹>ŽŽ¡’,ùºjŽ’/U‹¹<Ž’5ò¸l‘‚މffŒÐŽ‘^v‡alue‘ÕX¹>Ž– qи=‘ÕX¹<Ž“¸expr‘ÕX¹>ŽŽ¡’,ùºjŽ’/U‹‘ÕX¹<Ž‘ qиexpr‘ÕX¹>ŽŽ¡’,ùºjŽ’/U‹¸+‘ÕX¹<Ž‘ qиexpr‘ÕX¹>ŽŽ¡’,ùºjŽ’/U‹¸++‘ÕX¹<Ž‘ qиl‘‚މffŒÐŽ‘^v‡alue‘ÕX¹>ŽŽ¡’,ùºjŽ’/U‹‘ÕX¹<Ž‘ qиl‘‚މffŒÐŽ‘^v‡alue‘ÕX¹>ŽŽ¡’,ùºjŽ’/U‹¸(–ÕXINT“)“¹<Ž‘ qиexpr“¹>ŽŽ¡’,ùºjŽ’/U‹¸(–ÕXDOUBLE“)“¹<Ž‘ qиexpr“¹>ŽŽ¡’,ùºjŽ’/U‹¸(–ÕXFLOÃŽA‘ÿJªT“)“¹<Ž‘ qиexpr“¹>ŽŽ¡’,ùºjŽ’/U‹¸(–ÕXCHAR“)“¹<Ž‘ qиexpr“¹>ŽŽ¡’,ùºjŽ’/U‹¹<Ž’5ò¸prim‘‚މffŒÐŽ‘^expr‘ÕX¹>ŽŽ¦’úb]<Ž’þÕ¸prim‘‚މffŒÐŽ‘^expr‘ÕX¹>Ž– qи::=‘ÕX¹<Ž“¸idenÃŽti er‘ÕX¹>ŽŽ¡’,ùºjŽ’/U‹¹<Ž’5ò¸n•ÃŽum“bŽŽ¡’,ùºjŽ’/U‹¹<Ž’5ò¸n•ÃŽum“bŽŽ¡’,ùºjŽ’/U‹¹<Ž’5ò¸stringc‘ÕX¹>ŽŽ¡’,ùºjŽ’/U‹¹<Ž’5ò¸n•ÃŽum“bŽŽ¡’,ùºjŽ’/U‹¸(‘ÕX¹<Ž– qиexpr‘ÕX¹>Ž“¸)Ž¡’,ùºjŽ’/U‹¹<Ž’5ò¸call‘ÕX¹>ŽŽ¦’úb]<Ž’þÕ¸l‘‚މffŒÐŽ‘^v‡alue‘ÕX¹>Ž– qи::=‘ÕX¹<Ž“¸idenÃŽti er‘ÕX¹>ŽŽ¦’úb]<Ž’þÕ¸idenšÃŽti er‘ÕX¹>Ž– qи::=‘ÕX¹<Ž“¸iden˜t‘ÕX¹>ŽŽ¡’,ùºjŽ’/U‹¹<Ž’5ò¸idenÃŽti er‘ÕX¹>Ž– qи[‘ÕX¹<Ž“¸expr‘ÕX¹>Ž“¸]ަ’úb]¹<Ž’þÕ¸opŽ‘ qи::=–ÕXanšÃŽy“c˜haracter“from“the“set:Ž¡’úb]ºjŽ’þÕóIßCÊscmtt8ëI+–@-“/“\%“<“>“&“&&›€==“<=“>=“!=“*‘\¹<<–ÕX>>‘µV¸^ŽŽ‘Š®~ŽŽ˜!“ºjŽ‘1ÌjŽŽ¦’úb]¹<Ž’þÕ¸n•ÃŽum“bšŽ– qи::=‘ÕX¹<Ž“¸n•ÃŽum“b˜er‘ÕX¹>ŽŽ¡’,ùºjŽ’/U‹¸n•ÃŽum“bšŽ‘ qÐ<Ž‘H¸n“um“b˜er‘ÕX¹>ŽŽ¦’úb]<Ž’þÕ¸n•ÃŽum“bŽ‘ qи::=›ÕXan“y˜single˜c“haracterަ’úb]¹<Ž’þÕ¸n•ÃŽum“bšŽ– qи::=‘ÕX¹<Ž“¸n•ÃŽum“b˜eri‘ÕX¹>Ž‘ qи.‘Ç ¹<Ž‘ c˜¸n“um“b˜eri‘ÕX¹>ŽŽ¡’,ùºjŽ’/U‹¸.‘Ç ¹<Ž‘ c˜¸n•ÃŽum“bŽŽ¡’,ùºjŽ’/U‹¹<Ž’5ò¸n•ÃŽum“bŽ‘ qи.ަ’úb]¹<Ž’þÕ¸n•ÃŽum“bŽ‘ qи::=–ÕXdigit“from“the“set:‘Ç 0,1,2,3,4,5,6,7,8,9ަ’úb]¹<Ž’þÕ¸stringc‘ÕX¹>Ž‘ qи::=–ÕXSequence“one“or“more“cÃŽharacters,“ rstŽ¡’úb]cšÃŽharacter–ÕXis“a“letter“follo˜w˜ed“b˜y“letters“or“digitsަ’úb]¹<Ž’þÕ¸idenšÃŽt‘ÕX¹>Ž‘ qи::=–ÕXSequence“one“or“more“c˜haracters,“ rstŽ¡’úb]cšÃŽharacter–ÕXis“a“letter“follo˜w˜ed“b˜y“letters“or“digitsަ’úb]The–‰statemenšÃŽt“LO˜AD( le‘‚މffŒÐŽ‘^name);‘8¡is“only“proŽ– qи::=‘ÕX¹<Ž“¸list‘‚މffŒÐŽ–^stat‘‚މffŒÐŽ“0‘ÕX¹>Ž‘ qÐ<Ž‘H¸stat‘‚މffŒÐŽ“0‘ÕX¹>ŽŽ¡’,ùºjŽ’/U‹¸emptÃŽyŽŽŽŽŽŽŒ‹e8 ˹  ý®] àQ£ ýB®]‘ÝÛQ¹<Ž‘äwɸstat‘‚މffŒÐŽ‘^0‘ÕX¹>Ž› qи::=–ÕXFIELDS“=“¹<Ž˜¸n•ÃŽum“bŽŽ¤ €‘r ºjŽ‘Î¸TYPE–ÕX=“¹<Ž‘ qиstring“¹>ŽŽ¡‘r ºjŽ‘Î¸PRINT‘‚މffŒÐŽ‘^FÃŽORMA‘ÿJªT–ÕX=“¹<Ž‘ qиstring“¹>ŽŽ¡‘r ºjŽ‘Î¸ON‘‚މffŒÐŽ–^LEA‘ÿ8VE‘‚މffŒÐŽ“WINDOÃŽW–ÕX=“¹<Ž‘ qиstring“¹>ŽŽ¡‘r ºjŽ‘Î¸DIRECTION–ÕX=“¹<Ž‘ qиstring“¹>ŽŽ¡‘r ºjŽ‘Î¸ST–ÿJªAR“T‘‚މffŒÐŽ›^TIME–ÕX=“¹<Ž‘ qиs‘‚މffŒÐŽ˜time“¹>ŽŽ¡‘r ºjŽ‘Î¸DURA‘ÿJªTION‘‚މffŒÐŽ›^TIME–ÕX=“¹<Ž‘ qиd‘‚މffŒÐŽ˜time“¹>ŽŽ¡‘r ºjŽ‘Î¸W‘‚މffŒÐŽ‘^RESOLUTION–ÕX=“¹<Ž‘ qиn•ÃŽum“bŽŽ¡‘ÝÛQ<Ž‘äwɸn•ÃŽum“bŽŽ¡‘r ºjŽ‘Î¸LOšÃŽWER–ÕX(“¹<Ž‘ qиn˜um˜bŽ› qи)“=“¹<Ž˜¸n•ÃŽum“bŽŽ¡‘r ºjŽ‘Î¸UPPER–ÕX(“¹<Ž› qиn•ÃŽum“bŽ˜¸)–ÕX=“¹<Ž˜¸n•ÃŽum“bŽŽ¡‘r ºjŽ‘Î¸STYLE–ÕX(“¹<Ž› qиn•ÃŽum“bŽ˜¸)–ÕX=“¹<Ž˜¸n•ÃŽum“bŽŽ©Ûk‘ÝÛQ<Ž‘äwɸd‘‚މffŒÐŽ‘^time‘ÕX¹>Ž– qи::=‘ÕX¹<Ž“¸n•ÃŽum“bŽŽ¡‘r ºjŽ‘Î¸AÃŽUTOMA‘ÿJªTICަ‘ÝÛQ¹<Ž‘äwɸs‘‚މffŒÐŽ‘^time‘ÕX¹>Ž– qи::=‘ÕX¹<Ž“¸n•ÃŽum“bŽŽ¡‘r ºjŽ‘Î¸AÃŽUTOMA‘ÿJªTICަ‘ÝÛQ¹<Ž‘äwɸn•ÃŽum“bšŽ– qи::=‘ÕX¹<Ž“¸n•ÃŽum“b˜er‘ÕX¹>ŽŽ¡‘r ºjŽ‘Î¸n•ÃŽum“bšŽ‘ qÐ<Ž‘H¸n“um“b˜er‘ÕX¹>ŽŽ¦‘ÝÛQ<Ž‘äwɸn•ÃŽum“bšŽ– qи::=‘ÕX¹<Ž“¸n•ÃŽum“b˜eri‘ÕX¹>Ž‘ qи.‘Ç ¹<Ž‘ c˜¸n“um“b˜eri‘ÕX¹>ŽŽ¡‘r ºjŽ‘Î¸.‘Ç ¹<Ž‘ c˜¸n•ÃŽum“bŽŽ¡‘r ºjŽ‘Î¹<Ž‘j÷¸n•ÃŽum“bŽ‘ qи.ަ‘ÝÛQ¹<Ž‘äwɸn•ÃŽum“bŽ‘ qи::=–ÕXdigit“from“the“set:‘Ç 0,1,2,3,4,5,6,7,8,9ŽŸAÑ‘òñjÉC.‘¿þInstruction–ÕTset“of“the“ËClif“ÉvirtualŽŸ æf‘87émac®9hineŽŸCŒ‘ÝÛQ¸Notation:Ž¡‘ÝÛQ¹ADŽ‘ ®B¸-–ÕXan“inšÃŽteger“n˜um˜bŽ‘ qи-–ÕXa“double“precision“ oating“pŽ‘ qи-–ÕXa“single“precision“ oating“pŽ‘ ®B¸-–ÕXa“bÃŽyteŽ¡Ÿ€‘ÝÛQInstructions›²âha•ÃŽv“e˜a˜v‡ariable˜length.‘»£The˜structure˜of˜the˜in-Ž¡‘ÝÛQstructions– Âis“the“folloÃŽwing:‘1ômaxäjor,–minor,“immediately‘ÿJª.‘g^Im-Ž¡‘ÝÛQmediately–‚Rcan“b“¸[[¹ASr}T‘.:¸]]‘ÕhtÃŽyp¸=“[[¹ASr}T‘.:¸]]‘ÕhtÃŽyp¸~ŽŽ‘H[[¹AS“T˜¸]]‘ÕhOP‘‚މffŒÐŽ–^0‘‚މffŒÐŽ“maŽ¡¡‘°ÇInstruction‘ÕXëJSAL¸.Ž¡‘°ÇDescription:‘Ç p>“¸[[¹ASr}T‘.:¸]]‘ÕhOP‘‚މffŒÐŽ–^0‘‚މffŒÐŽ“maŽ¡¡’úb]Instruction‘ÕXëJXºOOR¸.Ž¡’úb]Description:‘Ç pŽ‘ ®BºŽŽŽ‘à!‘ÕX¹<Ž‘ qÐdoublKe‘ÕX>ŽŽ¡’úb]<Ž’þÕdoublKe‘ÕX>Ž‘ qÐºŽŽŽ‘£œ!‘ÕX¹<Ž‘ qÐintegI{er‘Ê>ŽŽ¡’úb]<Ž’þÕintegI{er‘Ê>Ž‘ ®BºŽŽŽ‘à!‘ÕX¹<Ž‘ qÐf‘áÇlKoat‘ÕX>ŽŽ¡’úb]<Ž’þÕf‘áÇlKoat‘ÕX>Ž‘ qÐºŽŽŽ‘£œ!‘ÕX¹<Ž‘ qÐintegI{er‘Ê>ŽŽ¡’úb]<Ž’þÕf‘áÇl•Koat‘ÕX>Ž‘ qÐºŽŽŽ‘£œ!‘ÕX¹<Ž‘ qÐdoubl“e‘ÕX>ŽŽ¡’úb]<Ž’þÕdoubl•Ke‘ÕX>Ž‘ qÐºŽŽŽ‘£œ!‘ÕX¹<Ž‘ qÐf‘áÇl“oat‘ÕX>ŽŽ¡’úb]<Ž’þÕchar‘Ê>Ž‘ ®BºŽŽŽ‘à!‘ÕX¹<Ž‘ qÐintegI{er‘Ê>ŽŽ¡’úb]<Ž’þÕintegI{er‘Ê>Ž‘ ®BºŽŽŽ‘à!‘ÕX¹<Ž‘ qÐchar‘Ê>ŽŽ¡’úb]<Ž’þÕdoublKe‘ÕX>Ž‘ qÐºŽŽŽ‘£œ!‘ÕX¹<Ž‘ qÐchar‘Ê>ŽŽ¡’úb]<Ž’þÕchar‘Ê>Ž‘ ®BºŽŽŽ‘à!‘ÕX¹<Ž‘ qÐdoublKe‘ÕX>ŽŽ¡’úb]<Ž’þÕchar‘Ê>Ž‘ ®BºŽŽŽ‘à!‘ÕX¹<Ž‘ qÐf‘áÇlKoat‘ÕX>ŽŽ¡’úb]<Ž’þÕf‘áÇlKoat‘ÕX>Ž‘ qÐºŽŽŽ‘£œ!‘ÕX¹<Ž‘ qÐchar‘Ê>ŽŽ¡’úb]<Ž’þÕv•I{oid‘ÕX>Ž‘ qÐºŽŽŽ‘£œ!‘ÕX¹<Ž‘ qÐinteg“er‘Ê>ŽŽ¡’úb]<Ž’þÕvI{oid‘ÕX>Ž‘ qÐºŽŽŽ‘£œ!‘ÕX¹<Ž‘ qÐdoublKe‘ÕX>ŽŽ¡’úb]<Ž’þÕvI{oid‘ÕX>Ž‘ qÐºŽŽŽ‘£œ!‘ÕX¹<Ž‘ qÐf‘áÇlKoat‘ÕX>ŽŽ¡’úb]<Ž’þÕvI{oid‘ÕX>Ž‘ qÐºŽŽŽ‘£œ!‘ÕX¹<Ž‘ qÐchar‘Ê>ŽŽ¡’úb]¸The›wcon•ÃŽv“ersion˜to˜the˜wider˜t“yp•13 D45 D<70F8F8F87005057D840B>I< 01800780FF80FF8007800780078007800780078007800780078007800780078007800780 0780FFF8FFF80D157D9414>49 D<0FC03FF870FCF83CF83EF81E701E003E003C00380070 00E001C0038006060C06180E3FFC7FFCFFFCFFFC0F157E9414>I<0FC01FF03078787C78 3C783C107C007800E00FE00078003C003C003E703EF83EF83EF83C70783FF00FC00F157E 9414>I<000C00001C00003C00007C0000FC0001BC00033C00063C000C3C00183C00303C 00603C00C03C00FFFF80FFFF80003C00003C00003C00003C0003FF8003FF8011157F9414 >I<700C7FF87FF07FE07F8060006000600067E07870603C003C003E003E703EF03EF03E E03C70783FF00FC00F157E9414>I<03F00FF81E1C383C383C70187000F000F3E0F438F8 1CF01CF01EF01EF01E701E701E781C3C381FF007E00F157E9414>I<70F8F8F870000000 000070F8F8F870050F7D8E0B>58 D<00060000000F0000000F0000001F8000001F800000 3FC0000037C0000037C0000063E0000063E00000C3F00000C1F00001C1F8000180F80001 80F80003FFFC0003FFFC0006003E0006003E000E003F000C001F00FF80FFF0FF80FFF01C 177F961F>65 DI<007F8103FFF707E03F0F000F1E00073C00077C0003780003F8 0000F80000F80000F80000F80000F80000F800007800037C00033C00031E00060F000C07 E03803FFF0007FC018177E961D>III<003FC08001FFF38007E01F800F8007801E0003803C0003807C00 01807C000180F8000000F8000000F8000000F8000000F8000000F801FFF0F801FFF07C00 0F807C000F803C000F801E000F800F800F8007E01F8001FFFF80003FE1801C177E9620> 71 DII<07FF8007FF80007C00007C00007C00007C00007C00007C0000 7C00007C00007C00007C00007C00007C00007C00007C00007C00707C00F87C00F87C00F8 780070F0001FC00011177F9615>I76 DII<007F800003C0F0000F003C 001E001E003C000F003C000F007C000F8078000780F80007C0F80007C0F80007C0F80007 C0F80007C0F80007C0F80007C0780007807C000F803C000F003E001F001E001E000F003C 0003C0F000007F80001A177E961F>II<007F800003C0F0000F003C001E001E00 3E001F003C000F007C000F8078000780F80007C0F80007C0F80007C0F80007C0F80007C0 F80007C0F80007C0780007807C000F803C000F003C1E0F001E211E000F20BC0003E0F000 007FE0400000704000007FC000007FC000003F8000003F0000000E001A1D7E961F>II<07F0801FFD80380F8070 0380F00380F00180F00180F80000FF80007FF8003FFE001FFF0007FF80007F80000FC000 07C0C003C0C003C0C003C0E00780F80F00DFFE0087F80012177E9617>I<7FFFFF007FFF FF00783E0F00603E0300E03E0380C03E0180C03E0180C03E0180003E0000003E0000003E 0000003E0000003E0000003E0000003E0000003E0000003E0000003E0000003E0000003E 0000003E000007FFF00007FFF00019177F961C>III<7FF07FC07FF07FC007C01C0007E0380003F0700001F8600000F8C00000FDC00000 7F8000003F0000001F0000001F8000001FC000003FE0000033E0000063F00000C1F80001 C0FC0003807C0003007E0006003F00FFC0FFF0FFC0FFF01C177F961F>88 D<7FFFF07FFFF07C03E07807C0700FC0600F80601F00603F00007E00007C0000F80001F8 0001F00003E03007E0300FC0300F80701F00703F00E03E00E07C03E0FFFFE0FFFFE01417 7E9619>90 D<0FE0003838003C1C003C1E00181E00001E0000FE000F9E003C1E00781E00 F01E00F01E00F01E00786FC01F87C0120F7F8E14>97 D<07F81C0E381E781E700CF000F0 00F000F000F0007000780038061C0C07F80F0F7F8E12>99 D<001F80001F800007800007 8000078000078000078000078003F7801E1F80380780780780700780F00780F00780F007 80F00780F00780700780780780380F801E1FE007E7E013177F9617>I<07F01C18380C78 067007F007F007FFFFF000F0007000780038031E0603FC100F7F8E13>I<0FE700183B80 301B80701C00701C00701C00701C003018001830002FE0002000003000003FF8003FFE00 3FFF00700780E00380E00380E00380700700380E000FF80011167F8E14>103 DI<387C7C7C3800000000FCFC3C3C3C3C3C3C3C3C3C3C3CFFFF08187F970B>I107 DIII<07F0001C1C00380E00700700700700F00780F00780F00780F00780 F00780700700700700380E001C1C0007F000110F7F8E14>II114 D<1FF060704030C030E000 FF007FE03FF00FF80078C018C018E010F020CFC00D0F7F8E10>I<0C000C000C000C001C 001C003FE0FFE03C003C003C003C003C003C003C003C303C303C303C301E6007C00C157F 9410>II121 D E /Fb 6 111 df<0007F0001818003038 00203000600000600000600000600000C00007FFE000C06000C06000C0600180C00180C0 0180C00180C00181800301900301900301900301A00300E0060000060000660000E40000 C80000700000151D819614>12 D<03900C70187030303060606060606060C0C0C0C840C8 41C862D01C700D0E7C8D12>97 D<07801840302060206040FF80C000C000C000C000C020 C04061803E000B0E7C8D10>101 D<3E0C0C0C0C181818183030303060606060C0C8C8C8 D06007177D9609>108 D<30783C00498CC6004E0502004C0602009C0E0600180C060018 0C0600180C060030180C0030180C8030181880301818806030090060300E00190E7D8D1D >I<3078498C4E044C049C0C180C180C180C30183019303130316012601C100E7D8D14>I E /Fc 11 93 df<60F0F0F0F0F0F0F0F0F0F0700000000060F0F0600414799312>33 D<30187838FC38FC70FC70FC70FCE0FCE078E031C001C001C0038003800700070007000E 180E3C0E7E1C7E1C7E1C7E387E383C18180F1A7F9612>37 D<07001F8019C039C039C039 C03B9E3B3E3E381C701C701EE03EE067E0E7C0E3C4E3CEE7CE7EFC3C380F147F9312>I< 070007000700E738FFF87FF01FC01FC07FF0FFF8E7380700070007000D0E7E9012>42 D<038003800380038003800380FFFEFFFEFFFE0380038003800380038003800F0F7F9112 >I45 D<0018003800380070007000E000E001C001C001C0 03800380070007000E000E001C001C001C003800380070007000E000E000C0000D1A7E96 12>47 D<0018007800F801E007C00F801E003C00F800F000F8003C001E000F8007C001E0 00F8007800180D137E9312>60 DII92 D E /Fd 7 107 df0 D<020002000200C218F2783AE00F80 0F803AE0F278C2180200020002000D0E7E8E12>3 D<0300000003000000030000000600 0000060000000C0000001800000030000000FFFFFFF8FFFFFFF830000000180000000C00 000006000000060000000300000003000000030000001D127D9023>32 D<000006000000060000000600000003000000030000000180000000C000000060FFFFFF FCFFFFFFFC00000060000000C00000018000000300000003000000060000000600000006 001E127E9023>I<007800C0018003000300030003000300030003000300030003000300 06000C00F0000C00060003000300030003000300030003000300030003000300018000C0 00780D217E9812>102 DI106 D E /Fe 38 121 df<0000300000F00003C000 0700001C0000780001E0000780000E0000380000F00000F000003800000E000007800001 E000007800001C000007000003C00000F000003014167D921B>60 D<0008001800300030003000600060006000C000C000C001800180018003000300060006 0006000C000C000C00180018001800300030003000600060006000C000C0000D217E9812 >II<0000C00000C00001C00001C00003C00005C00005E00008E00018E00010E00020E0 0020E00040E00080E00080E001FFF0010070020070040070040070080070180070FE03FE 17177F961A>65 D<07FFF800E00E00E00700E00300E00301C00301C00701C00701C00E03 803C03FFF003FFF003803C07001C07000E07000E07000E0E001C0E001C0E00380E00701C 01E0FFFF0018177F961B>I<001F8200E04403802C07001C0C001C1C0008380008300008 700008600000E00000E00000E00000C00000C00020C00020C00040E00040600080600100 3002001C1C0007E00017177E9619>I<07FFF80000E00E0000E0030000E0038000E00180 01C001C001C001C001C000C001C000C0038001C0038001C0038001C0038001C007000380 0700038007000300070007000E000E000E000C000E0018000E0070001C01C000FFFF0000 1A177F961D>I<07FFFF8000E0038000E0010000E0010000E0010001C0010001C0010001 C0400001C04000038080000381800003FF80000381800007010000070102000701020007 0004000E0004000E000C000E0008000E0018001C007000FFFFF00019177F961A>I<07FF FF8000E0038000E0010000E0010000E0010001C0010001C0010001C0400001C040000380 80000381800003FF800003818000070100000701000007010000070000000E0000000E00 00000E0000000E0000001C000000FFC0000019177F9616>I<001F8100F0620180160700 0E0E000E1C0004380004300004700004600000E00000E00000E00000C007FEC00070C000 70E00070E000E06000E07000E03001E00C06C003F84018177E961B>I<07FE1FF800E003 8000E0038000E0038000E0038001C0070001C0070001C0070001C0070003800E0003800E 0003FFFE0003800E0007001C0007001C0007001C0007001C000E0038000E0038000E0038 000E0038001C007000FF83FE001D177F961D>I<07FE00E000E000E000E001C001C001C0 01C0038003800380038007000700070007000E000E000E000E001C00FFC00F177E960F> I<07FE03F800E001C000E0010000E0020000E0080001C0100001C0200001C0800001C100 0003830000038F00000393800003A380000781C0000701C0000700E0000700E0000E0070 000E0070000E0038000E0038001C003C00FF80FF001D177F961E>75 D<07F0000FE000F0001E0000B8001E0000B8002E0000B8004E000138005C000138009C00 0138011C00011C011C00021C023800021C043800021C043800021C083800041C10700004 0E107000040E207000040E407000080E40E000080E80E000080F00E000080700E0001806 01C000FE040FF80023177F9622>77 D<07F007F800F000C000B8008000B80080009C0080 011C0100011E0100010E0100010E0100020702000207020002038200020382000401C400 0401C4000400E4000400E4000800780008007800080038000800380018001000FE001000 1D177F961C>I<001FC000707001C01803001C06000C0E000E1C000E18000E38000E3000 0E70000E70000E70000E70001CE0001C6000387000387000707000E03801C01803800E0E 0003F00017177F961B>I<07FFF800E00E00E00700E00700E00701C00701C00701C00701 C00E03801C03807003FFC00380000700000700000700000700000E00000E00000E00000E 00001C0000FF800018177F9616>I<07FFF00000E01C0000E0060000E0070000E0070001 C0070001C0070001C0070001C00E0003801C000380700003FF80000380E0000700700007 00380007003800070038000E0070000E0070000E0070800E0070801C003100FF801E0019 177F961B>82 D<003E1000C1A00100E00200600600600C00400C00400E00000F000007E0 0007FC0001FE00003F00000780000380000380200180400300400300600600600400D818 0087E00014177E9615>I<1FFFFE381C0E201C04601C04401C0440380480380400380000 380000700000700000700000700000E00000E00000E00000E00001C00001C00001C00001 C00003C0003FFC0017177F9615>II<071018F0307060706060C060C060C06080 C080C480C4C1C446C838700E0E7E8D13>97 D<7C00180018001800180030003000300030 00678068C070406060C060C060C060C06080C080C08180C10046003C000B177E960F>I< 07C00C20107020706000C000C000C00080008000C010C02060C03F000C0E7E8D0F>I<00 3E000C000C000C000C0018001800180018073018F0307060706060C060C060C06080C080 C480C4C1C446C838700F177E9612>I<07C01C20301060106020FFC0C000C000C000C000 C010402060C01F000C0E7E8D10>I<000E0013003700360030006000600060006003FC00 C000C000C000C000C001800180018001800180030003000300030002006600E600CC0078 00101D7E9611>I<00E2031E060E0C0E0C0C180C180C180C101810181018183808F00730 003000306060E060C1C07F000F14808D11>I<1F0006000600060006000C000C000C000C 0018F01B181C08180838183018301830186030603160616062C026C03810177E9614>I< 0300038003000000000000000000000000001C002400460046008C000C00180018001800 31003100320032001C0009177F960C>I<3E0C0C0C0C181818183030303060606060C0C8 C8C8D07007177E960B>108 D<383C0044C6004702004602008E06000C06000C06000C06 00180C00180C40181840181880300980300E00120E7F8D15>110 D<07C00C20101020186018C018C018C01880308030C060C0C061803E000D0E7E8D11>I< 30F049184E384C309C001800180018003000300030003000600060000D0E7F8D10>114 D<030003000600060006000600FFC00C000C000C00180018001800180030003080308031 0032001C000A147F930D>116 D<1C0200260600460600460600860C000C0C000C0C000C 0C001818001818801818801838800C5900078E00110E7F8D14>I<1C0426064606460686 040C040C040C0418081808181018200C6007800F0E7F8D11>I<0F1F0011A18020C38020 C300418000018000018000018000030000030200C30200E70400C5080078F000110E7F8D 14>120 D E /Ff 3 104 df<03C00FF01FF83FFC7FFE7FFEFFFFFFFFFFFFFFFF7FFE7FFE 3FFC1FF80FF003C010107E9115>15 D<003C00E001C00180038003800380038003800380 0380038003800380038003800380030007001C00F0001C00070003000380038003800380 038003800380038003800380038003800380018001C000E0003C0E297D9E15>102 DI E /Fg 1 47 df<40E04003037D8208>46 D E /Fh 2 46 df<0002001E007E01FE0FFEFFFEFFFE0FFE01FE007E001E00020F0C7E85 2A>27 D<8000F000FC00FF00FFE0FFFEFFFEFFE0FF00FC00F00080000F0C67852A>45 D E /Fi 1 50 df<187898181818181818181818181818FF08107D8F0F>49 D E /Fj 16 122 df45 D<01E307170C0F180F380E300E70 0E700EE01CE01CE01CE01CE039E039E0396079319A1E0C10127C9115>97 D<00F807040C0418023804300470087FF0E000E000E000E000E00060046008301030600F 800F127C9113>101 D<0003C0000670000C70001C60001C00001C000038000038000038 0000380000380003FF8000700000700000700000700000700000E00000E00000E00000E0 0000E00001C00001C00001C00001C00001C0000380000380000380000300000300000700 00C60000E60000CC00007800001425819C0D>I<01800380010000000000000000000000 000000001C002600470047008E008E000E001C001C001C00380038007100710071007200 72003C00091C7C9B0D>105 D<0FC00001C00001C0000380000380000380000380000700 000700000700000700000E07800E08800E11C00E21C01C41801C80001D00001E00003FC0 0038E000387000387000707100707100707100707200E03200601C00121D7E9C13>107 D<1C1E0780266318C04683A0E04703C0E08E0380E08E0380E00E0380E00E0380E01C0701 C01C0701C01C0701C01C070380380E0388380E0388380E0708380E0710701C0320300C01 C01D127C9122>109 D<383E004CC3004D03804E03809E03809C03801C03801C03803807 00380700380700380E00700E40700E40701C40701C80E00C8060070012127C9117>I<00 F800030C000E06001C0300180300300300700380700380E00700E00700E00700E00E00E0 0E00E01C0060180060300030E0000F800011127C9115>I<03878004C86004D03004E030 09C03009C03801C03801C0380380700380700380700380600700E00700C0070180078300 0E86000E78000E00000E00001C00001C00001C00001C0000380000FF0000151A809115> I<1C3C2642468747078E068E000E000E001C001C001C001C003800380038003800700030 0010127C9112>114 D<01F006080C080C1C18181C001F001FC00FF007F0007800386030 E030C030806060C01F000E127D9111>I<03000700070007000E000E000E000E00FFE01C 001C001C0038003800380038007000700070007000E080E080E100E100660038000B1A7C 990E>I<1E01832703874703874703838707018707010E07010E07011C0E021C0E021C0E 021C0E04180C04181C04181C081C1E080C263007C3C018127C911C>119 D<0387800CC8400870E01070E020E0C020E00000E00000E00001C00001C00001C00001C0 00038100638100E38200C5820085840078780013127E9113>I<1C01802E03804E03804E 03808E07008E07001C07001C0700380E00380E00380E00380E00301C00301C00301C0038 3C001878000FB800003800003000007000E06000E0C0008180004300003C0000111A7C91 14>I E /Fk 4 109 df<003FC001FFF803C0F80780180F00001E00003C00003C00007800 00780000780000F00000F00000F00000F00000F00000F00000F00000F00000F000007800 007800007800003C00003C00001E00000F000807801803C07801FFF0003F80151F7D9D1B >67 D<00FC01FC03FC07000E000E000E000E000E000E000E00FFE0FFE00E000E000E000E 000E000E000E000E000E000E000E000E000E000E000E000E000E1D809C0D>102 D 105 D108 D E /Fl 79 123 df<007E1F0001C1B1800303E3C00703C3C00E03C1800E01C0 000E01C0000E01C0000E01C0000E01C0000E01C000FFFFFC000E01C0000E01C0000E01C0 000E01C0000E01C0000E01C0000E01C0000E01C0000E01C0000E01C0000E01C0000E01C0 000E01C0000E01C0000E01C0000E01C0007F87FC001A1D809C18>11 D<007E0001C1800301800703C00E03C00E01800E00000E00000E00000E00000E0000FFFF C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01 C00E01C00E01C00E01C00E01C07F87F8151D809C17>I<007FC001C1C00303C00703C00E 01C00E01C00E01C00E01C00E01C00E01C00E01C0FFFFC00E01C00E01C00E01C00E01C00E 01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C07F CFF8151D809C17>I<003F07E00001C09C18000380F018000701F03C000E01E03C000E00 E018000E00E000000E00E000000E00E000000E00E000000E00E00000FFFFFFFC000E00E0 1C000E00E01C000E00E01C000E00E01C000E00E01C000E00E01C000E00E01C000E00E01C 000E00E01C000E00E01C000E00E01C000E00E01C000E00E01C000E00E01C000E00E01C00 0E00E01C007FC7FCFF80211D809C23>I<0E0E1E3870E0800707779C15>19 DI<1FC07C0030718300783B0180781E0180301E00C0 001C00C0001C00C001FFFFC00F1C0000381C0000701C0000601C0000E01C0000E01E0040 E01E0040603300803061C3001F807C001A127E911E>26 D<6060F0F0F8F8686808080808 0808101010102020404080800D0C7F9C15>34 D<60F0F8680808081010204080050C7C9C 0C>39 D<00800100020006000C000C00180018003000300030006000600060006000E000 E000E000E000E000E000E000E000E000E000E000E0006000600060006000300030003000 180018000C000C000600020001000080092A7C9E10>I<8000400020003000180018000C 000C00060006000600030003000300030003800380038003800380038003800380038003 800380038003000300030003000600060006000C000C0018001800300020004000800009 2A7E9E10>I<60F0F0701010101020204080040C7C830C>44 DI< 60F0F06004047C830C>I<00010003000600060006000C000C000C001800180018003000 3000300060006000C000C000C0018001800180030003000300060006000C000C000C0018 0018001800300030003000600060006000C000C00010297E9E15>I<03C00C301818300C 300C700E60066006E007E007E007E007E007E007E007E007E007E007E007E007E0076006 6006700E300C300C18180C3007E0101D7E9B15>I<010007003F00C70007000700070007 000700070007000700070007000700070007000700070007000700070007000700070007 000700FFF80D1C7C9B15>I<07C01830201C400C400EF00FF80FF807F8077007000F000E 000E001C001C00380070006000C00180030006010C01180110023FFE7FFEFFFE101C7E9B 15>I<07E01830201C201C781E780E781E381E001C001C00180030006007C00030001C00 1C000E000F000F700FF80FF80FF80FF00E401C201C183007C0101D7E9B15>I<000C0000 0C00001C00003C00003C00005C0000DC00009C00011C00031C00021C00041C000C1C0008 1C00101C00301C00201C00401C00C01C00FFFFC0001C00001C00001C00001C00001C0000 1C00001C0001FFC0121C7F9B15>I<300C3FF83FF03FC020002000200020002000200023 E02C303018301C200E000E000F000F000F600FF00FF00FF00F800E401E401C2038187007 C0101D7E9B15>I<00F0030C04040C0E181E301E300C700070006000E3E0E430E818F00C F00EE006E007E007E007E007E007600760077006300E300C18180C3003E0101D7E9B15> I<4000007FFF807FFF007FFF004002008004008004008008000010000010000020000060 0000400000C00000C00001C0000180000180000380000380000380000380000780000780 00078000078000078000078000030000111D7E9B15>I<03E00C301008200C2006600660 06700670067C0C3E183FB01FE007F007F818FC307E601E600FC007C003C003C003C00360 026004300C1C1007E0101D7E9B15>I<03C00C301818300C700C600EE006E006E007E007 E007E007E0076007700F300F18170C2707C700060006000E300C780C78187018203010C0 0F80101D7E9B15>I<60F0F0600000000000000000000060F0F06004127C910C>I<60F0F0 600000000000000000000060F0F0701010101020204080041A7C910C>I<000600000006 000000060000000F0000000F0000000F000000178000001780000037C0000023C0000023 C0000043E0000041E0000041E0000080F0000080F0000080F000010078000100780001FF F80002003C0002003C0002003C0004001E0004001E000C001F000C000F001E001F00FF00 FFF01C1D7F9C1F>65 DI<001F808000E0618001801980070007 800E0003801C0003801C00018038000180780000807800008070000080F0000000F00000 00F0000000F0000000F0000000F0000000F0000000F00000007000008078000080780000 80380000801C0001001C0001000E000200070004000180080000E03000001FC000191E7E 9C1E>IIII<001F808000E0618001801980070007800E0003 801C0003801C00018038000180780000807800008070000080F0000000F0000000F00000 00F0000000F0000000F0000000F000FFF0F0000F80700007807800078078000780380007 801C0007801C0007800E00078007000B800180118000E06080001F80001C1E7E9C21>I< FFF0FFF00F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F00 0F000F000F000F000F000F000F000F000FFFFF000F000F000F000F000F000F000F000F00 0F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F00 FFF0FFF01C1C7F9B1F>II<07FF80007C00003C00003C00003C00003C00003C00003C00003C00003C00003C0000 3C00003C00003C00003C00003C00003C00003C00003C00003C00003C00703C00F83C00F8 3C00F8380070780040700030E0000F8000111D7F9B15>IIIII<003F8000 00E0E0000380380007001C000E000E001C0007003C00078038000380780003C0780003C0 700001C0F00001E0F00001E0F00001E0F00001E0F00001E0F00001E0F00001E0F00001E0 700001C0780003C0780003C0380003803C0007801C0007000E000E0007001C0003803800 00E0E000003F80001B1E7E9C20>II82 D<07E0801C1980300580300380600180E00180E00080E0 0080E00080F00000F800007C00007FC0003FF8001FFE0007FF0000FF80000F800007C000 03C00001C08001C08001C08001C0C00180C00180E00300D00200CC0C0083F800121E7E9C 17>I<7FFFFFC0700F01C0600F00C0400F0040400F0040C00F0020800F0020800F002080 0F0020000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F000000 0F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F000000 1F800003FFFC001B1C7F9B1E>IIIIII91 D93 D<1FC000307000783800781C00301C00001C00001C0001FC000F1C00381C00701C00601C 00E01C40E01C40E01C40603C40304E801F870012127E9115>97 DI<03F80C0C181E301E700C6000E000E000E000E000E000E0 0060007002300218040C1803E00F127F9112>I<001F8000038000038000038000038000 038000038000038000038000038000038003F3800E0B80180780300380700380600380E0 0380E00380E00380E00380E00380E003806003807003803003801807800E1B8003E3F014 1D7F9C17>I<07E00C301818300C700E6006E006FFFEE000E000E000E000600070023002 18040C1803E00F127F9112>I<00F8018C071E061E0E0C0E000E000E000E000E000E00FF E00E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E007FE00F 1D809C0D>I<00038007C4C01C78C0383880301800701C00701C00701C00701C00301800 3838001C700027C0002000002000003000003FF8001FFF001FFF802003806001C0C000C0 C000C0C000C06001803003001C0E0007F800121C7F9215>II<18003C003C0018000000000000000000000000000000FC001C 001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C00FF80091D7F 9C0C>I<00C001E001E000C0000000000000000000000000000007E000E000E000E000E0 00E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E060E0F0C0 F1C061803E000B25839C0D>IIIII<03F0000E1C00180600300300700380600180E001C0E001C0E001C0E001C0 E001C0E001C06001807003803003001806000E1C0003F00012127F9115>II<03E0800E1980180580380780700380700380E00380E00380E00380E0 0380E00380E003807003807003803807801807800E1B8003E38000038000038000038000 0380000380000380000380001FF0141A7F9116>II<1F9020704030C010 C010E010F8007F803FE00FF000F880388018C018C018E010D0608FC00D127F9110>I<04 000400040004000C000C001C003C00FFE01C001C001C001C001C001C001C001C001C001C 101C101C101C101C100C100E2003C00C1A7F9910>III< FF3FC7E03C0703C01C0701801C0701001C0B01000E0B82000E0B82000E1182000711C400 0711C4000720C40003A0E80003A0E80003C0680001C0700001C070000180300000802000 1B127F911E>III<7FFC70386038407040F040E041C003C0038007000F040E041C043C 0C380870087038FFF80E127F9112>I E /Fm 37 122 df<78FCFCFCFC7806067D850D> 46 D<00600001E0000FE000FFE000F3E00003E00003E00003E00003E00003E00003E000 03E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E000 03E00003E0007FFF807FFF80111B7D9A18>49 D<07F8001FFE00383F80780FC0FC07C0FC 07E0FC03E0FC03E07803E00007E00007C00007C0000F80001F00001E0000380000700000 E0000180600300600600600800E01FFFC03FFFC07FFFC0FFFFC0FFFFC0131B7E9A18>I< 07F8001FFE003C1F003C0F807C07C07E07C07C07C03807C0000F80000F80001E00003C00 03F800001E00000F800007C00007C00007E03007E07807E0FC07E0FC07E0FC07C0780F80 781F001FFE0007F800131B7E9A18>I<000180000380000780000F80001F80003F80006F 8000CF80008F80018F80030F80060F800C0F80180F80300F80600F80C00F80FFFFF8FFFF F8000F80000F80000F80000F80000F80000F8000FFF800FFF8151B7F9A18>I<78FCFCFC FC7800000000000078FCFCFCFC7806127D910D>58 D<00038000000380000007C0000007 C0000007C000000FE000000FE000001FF000001BF000003BF8000031F8000031F8000060 FC000060FC0000E0FE0000C07E0000C07E0001803F0001FFFF0003FFFF8003001F800700 1FC006000FC006000FC00C0007E00C0007E0FF803FFEFF803FFE1F1C7E9B24>65 DI<001FE02000FFF8E003F80FE007C003E00F8001E01F0000E0 3E0000E03E0000607E0000607C000060FC000000FC000000FC000000FC000000FC000000 FC000000FC000000FC0000007C0000607E0000603E0000603E0000C01F0000C00F800180 07C0030003F80E0000FFFC00001FE0001B1C7D9B22>I70 D73 D77 D80 D82 D<07F8201FFEE03C07E07801E07000E0 F000E0F00060F00060F80000FE0000FFE0007FFE003FFF003FFF800FFFC007FFE0007FE0 0003F00001F00000F0C000F0C000F0C000E0E000E0F001C0FC03C0EFFF0083FC00141C7D 9B1B>I86 D<0FF8001C1E003E0F803E07803E07C01C07C00007C0007FC007E7C01F 07C03C07C07C07C0F807C0F807C0F807C0780BC03E13F80FE1F815127F9117>97 DI<03FC000E0E001C1F003C1F0078 1F00780E00F80000F80000F80000F80000F80000F800007800007801803C01801C03000E 0E0003F80011127E9115>I<000FF0000FF00001F00001F00001F00001F00001F00001F0 0001F00001F00001F001F9F00F07F01C03F03C01F07801F07801F0F801F0F801F0F801F0 F801F0F801F0F801F07801F07801F03C01F01C03F00F0FFE03F9FE171D7E9C1B>I<03FC 000F07001C03803C01C07801C07801E0F801E0F801E0FFFFE0F80000F80000F800007800 007800603C00601E00C00F038001FC0013127F9116>I<007F0001E38003C7C00787C00F 87C00F83800F80000F80000F80000F80000F8000FFF800FFF8000F80000F80000F80000F 80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80007FF0007F F000121D809C0F>I<03F0F00E1F383C0F38380730780780780780780780780780380700 3C0F001E1C0033F0003000003000003000003FFF003FFFC01FFFE01FFFF07801F8F00078 F00078F000787000707800F01E03C007FF00151B7F9118>II<1E003F003F003F003F001E000000000000000000000000007F 007F001F001F001F001F001F001F001F001F001F001F001F001F001F001F00FFC0FFC00A 1E7F9D0E>I108 DII<01FC000F07801C01C03C01E07800F07800F0F800F8 F800F8F800F8F800F8F800F8F800F87800F07800F03C01E01E03C00F078001FC0015127F 9118>II114 D<1FD830786018E018E018F000FF807FE07FF01FF807FC007CC01CC01C E01CE018F830CFC00E127E9113>I<0300030003000300070007000F000F003FFCFFFC1F 001F001F001F001F001F001F001F001F001F0C1F0C1F0C1F0C0F08079803F00E1A7F9913 >III120 DI E /Fn 81 127 df<00FCF807839C0E07 9C1C07081C07001C07001C07001C07001C0700FFFFE01C07001C07001C07001C07001C07 001C07001C07001C07001C07001C07001C07001C07007F1FE01617809615>11 D<00FC000782000E07001C07001C02001C00001C00001C00001C0000FFFF001C07001C07 001C07001C07001C07001C07001C07001C07001C07001C07001C07001C07007F1FC01217 809614>I<00FF000707000E07001C07001C07001C07001C07001C07001C0700FFFF001C 07001C07001C07001C07001C07001C07001C07001C07001C07001C07001C07001C07007F 1FC01217809614>I<1C1C3C7060C00606799612>19 D<60F0F0F0F0F060606060606060 60600000000060F0F06004177D960A>33 D<1C00183200186180706161E0E09E60E080C0 E08180E08180E08300E08300610600610C00320C001C18380030640030C20060C200C1C1 00C1C10181C10181C10301C10601C10600C20C00C2180064080038181B7E981D>37 D<01C0000320000610000E10000E10000E10000E20000E40000E80000700FE0700380780 200780200BC04011C04020E08060F100E07A00E03A00E01C02701E0238638C1F80F81717 7F961B>I<60F0F070101020204040040A7D960A>I<0102040C1818303070606060E0E0E0 E0E0E0E0E0E0E060606070303018180C04020108227D980E>I<8040203018180C0C0E06 0606070707070707070707070606060E0C0C18183020408008227E980E>I<0030000030 00003000003000003000003000003000003000003000003000003000FFFFFCFFFFFC0030 0000300000300000300000300000300000300000300000300000300000300016187E931B >43 D<60F0F070101020204040040A7D830A>II<60F0F0600404 7D830A>I<0008001800300030003000600060006000C000C000C0018001800180030003 000600060006000C000C000C00180018001800300030003000600060006000C000C0000D 217E9812>I<07C018303018701C600C600CE00EE00EE00EE00EE00EE00EE00EE00EE00E 600C600C701C30181C7007C00F157F9412>I<06000E00FE000E000E000E000E000E000E 000E000E000E000E000E000E000E000E000E000E000E00FFE00B157D9412>I<0F8030E0 40708030C038E0384038003800700070006000C00180030006000C08080810183FF07FF0 FFF00D157E9412>I<0FE030306018701C701C001C00180038006007E000300018000C00 0E000EE00EE00EC00C401830300FE00F157F9412>I<00300030007000F001F001700270 047008701870107020704070C070FFFE0070007000700070007003FE0F157F9412>I<60 307FE07FC0440040004000400040004F8070E040700030003800384038E038E038803040 6020C01F000D157E9412>I<01F00608080C181C301C70006000E000E3E0EC30F018F00C E00EE00EE00E600E600E300C3018183007C00F157F9412>I<40007FFE7FFC7FF8C00880 1080200040008000800100030003000200060006000E000E000E000E000E0004000F167E 9512>I<07E018302018600C600C700C78183E101F6007C00FF018F8607C601EC00EC006 C006C004600C38300FE00F157F9412>I<07C0183030186018E00CE00CE00EE00EE00E60 1E301E186E0F8E000E000C001C70187018603020E01F800F157F9412>I<60F0F0600000 0000000060F0F060040E7D8D0A>I<60F0F06000000000000060F0F07010102020404004 147D8D0A>I61 D<00FC000303000C00C01000202078102184104302084701C88601C48E 01C48E01C48E01C48E01C48E01C48601C44701C44303C42184C82078701000000C001C03 00F000FF0016177E961B>64 D<001000003800003800003800005C00005C00005C00008E 00008E00008E0001070001070002038002038002038007FFC00401C00401C00800E00800 E01800F03800F0FE03FE17177F961A>II<00FC100383300E00B01C0070380030 300030700010600010E00010E00000E00000E00000E00000E00000E00010600010700010 3000203800201C00400E008003830000FC0014177E9619>III I72 DI75 DIII< 00FC000303000E01C01C00E0380070300030700038600018E0001CE0001CE0001CE0001C E0001CE0001CE0001C7000387000383000303800701C00E00E01C003030000FC0016177E 961B>II82 D<0FC4302C601C400CC004C004C004E00070007F003FE00F F801FC001C000E0006800680068006C004E008D81087E00F177E9614>I<7FFFF8603818 403808403808803804803804803804003800003800003800003800003800003800003800 00380000380000380000380000380000380000380000380003FF8016177F9619>IIIIII91 D93 D<08001C0036006300808009 057C9612>I<3FC0706070302038003803F81E3830387038E039E039E07970FF1F1E100E 7F8D12>97 DI<07F01838303870106000E000E000E000E0006000700830081830 07C00D0E7F8D10>I<003E00000E00000E00000E00000E00000E00000E00000E00000E00 07CE001C3E00300E00700E00600E00E00E00E00E00E00E00E00E00600E00700E00301E00 182E0007CF8011177F9614>I<0FC0186030307038E018FFF8E000E000E0006000700830 10183007C00D0E7F8D10>I<03E006700E701C201C001C001C001C001C00FF801C001C00 1C001C001C001C001C001C001C001C001C001C007F800C1780960B>I<0F9E18E3306070 7070707070306018C02F80200060003FE03FF83FFC600EC006C006C006600C38380FE010 157F8D12>II<307878300000000000F8383838383838383838383838FE07177F 960A>I<0300078007800300000000000000000000001F80038003800380038003800380 0380038003800380038003800380038003804380E300E7007C00091D82960B>IIIII<07C018303018600C600CE00EE00EE00EE00EE00E701C3018 183007C00F0E7F8D12>II<07C2001C2600381E00700E00600E00E00E00E00E00E00E00E00E00600E00 700E00301E001C2E0007CE00000E00000E00000E00000E00000E00003F8011147F8D13> II< 1F4060C0C040C040E000FF007F801FC001E080608060C060E0C09F000B0E7F8D0E>I<08 0008000800180018003800FFC0380038003800380038003800380038403840384038401C 800F000A147F930E>IIIIIII<3C207FC087800B037D9512>126 D E /Fo 15 123 df<07070F1E1C38604080080976A218>19 DI<70F8F8F87005057C840E>46 D72 D75 DI<7FFFFFF878078078600780184007800840078008 40078008C007800C80078004800780048007800480078004000780000007800000078000 000780000007800000078000000780000007800000078000000780000007800000078000 000780000007800000078000000780000007800000078000000780000007800000078000 000FC00001FFFE001E227EA123>84 D<1FE000303800780C00780E003007000007000007 0000070000FF0007C7001E07003C0700780700700700F00708F00708F00708F00F087817 083C23900FC1E015157E9418>97 D<0000E0000FE00001E00000E00000E00000E00000E0 0000E00000E00000E00000E00000E00000E00000E001F8E00704E00C02E01C01E03800E0 7800E07000E0F000E0F000E0F000E0F000E0F000E0F000E0F000E07000E07800E03800E0 1801E00C02E0070CF001F0FE17237EA21B>100 D<01FC000707000C03801C01C03801C0 7801E07000E0F000E0FFFFE0F00000F00000F00000F00000F00000700000780020380020 1C00400E008007030000FC0013157F9416>I<0E1F80FE60C01E80E00F00700F00700E00 700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00 700E00700E0070FFE7FF18157F941B>110 D<01FC000707000C01801800C03800E07000 70700070F00078F00078F00078F00078F00078F00078F000787000707800F03800E01C01 C00E038007070001FC0015157F9418>I<0E3CFE461E8F0F0F0F060F000E000E000E000E 000E000E000E000E000E000E000E000E000E000F00FFF010157F9413>114 D<0E0070FE07F01E00F00E00700E00700E00700E00700E00700E00700E00700E00700E00 700E00700E00700E00700E00700E00F00E00F006017003827800FC7F18157F941B>117 D<3FFFC0380380300780200700600E00401C00403C0040380000700000E00001E00001C0 000380400700400F00400E00C01C0080380080780180700780FFFF8012157F9416>122 D E /Fp 22 120 df<00001FFC00000001FFFF00000007FFFF8000001FF807C000007FC0 03E00000FF0007F00000FE000FF00001FE000FF00003FC000FF00003FC000FF00003FC00 0FF00003FC0007E00003FC0001800003FC0000000003FC0000000003FC0000000003FC00 00000003FC00FFF800FFFFFFFFF800FFFFFFFFF800FFFFFFFFF80003FC0007F80003FC00 07F80003FC0007F80003FC0007F80003FC0007F80003FC0007F80003FC0007F80003FC00 07F80003FC0007F80003FC0007F80003FC0007F80003FC0007F80003FC0007F80003FC00 07F80003FC0007F80003FC0007F80003FC0007F80003FC0007F80003FC0007F80003FC00 07F80003FC0007F80003FC0007F80003FC0007F80003FC0007F80003FC0007F80003FC00 07F8007FFFE0FFFFC07FFFE0FFFFC07FFFE0FFFFC02A327FB12E>12 D45 D<000003FF80018000003FFFF003800001FFFFFC0F800007FF007F1F80001FF8000FBF80 003FE00003FF8000FF800000FF8001FF0000007F8003FE0000003F8007FC0000003F8007 FC0000001F800FF80000001F801FF80000000F801FF00000000F803FF000000007803FF0 00000007807FF000000007807FE000000007807FE000000000007FE00000000000FFE000 00000000FFE00000000000FFE00000000000FFE00000000000FFE00000000000FFE00000 000000FFE00000000000FFE00000000000FFE000000000007FE000000000007FE0000000 00007FE000000000007FF000000003803FF000000003803FF000000003801FF000000003 801FF800000007800FF8000000070007FC000000070007FC0000000E0003FE0000001E00 01FF0000003C0000FF8000007800003FE00000F000001FF80003E0000007FF003F800000 01FFFFFE000000003FFFF80000000003FF80000031317BB03C>67 D70 D73 D<001FF0018000FFFF038003FFFFC78007F00FFF800FC001FF801F00007F803F0000 1F803E00000F807E00000F807E00000780FE00000780FE00000780FE00000380FF000003 80FF00000380FF80000000FFE00000007FFC0000007FFFE000007FFFFE00003FFFFFC000 1FFFFFF0000FFFFFF80007FFFFFC0003FFFFFE0001FFFFFF00007FFFFF80001FFFFF8000 00FFFFC0000007FFC0000000FFE00000007FE00000003FE00000001FE06000001FE0E000 000FE0E000000FE0E000000FE0E000000FC0F000000FC0F000000FC0F800001F80FC0000 1F80FF00003F00FFC0007E00FFFC01FC00F1FFFFF800E03FFFE000C007FF000023317BB0 2E>83 D<007FF8000003FFFF000007FFFFC0000FE01FE0001FF007F0001FF003F8001FF0 03FC001FF001FE000FE001FE0007C001FE00010001FE00000001FE00000001FE000001FF FE00003FFFFE0001FFF1FE0007FE01FE000FF001FE001FC001FE003F8001FE007F8001FE 00FF0001FE00FF0001FE00FF0001FE00FF0001FE00FF0003FE007F8003FE007FC00EFE00 3FF03CFF000FFFF87FF807FFF03FF800FF800FF825207E9F28>97 D<0007FF00007FFFE000FFFFF003FC03F807F007FC0FE007FC1FE007FC3FC007FC3FC003 F87FC001F07F8000407F800000FF800000FF800000FF800000FF800000FF800000FF8000 00FF800000FF8000007F8000007FC000007FC000003FC0000E3FE0000E1FE0001C0FF000 1C07F8007803FF01F000FFFFE0007FFF800007FC001F207D9F25>99 D<0007FC0000003FFF800000FFFFE00003FC07F00007F801F8000FE000FC001FE0007E00 3FC0007E003FC0003F007FC0003F007F80003F007F80003F80FF80003F80FF80003F80FF FFFFFF80FFFFFFFF80FFFFFFFF80FF80000000FF80000000FF800000007F800000007F80 0000003FC00000003FC00003801FC00003801FE00007800FF0000F0007F8001E0003FE00 FC0000FFFFF800003FFFE0000003FF000021207E9F26>101 D<0000FF000007FFC0001F FFE0003FC7F0007F0FF800FE0FF801FE0FF801FC0FF803FC07F003FC03E003FC01C003FC 000003FC000003FC000003FC000003FC000003FC000003FC0000FFFFFC00FFFFFC00FFFF FC0003FC000003FC000003FC000003FC000003FC000003FC000003FC000003FC000003FC 000003FC000003FC000003FC000003FC000003FC000003FC000003FC000003FC000003FC 000003FC000003FC000003FC000003FC000003FC000003FC000003FC000003FC00007FFF F0007FFFF0007FFFF0001D327EB119>I<001FF803E000FFFF1FF001FFFFBFF807F81FF9 F80FE007F1F80FE007F0F01FC003F8601FC003F8003FC003FC003FC003FC003FC003FC00 3FC003FC003FC003FC001FC003F8001FC003F8000FE007F0000FE007F00007F81FE00007 FFFF800006FFFF00000E1FF800000E000000001E000000001E000000001F000000001F80 0000001FFFFFC0000FFFFFF8000FFFFFFE0007FFFFFF0003FFFFFF8007FFFFFFC01FFFFF FFE03F00007FE07E00000FF0FC000007F0FC000003F0FC000003F0FC000003F0FC000003 F07E000007E03F00000FC01FC0003F800FF801FF0007FFFFFE0000FFFFF000001FFF8000 252F7E9F29>I<01C00007F0000FF8000FF8001FFC001FFC001FFC000FF8000FF80007F0 0001C00000000000000000000000000000000000000000000000000001F800FFF800FFF8 00FFF80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F8 0007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F8 0007F80007F800FFFF80FFFF80FFFF8011337DB217>105 D<01F8000000FFF8000000FF F8000000FFF80000000FF800000007F800000007F800000007F800000007F800000007F8 00000007F800000007F800000007F800000007F800000007F800000007F800000007F800 000007F800000007F8007FFC07F8007FFC07F8007FFC07F8001FC007F8001F0007F8003E 0007F800780007F801F00007F803E00007F807800007F81F000007F83E000007F87C0000 07F9FE000007FBFF000007FFFF800007FF7FC00007FE3FE00007F81FE00007F01FF00007 F00FF80007F007FC0007F003FE0007F001FF0007F000FF0007F000FF8007F0007FC007F0 003FE007F0003FF0FFFF80FFFFFFFF80FFFFFFFF80FFFF28327EB12C>107 D<01F800FFF800FFF800FFF8000FF80007F80007F80007F80007F80007F80007F80007F8 0007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F8 0007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F8 0007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F800FFFF C0FFFFC0FFFFC012327DB117>I<03F007F8000FF000FFF03FFF007FFE00FFF07FFF80FF FF00FFF0F03FC1E07F800FF1C01FE3803FC007F3000FE6001FC007F6000FFC001FE007FE 000FFC001FE007FC000FF8001FE007FC000FF8001FE007F8000FF0001FE007F8000FF000 1FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8 000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF000 1FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8 000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE0FFFFC1FFFF83 FFFFFFFFC1FFFF83FFFFFFFFC1FFFF83FFFF40207D9F45>I<03F007F80000FFF03FFF00 00FFF07FFF8000FFF0F03FC0000FF1C01FE00007F3000FE00007F6000FF00007FE000FF0 0007FC000FF00007FC000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF0 0007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF0 0007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF0 0007F8000FF00007F8000FF00007F8000FF000FFFFC1FFFF80FFFFC1FFFF80FFFFC1FFFF 8029207D9F2E>I<0007FE0000003FFFC00000FFFFF00003FC03FC0007F000FE000FE000 7F001FC0003F803FC0003FC03FC0003FC07F80001FE07F80001FE07F80001FE0FF80001F F0FF80001FF0FF80001FF0FF80001FF0FF80001FF0FF80001FF0FF80001FF0FF80001FF0 7F80001FE07F80001FE07F80001FE03FC0003FC03FC0003FC01FE0007F800FE0007F0007 F801FE0003FE07FC0001FFFFF800003FFFC0000007FE000024207E9F29>I<01F80FF000 FFF87FFE00FFF9FFFF80FFFFE07FC00FFF001FE007FE000FF007F80007F807F80007FC07 F80003FC07F80003FE07F80003FE07F80001FE07F80001FF07F80001FF07F80001FF07F8 0001FF07F80001FF07F80001FF07F80001FF07F80001FF07F80001FE07F80003FE07F800 03FE07F80003FC07F80007FC07FC0007F807FE000FF007FF001FE007FBE07FC007F9FFFF 0007F87FFE0007F81FE00007F800000007F800000007F800000007F800000007F8000000 07F800000007F800000007F800000007F800000007F800000007F8000000FFFFC00000FF FFC00000FFFFC00000282E7E9F2E>I<03F03F00FFF07FC0FFF1FFE0FFF1C7F00FF38FF8 07F70FF807F60FF807FE0FF807FC07F007FC03E007FC008007F8000007F8000007F80000 07F8000007F8000007F8000007F8000007F8000007F8000007F8000007F8000007F80000 07F8000007F8000007F8000007F8000007F8000007F80000FFFFE000FFFFE000FFFFE000 1D207E9F22>114 D<001C0000001C0000001C0000001C0000003C0000003C0000003C00 00007C0000007C000000FC000001FC000003FC000007FC00001FFC0000FFFFFF00FFFFFF 00FFFFFF0003FC000003FC000003FC000003FC000003FC000003FC000003FC000003FC00 0003FC000003FC000003FC000003FC000003FC000003FC000003FC000003FC000003FC01 C003FC01C003FC01C003FC01C003FC01C003FC01C003FC01C001FC038001FE038000FF07 00007FFE00003FFC000007F0001A2E7FAD20>116 D<01F80003F000FFF801FFF000FFF8 01FFF000FFF801FFF0000FF8001FF00007F8000FF00007F8000FF00007F8000FF00007F8 000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8 000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8 000FF00007F8000FF00007F8000FF00007F8000FF00007F8001FF00007F8001FF00003F8 003FF00003F8006FF00001FE03CFF80000FFFF8FFF80007FFF0FFF80000FFC0FFF802920 7D9F2E>I119 D E /Fq 4 109 df<00007FE0000003FFFC00000FFFFF80001FFFFFC0003FFFFFC0007FC03FC001FF0007 8001FC00018003F800008007F00000000FE00000000FC00000001FC00000001F80000000 3F000000003F000000007F000000007E000000007E000000007E00000000FE00000000FC 00000000FC00000000FC00000000FC00000000FC00000000FC00000000FC00000000FC00 000000FC00000000FC00000000FE000000007E000000007E000000007E000000007F0000 00003F000000003F000000001F800000001FC00000000FC00000000FE000000007F00000 0003F800002001FC0000E001FF0003E0007FC01FE0003FFFFFE0001FFFFFC0000FFFFF00 0003FFFC0000007FE00023347CB22B>67 D<0007FC001FFC003FFC007FFC00FC0400F000 01F00001E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E000 03E000FFFFC0FFFFC0FFFFC0FFFFC003E00003E00003E00003E00003E00003E00003E000 03E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E000 03E00003E00003E00003E00003E00003E00003E00003E00016327FB115>102 D105 D108 D E end %%EndProlog %%BeginSetup %%Feature: *Resolution 300dpi TeXDict begin %%PaperSize: A4 %%EndSetup %%Page: 1 1 1 0 bop 123 68 a Fq(Clif)27 b Fp(a)g(C-lik)n(e)g(In)n(terpreter)f(F)-7 b(ramew)n(ork)27 b(for)g(Scien)n(ti\014c)790 159 y(Computing)744 280 y Fo(T.)16 b(Hr)q(\023)-26 b(uz)17 b(and)1028 267 y(\024)1025 280 y(L.)k(Kore)q(\024)-26 b(n)1219 262 y Fn(1)393 443 y Fm(Abstract)24 537 y Fl(This)10 b(pap)q(er)i(describ)q (es)g(an)f(op)q(en)g(C-lik)o(e)f(in)o(terpreter)i Fk(Clif)p Fl(.)24 586 y(The)21 b(main)e(goal)g(of)i(the)g(dev)o(elopmen)o(t)f(is) h(to)g(prepare)24 635 y(a)16 b(syn)o(tactic)g(and)h(seman)o(tic)e (framew)o(ork)g(whic)o(h)h(can)g(b)q(e)24 685 y(easily)22 b(enric)o(hed)i(with)e(application)f(directed)k(syn)o(tac-)24 734 y(tic)15 b(and)f(seman)o(tic)g(subsystems.)22 b(The)15 b(in)o(terpreter)i(con-)24 784 y(tains)12 b(an)h(implem)o(en)o(tation)d (of)i(basic)g(atomary)f(t)o(yp)q(es.)19 b(A)24 833 y(further)i(data)f (abstraction)h(mec)o(hanism)d(allo)o(ws)i(a)g(use)24 882 y(of)15 b(n-dimensional)e(arra)o(ys)j(of)f(atomary)e(t)o(yp)q(e)j (elemen)o(ts.)24 932 y(The)k(functional)e(abstraction)i(allo)o(ws)f(a)g (use)i(of)e(recur-)24 981 y(siv)o(e)12 b(function)g(calls.)18 b(P)o(arameters)12 b(in)g(function)g(calls)g(are)24 1031 y(passed)g(b)o(y)e(reference)k(and)d(the)g(in)o(terpreter)i(arc)o (hitecture)24 1080 y(is)19 b(optimized)f(for)i(manipulation)c(with)k (large)f(ob)r(jects.)24 1129 y(The)d(in)o(terpreter)h(con)o(tains)f (also)f(w)o(ell-de\014ned)h(slots)g(for)24 1179 y(clien)o(t-serv)o(er)f (paradigm)d(as)i(w)o(ell)g(as)g(user)h(in)o(terfaces)g(on)24 1228 y(v)n(arious)e(lev)o(els.)322 1355 y Fm(1.)24 b(In)o(tro)q (duction)24 1449 y Fl(There)12 b(are)g(man)o(y)d(situations)i(when)h (it)f(is)g(needed)i(to)e(pre-)24 1498 y(pare)18 b(large)g(programs)f (for)h(computer)g(in)o(tensiv)o(e)h(infor-)24 1548 y(mation)14 b(pro)q(cessing)j(and)g(for)f(con)o(trol)g(of)g(tec)o(hnological)24 1597 y(pro)q(cesses.)35 b(Usually)m(,)18 b(to)h(do)f(this)h(task)g (e\016cien)o(tly)f(the)24 1646 y(most)9 b(appropriate)h(w)o(a)o(y)g(is) g(to)g(dev)o(elop)g(a)g(language.)16 b(The)24 1696 y(in)o(terpreter)c Fk(Clif)e Fl(is)h(a)g(con)o(v)o(enien)o(t)g(starting)g(sp)q (eci\014cation)24 1745 y(and)i(a)h(to)q(ol)f(for)h(these)h(purp)q (oses.)24 1836 y(The)e(general)g(concept)h(whic)o(h)e(w)o(e)h(follo)o (w)e(\(and)h(is)h(mean)o(t)24 1886 y(with)g(the)i(w)o(ord)e Fj(fr)n(amework)p Fl(\))g(is)h(to)f(prepare)i(in)f(an)f(op)q(en)24 1935 y(w)o(a)o(y)e(syn)o(tactic)i(and)g(seman)o(tic)e(structures)k (with)e(expres-)24 1984 y(siv)o(eness)23 b(similar)d(as)i(in)g(the)h (common)d(programmi)o(ng)24 2034 y(languages)d(lik)o(e)g(C,)h(F)o(OR)m (TRAN)f(etc.)31 b(Then)19 b(user)g(can)24 2083 y(add)14 b(syn)o(tactic)g(and)g(seman)o(tic)g(structures)i(sp)q(eci\014c)g(to)e (a)24 2133 y(giv)o(en)9 b(problem.)15 b(A)10 b(p)q(o)o(w)o(erful)g (application)e(directed)k(lan-)24 2182 y(guage)j(is)g(easily)g (obtained)g(this)g(w)o(a)o(y)m(.)21 b(F)m(rom)14 b(this)h(p)q(oin)o(t) 24 2231 y(of)d(view)g Fk(Clif)g Fl(could)g(serv)o(e)i(as)f(an)f(empt)o (y)g(or)g(sk)o(eletal)h(lan-)24 2281 y(guage)h(in)g(the)h(same)f(sense) i(as)e(sk)o(eletal)h(exp)q(ert)h(systems)24 2330 y(are)h(build)f(and)h (subsequen)o(tly)i(\014lled)d(with)h(an)g(applica-)24 2379 y(tion)c(directed)i(information.)24 2470 y(Our)j(in)o(ten)o(tion)f (is)h(also)f(driv)o(en)h(b)o(y)g(similar)d(reasons)k(as)24 2520 y(had)9 b(motiv)n(ated)f(a)h(dev)o(elopmen)o(t)g(of)f(MA)m(TLAB)i (and)g(sim-)24 2569 y(ilar)e(en)o(vironmen)o(ts)h(i.e.)16 b(to)9 b(ha)o(v)o(e)g(a)g(con)o(v)o(enien)o(t)h(and)f(op)q(en)24 2619 y(to)q(ol)j(for)h(manipulation)d(with)j(ob)r(jects)h(in)f(large)g (and)g(op-)p 24 2650 369 2 v 70 2677 a Fi(1)87 2689 y Fn(Slo)o(v)n(ak)t(T)m(ec)o(hnical)t(Univ)o(ersit)o(y)m(,)i(F)m(acult)o (y)g(of)h(Mec)o(hanical)e(En-)24 2728 y(gineering,)d(Departmen)o(t)f (of)j(Automatic)e(Con)o(trol)h(and)h(Measure-)24 2768 y(men)o(t,)24 b(N\023)-18 b(amestie)21 b(Slob)q(o)q(dy)g(17,)k(812)d (31)h(Bratisla)o(v)n(a,)g(Slo)o(v)n(ak)24 2807 y(Republic,)e(Phone:)33 b(+42-7-497193,)20 b(493041/ext.)o(497)e(E-mail:)24 2847 y(hruz@cvt.stub)o(a.sk)o(,)9 b(k)o(orenl@cvt.stub)o(a.sk)1039 443 y Fl(timized)15 b(scien)o(ti\014c)i(computing)d(libraries)i(as)g (BIGNUM)1039 492 y([12)o(],)d(LINP)m(A)o(CK)h([6],)e(etc.)1039 583 y(In)23 b(our)g(dev)o(elopmen)o(t)f(w)o(e)h(stress)i(user)f(in)o (terfaces)g(on)1039 632 y(all)d(lev)o(els)h(of)f(the)h(in)o(terpreter)i (system.)41 b(A)22 b(user)g(can)1039 682 y(write)f(pro)q(cedures)i (within)d(the)i Fk(Clif)d Fl(sp)q(eci\014cation,)k(he)1039 731 y(can)f(build)f(mo)q(dules)g(using)h(di\013eren)o(t)g(languages)g (and)1039 780 y(link)16 b(those)h(mo)q(dules)e(in)o(to)h(the)h Fk(Clif)f Fl(but)g(ev)o(en)i(more)d(he)1039 830 y(can)f(add)g(new)h (language)d(structures)17 b(to)d Fk(Clif)p Fl(.)1039 921 y(The)i(next)g(sections)g(are)g(organized)f(as)h(follo)o(ws:)j(in)c (sec-)1039 970 y(tion)c(2)h(w)o(e)g(describ)q(e)h(main)c(syn)o(tactic)k (and)e(seman)o(tic)g(fea-)1039 1020 y(tures)h(of)e(the)h Fk(Clif)p Fl(.)16 b(In)11 b(section)g(3)f(w)o(e)h(follo)o(w)d(some)i (asp)q(ects)1039 1069 y(of)15 b(arc)o(hitecture)h(and)f(implemen)o (tation)c(of)k(the)g Fk(Clif)f Fl(sys-)1039 1118 y(tem.)i(In)10 b(section)h(4)e(w)o(e)h(conclude)h(with)f(commen)o(ts)e(ab)q(out)1039 1168 y(further)20 b(dev)o(elopmen)o(t)d(of)h(the)i(in)o(terpreter.)33 b(A)19 b(formal)1039 1217 y(de\014nition)i(of)f(the)h Fk(Clif)e Fl(syn)o(tax)i(is)f(in)g(app)q(endix)h(A)g(as)1039 1267 y(w)o(ell)16 b(as)h(the)h(syn)o(tax)f(of)f(graphics)h(subsystem)g (whic)o(h)g(is)1039 1316 y(in)12 b(app)q(endix)g(B.)g(In)g(app)q(endix) g(C)f(the)i(instruction)f(set)h(of)1039 1365 y(the)i Fk(Clif)e Fl(virtual)g(mac)o(hine)f(is)i(describ)q(ed.)1052 1514 y Fm(2.)24 b(Main)15 b(syn)o(tactic)f(and)i(seman)o(tic)d (features)h(of)1350 1563 y(the)g Fk(Clif)h Fm(system)1039 1669 y Fl(The)20 b(syn)o(tax)e(of)g Fk(Clif)g Fl(can)h(b)q(e)g (classi\014ed)h(to)e(t)o(w)o(o)h(parts.)1039 1718 y(The)14 b(\014rst)g(part)f(whic)o(h)h(represen)o(ts)h(most)d(of)h Fk(Clif)f Fl(syn)o(tac-)1039 1768 y(tic)f(structures)h(is)e(a)g(prop)q (er)h(subset)h(of)e(C)g(language.)16 b(This)1039 1817 y(subset)f(con)o(tains)e(all)f(k)o(ey)h(constructions)h(of)f(C)g (language)1039 1866 y(except)h(higher)e(t)o(yp)q(e)h(abstractions.)18 b Fk(Clif)11 b Fl(curren)o(tly)i(do)q(es)1039 1916 y(not)i(con)o(tain)g (structures,)j(unions)c(and)h(p)q(oin)o(ters.)23 b(Some)1039 1965 y(other)c(di\013erences)g(are)g(caused)f(b)o(y)g(restrictions)h (to)e(the)1039 2015 y(k)o(ey)h(language)f(subsystems.)30 b(F)m(or)18 b(example,)f(curren)o(tly)1039 2064 y(the)h(sp)q (eci\014cation)f(of)f Fk(Clif)g Fl(con)o(tains)h(the)g(program)e(\015o) o(w)1039 2113 y(con)o(trol)e(statemen)o(ts)f("for",)g("while")f(and)h ("if")f(but)i(do)q(es)1039 2163 y(not)i(con)o(tain)f(the)i("switc)o(h") e(and)h("do)f(while")h(sp)q(eci\014ca-)1039 2212 y(tions)i(b)q(ecause)h (they)f(do)f(not)g(represen)o(t)j(an)o(ything)c(new)1039 2262 y(in)g(the)g(language)f(concept.)23 b(The)15 b(latter)g(syn)o(tax) g(can)g(b)q(e)1039 2311 y(easily)g(added)g(in)f(the)h(future.)21 b(The)16 b(C-compatible)c(part)1039 2360 y(of)18 b Fk(Clif)g Fl(con)o(tains)g(one)h(seman)o(tic)e(di\013erence.)34 b(P)o(arame-)1039 2410 y(ters)21 b(are)e(passed)i(to)e(functions)g(b)o (y)g(reference)j(b)q(ecause)1039 2459 y(according)16 b(to)f(the)h(main)e(goal)g(of)h Fk(Clif)f Fl(w)o(e)i(supp)q(ose)g(ma-) 1039 2509 y(nipulations)e(with)h(relativ)o(ely)g(large)g(ob)r(jects)h (\(matrices,)1039 2558 y(splines,)e(etc.\).)19 b(Also)14 b(the)g(t)o(yp)q(e)h(c)o(hec)o(king)f(is)g(stronger)h(in)1039 2607 y Fk(Clif)e Fl(than)h(in)g(C.)f(W)m(e)g(ha)o(v)o(e)h(no)g(default) f(t)o(yp)q(es.)1039 2698 y(Another)19 b(part)e(of)g Fk(Clif)f Fl(is)h(cen)o(tered)j(around)d(the)h(direc-)1039 2748 y(tions)e(of)g(future)g(dev)o(elopmen)o(t)f(of)h(the)g(language.)24 b(This)1039 2797 y(part)f(is)g(represen)o(ted)i(with)e("remote")f (class)h(of)f(com-)1039 2847 y(mands.)36 b(This)20 b(is)g(a)g(slot)g (to)g(remote)g(pro)q(cedure)i(calls)p eop %%Page: 2 2 2 1 bop -142 -65 a Fl(and)16 b(clien)o(t)f(serv)o(er)i(paradigm.)k(W)m (e)15 b(ha)o(v)o(e)g(also)g(in)g(mind)-142 -15 y(sp)q(eci\014c)e (atomary)d(t)o(yp)q(es)i(as)g(are)g(arbitrary)f(precision)h(in-)-142 34 y(tegers,)j(matrices)e(and)h(splines.)-142 125 y Fk(Clif)k Fl(is)h(a)g(m)o(ultiplatform)c(compiler)j(based)h(on)g(v)n(arious)-142 174 y(UNIX)14 b(platforms.)-142 265 y(The)j(in)o(terpreter)g(consists)g (from)d(t)o(w)o(o)i(main)d(parts:)23 b(the)-142 315 y(compiler)d(and)g (the)h(virtual)f(stac)o(k)i(mac)o(hine.)37 b(A)21 b(pro-)-142 364 y(gram)c(for)h Fk(Clif)f Fl(is)h(a)g(sequence)i(of)e(zero)h(lev)o (el)f(syn)o(tactic)-142 413 y(structures.)34 b(When)19 b(a)f(complete)g(zero)h(lev)o(el)f(syn)o(tactic)-142 463 y(structure)h(is)d(read)h(it)g(is)f(compiled)f(to)h(the)i(virtual)d (ma-)-142 512 y(c)o(hine)22 b(co)q(de)g(whic)o(h)g(is)f(then)h (executed.)42 b(The)22 b(debug-)-142 562 y(ging)d(and)h(the)g(user)h (con)o(trol)f(o)o(v)o(er)g(a)f(program)f(execu-)-142 611 y(tion)10 b(is)g(realized)h(with)f(the)h(sync)o(hronous)h(in)o (terrupt)f(com-)-142 660 y(mand)i("csusp)q(end")i(and)f(with)f(an)h (async)o(hronous)g(in)o(ter-)-142 710 y(rupt)h(handling.)j(In)c(b)q (oth)h(cases)g(the)g(in)o(terpreter)h(reacts)-142 759 y(with)h(op)q(ening)g(of)f(a)h(new)g(fully)f(functional)g(in)o (terpreter)-142 809 y(lev)o(el.)h(A)11 b(user)h(can)f(\014nish)h(the)f (computation)e(on)i(the)h(cur-)-142 858 y(ren)o(t)g(lev)o(el)e(with)g (a)g(command)e("resume")i(whic)o(h)h(resumes)-142 907 y(the)k(computation)d(on)i(the)g(lo)o(w)o(er)g(lev)o(el.)-142 998 y Fk(Clif)e Fl(has)g(three)i(lev)o(els)f(\(in)o(terfaces\))g (through)g(whic)o(h)f(user)-142 1048 y(can)j(add)f(new)h(mo)q(dules)f (and)g(enric)o(h)h(the)g(en)o(vironmen)o(t.)-142 1097 y(Firstly)m(,)21 b(user)h(can)f(write)g(functions)g(in)f Fk(Clif)f Fl(language)-142 1147 y(whic)o(h)h(is)g(the)h(most)e(natural) g(and)h(simple)e(w)o(a)o(y)m(.)36 b(Sec-)-142 1196 y(ondly)m(,)11 b(more)f(exp)q(erienced)k(users)f(can)f(write)g(mo)q(dules)f(in)-142 1245 y(F)o(OR)m(TRAN)g(or)i(C)f(language)f(and)h(link)f(them)g(to)h Fk(Clif)f Fl(en-)-142 1295 y(vironmen)o(t.)36 b(This)21 b(sort)f(of)g(op)q(enness)i(is)f(realized)f(via)-142 1344 y("remote")h(class)g(syn)o(tax.)40 b(The)22 b(third)f(and)g(the)h (most)-142 1394 y(p)q(o)o(w)o(erful)16 b(w)o(a)o(y)f(ho)o(w)h(to)g (enric)o(h)h Fk(Clif)e Fl(en)o(vironmen)o(t)g(is)h(to)-142 1443 y(c)o(hange)f(the)h(language)d(itself.)20 b(This)15 b(is)g(enabled)g(b)o(y)f(sys-)-142 1492 y(tematic)f(use)h(of)f (compiler-compil)o(er)e(tec)o(hnology)i([7,)f(11])-142 1542 y(and)18 b(careful)h(structural)g(dev)o(elopmen)o(t)e(of)h Fk(Clif)f Fl([9)o(,)h(10)o(].)-142 1591 y(F)m(or)13 b(example,)f(there) j(is)f(a)f(w)o(ell)g(de\014ned)h(pro)q(cedure)i(ho)o(w)-142 1641 y(to)e(add)g(a)f(new)i(atomary)d(t)o(yp)q(e)i(to)g(the)g (language.)-142 1731 y(The)24 b(graphics)f(output)g(for)g(applications) f(in)g(optimal)-142 1781 y(con)o(trol)16 b(and)h(iden)o(ti\014cation)f (is)g(realized)h(with)f(external)-142 1830 y(subsystem)d(of)f(graphics) h(windo)o(w)f(c)o(hannels.)18 b(There)c(is)f(a)-142 1880 y(sp)q(ecial)d(language)e(for)h(the)h(c)o(hannel)g(sp)q(eci\014cation,) h(whic)o(h)-142 1929 y(is)j(de\014ned)h(in)e(app)q(endix)h(B.)-129 2065 y Fm(3.)24 b(Arc)o(hitecture)13 b(and)i(implemen)n(tati)o(on)d(of) k(the)210 2114 y Fk(Clif)f Fm(system)-142 2212 y Fl(An)d(imp)q(ortan)o (t)f(decision)h(in)f(the)i(design)f(of)f(C-lik)o(e)g Fj(inter-)-142 2262 y(pr)n(eter)i Fl(is)g(to)h(establish)f(syn)o (tactic)h(and)g(seman)o(tic)e(blo)q(c)o(ks)-142 2311 y(on)e(whic)o(h)g(it)g(is)f(reasonable)i(to)f(susp)q(end)h(the)g (parsing)f(and)-142 2360 y(switc)o(h)15 b(to)f(execution.)19 b(These)c(considerations)g(ha)o(v)o(e)e(led)-142 2410 y(us)18 b(to)g(the)g(solution)f(where)h(the)h(in)o(terpreter)g(is)f (clearly)-142 2459 y(split)e(to)f(a)h(virtual)e(mac)o(hine)h(and)g(to)h (a)f(language)g(pars-)-142 2509 y(ing)e(and)h(co)q(de)h(generation)f (engine.)-142 2600 y(The)j(virtual)e(mac)o(hine)g(is)h(an)g(abstract)i (mo)q(del)c(of)i(com-)-142 2649 y(puter)24 b(with)e(a)g(lo)o(w)g(lev)o (el)g(instruction)h(set.)45 b(The)23 b(in-)-142 2698 y(terpreter)g(w)o(orks)c(in)h(an)f(alternating)h(t)o(w)o(o-step)g(mo)q (de,)-142 2748 y(where)h(the)e(parser)h(translates)g(a)f(lev)o(el)g (zero)h(syn)o(tactic)-142 2797 y(blo)q(c)o(k)k(and)f(generates)j(a)d (co)q(de)i(for)e(the)h(virtual)f(ma-)-142 2847 y(c)o(hine.)29 b(Subsequen)o(tly)19 b(the)f(virtual)e(mac)o(hine)g(executes)874 -65 y(the)g(co)q(de.)23 b(The)16 b(co)q(de)g(is)f(alw)o(a)o(ys)f (\014nished)i(with)f(the)h(in-)874 -15 y(struction)11 b(STOP)m(,)f(whic)o(h)h(giv)o(es)f(the)h(con)o(trol)g(bac)o(k)f(to)h (the)874 34 y(parser.)874 125 y(In)19 b(the)g(follo)o(wing)d(sections)k (w)o(e)f(describ)q(e)h(in)e(more)g(de-)874 174 y(tail)12 b(some)f(asp)q(ects)k(of)d(the)h(virtual)f(mac)o(hine)g(and)g(parser) 874 224 y(design.)874 358 y Fm(3.1.)24 b(Virtual)14 b(mac)o(hine)874 426 y Fl(During)f(the)h(virtual)f(mac)o(hine)f(design)h(pro)q(cess)j(w) o(e)d(ha)o(v)o(e)874 475 y(follo)o(w)o(ed)f(three)j(main)d(ob)r(jectiv) o(es:)925 578 y(1.)20 b(T)m(o)9 b(obtain)g(a)h(mac)o(hine)e(whic)o(h)i (naturally)f(supp)q(orts)978 627 y(the)14 b(C)g(language.)925 738 y(2.)20 b(T)m(o)12 b(ha)o(v)o(e)i(a)f(simple)f(instruction)h(set)h (consisting)g(of)978 787 y(instructions)g(with)g(a)g(medium)d (complexit)o(y)m(.)925 898 y(3.)20 b(T)m(o)15 b(minimi)o(ze)f(a)i(cop)o (ying)g(and)g(migration)e(of)i(ob-)978 947 y(jects)f(in)e(memory)m(.) 874 1050 y(The)i(\014rst)g(design)f(ob)r(jectiv)o(e)h(has)f(led)g(us)g (naturally)g(to)g(a)874 1100 y(certain)g(sort)g(of)f(stac)o(k)h(mac)o (hine.)j(The)d(virtual)f(mac)o(hine)874 1149 y(has)21 b(no)f(general)h(purp)q(ose)h(registers.)39 b(All)20 b(op)q(erations)874 1199 y(o)q(ccur)h(on)f(the)g(top)g(of)f(the)i (arithmetical)d(stac)o(k.)37 b(The)874 1248 y(fact)13 b(that)g(a)g(stac)o(k)g(mac)o(hine)f(supp)q(orts)i(C)f(language)f(w)o (as)874 1297 y(also)f(describ)q(ed)i(in)e(the)h(series)h(of)e(articles) h([3,)f(4)o(,)g(5])g(where)874 1347 y(the)19 b(same)f(ob)r(jectiv)o(e)h (has)g(led)g(authors)g(during)f(design)874 1396 y(of)h(a)h(micropro)q (cessor)g(c)o(hip.)37 b(The)20 b(result)h(w)o(as)f(a)f(c)o(hip)874 1446 y(whic)o(h)12 b(considerably)g(emphasizes)g(stac)o(k)g(op)q (erations)h(for)874 1495 y(C)h(language)f(supp)q(ort.)874 1586 y(The)24 b(second)h(design)f(ob)r(jectiv)o(e)g(\014ts)g(nicely)g (in)o(to)f(the)874 1635 y(framew)o(ork)9 b(of)i(RISC)f(micropro)q (cessor)h(instruction)g(sets;)874 1685 y(therefore)j(w)o(e)f(ha)o(v)o (e)f(inspired)h(ourselv)o(es)g(with)f(suc)o(h)h(sets.)874 1776 y(The)g(third)f(design)g(ob)r(jectiv)o(e)h(stems)f(from)e(the)j (in)o(tended)874 1825 y(applications)h(of)g(the)h(in)o(terpreter.)22 b(W)m(e)15 b(exp)q(ect)h(to)f(w)o(ork)874 1874 y(with)21 b(relativ)o(ely)f(large)h(ob)r(jects)i(\(with)e(gran)o(ularit)o(y)f(of) 874 1924 y(kilob)o(ytes\))c(where)i(an)o(y)e(ine\016ciency)h(caused)g (b)o(y)f(ob)r(ject)874 1973 y(cop)o(ying)h(can)i(signi\014can)o(tly)e (reduce)i(a)f(p)q(erformance)g(of)874 2023 y(the)d(in)o(terpreter.)874 2113 y(T)m(o)j(matc)o(h)f(the)h(ab)q(o)o(v)o(e)g(design)h(ob)r(jectiv)o (es)g(w)o(e)g(use)g(the)874 2163 y(follo)o(wing)9 b(structure)14 b(of)e(the)g(virtual)f(mac)o(hine.)16 b(There)d(is)874 2212 y(a)h(main)f(memory)f(with)i(global)e(v)n(ariables)i(and)h (function)874 2262 y(b)q(o)q(dies)g(lo)q(cated)f(from)f(the)i(top)f (and)h(the)g(stac)o(k)f(gro)o(wing)874 2311 y(from)i(the)i(b)q(ottom)f (\(see)i(\014gure)f(1\);)h(there)g(is)f(an)g(arith-)874 2360 y(metic)11 b(stac)o(k)h(and)g(temp)q(orary)f(stac)o(k.)17 b(T)m(o)11 b(a)o(v)o(oid)g(cop)o(ying)874 2410 y(of)k(ob)r(jects,)h (the)h(arithmetic)d(stac)o(k)i(con)o(tains)f(addresses)874 2459 y(of)20 b(ob)r(jects)h(lo)q(cated)g(in)e(the)i(main)d(memory)m(,)h (stac)o(k)h(or)874 2509 y(temp)q(orary)9 b(stac)o(k.)17 b(Also)10 b(the)h(parameter)e(passing)h(mec)o(h-)874 2558 y(anism)j(for)h(recursiv)o(e)i(function)f(calls)f(w)o(orks)h (strictly)f(b)o(y)874 2607 y(reference.)31 b(This)18 b(arc)o(hitecture)h(allo)o(ws)d(us)i(to)f(a)o(v)o(oid)f(at)874 2657 y(all)i(cop)o(ying)h(of)g(ob)r(jects,)i(except)g(the)f(cop)o(y)f (op)q(eration)874 2706 y(explicitly)13 b(demanded)g(with)h(an)f (assignmen)o(t)g(op)q(erator.)874 2797 y(In)f(app)q(endix)h(C)f(w)o(e)g (brie\015y)h(describ)q(e)h(the)f(RISC-lik)o(e)e(in-)874 2847 y(struction)k(set)f(of)g(the)g(virtual)f(mac)o(hine.)p eop %%Page: 3 3 3 2 bop 395 -54 229 2 v 395 733 2 788 v 622 733 V 395 735 229 2 v 845 171 V 845 733 2 563 v 1071 733 V 845 735 229 2 v 1295 -54 V 1295 733 2 788 v 1521 733 V 1295 735 229 2 v 397 -8 225 2 v 397 60 V 397 150 V 397 510 V 846 285 V 846 330 V 846 375 V 1296 71 V 1296 116 V 1071 352 124 2 v 1194 351 2 248 v 1195 105 102 2 v 1255 104 a Fh(-)p 689 307 158 2 v 688 306 2 214 v 622 94 68 2 v 622 93 a(\033)1067 419 y Fg(.)1067 430 y(.)p 846 420 225 2 v 689 397 158 2 v 688 531 2 135 v 622 532 68 2 v 622 531 a Fh(\033)422 -20 y Fl(glob.)17 b(v)n(ar.)410 36 y(func.)h(b)q(o)q(dy)422 126 y(glob.)f(v)n(ar.)463 621 y(stac)o(k)384 846 y(main)12 b(memory)159 b(arithmetical)12 b(stac)o(k)140 b(temp)q(orary)13 b(stac)o(k)k(\032)889 979 y Fm(Figure)d(1:)539 1070 y Fl(The)g(top)g(lev)o(el)f(structure)j (of)e(the)g Fk(Clif)f Fl(virtual)g(mac)o(hine)24 1244 y Fm(3.2.)24 b(P)o(arser)14 b(and)h(co)q(de)h(generation)24 1311 y Fl(The)g(parser)h(subsystem)f(of)f(the)h Fk(Clif)f Fl(in)o(terpreter)j(is)e(de-)24 1360 y(signed)h(as)h(a)f(regular)h (expression)h(lexical)e(analyzer)g(re-)24 1410 y(alized)j(with)g(LEX)h ([11)o(])g(and)f(LR\(1\))g(parser)i(designed)24 1459 y(with)11 b(Y)m(A)o(CC)g([2].)16 b(The)d(BNF)f(form)e(of)h(grammar)e (\(parser)24 1509 y(sp)q(eci\014cation\))16 b(is)g(in)f(app)q(endix)g (A.)h(The)g(parser)g(is)g(con-)24 1558 y(structed)c(as)f(one-pass)g (parser)h(and)e(co)q(de)h(generator.)18 b(F)m(or)24 1607 y(a)11 b(parsing)g(of)f(v)n(arious)h(con)o(text)h(dep)q(enden)o(t)h (seman)o(tics)d(of)24 1657 y Fk(Clif)h Fl(as)i(w)o(ell)e(as)i(for)f(an) g(ob)r(ject)i(mo)o(v)o(emen)o(t)c(optimization)24 1706 y(w)o(e)h(use)h(v)n(arious)f(sorts)h(of)f(bac)o(kw)o(ard)g(and)h(forw)o (ard)f(\014xing)24 1756 y(tec)o(hniques.)24 1846 y(As)i(w)o(e)h(ha)o(v) o(e)f(men)o(tioned)f(at)h(the)g(b)q(eginning)g(of)g(this)g(sec-)24 1896 y(tion)j(there)j(m)o(ust)d(b)q(e)i(a)f(decision)g(ab)q(out)g(the)h (syn)o(tactic)24 1945 y(resp.)g(seman)o(tic)10 b(blo)q(c)o(ks)g(whic)o (h)h(trigger)g(a)f(run)h(of)f(the)h(vir-)24 1995 y(tual)e(mac)o(hine)g (and)h(the)h(parser.)18 b(This)10 b(design)h(decision)f(is)24 2044 y(realized)k(with)g(the)g(lev)o(el)p 425 2044 13 2 v 15 w(0)g(and)g(the)g(lev)o(el)p 708 2044 V 15 w(1)g(gramma)o(ti-)24 2093 y(cal)g(construction)h(\(see)h(app)q(endix)f(A\).)f(Shortly)m(,)g (w)o(e)h(can)24 2143 y(sa)o(y)e(that)i(an)o(y)e(left)h(brac)o(k)o(et)h (")p Ff(f)p Fl(")e(op)q(ens)i(a)e(list)h(of)f(lev)o(el)p 911 2143 V 15 w(1)24 2192 y(statemen)o(ts.)k(They)11 b(are)h(compiled)d(and)i(the)g(co)q(de)h(is)f(gen-)24 2242 y(erated)19 b(in)f(the)h(\014rst)g(free)g(area)g(in)f(the)h(main)d (memory)m(.)24 2291 y(The)e(o)q(ccurrence)k(of)13 b(the)i(last)f(righ)o (t)g(brac)o(k)o(et)h(")p Ff(g)p Fl(")f(whic)o(h)24 2340 y(brings)f(the)h(sen)o(tence)i(to)e(the)g(lev)o(el)p 589 2340 V 14 w(0)g(stops)g(the)g(parsing)24 2390 y(and)f(triggers)i(a) e(run)i(of)e(the)h(virtual)f(mac)o(hine.)330 2523 y Fm(4.)24 b(Conclusions)24 2618 y Fl(In)c(the)g(concluding)g(section)g(w)o(e)g (commen)o(t)e(some)h(fea-)24 2668 y(tures)c(of)e Fk(Clif)g Fl(and)h(w)o(e)g(discuss)h(a)f(p)q(ossible)g(future)g(direc-)24 2717 y(tions)f(of)h(the)g(dev)o(elopmen)o(t.)86 2797 y Ff(\017)20 b Fl(Because)h Fk(Clif)d Fl(is)g(a)g(m)o(ultiplatform)c (compiler)k(w)o(e)127 2847 y(ha)o(v)o(e)13 b(a)g(w)o(ell-de\014ned)g (pro)q(cedure)i(of)d(migration)e(to)1143 1244 y(di\013eren)o(t)22 b(platforms.)35 b(The)21 b(in)o(terpreter)i(is)d(cur-)1143 1293 y(ren)o(tly)c(p)q(orted)h(to)f(the)h(follo)o(wing)c(op)q(erating)j (sys-)1143 1343 y(tems)j(and)g(arc)o(hitectures,)k(resp)q(ectiv)o(ely:) 30 b(UNIX)1143 1392 y(\(CD4680)23 b(-)g(EP/IX,)h(DEC5000/240)d(-)j (Ultrix,)1143 1441 y(Sun)f(SP)m(AR)o(C)f(Station)g(-)g(Solaris,)i(Lin)o (ux\),)g(MS)1143 1491 y(DOS.)19 b(W)m(e)g(are)g(w)o(orking)f(on)h(the)h (MS)f(Windo)o(ws)1143 1540 y(p)q(ort.)1102 1597 y Ff(\017)h Fl(The)c(remote)g(pro)q(cedure)h(call)e(slot)h(that)g(w)o(e)g(ha)o(v)o (e)1143 1646 y(built)11 b(curren)o(tly)i(in)o(to)e(the)h(in)o (terpreter)i(supp)q(orts)f(a)1143 1696 y(remote)g(pro)q(cedure)i(call)d (paradigm,)e(where)15 b(clien)o(t)1143 1745 y(\(or)23 b(caller\))f(w)o(aits)g(un)o(til)g(the)h(\014nish)f(of)g(the)h(re-)1143 1794 y(mote)18 b(pro)q(cedure.)35 b(W)m(e)19 b(w)o(ould)f(lik)o(e)h(to) f(impro)o(v)o(e)1143 1844 y(this)f(mec)o(hanism)d(with)i(a)g(p)q (ossibilit)o(y)f(of)h(concur-)1143 1893 y(ren)o(t)d(computation)e(and)i (sync)o(hronization)f(via)g(in-)1143 1943 y(ternal)17 b(mec)o(hanism)d(whic)o(h)j(w)o(ould)f(allo)o(w)f(the)i(in-)1143 1992 y(terpreter)d(to)e(pro)q(ceed)i(with)d(a)h(computation)e(ev)o(en) 1143 2041 y(if)19 b(the)h(data)f(from)e(the)j(remote)f(call)g(are)g (not)h(at)1143 2091 y(the)14 b(disp)q(osal.)j(The)d(in)o(terpreter)h (runs)f(un)o(til)e(there)1143 2140 y(is)20 b(no)f(reference)j(to)e(the) g(results)h(of)e(the)h(remote)1143 2190 y(call)13 b(and)g(then)h(blo)q (c)o(ks)g(just)f(b)q(efore)i(the)f(\014rst)g(suc)o(h)1143 2239 y(reference.)1102 2296 y Ff(\017)20 b Fl(W)m(e)c(supp)q(ose)i(to)e (implemen)o(t)e(the)j(follo)o(wing)d(sp)q(e-)1143 2345 y(cial)20 b(atomary)e(t)o(yp)q(es:)32 b(in)o(tegers)22 b(with)e(arbitrary)1143 2395 y(precision,)e(matrices)f(with)h(a)f (dynamical)e(allo)q(ca-)1143 2444 y(tion)e(of)h(memory)d(and)j (splines.)1102 2501 y Ff(\017)20 b Fl(T)m(o)12 b(allo)o(w)f(a)h(more)g (\015exibilit)o(y)f(in)h(language)g Fj(syntax)1143 2550 y Fl(w)o(e)j(prop)q(ose)h(a)e(pro)q(cedure)j(where)f(for)e(eac)o(h)h (stage)1143 2600 y(of)22 b(the)g(compiler)f(dev)o(elopmen)o(t)g(there)j (are)e(t)o(w)o(o)1143 2649 y(compilers.)35 b(One)20 b(is)g(the)g(activ) o(e)g(compiler)e(with)1143 2698 y(a)c(full)e(seman)o(tic)h(and)g(the)i (other)f(one)g(is)f(the)h(same)1143 2748 y(parser)e(but)e(with)g(a)g (sp)q(ecial)g(seman)o(tic)g(whic)o(h)g(is)g(di-)1143 2797 y(rected)16 b(to)e(a)g(source-source)j(translation)d(to)o(w)o (ards)1143 2847 y(a)g(new)g(syn)o(tax.)p eop %%Page: 4 4 4 3 bop -79 -65 a Ff(\017)20 b Fl(W)m(e)15 b(also)f(think)h(ab)q(out)g (a)g(p)q(ossibilit)o(y)f(to)h(conduct)-38 -15 y(a)g(researc)o(h)j(to)o (w)o(ards)e(a)f(compiler)f(with)i(a)f(uni\014ed)-38 34 y(parser)22 b(w)o(orking)f(in)g(a)g(heterogeneous)i(en)o(viron-)-38 83 y(men)o(t)13 b(with)g(di\013eren)o(t)i(co)q(de)g(generation)f(parts) g(for)-38 133 y(particular)f(en)o(vironmen)o(ts.)k(W)m(e)c(ha)o(v)o(e)g (in)f(mind)g(to)-38 182 y(apply)18 b(the)h(metho)q(ds)g(used)g(in)g(ob) r(ject)g(program-)-38 232 y(ming)e(to)i(solv)o(e)g("inheritance)g (anomaly")d([8)o(])j(for)-38 281 y(this)h(problem.)34 b(When)20 b(w)o(e)g(lo)q(ok)f(at)h(the)g(parser)-38 330 y(constructed)g(with)d(Y)m(A)o(CC)h(it)f(can)h(b)q(e)g(seen)h(that)-38 380 y(parsing)e(and)g(co)q(de)g(generation)h(parts)f(are)g(in)o(ter-) -38 429 y(sp)q(ersed)h(in)e(suc)o(h)h(a)f(w)o(a)o(y)f(that)h(it)g(is)g (not)g(p)q(ossible)-38 479 y(to)e(separate)g(and)g(encapsulate)h(those) f(parts)g(from)-38 528 y(eac)o(h)g(other.)k(This)13 b(is)g(an)g (instance)h(of)f(inheritance)-38 577 y(anomaly)k(whic)o(h)j(can)g(b)q (e)g(approac)o(hed)h(with)e(re-)-38 627 y(cen)o(tly)14 b(disco)o(v)o(ered)h(metho)q(ds.)207 753 y Fm(References)-121 844 y Fl([1])20 b(A.)15 b(V.)g(Aho,)g(S.)g(C.)f(Johnson:)22 b(LR)14 b(parsing,)h(Com-)-56 893 y(puting)g(Surv)o(eys,)i(V)m(ol.)d (6,)i(No.)f(2,)h(June)h(1974,)e(pp.)-56 943 y(99-124)-121 994 y([2])20 b(A.)11 b(V.)h(Aho,)g(J.)g(D.)f(Ullman:)k(The)d(Theory)h (of)e(P)o(ars-)-56 1044 y(ing,)e(T)m(ranslation,)f(and)i(Compiling)o(,) d(Pren)o(tice)k(Hall,)-56 1093 y(Englew)o(o)q(o)q(d)19 b(Cli\013s,)h(N.J.,)h(V)m(ol.)d(1,)i(1972,)g(V)m(ol.)e(2,)-56 1143 y(1973)-121 1195 y([3])i(S.)d(Bandy)o(opadh)o(y)o(a)o(y)m(,)f (V.S.)g(Begw)o(ani,)i(R.B.)e(Mur-)-56 1244 y(ra)o(y:)h(Compiling)11 b(for)i(the)i(CRISP)e(pro)q(cessor,)i(Pro-)-56 1293 y(ceedings)27 b(of)e(the)h(IEEE)h(Spring,)h(COMPCON,)-56 1343 y(1987,)12 b(pp.)h(96-100)-121 1395 y([4])20 b(A.D.)11 b(Beren)o(baum,)i(D.R.)e (Ditzel,)h(H.R.)f(McLellan:)-56 1444 y(In)o(tro)q(duction)g(to)h(the)g (CRISP)f(Instruction)h(Set)g(Ar-)-56 1493 y(c)o(hitecture,)24 b(Pro)q(ceedings)f(of)e(the)h(IEEE)g(Spring,)-56 1543 y(COMPCON,)14 b(1987,)e(pp.)i(86-90)-121 1595 y([5])20 b(A.D.)11 b(Beren)o(baum,)i(D.R.)e(Ditzel,)h(H.R.)f(McLellan:)-56 1644 y(Arc)o(hitectural)22 b(Inno)o(v)n(ations)d(in)i(the)g(CRISP)g (Mi-)-56 1693 y(cropro)q(cessor,)15 b(Pro)q(ceedings)f(of)e(the)i(IEEE) f(Spring,)-56 1743 y(COMPCON,)h(1987,)e(pp.)i(91-95)-121 1795 y([6])20 b(J.J.)14 b(Dongarra,)g(C.B.)g(Moler,)g(J.R.)g(Bunc)o(h,) h(G.W.)-56 1844 y(Stew)o(art,)39 b(LINP)m(A)o(CK)34 b(User's)h(Guide,)k (SIAM,)-56 1893 y(Philadelphia,)12 b(1979)-121 1945 y([7])20 b(S.)14 b(C.)g(Johnson:)20 b(Y)m(A)o(CC:)14 b(Y)m(et)h(Another)g (Compiler)-56 1995 y(Compiler,)21 b(Computing)f(Science)k(T)m(ec)o (hnical)e(Re-)-56 2044 y(p)q(ort)d(No.)g(32,)h(Bell)f(Lab)q(oratories,) i(Murra)o(y)e(Hill,)-56 2093 y(NJ)14 b(07974,)e(1975,)g(pp.)i(163-196) -121 2145 y([8])20 b(D.G.)28 b(Kafura,)33 b(R.G.)28 b(La)o(v)o(ender:) 50 b(Concurren)o(t)-56 2195 y(Ob)r(ject-Orien)o(ted)11 b(Language)f(and)f(the)h(Inheritance)-56 2244 y(Anomaly)m(,)h(Pro)q (ceedings)17 b(ISIPCALA'93,)c(Prague,)-56 2293 y(1993,)f(pp.)h(183-215) -121 2345 y([9])-54 2335 y(\024)-56 2345 y(L.)h(Kore)q(\024)-22 b(n:)22 b(The)16 b(In)o(terpreter)h Fk(Clif)p Fl(,)e(Programmer's)-56 2395 y(Guide,)9 b(Researc)o(h)i(Rep)q(ort,)g(Slo)o(v)n(ak)d(T)m(ec)o (hnical)h(Uni-)-56 2444 y(v)o(ersit)o(y)m(,)g(F)m(acult)o(y)g(of)g(Mec) o(h.)h(Eng.,)g(Bratisla)o(v)n(a,)f(1994)-142 2496 y([10])-54 2485 y(\024)-56 2496 y(L.)28 b(Kore)q(\024)-22 b(n:)48 b(The)30 b(In)o(terpreter)h Fk(Clif)p Fl(,)g(T)m(ec)o(hnical)-56 2545 y(Guide,)9 b(Researc)o(h)i(Rep)q(ort,)g(Slo)o(v)n(ak)d(T)m(ec)o (hnical)h(Uni-)-56 2595 y(v)o(ersit)o(y)m(,)g(F)m(acult)o(y)g(of)g(Mec) o(h.)h(Eng.,)g(Bratisla)o(v)n(a,)f(1994)-142 2646 y([11])20 b(M.)13 b(E.)h(Lesk,)g(E.)f(Sc)o(hmidt:)k(LEX)d(-)g(A)g(lexical)f(ana-) -56 2696 y(lyzer)h(generator,)g(Researc)o(h)h(rep)q(ort,)f(Bell)g(Lab)q (ora-)-56 2745 y(tories,)f(Murra)o(y)h(Hill,)f(NJ,)g(1975,)g(pp.)g (197-210)-142 2797 y([12])20 b(B.)41 b(Serp)q(ette,)51 b(J.)41 b(V)m(uillemin,)46 b(J.C.)41 b(Herv)o(\023)-20 b(e:)-56 2847 y(BigNum:)15 b(A)d(P)o(ortable)h(and)f(E\016cien)o(t)g(P) o(ac)o(k)n(age)g(for)959 -65 y(Arbitrary-Precision)18 b(Arithmetic,)e(Researc)o(h)i(Re-)959 -15 y(p)q(ort,)c(preprin)o(t,)g (INRIA,)f(1989)1161 110 y Fm(A.)25 b(Syn)o(tax)14 b(of)i Fk(Clif)874 194 y Fe(<)p Fn(list)p 951 194 11 2 v 12 w(stat)p 1023 194 V 12 w(0)c Fe(>)p Fn(::=)g Fe(<)p Fn(list)p 1226 194 V 12 w(stat)p 1298 194 V 12 w(0)f Fe(>)q(<)p Fn(stat)p 1454 194 V 12 w(0)g Fe(>)1084 233 y Fd(j)p Fn(empt)o(y)874 344 y Fe(<)p Fn(list)p 951 344 V 12 w(stat)g Fe(>)q Fn(::=)g Fe(<)q Fn(list)p 1196 344 V 12 w(stat)g Fe(><)p Fn(stat)p 1393 344 V 12 w(1)h Fe(>)1084 383 y Fd(j)p Fn(empt)o(y)874 494 y Fe(<)p Fn(stat)p 963 494 V 12 w(0)g Fe(>)p Fn(::=)g(INT)g Fe(<)q Fn(list)p 1243 494 V 12 w(dekl)e Fe(>)q Fn(;)1084 534 y Fd(j)p Fn(DOUBLE)i Fe(<)q Fn(list)p 1335 534 V 12 w(dekl)e Fe(>)q Fn(;)1084 573 y Fd(j)p Fn(FLO)o(A)m(T)j Fe(<)q Fn(list)p 1304 573 V 11 w(dekl)e Fe(>)p Fn(;)1084 613 y Fd(j)p Fn(CHAR)i Fe(<)p Fn(list)p 1287 613 V 12 w(dekl)e Fe(>)p Fn(;)1084 652 y Fd(j)p Fe(<)p Fn(expr)g Fe(>)p Fn(;)1084 691 y Fd(j)p Fn(IF)g(\()h Fe(<)p Fn(expr)f Fe(>)p Fn(\))h Fe(<)p Fn(then)e Fe(>)1084 731 y Fd(j)p Fn(WHILE)i(\()f Fe(<)q Fn(expr)f Fe(>)q Fn(\))h Fd(f)h Fe(<)p Fn(list)p 1519 731 V 12 w(stat)f Fe(>)p Fd(g)1084 770 y(j)p Fn(F)o(OR)h(for)f Fd(f)g Fe(<)q Fn(list)p 1342 770 V 12 w(stat)g Fe(>)p Fd(g)1084 810 y(j)p Fn(READ)h(\()f Fe(<)q Fn(l)p 1274 810 V 12 w(v)n(alue)f Fe(>)q Fn(\))h(;)1084 849 y Fd(j)p Fn(WRITE)h(\()f Fe(<)q Fn(l)p 1295 849 V 12 w(v)n(alue)g Fe(>)p Fn(\))g(;)1084 889 y Fd(j)p Fn(PRINT)h(;)1084 928 y Fd(j)p Fn(EXIT)g(;)1084 968 y Fd(j)p Fn(INT)g(PR)o(OC)h Fe(<)p Fn(pro)q(c)e Fe(>)1084 1007 y Fd(j)p Fn(DOUBLE)h(PR)o(OC)h Fe(<)p Fn(pro)q(c)e Fe(>)1084 1046 y Fd(j)p Fn(FLO)o(A)m(T)i(PR)o(OC)g Fe(<)p Fn(pro)q(c)e Fe(>)1084 1086 y Fd(j)p Fn(CHAR)i(PR)o(OC)g Fe(<)p Fn(pro)q(c)d Fe(>)1084 1125 y Fd(j)p Fn(V)o(OID)i(PR)o(OC)h Fe(<)p Fn(pro)q(c)e Fe(>)1084 1165 y Fd(j)p Fn(EXPOR)m(T)p 1245 1165 V 14 w(T)h(REMOTE)p 1454 1165 V 14 w(C)g(INT)h(PR)o(OC)874 1204 y Fe(<)p Fn(iden)o(t)e Fe(>)p Fn(\()h(\))f(;)1084 1244 y Fd(j)p Fn(EXPOR)m(T)p 1245 1244 V 14 w(T)h(REMOTE)p 1454 1244 V 14 w(C)g(DOUBLE)h(PR)o(OC)874 1283 y Fe(<)p Fn(iden)o(t)e Fe(>)p Fn(\()h(\))f(;)1084 1322 y Fd(j)p Fn(EXPOR)m(T)p 1245 1322 V 14 w(T)h(REMOTE)p 1454 1322 V 14 w(C)g(FLO)o(A)m(T)i(PR)o(OC)874 1362 y Fe(<)p Fn(iden)o(t)d Fe(>)p Fn(\()h(\))f(;)1084 1401 y Fd(j)p Fn(EXPOR)m(T)p 1245 1401 V 14 w(T)h(REMOTE)p 1454 1401 V 14 w(C)g(CHAR)h(PR)o(OC)874 1441 y Fe(<)p Fn(iden)o(t)e Fe(>)p Fn(\()h(\))f(;)1084 1480 y Fd(j)p Fn(EXPOR)m(T)p 1245 1480 V 14 w(T)h(REMOTE)p 1454 1480 V 14 w(C)g(V)o(OID)h(PR)o(OC)874 1520 y Fe(<)p Fn(iden)o(t)e Fe(>)p Fn(\()h(\))f(;)1084 1559 y Fd(j)p Fn(REMOTE)p 1254 1559 V 14 w(C)h(INT)g(PR)o(OC)h Fe(<)p Fn(iden)o(t)e Fe(>)p Fn(\()h(\))f(;)1084 1598 y Fd(j)p Fn(REMOTE)p 1254 1598 V 14 w(C)h(DOUBLE)h(PR)o(OC)f Fe(<)q Fn(iden)o(t)e Fe(>)p Fn(\()i(\))f(;)1084 1638 y Fd(j)p Fn(REMOTE)p 1254 1638 V 14 w(C)h(FLO)o(A)m(T)h(PR)o(OC)g Fe(<)p Fn(iden)o(t)d Fe(>)q Fn(\()h(\))h(;)1084 1677 y Fd(j)p Fn(REMOTE)p 1254 1677 V 14 w(C)g(CHAR)h(PR)o(OC)g Fe(<)p Fn(iden)o(t)d Fe(>)q Fn(\()h(\))h(;)1084 1717 y Fd(j)p Fn(REMOTE)p 1254 1717 V 14 w(C)g(V)o(OID)g(PR)o(OC)h Fe(<)p Fn(iden)o(t)e Fe(>)p Fn(\()g(\))h(;)1084 1756 y Fd(j)p Fn(CSUSPEND)g(;)1084 1796 y Fd(j)p Fn(RESUME)g(;)1084 1835 y Fd(j)p Fn(LO)o(AD)g(\()g Fe(<)p Fn(\014le)p 1308 1835 V 12 w(name)e Fe(>)q Fn(\);)1084 1875 y Fd(j)p Fn(;)874 1985 y Fe(<)p Fn(stat)p 963 1985 V 12 w(1)i Fe(>)p Fn(::=)g Fe(<)p Fn(expr)f Fe(>)p Fn(;)1084 2025 y Fd(j)p Fn(IF)g(\()h Fe(<)p Fn(expr)f Fe(>)p Fn(\))h Fe(<)p Fn(then)e Fe(>)1084 2064 y Fd(j)p Fn(WHILE)i(\()f Fe(<)q Fn(expr)f Fe(>)q Fn(\))h Fd(f)h Fe(<)p Fn(list)p 1519 2064 V 12 w(stat)f Fe(>)p Fd(g)1084 2104 y(j)p Fn(F)o(OR)h Fe(<)p Fn(for)f Fe(>)q Fd(f)g Fe(<)q Fn(list)p 1397 2104 V 12 w(stat)f Fe(>)q Fd(g)1084 2143 y(j)p Fn(BREAK)i(;)1084 2183 y Fd(j)p Fn(CONTINUE)i(;)1084 2222 y Fd(j)p Fn(READ)e(\()f Fe(<)q Fn(list)p 1312 2222 V 12 w(expr)f Fe(>)q Fn(\))h(;)1084 2261 y Fd(j)p Fn(WRITE)h(\()f Fe(<)q Fn(list)p 1333 2261 V 12 w(expr)f Fe(>)q Fn(\))h(;)1084 2301 y Fd(j)p Fn(PRINT)h(;)1084 2340 y Fd(j)p Fn(EXIT)g(;)1084 2380 y Fd(j)p Fn(RETURN)h(\()e Fe(<)q Fn(expr)f Fe(>)q Fn(\);)1084 2419 y Fd(j)p Fn(CSUSPEND)i(;)1084 2459 y Fd(j)p Fn(LO)o(AD)g(\()g(\014le)p 1281 2459 V 12 w(name)e(\);)1084 2498 y Fd(j)p Fn(;)874 2609 y Fe(<)p Fn(list)p 951 2609 V 12 w(dekl)h Fe(>)p Fn(::=)h Fe(<)q Fn(iden)o(t)e Fe(>)1084 2648 y Fd(j)p Fe(<)p Fn(iden)o(t)g Fe(>)q Fn(,)h Fe(<)q Fn(list)p 1337 2648 V 12 w(dekl)f Fe(>)1084 2688 y Fd(j)p Fe(<)p Fn(iden)o(t)g Fe(>)q(<)p Fn(list)p 1315 2688 V 12 w(dim)h Fe(>)p Fn(,)h Fe(<)p Fn(list)p 1522 2688 V 12 w(dekl)f Fe(>)874 2799 y(<)p Fn(list)p 951 2799 V 12 w(dim)g Fe(>)p Fn(::=)h Fe(<)q Fn(list)p 1196 2799 V 12 w(dim)e Fe(>)q Fn([)h Fe(<)q Fn(n)o(um)o(b)q(eri)e Fe(>)p Fn(])1084 2838 y Fd(j)p Fn([)i Fe(<)q Fn(n)o(um)o(b)q(eri)e Fe(>)p Fn(])j Fe(<)q Fn(list)p 1408 2838 V 11 w(dim)f Fe(>)p eop %%Page: 5 5 5 4 bop 24 -65 a Fe(<)p Fn(then)10 b Fe(>)q Fn(::=)i Fd(f)f Fe(<)q Fn(list)p 325 -65 11 2 v 11 w(stat)g Fe(>)q(<)p Fn(or)g Fe(>)24 55 y(<)p Fn(or)g Fe(>)q Fn(::=)g Fd(g)h Fn(ELSE)f Fd(f)h Fe(<)p Fn(list)p 418 55 V 12 w(stat)f Fe(>)p Fd(g)234 95 y(j)o(g)24 215 y Fe(<)p Fn(for)g Fe(>)p Fn(::=)h(\()g Fe(<)p Fn(expr)f Fe(>)p Fn(;)h Fe(<)p Fn(expr)e Fe(>)q Fn(;)h Fe(<)q Fn(expr)f Fe(>)q Fn(\))234 254 y Fd(j)o Fn(\()i(;)f(;)h(\))24 375 y Fe(<)p Fn(pro)q(c)e Fe(>)q Fn(::=)i Fe(<)p Fn(iden)o(t)e Fe(>)q(<)p Fn(pro)q(c1)g Fe(>)24 495 y(<)p Fn(pro)q(c1)g Fe(>)q Fn(::=)h(\()h Fe(<)p Fn(list)p 337 495 V 12 w(form)p 422 495 V 12 w(param)d Fe(>)q Fn(\))i Fe(<)q Fn(pro)q(c2)f Fe(>)234 534 y Fd(j)o Fn(\()i(\))f Fe(<)q Fn(pro)q(c2)f Fe(>)234 574 y Fd(j)o Fn(\()i(\))f(;)24 694 y Fe(<)p Fn(pro)q(c2)f Fe(>)q Fn(::=)h Fd(f)h Fe(<)p Fn(list)p 341 694 V 12 w(lo)q(c)p 398 694 V 12 w(dekl)e Fe(>)q Fn(;)h Fe(<)q Fn(pro)q(c3)f Fe(>)234 733 y Fd(j)o(f)i Fe(<)p Fn(pro)q(c3)e Fe(>)24 853 y(<)p Fn(pro)q(c3)g Fe(>)q Fn(::=)h Fe(<)q Fn(list)p 312 853 V 12 w(stat)g Fe(>)p Fd(g)24 974 y Fe(<)p Fn(list)p 101 974 V 12 w(form)p 186 974 V 11 w(param)f Fe(>)q Fn(::=)h(INT)i Fe(<)p Fn(iden)o(t)d Fe(>)234 1013 y Fd(j)o Fn(INT)j Fe(<)p Fn(iden)o(t)d Fe(>)q Fn(,)h Fe(<)q Fn(list)p 563 1013 V 12 w(form)p 648 1013 V 11 w(param)f Fe(>)234 1052 y Fd(j)o Fn(DOUBLE)j Fe(<)p Fn(iden)o(t)e Fe(>)234 1092 y Fd(j)o Fn(DOUBLE)i Fe(<)p Fn(iden)o(t)e Fe(>)p Fn(,)h Fe(<)p Fn(list)p 650 1092 V 12 w(form)p 735 1092 V 11 w(param)e Fe(>)234 1131 y Fd(j)o Fn(FLO)o(A)m(T)k Fe(<)p Fn(iden)o(t)c Fe(>)234 1171 y Fd(j)o Fn(FLO)o(A)m(T)k Fe(<)p Fn(iden)o(t)c Fe(>)q Fn(,)h Fe(<)q Fn(list)p 619 1171 V 12 w(form)p 704 1171 V 11 w(param)f Fe(>)234 1210 y Fd(j)o Fn(CHAR)j Fe(<)q Fn(iden)o(t)d Fe(>)234 1250 y Fd(j)o Fn(CHAR)j Fe(<)q Fn(iden)o(t)d Fe(>)q Fn(,)h Fe(<)q Fn(list)p 603 1250 V 12 w(form)p 688 1250 V 11 w(param)f Fe(>)234 1289 y Fd(j)o Fn(INT)j Fe(<)p Fn(iden)o(t)d Fe(>)q(<)p Fn(list)p 541 1289 V 12 w(lo)q(c)p 598 1289 V 12 w(dim)h Fe(>)234 1329 y Fd(j)o Fn(INT)i Fe(<)p Fn(iden)o(t)d Fe(>)q(<)p Fn(list)p 541 1329 V 12 w(lo)q(c)p 598 1329 V 12 w(dim)h Fe(>)p Fn(,)24 1368 y Fe(<)p Fn(list)p 101 1368 V 12 w(form)p 186 1368 V 11 w(param)f Fe(>)234 1407 y Fd(j)o Fn(DOUBLE)j Fe(<)p Fn(iden)o(t)e Fe(><)q Fn(list)p 629 1407 V 11 w(lo)q(c)p 685 1407 V 12 w(dim)g Fe(>)234 1447 y Fd(j)o Fn(DOUBLE)i Fe(<)p Fn(iden)o(t)e Fe(><)q Fn(list)p 629 1447 V 11 w(lo)q(c)p 685 1447 V 12 w(dim)g Fe(>)p Fn(,)24 1486 y Fe(<)p Fn(list)p 101 1486 V 12 w(form)p 186 1486 V 11 w(param)f Fe(>)234 1526 y Fd(j)o Fn(FLO)o(A)m(T)k Fe(<)p Fn(iden)o(t)c Fe(>)q(<)p Fn(list)p 597 1526 V 12 w(lo)q(c)p 654 1526 V 12 w(dim)h Fe(>)234 1565 y Fd(j)o Fn(FLO)o(A)m(T)j Fe(<)p Fn(iden)o(t)c Fe(>)q(<)p Fn(list)p 597 1565 V 12 w(lo)q(c)p 654 1565 V 12 w(dim)h Fe(>)p Fn(,)24 1605 y Fe(<)p Fn(list)p 101 1605 V 12 w(form)p 186 1605 V 11 w(param)f Fe(>)234 1644 y Fd(j)o Fn(CHAR)j Fe(<)q Fn(iden)o(t)d Fe(>)q(<)p Fn(list)p 581 1644 V 12 w(lo)q(c)p 638 1644 V 12 w(dim)g Fe(>)234 1683 y Fd(j)o Fn(CHAR)j Fe(<)q Fn(iden)o(t)d Fe(>)q(<)p Fn(list)p 581 1683 V 12 w(lo)q(c)p 638 1683 V 12 w(dim)g Fe(>)q Fn(,)24 1723 y Fe(<)p Fn(list)p 101 1723 V 12 w(form)p 186 1723 V 11 w(param)g Fe(>)24 1843 y(<)p Fn(list)p 101 1843 V 12 w(lo)q(c)p 158 1843 V 12 w(dim)g Fe(>)q Fn(::=)i([)f(])234 1882 y Fd(j)o Fn([)h Fe(<)p Fn(n)o(um)o(b)q(eri)e Fe(>)p Fn(])234 1922 y Fd(j)o Fe(<)q Fn(list)p 321 1922 V 12 w(lo)q(c)p 378 1922 V 12 w(dim)g Fe(>)q Fn([)h Fe(<)q Fn(n)o(um)o(b)q(eri)e Fe(>)p Fn(])24 2042 y Fe(<)p Fn(list)p 101 2042 V 12 w(lo)q(c)p 158 2042 V 12 w(dekl)h Fe(>)q Fn(::=)i(IDENT)234 2081 y Fd(j)o Fn(IDENT)h(,)e Fe(<)q Fn(list)p 470 2081 V 12 w(lo)q(c)p 527 2081 V 11 w(dekl)g Fe(>)24 2202 y(<)p Fn(dekl)g Fe(>)p Fn(::=)h(INT)g Fe(<)q Fn(list)p 367 2202 V 12 w(lo)q(c)p 424 2202 V 11 w(dekl)p 500 2202 V 12 w(1)f Fe(>)q Fn(;)234 2241 y Fd(j)o Fn(DOUBLE)i Fe(<)p Fn(list)p 484 2241 V 12 w(lo)q(c)p 541 2241 V 12 w(dekl)p 618 2241 V 12 w(1)e Fe(>)p Fn(;)234 2281 y Fd(j)o Fn(FLO)o(A)m(T)j Fe(<)p Fn(list)p 453 2281 V 12 w(lo)q(c)p 510 2281 V 12 w(dekl)p 587 2281 V 11 w(1)e Fe(>)p Fn(;)234 2320 y Fd(j)o Fn(CHAR)h Fe(<)q Fn(list)p 437 2320 V 12 w(lo)q(c)p 494 2320 V 12 w(dekl)p 571 2320 V 11 w(1)e Fe(>)q Fn(;)24 2440 y Fe(<)p Fn(list)p 101 2440 V 12 w(lo)q(c)p 158 2440 V 12 w(dekl)p 235 2440 V 11 w(1)h Fe(>)p Fn(::=)g Fe(<)p Fn(iden)o(t)f Fe(>)234 2480 y Fd(j)o Fe(<)q Fn(iden)o(t)f Fe(>)q Fn(,)h Fe(<)q Fn(list)p 487 2480 V 11 w(lo)q(c)p 543 2480 V 12 w(dekl)p 620 2480 V 12 w(1)g Fe(>)234 2519 y Fd(j)o Fe(<)q Fn(iden)o(t)f Fe(>)q(<)p Fn(list)p 465 2519 V 12 w(dim)g Fe(>)234 2558 y Fd(j)o Fe(<)q Fn(iden)o(t)g Fe(>)q(<)p Fn(list)p 465 2558 V 12 w(dim)g Fe(>)q Fn(,)h Fe(<)q Fn(list)p 672 2558 V 12 w(lo)q(c)p 729 2558 V 12 w(dekl)p 806 2558 V 11 w(1)g Fe(>)24 2679 y(<)p Fn(call)g Fe(>)p Fn(::=)h Fe(<)p Fn(iden)o(t)f Fe(>)p Fn(\()h Fe(<)p Fn(call1)e Fe(>)24 2799 y(<)p Fn(call1)g Fe(>)q Fn(::=)i Fe(<)p Fn(list)p 297 2799 V 12 w(param)e Fe(>)p Fn(\))234 2838 y Fd(j)o Fn(\))1039 -65 y Fe(<)q Fn(list)p 1117 -65 V 12 w(param)g Fe(>)p Fn(::=)i Fe(<)p Fn(expr)f Fe(>)p Fn(\))1249 -25 y Fd(j)p Fe(<)q Fn(expr)f Fe(>)p Fn(,)i Fe(<)p Fn(list)p 1492 -25 V 12 w(param)e Fe(>)1039 105 y(<)q Fn(expr)g Fe(>)q Fn(::=)h Fe(<)q Fn(expr)f Fe(>)q(<)p Fn(op)q(erator)f Fe(>)q(<)p Fn(expr)i Fe(>)1249 145 y Fd(j)p Fe(<)q Fn(l)p 1299 145 V 12 w(v)n(alue)f Fe(>)q Fn(=)i Fe(<)p Fn(expr)f Fe(>)1249 184 y Fd(j\000)h Fe(<)q Fn(expr)e Fe(>)1249 223 y Fd(j)p Fn(+)i Fe(<)q Fn(expr)e Fe(>)1249 263 y Fd(j)p Fn(++)j Fe(<)p Fn(l)p 1365 263 V 13 w(v)n(alue)d Fe(>)1249 302 y Fd(j\000\000)j Fe(<)p Fn(l)p 1365 302 V 13 w(v)n(alue)d Fe(>)1249 342 y Fd(j)p Fn(\()i(INT)g(\))g Fe(<)p Fn(expr)e Fe(>)1249 381 y Fd(j)p Fn(\()i(DOUBLE)g(\))g Fe(<)p Fn(expr)f Fe(>)1249 421 y Fd(j)p Fn(\()h(FLO)o(A)m(T)h(\))e Fe(<)q Fn(expr)f Fe(>)1249 460 y Fd(j)p Fn(\()i(CHAR)h(\))e Fe(<)q Fn(expr)f Fe(>)1249 500 y Fd(j)p Fe(<)q Fn(prim)p 1363 500 V 11 w(expr)g Fe(>)1039 630 y(<)q Fn(prim)p 1143 630 V 11 w(expr)g Fe(>)q Fn(::=)i Fe(<)p Fn(iden)o(ti\014er)d Fe(>)1249 669 y Fd(j)p Fe(<)q Fn(n)o(um)o(b)q(eri)g Fe(>)1249 709 y Fd(j)p Fe(<)q Fn(n)o(um)o(b)q(erd)g Fe(>)1249 748 y Fd(j)p Fe(<)q Fn(stringc)g Fe(>)1249 788 y Fd(j)p Fe(<)q Fn(n)o(um)o(b)q(erc)g Fe(>)1249 827 y Fd(j)p Fn(\()j Fe(<)p Fn(expr)f Fe(>)p Fn(\))1249 867 y Fd(j)p Fe(<)q Fn(call)f Fe(>)1039 997 y(<)q Fn(l)p 1079 997 V 12 w(v)n(alue)g Fe(>)q Fn(::=)i Fe(<)p Fn(iden)o(ti\014er)d Fe(>)1039 1128 y(<)q Fn(iden)o(ti\014er)g Fe(>)p Fn(::=)j Fe(<)q Fn(iden)o(t)e Fe(>)1249 1167 y Fd(j)p Fe(<)q Fn(iden)o(ti\014er)f Fe(>)p Fn([)j Fe(<)p Fn(expr)f Fe(>)p Fn(])1039 1297 y Fe(<)q Fn(op)q(erator)e Fe(>)p Fn(::=)j(an)o(y)f(c)o(haracter)e(from) h(the)h(set:)1039 1337 y Fd(j)18 b Fc(+)f(-)g(/)h(\\\045)f(<)g(>)g(&)g (&&)35 b(==)17 b(<=)g(>=)g(!=)g(*)29 b Fe(<<)12 b(>>)s Fn(^)-5 b(~)s(!)11 b Fd(jj)1039 1467 y Fe(<)q Fn(n)o(um)o(b)q(eri)e Fe(>)p Fn(::=)j Fe(<)q Fn(n)o(um)o(b)q(er)d Fe(>)1249 1507 y Fd(j)p Fn(n)o(um)o(b)q(eri)g Fe(>)q(<)p Fn(n)o(um)o(b)q(er)h Fe(>)1039 1637 y(<)q Fn(n)o(um)o(b)q(erc)f Fe(>)p Fn(::=)j(an)o(y)f (single)f(c)o(haracter)1039 1768 y Fe(<)q Fn(n)o(um)o(b)q(erd)f Fe(>)p Fn(::=)j Fe(<)q Fn(n)o(um)o(b)q(eri)d Fe(>)p Fn(.)16 b Fe(<)p Fn(n)o(um)o(b)q(eri)9 b Fe(>)1249 1807 y Fd(j)p Fn(.)16 b Fe(<)p Fn(n)o(um)o(b)q(eri)9 b Fe(>)1249 1847 y Fd(j)p Fe(<)q Fn(n)o(um)o(b)q(eri)g Fe(>)p Fn(.)1039 1977 y Fe(<)q Fn(n)o(um)o(b)q(er)g Fe(>)q Fn(::=)i(digit)g(from)f(the)h (set:)k(0,1,2,3,4,5,)o(6,7)o(,8,9)1039 2108 y Fe(<)q Fn(stringc)10 b Fe(>)p Fn(::=)i(Sequence)d(one)i(or)g(more)f(c)o (haracters,)f(\014rst)1039 2147 y(c)o(haracter)g(is)j(a)f(letter)f (follo)o(w)o(ed)h(b)o(y)g(letters)f(or)h(digits)1039 2277 y Fe(<)q Fn(iden)o(t)f Fe(>)p Fn(::=)i(Sequence)d(one)i(or)g(more) f(c)o(haracters,)f(\014rst)1039 2317 y(c)o(haracter)g(is)j(a)f(letter)f (follo)o(w)o(ed)h(b)o(y)g(letters)f(or)h(digits)1039 2447 y(The)i(statemen)o(t)d(LO)o(AD\(\014le)p 1441 2447 V 12 w(name\);)i(is)g(only)g(pro)q(cessed)e(b)o(y)i(lexi-)1039 2487 y(cal)f(analyzer)e(-)i(yylex)f(whic)o(h)h(op)q(ens)f(\014le)h Fb(\014le)p 1654 2487 V 13 w(name)i Fn(and)d(redirects)1039 2526 y(input)g(to)i(the)e(input)g(from)h(that)f(\014le.)1105 2662 y Fm(B.)24 b(Syn)o(tax)15 b(of)g(the)g(graphical)f(subsystem)1409 2711 y(language)1039 2799 y Fe(<)q Fn(list)p 1117 2799 V 12 w(stat)p 1189 2799 V 11 w(0)e Fe(>)p Fn(::=)g Fe(<)q Fn(list)p 1392 2799 V 12 w(stat)p 1464 2799 V 11 w(0)g Fe(><)q Fn(stat)p 1620 2799 V 11 w(0)g Fe(>)1249 2838 y Fd(j)p Fn(empt)o(y)p eop %%Page: 6 6 6 5 bop -142 -65 a Fe(<)q Fn(stat)p -52 -65 11 2 v 11 w(0)12 b Fe(>)p Fn(::=)g(FIELDS)f(=)h Fe(<)q Fn(n)o(um)o(b)q(eri)d Fe(>)68 -25 y Fd(j)p Fn(TYPE)k(=)f Fe(<)p Fn(string)f Fe(>)68 14 y Fd(j)p Fn(PRINT)p 194 14 V 13 w(F)o(ORMA)m(T)j(=)e Fe(<)p Fn(string)f Fe(>)68 54 y Fd(j)p Fn(ON)p 133 54 V 14 w(LEA)l(VE)p 265 54 V 13 w(WINDO)o(W)i(=)f Fe(<)q Fn(string)e Fe(>)68 93 y Fd(j)p Fn(DIRECTION)j(=)f Fe(<)q Fn(string)e Fe(>)68 132 y Fd(j)p Fn(ST)m(AR)m(T)p 196 132 V 14 w(TIME)i(=)g Fe(<)q Fn(s)p 397 132 V 12 w(time)f Fe(>)68 172 y Fd(j)p Fn(DURA)m(TION)p 273 172 V 15 w(TIME)h(=)g Fe(<)q Fn(d)p 481 172 V 12 w(time)e Fe(>)68 211 y Fd(j)p Fn(W)p 116 211 V 13 w(RESOLUTION)j(=)f Fe(<)q Fn(n)o(um)o(b)q(eri)d Fe(>)-142 251 y(<)q Fn(n)o(um)o(b)q(eri)g Fe(>)68 290 y Fd(j)p Fn(LO)o(WER)k(\()e Fe(<)p Fn(n)o(um)o(b)q(eri)f Fe(>)p Fn(\))i(=)g Fe(<)p Fn(n)o(um)o(b)q(erd)d Fe(>)68 330 y Fd(j)p Fn(UPPER)j(\()g Fe(<)p Fn(n)o(um)o(b)q(eri)d Fe(>)q Fn(\))i(=)h Fe(<)q Fn(n)o(um)o(b)q(erd)d Fe(>)68 369 y Fd(j)p Fn(STYLE)j(\()g Fe(<)p Fn(n)o(um)o(b)q(eri)e Fe(>)p Fn(\))h(=)i Fe(<)p Fn(n)o(um)o(b)q(eri)c Fe(>)-142 472 y(<)q Fn(d)p -92 472 V 12 w(time)h Fe(>)q Fn(::=)i Fe(<)p Fn(n)o(um)o(b)q(erd)d Fe(>)68 512 y Fd(j)p Fn(A)o(UTOMA)m(TIC) -142 615 y Fe(<)q Fn(s)p -98 615 V 12 w(time)i Fe(>)p Fn(::=)h Fe(<)p Fn(n)o(um)o(b)q(erd)d Fe(>)68 654 y Fd(j)p Fn(A)o(UTOMA)m(TIC)-142 757 y Fe(<)q Fn(n)o(um)o(b)q(eri)g Fe(>)p Fn(::=)j Fe(<)q Fn(n)o(um)o(b)q(er)d Fe(>)68 797 y Fd(j)p Fn(n)o(um)o(b)q(eri)g Fe(>)q(<)p Fn(n)o(um)o(b)q(er)h Fe(>)-142 900 y(<)q Fn(n)o(um)o(b)q(erd)f Fe(>)p Fn(::=)j Fe(<)p Fn(n)o(um)o(b)q(eri)e Fe(>)p Fn(.)16 b Fe(<)p Fn(n)o(um)o(b)q(eri)9 b Fe(>)68 940 y Fd(j)p Fn(.)16 b Fe(<)p Fn(n)o(um)o(b)q(eri)9 b Fe(>)68 979 y Fd(j)p Fe(<)q Fn(n)o(um)o(b)q(eri)g Fe(>)p Fn(.)-142 1082 y Fe(<)q Fn(n)o(um)o(b)q(er)g Fe(>)q Fn(::=)i(digit)g(from)f(the)h(set:)k (0,1,2,3,4,5)o(,6,7)o(,8,9)-54 1195 y Fm(C.)24 b(Instruction)13 b(set)i(of)h(the)e Fk(Clif)h Fm(virtual)233 1245 y(mac)o(hine)-142 1329 y Fn(Notation:)-142 1368 y Fe(AD)q(R)p Fn(-)d(address)e(of)h(the)g (memory)e(cell)-142 1408 y Fe(AD)q(R)p -57 1408 V 13 w(S)r(T)c(AC)r(K)r Fn(-)12 b(the)f(address)f(stac)o(k)g(register)-142 1447 y Fe(AS)r(T)5 b Fn(-)12 b(the)f(arithmetic)d(stac)o(k)j(register) -142 1487 y Fe(B)r(P)5 b Fn(-)11 b(the)g(base)g(p)q(oin)o(ter,)e(it)i (is)h(used)e(in)i(relativ)o(e)d(address)h(mo)q(de)-142 1526 y Fe(T)5 b(M)t(P)g Fn(-)10 b(the)g(temp)q(orary)e(stac)o(k)i (register,)f(it)i(is)g(used)f(in)g(addressing)-142 1565 y(of)h(temp)q(orary)e(v)n(ariables)-142 1605 y Fe(T)c(M)t(P)g(H)s Fn(-)k(the)h(temp)q(orary)e(stac)o(k)h(register,)g(it)h(is)g(used)g(in) g(resetting)-142 1644 y(of)h(the)g(temp)q(orary)e(stac)o(k)-142 1684 y Fe(N)t(U)t(M)t Fn(-)h(o\013set)g(in)i(address)e(or)h(v)n(alue) -142 1723 y Fe(S)r(T)5 b(RI)s(N)t(G)p Fn(-)11 b(a)h(string)-142 1763 y Fe(S)r(T)5 b(AC)r(K)r Fn(-)13 b(the)d(stac)o(k)h(register)-142 1802 y Fe(F)5 b(RAM)t(E)r Fn(-)15 b(the)g(stac)o(k)f(register)f(used)h (in)h(parameter)e(passing)g(to)-142 1841 y(the)e(in)o(trinsic)e (functions)-142 1881 y([)p Fe(x)p Fn(]-)i(a)h(v)n(alue)e(to)h(whic)o(h) g(x)g(p)q(oin)o(ts)f(to)-142 1920 y Fe(<)q(integ)q(er)j(>)q Fn(-)e(an)g(in)o(teger)f(n)o(um)o(b)q(er)-142 1960 y Fe(<)q(double)i(>)q Fn(-)f(a)h(double)e(precision)f(\015oating)g(p)q (oin)o(t)h(n)o(um)o(b)q(er)-142 1999 y Fe(<)q(f)t(loat)h(>)p Fn(-)h(a)f(single)f(precision)f(\015oating)h(p)q(oin)o(t)g(n)o(um)o(b)q (er)-142 2039 y Fe(<)q(char)j(>)p Fn(-)f(a)f(b)o(yte)-142 2159 y(Instructions)d(ha)o(v)o(e)i(a)h(v)n(ariable)e(length.)k(The)e (structure)e(of)h(the)g(in-)-142 2198 y(structions)g(is)j(the)e(follo)o (wing:)16 b(ma)r(jor,)11 b(minor,)f(immediately)m(.)15 b(Im-)-142 2238 y(mediately)d(can)h(b)q(e)h(either)f(address)g(or)h(v)n (alue.)22 b(In)14 b(the)f(follo)o(wing)-142 2277 y(table)d(is)i(the)f (summary)e(of)i(instruction)e(t)o(yp)q(es.)p 60 2353 517 2 v 59 2393 2 40 v 122 2381 a(t)o(yp)q(e)p 251 2393 V 86 w(parameters)p 472 2393 V 46 w(size)p 576 2393 V 60 2394 517 2 v 60 2404 V 59 2444 2 40 v 85 2432 a(OP)p 138 2432 11 2 v 14 w(0)p 170 2432 V 12 w(ma)p 251 2444 2 40 v 89 w(ma)r(jor)p 472 2444 V 106 w(1)p 576 2444 V 60 2446 517 2 v 59 2485 2 40 v 89 2473 a(OP)p 142 2473 11 2 v 13 w(0)p 173 2473 V 13 w(mi)p 251 2485 2 40 v 93 w(ma)r(jor)p 472 2485 V 106 w(2)p 576 2485 V 59 2524 V 251 2524 V 317 2513 a(minor)p 472 2524 V 576 2524 V 60 2526 517 2 v 59 2565 2 40 v 85 2554 a(OP)p 138 2554 11 2 v 14 w(1)p 170 2554 V 12 w(ma)p 251 2565 2 40 v 89 w(ma)r(jor)p 472 2565 V 106 w(2)p 576 2565 V 59 2605 V 251 2605 V 305 2593 a(address)p 472 2605 V 576 2605 V 60 2607 517 2 v 59 2646 2 40 v 89 2634 a(OP)p 142 2634 11 2 v 13 w(1)p 173 2634 V 13 w(mi)p 251 2646 2 40 v 93 w(ma)r(jor)p 472 2646 V 106 w(3)p 576 2646 V 59 2685 V 251 2685 V 317 2674 a(minor)p 472 2685 V 576 2685 V 59 2725 V 251 2725 V 305 2713 a(address)p 472 2725 V 576 2725 V 60 2727 517 2 v 59 2766 2 40 v 104 2754 a(OP)p 157 2754 11 2 v 13 w(1)p 188 2754 V 12 w(i)p 251 2766 2 40 v 109 w(ma)r(jor)p 472 2766 V 106 w(3)p 576 2766 V 59 2805 V 251 2805 V 317 2794 a(minor)p 472 2805 V 576 2805 V 59 2845 V 251 2845 V 322 2833 a(v)n(alue)p 472 2845 V 576 2845 V 60 2847 517 2 v 874 -65 a Fa(C.1.)22 b(Address)c(instructions)i(and)f(instructions)h(on)g(the)874 -25 y(arithmetic)12 b(stac)o(k)874 28 y Fn(Instruction)d Fa(MO)o(V)p Fn(.)874 68 y(Description:)i(mo)o(v)o(e)c(data)g(from)g (the)g(sp)q(eci\014ed)f(address)h(to)h(another)874 107 y(sp)q(eci\014ed)h(address.)874 147 y(Options:)874 186 y([)p Fe(AD)q(R)p Fn(])h Fd( )-6 b(\000)10 b Fn([[)p Fe(AS)r(T)5 b Fn(]])82 b(t)o(yp)q(e)10 b(OP)p 1382 186 11 2 v 13 w(1)p 1413 186 V 13 w(mi)874 226 y([)p Fe(B)r(P)i Fn(+)c Fe(N)t(U)t(M)t Fn(])g Fd( )-6 b(\000)11 b Fn([[)p Fe(AS)r(T)5 b Fn(]])82 b(t)o(yp)q(e)10 b(OP)p 1494 226 V 13 w(1)p 1525 226 V 13 w(i)874 265 y([[)p Fe(B)r(P)i Fn(+)c Fe(N)t(U)t(M)t Fn(]])g Fd( )-6 b(\000)11 b Fn([[)p Fe(AS)r(T)5 b Fn(]])81 b(t)o(yp)q(e)11 b(OP)p 1514 265 V 13 w(1)p 1545 265 V 12 w(i)874 304 y([)p Fe(AD)q(R)d Fn(+)g([[)p Fe(AS)r(T)13 b Fd(\000)8 b Fn(1]]])h Fd( )-6 b(\000)10 b Fn([[)p Fe(AS)r(T)5 b Fn(]])82 b(t)o(yp)q(e)11 b(OP)p 1601 304 V 13 w(1)p 1632 304 V 12 w(mi)874 344 y([)p Fe(B)r(P)h Fn(+)c Fe(N)t(U)t(M)j Fn(+)d([[)p Fe(AS)r(T)13 b Fd(\000)8 b Fn(1]]])h Fd( )-6 b(\000)10 b Fn([[)p Fe(AS)r(T)5 b Fn(]])82 b(t)o(yp)q(e)10 b(OP)p 1712 344 V 14 w(1)p 1744 344 V 12 w(i)874 383 y([[)p Fe(B)r(P)i Fn(+)c Fe(N)t(U)t(M)i Fn(+)f([[)p Fe(AS)r(T)j Fd(\000)d Fn(1]]]])f Fd( )-6 b(\000)11 b Fn([[)p Fe(AS)r(T)5 b Fn(]])82 b(t)o(yp)q(e)10 b(OP)p 1732 383 V 13 w(1)p 1763 383 V 13 w(i)874 423 y(The)k(instructions)d(are)i(sp)q(eci\014c)f(for)h(eac)o(h)f(data)h(t)o (yp)q(e.)21 b(W)m(e)14 b(mean)874 462 y(that)8 b(the)h(eac)o(h)f (instruction)e(option)i(represen)o(ts)f(a)i(class)f(of)h(instruc-)874 502 y(tions.)25 b(The)15 b(instructions)d(in)i(eac)o(h)g(class)g (di\013er)g(b)o(y)h(minor.)24 b(F)m(or)874 541 y(example)10 b(the)h(v)o(ery)g(\014rst)h(option)e(is)i(sp)q(eci\014c)e(for)i(t)o(yp) q(e)f(of)h(op)q(erand)874 581 y(double,)e(\015oat,)g(in)o(teger,)f(c)o (har.)874 620 y Fe(B)r(P)14 b Fd( )-6 b(\000)11 b Fe(S)r(T)5 b(AC)r(K)85 b Fn(t)o(yp)q(e)10 b(OP)p 1355 620 V 14 w(0)p 1387 620 V 12 w(mi)874 659 y Fe(S)r(T)5 b(AC)r(K)13 b Fd( )-6 b(\000)10 b Fe(B)r(P)87 b Fn(t)o(yp)q(e)10 b(OP)p 1355 659 V 14 w(0)p 1387 659 V 12 w(mi)874 699 y Fe(T)5 b(M)t(P)g(H)11 b Fd( )-6 b(\000)11 b Fe(T)5 b(M)t(P)87 b Fn(t)o(yp)q(e)10 b(OP)p 1377 699 V 13 w(0)p 1408 699 V 12 w(mi)874 738 y Fe(F)5 b(RAM)t(E)11 b Fd( )-6 b(\000)11 b Fe(S)r(T)5 b(AC)r(K)85 b Fn(t)o(yp)q(e)11 b(OP)p 1446 738 V 13 w(0)p 1477 738 V 12 w(mi)874 817 y(Instruction)e Fa(PUSHA)874 857 y Fn(Description:)k(PUSH)f(in)f(to)g(the)g(arithmetic) d(stac)o(k.)874 896 y(Options:)874 935 y([)p Fe(AS)r(T)d Fn(])10 b Fd( )-6 b(\000)10 b Fn([)p Fe(AD)q(R)p Fn(])82 b(t)o(yp)q(e)11 b(OP)p 1363 935 V 13 w(1)p 1394 935 V 12 w(mi)874 975 y([)p Fe(AS)r(T)5 b Fn(])10 b Fd( )-6 b(\000)10 b Fn([)p Fe(B)r(P)i Fn(+)d Fe(N)t(U)t(M)t Fn(])80 b(t)o(yp)q(e)11 b(OP)p 1475 975 V 13 w(1)p 1506 975 V 12 w(i)874 1014 y([)p Fe(AS)r(T)5 b Fn(])10 b Fd( )-6 b(\000)10 b Fn([[)p Fe(B)r(P)i Fn(+)d Fe(N)t(U)t(M)t Fn(]])80 b(t)o(yp)q(e)10 b(OP)p 1494 1014 V 13 w(1)p 1525 1014 V 13 w(i)874 1054 y([)p Fe(AS)r(T)5 b Fn(])10 b Fd( )-6 b(\000)10 b Fn([[)p Fe(AD)q(R)e Fn(+)g([[)p Fe(AS)r(T)13 b Fd(\000)8 b Fn(1]]]])81 b(t)o(yp)q(e)11 b(OP)p 1601 1054 V 13 w(1)p 1632 1054 V 12 w(i)874 1093 y([)p Fe(AS)r(T)5 b Fn(])10 b Fd( )-6 b(\000)10 b Fn([)p Fe(B)r(P)i Fn(+)d Fe(N)t(U)t(M)h Fn(+)e([[)p Fe(AS)r(T)13 b Fd(\000)8 b Fn(1]]])82 b(t)o(yp)q(e)10 b(OP)p 1693 1093 V 13 w(1)p 1724 1093 V 12 w(i)874 1133 y([)p Fe(AS)r(T)5 b Fn(])10 b Fd( )-6 b(\000)10 b Fn([[)p Fe(B)r(P)i Fn(+)d Fe(N)t(U)t(M)h Fn(+)e([[)p Fe(AS)r(T)13 b Fd(\000)8 b Fn(1]]]])81 b(t)o(yp)q(e)10 b(OP)p 1712 1133 V 14 w(1)p 1744 1133 V 12 w(i)874 1172 y(The)i(instruction)o(s)d(are)i(sp)q (eci\014c)f(for)h(eac)o(h)f(data)g(t)o(yp)q(e.)874 1251 y(Instruction)f Fa(PUSHAI)p Fn(.)874 1290 y(Description:)k(push)d(on)o (to)h(the)f(arithmetic)f(stac)o(k)h(immediately)874 1330 y(Options:)874 1369 y([[)p Fe(AS)r(T)5 b Fn(]])k Fd( )-6 b(\000)11 b Fe(N)t(U)t(M)85 b Fn(t)o(yp)q(e)10 b(OP)p 1376 1369 V 13 w(1)p 1407 1369 V 12 w(i)874 1409 y(The)i(instruction)c (is)k(sp)q(eci\014c)d(for)i(eac)o(h)g(data)f(t)o(yp)q(e.)874 1448 y([[)p Fe(AS)r(T)5 b Fn(]])k Fd( )-6 b(\000)11 b Fe(S)r(T)5 b(RI)s(N)t(G)82 b Fn(t)o(yp)q(e)10 b(OP)p 1432 1448 V 13 w(1)p 1463 1448 V 13 w(mi)874 1527 y(Instruction)f Fa(POP)m(A)p Fn(.)874 1566 y(Description:)k(POP)f(from)e(the)h (arithmetic)e(stac)o(k.)874 1606 y(Options:)874 1645 y(The)j(arithmetic)c(stac)o(k)i(is)i(cleared.)84 b(t)o(yp)q(e)10 b(OP)p 1579 1645 V 13 w(1)p 1610 1645 V 13 w(mi)955 1782 y Fa(C.1.1)22 b(Arithmetic-logical)16 b(instructions:)110 b Fn(Ad-)874 1821 y(dress)7 b(of)g(the)h(result)e(is)i(placed)e(on)h (the)g(top)g(of)h(the)f(arithmetic)e(stac)o(k.)874 1861 y(Ev)n(aluation)10 b(is)j(placed)d(in)o(to)i(the)g(temp)q(orary)e(stac) o(k.)17 b(Arithmetic-)874 1900 y(logical)8 b(instructions)f(are)i(sp)q (eci\014c)f(for)h(eac)o(h)f(data)h(t)o(yp)q(e,)g(if)g(it)h(is)f(not)874 1939 y(stated)h(otherwise)g(in)h(description)e(of)i(an)g(instruction.) 874 1979 y(Instruction)e Fa(ADD)p Fn(.)874 2018 y(Description:)k(p)q (erform)c(arithmetic)g(addition.)874 2058 y(Options:)874 2097 y([[)p Fe(AS)r(T)k Fd(\000)8 b Fn(1]])h Fd( )-6 b(\000)11 b Fn([[)p Fe(AS)r(T)5 b Fn(]])i(+)h([[)p Fe(AS)r(T)13 b Fd(\000)8 b Fn(1]])82 b(t)o(yp)q(e)10 b(OP)p 1673 2097 V 13 w(0)p 1704 2097 V 13 w(mi)874 2176 y(Instruction)f Fa(SUB)p Fn(.)874 2216 y(Description:)20 b(p)q(erform)13 b(arithmetic)f(subtraction)g(on)i(the)h(top)f(of)874 2255 y(arithmetic)8 b(stac)o(k)i(or)h(from)f(stac)o(k)g(p)q(oin)o(ter.) k(On)d(the)g(stac)o(k)f(can)g(b)q(e)874 2294 y(only)i(pro)q(cessed)f (an)h(instruction)e(men)o(tioned)h(b)q(elo)o(w)h(\(from)g(stac)o(k)874 2334 y(p)q(oin)o(ter)e(can)g(b)q(e)h(only)g(subtracted)d(an)j(in)o (teger)f(n)o(um)o(b)q(er\).)874 2373 y(Options:)874 2413 y([[)p Fe(AS)r(T)j Fd(\000)8 b Fn(1]])h Fd( )-6 b(\000)11 b Fn([[)p Fe(AS)r(T)h Fd(\000)d Fn(1]])e Fd(\000)h Fn([[)p Fe(AS)r(T)d Fn(]])82 b(t)o(yp)q(e)10 b(OP)p 1673 2413 V 13 w(0)p 1704 2413 V 13 w(mi)874 2452 y Fe(S)r(T)5 b(AC)r(K)13 b Fd( )-6 b(\000)10 b Fn(\()p Fe(S)r(T)5 b(AC)r(K)11 b Fd(\000)d Fe(N)t(U)t(M)t Fn(\))80 b(t)o(yp)q(e)11 b(OP)p 1602 2452 V 13 w(1)p 1633 2452 V 12 w(i)874 2531 y(Instruction)e Fa(MUL)m(T)p Fn(.)874 2570 y(Description:)k(p)q(erform) c(arithmetic)g(m)o(ultiplica)o(tion)o(.)874 2610 y(Options:)874 2649 y([[)p Fe(AS)r(T)k Fd(\000)8 b Fn(1]])h Fd( )-6 b(\000)11 b Fn([[)p Fe(AS)r(T)5 b Fn(]])i Fd(\003)g Fn([[)p Fe(AS)r(T)13 b Fd(\000)8 b Fn(1]])82 b(t)o(yp)q(e)10 b(OP)p 1663 2649 V 13 w(0)p 1694 2649 V 13 w(mi)874 2728 y(Instruction)f Fa(MOD)p Fn(.)874 2768 y(Description:)16 b(p)q(erform)c(arithmetic)e(mo)q(dulo)h(op)q(eration)g(on)i(in)o(te-) 874 2807 y(gers.)874 2847 y(Options:)p eop %%Page: 7 7 7 6 bop 24 -65 a Fn([[)p Fe(AS)r(T)12 b Fd(\000)d Fn(1]])g Fd( )-6 b(\000)10 b Fn([[)p Fe(AS)r(T)j Fd(\000)8 b Fn(1]]\045[[)p Fe(AS)r(T)d Fn(]])82 b(t)o(yp)q(e)10 b(OP)p 809 -65 11 2 v 13 w(0)p 840 -65 V 12 w(ma)24 14 y(Instruction)e Fa(DIV)p Fn(.)24 54 y(Description:)k(p)q(erform)e(arithmetic)e (division.)24 93 y(Options:)24 132 y([[)p Fe(AS)r(T)k Fd(\000)d Fn(1]])g Fd( )-6 b(\000)10 b Fn([[)p Fe(AS)r(T)j Fd(\000)8 b Fn(1]])p Fe(=)p Fn([[)p Fe(AS)r(T)d Fn(]])81 b(t)o(yp)q(e)10 b(OP)p 797 132 V 13 w(0)p 828 132 V 13 w(mi)24 211 y(Instruction)e Fa(OR)p Fn(.)24 251 y(Description:)k(p)q (erform)e(logical)f(inclusiv)o(e)h(OR.)24 290 y(Options:)24 330 y([[)p Fe(AS)r(T)h Fd(\000)c Fn(1]])i Fd( )-6 b(\000)11 b Fn([[)p Fe(AS)r(T)h Fd(\000)7 b Fn(1]])34 b Fd(jj)h Fn([[)p Fe(AS)r(T)5 b Fn(]])81 b(t)o(yp)q(e)10 b(OP)p 864 330 V 13 w(0)p 895 330 V 13 w(mi)24 408 y(Instruction)e Fa(AND)p Fn(.)24 448 y(Description:)k(p)q(erform)e(logical)f(AND.)24 487 y(Options:)24 527 y([[)p Fe(AS)r(T)j Fd(\000)d Fn(1]])g Fd( )-6 b(\000)10 b Fn([[)p Fe(AS)r(T)j Fd(\000)8 b Fn(1]]&&[[)p Fe(AS)r(T)d Fn(]])82 b(t)o(yp)q(e)10 b(OP)p 834 527 V 14 w(0)p 866 527 V 12 w(mi)24 606 y(Instruction)e Fa(ORB)p Fn(.)24 645 y(Description:)k(p)q(erform)e(bit)o(wise)g(OR)j(of)e(in)o (tegers.)24 685 y(Options:)24 724 y([[)p Fe(AS)r(T)h Fd(\000)7 b Fn(1]])i Fd( )-6 b(\000)11 b Fn([[)p Fe(AS)r(T)h Fd(\000)7 b Fn(1]])35 b Fd(j)g Fn([[)p Fe(AS)r(T)5 b Fn(]])81 b(t)o(yp)q(e)10 b(OP)p 856 724 V 13 w(0)p 887 724 V 13 w(ma)24 803 y(Instruction)e Fa(ANDB)p Fn(.)24 842 y(Description:)k(p)q(erform)e(bit)o(wise)g(AND)j(of)e(in)o(tegers.) 24 882 y(Options:)24 921 y([[)p Fe(AS)r(T)h Fd(\000)d Fn(1]])g Fd( )-6 b(\000)10 b Fn([[)p Fe(AS)r(T)j Fd(\000)8 b Fn(1]]&[[)p Fe(AS)r(T)d Fn(]])82 b(t)o(yp)q(e)10 b(OP)p 807 921 V 13 w(0)p 838 921 V 12 w(ma)24 1000 y(Instruction)e Fa(EQ)p Fn(.)24 1039 y(Description:)k(p)q(erform)e(logical)f(test)i (for)g(equalit)o(y)m(.)24 1079 y(Options:)24 1118 y([[)p Fe(AS)r(T)h Fd(\000)d Fn(1]])g Fd( )-6 b(\000)10 b Fn([[)p Fe(AS)r(T)j Fd(\000)8 b Fn(1]])h(==)i([[)p Fe(AS)r(T)5 b Fn(]])82 b(t)o(yp)q(e)10 b(OP)p 854 1118 V 13 w(0)p 885 1118 V 12 w(mi)24 1197 y(Instruction)e Fa(GR)p Fn(.)24 1237 y(Description:)k(p)q(erform)e(logical)f(test)i(for)g(greater)f (than.)24 1276 y(Options:)24 1315 y([[)p Fe(AS)r(T)i Fd(\000)d Fn(1]])g Fd( )-6 b(\000)10 b Fn([[)p Fe(AS)r(T)j Fd(\000)8 b Fn(1]])h Fe(>)h Fn([[)p Fe(AS)r(T)5 b Fn(]])82 b(t)o(yp)q(e)11 b(OP)p 827 1315 V 13 w(0)p 858 1315 V 12 w(mi)24 1394 y(Instruction)d Fa(LO)p Fn(.)24 1434 y(Description:)k(p)q(erform)e(logical)f(test)i(for)g(lo)o(w)o(er)g (than.)24 1473 y(Options:)24 1513 y([[)p Fe(AS)r(T)h Fd(\000)d Fn(1]])g Fd( )-6 b(\000)10 b Fn([[)p Fe(AS)r(T)j Fd(\000)8 b Fn(1]])h Fe(<)h Fn([[)p Fe(AS)r(T)5 b Fn(]])82 b(t)o(yp)q(e)11 b(OP)p 827 1513 V 13 w(0)p 858 1513 V 12 w(mi)24 1592 y(Instruction)d Fa(LE)p Fn(.)24 1631 y(Description:)k(p)q(erform)e(logical)f(test)i(for)g(lo)o(w)o(er)g(or)g (equal.)24 1670 y(Options:)24 1710 y([[)p Fe(AS)r(T)h Fd(\000)d Fn(1]])g Fd( )-6 b(\000)10 b Fn([[)p Fe(AS)r(T)j Fd(\000)8 b Fn(1]])h Fe(<)p Fn(=)i([[)p Fe(AS)r(T)5 b Fn(]])82 b(t)o(yp)q(e)10 b(OP)p 854 1710 V 13 w(0)p 885 1710 V 12 w(mi)24 1789 y(Instruction)e Fa(GE)p Fn(.)24 1828 y(Description:)k(p)q(erform)e(logical)f(test)i(for)g(greater)f(or) h(equal.)24 1868 y(Options:)24 1907 y([[)p Fe(AS)r(T)h Fd(\000)d Fn(1]])g Fd( )-6 b(\000)10 b Fn([[)p Fe(AS)r(T)j Fd(\000)8 b Fn(1]])h Fe(>)p Fn(=)i([[)p Fe(AS)r(T)5 b Fn(]])82 b(t)o(yp)q(e)10 b(OP)p 854 1907 V 13 w(0)p 885 1907 V 12 w(mi)24 1986 y(Instruction)e Fa(NE)p Fn(.)24 2025 y(Description:)k(p)q(erform)e(logical)f(test)i(for)g(non)g(equal.) 24 2065 y(Options:)24 2104 y([[)p Fe(AS)r(T)h Fd(\000)d Fn(1]])g Fd( )-6 b(\000)10 b Fn([[)p Fe(AS)r(T)j Fd(\000)8 b Fn(1]]!)h(=)h([[)p Fe(AS)r(T)5 b Fn(]])82 b(t)o(yp)q(e)10 b(OP)p 836 2104 V 14 w(0)p 868 2104 V 12 w(mi)24 2183 y(Instruction)e Fa(NEG)p Fn(.)24 2223 y(Description:)k(p)q(erform)e (logical)f(negation.)24 2262 y(Options:)24 2301 y([[)p Fe(AS)r(T)c Fn(]])k Fd( )-6 b(\000)q Fn(!)35 b([[)p Fe(AS)r(T)5 b Fn(]])81 b(t)o(yp)q(e)11 b(OP)p 579 2301 V 13 w(0)p 610 2301 V 12 w(mi)24 2380 y(Instruction)d Fa(NOT)p Fn(.)24 2420 y(Description:)22 b(p)q(erform)14 b(one's)h(complemen)o(t)e(op)q (eration)g(of)j(in)o(te-)24 2459 y(gers.)24 2499 y(Options:)24 2538 y([[)p Fe(AS)r(T)5 b Fn(]])k Fd( )-6 b(\000)r Fn(~)26 b([[)p Fe(AS)r(T)5 b Fn(]])81 b(OP)p 499 2538 V 14 w(0)p 531 2538 V 12 w(ma)24 2617 y(Instruction)8 b Fa(SAL)p Fn(.)24 2656 y(Description:)k(p)q(erform)e(arithmetic)e(left)j(shift)g (of)g(in)o(tegers.)24 2696 y(Options:)24 2735 y([[)p Fe(AS)r(T)h Fd(\000)d Fn(1]])g Fd( )-6 b(\000)10 b Fn([[)p Fe(AS)r(T)j Fd(\000)8 b Fn(1]])h Fe(<<)i Fn([[)p Fe(AS)r(T)5 b Fn(]])82 b(OP)p 775 2735 V 13 w(0)p 806 2735 V 12 w(ma)24 2814 y(Instruction)8 b Fa(SAR)p Fn(.)1039 -65 y(Description:)13 b(p)q(erform)c(arithmetic)g(righ)o(t)h(shift)h(of)g(in)o(tegers.)1039 -25 y(Options:)1039 14 y([[)p Fe(AS)r(T)i Fd(\000)8 b Fn(1]])h Fd( )-6 b(\000)11 b Fn([[)p Fe(AS)r(T)i Fd(\000)8 b Fn(1]])h Fe(>>)i Fn([[)p Fe(AS)r(T)5 b Fn(]])81 b(OP)p 1790 14 V 14 w(0)p 1822 14 V 12 w(ma)1039 93 y(Instruction)9 b Fa(X)o(OR)p Fn(.)1039 132 y(Description:)k(p)q(erform)c(logical)h (exclusiv)o(e)f(OR)j(of)g(t)o(w)o(o)f(in)o(tegers.)1039 172 y(Options:)1039 211 y([[)p Fe(AS)r(T)i Fd(\000)8 b Fn(1]])h Fd( )-6 b(\000)11 b Fn([[)p Fe(AS)r(T)i Fd(\000)8 b Fn(1]])26 b(^)g([[)p Fe(AS)r(T)5 b Fn(]])81 b(OP)p 1786 211 V 14 w(0)p 1818 211 V 12 w(ma)1121 366 y Fa(C.1.2)22 b(In)o(teger)9 b(and)g(\015oating)h(p)q(oin)o(t)g(instructions:)1039 406 y Fn(Instruction)f Fa(CVT)p Fn(.)1039 445 y(Description:)k(Con)o(v) o(ert)d(a)h(signed)f(quan)o(tit)o(y)f(to)i(a)g(di\013eren)o(t)e(signed) 1039 485 y(data)i(t)o(yp)q(e.)1039 524 y(Options:)1039 564 y Fe(<)q(integ)q(er)i(>)q Fd(\000)-6 b(!)12 b Fe(<)q(double)h(>) 1039 603 y(<)q(double)g(>)p Fd(\000)-5 b(!)12 b Fe()1039 642 y(<)q(integ)q(er)f(>)q Fd(\000)-6 b(!)12 b Fe(<)q(f)t(loat)f(>)1039 682 y(<)q(f)t(loat)g(>)p Fd(\000)-5 b(!)12 b Fe()1039 721 y(<)q(f)t(loat)d(>)p Fd(\000)-5 b(!)12 b Fe()1039 761 y(<)q(double)g(>)p Fd(\000)-5 b(!)12 b Fe()1039 800 y(<)q(char)i(>)p Fd(\000)-5 b(!)12 b Fe()1039 840 y(<)q(integ)q(er)f(>)q Fd(\000)-6 b(!)12 b Fe(<)q(char)h(>)1039 879 y(<)q(double)g(>)p Fd(\000)-5 b(!)12 b Fe()1039 919 y(<)q(char)g(>)p Fd(\000)-5 b(!)12 b Fe()1039 958 y(<)q(char)g(>)p Fd(\000)-5 b(!)12 b Fe()1039 997 y(<)q(f)t(loat)g(>)p Fd(\000)-5 b(!)12 b Fe()1039 1037 y(<)q(v)q(oid)f(>)q Fd(\000)-6 b(!)12 b Fe(<)q(integ)q(er)h(>)1039 1076 y(<)q(v)q(oid)f(>)q Fd(\000)-6 b(!)12 b Fe(<)q(double)g(>)1039 1116 y(<)q(v)q(oid)g(>)q Fd(\000)-6 b(!)12 b Fe(<)q(f)t(loat)f(>)1039 1155 y(<)q(v)q(oid)h(>)q Fd(\000)-6 b(!)12 b Fe(<)q(char)h(>)1039 1195 y Fn(The)c(con)o(v)o(ersion)c(to)j(the)f(wider)h(t)o(yp)q(e)f (\(more)f(bits\))h(can)h(b)q(e)f(executed)1039 1234 y(either)13 b(on)h(the)f(top)h(of)g(the)f(arithmetical)e(stac)o(k)i(or)h(one)f(op)q (erand)1039 1273 y(under)e(the)g(top)g(of)h(the)f(arithmetical)e(stac)o (k.)16 b(Ab)q(o)o(v)o(e)11 b(instructions)1039 1313 y(are)g(of)g(the)g (t)o(yp)q(e)g(OP)p 1332 1313 V 13 w(0)p 1363 1313 V 12 w(mi.)1039 1429 y Fa(C.2.)22 b(Stac)o(k)13 b(instructions)1039 1482 y Fn(Instruction)c Fa(PUSH)p Fn(.)1039 1522 y(Description:)k(Push) e(v)n(alue)f(on)o(to)g(the)h(stac)o(k.)1039 1561 y(Options:)1039 1601 y([)p Fe(S)r(T)5 b(AC)r(K)r Fn(])11 b Fd( )-6 b(\000)10 b Fe(B)r(P)87 b Fn(t)o(yp)q(e)10 b(OP)p 1540 1601 V 14 w(0)p 1572 1601 V 12 w(mi)1039 1679 y([)p Fe(S)r(T)5 b(AC)r(K)r Fn(])11 b Fd( )-6 b(\000)10 b Fe(T)5 b(M)t(P)g(H)84 b Fn(t)o(yp)q(e)11 b(OP)p 1607 1679 V 13 w(0)p 1638 1679 V 12 w(mi)1039 1758 y(Instruction)e Fa(POP)p Fn(.)1039 1798 y(Description:)k(P)o(op)e(v)n(alue)f(from)h(the)f(top)h(of)g(the)g (stac)o(k.)1039 1837 y(Options:)1039 1877 y Fe(B)r(P)k Fd( )-6 b(\000)10 b Fn([)p Fe(S)r(T)5 b(AC)r(K)r Fn(])83 b(t)o(yp)q(e)10 b(OP)p 1540 1877 V 14 w(0)p 1572 1877 V 12 w(mi)1039 1956 y Fe(T)5 b(M)t(P)g(H)12 b Fd( )-6 b(\000)11 b Fn([)p Fe(S)r(T)5 b(AC)r(K)r Fn(])82 b(t)o(yp)q(e)11 b(OP)p 1607 1956 V 13 w(0)p 1638 1956 V 12 w(mi)1039 2111 y Fa(C.3.)22 b(Address)12 b(stac)o(k)i(instruction)1039 2164 y Fn(Instruction)9 b Fa(PUSHAD)p Fn(.)1039 2204 y(Description:)k(PUSH)f(address)e(in)o(to)h(the)f(address)g(stac)o(k.) 1039 2243 y(Options:)1039 2283 y([)p Fe(AD)q(R)p 1134 2283 V 13 w(S)r(T)5 b(AC)r(K)r Fn(])10 b Fd( )-6 b(\000)11 b Fn([)p Fe(AS)r(T)5 b Fn(])82 b(t)o(yp)q(e)11 b(OP)p 1676 2283 V 13 w(0)p 1707 2283 V 12 w(ma)1039 2362 y(Instruction)e Fa(POP)m(AD)p Fn(.)1039 2401 y(Description:)k(POP)f(address)e(from)g (the)h(address)f(stac)o(k.)1039 2440 y(Options:)1039 2480 y([)p Fe(S)r(T)5 b(AC)r(K)r Fn(])11 b Fd( )-6 b(\000)10 b Fn([)p Fe(AD)q(R)p 1365 2480 V 13 w(S)r(T)5 b(AC)r(K)r Fn(])83 b(t)o(yp)q(e)10 b(OP)p 1735 2480 V 13 w(0)p 1766 2480 V 13 w(ma)1039 2635 y Fa(C.4.)22 b(T)m(emp)q(orary)12 b(stac)o(k)i(instructions)1039 2689 y Fn(Instruction)9 b Fa(CLR)m(T)p Fn(.)1039 2728 y(Description:)k(Clear)e(temp)q(orary)e (stac)o(k.)1039 2768 y(Options:)1039 2807 y Fe(T)c(M)t(P)14 b Fd( )-6 b(\000)11 b Fe(T)5 b(M)t(P)g(H)84 b Fn(t)o(yp)q(e)10 b(OP)p 1542 2807 V 14 w(0)p 1574 2807 V 12 w(ma)p eop %%Page: 8 8 8 7 bop -142 -65 a Fa(C.5.)22 b(Input)12 b(and)h(output)f(instructions) -142 -11 y Fn(Instruction)d Fa(IN)p Fn(.)-142 28 y(Description:)16 b(input)c(of)g(the)g(v)n(alue)g(in)o(to)g(address;)g(the)g(address)g (is)-142 68 y(sp)q(eci\014ed)e(absolutely)e(or)k(relativ)o(ely)m(.)-142 107 y(Options:)-142 147 y Fe(I)s(N)t Fn([)p Fe(AD)q(R)p Fn(])82 b(t)o(yp)q(e)10 b(OP)p 225 147 11 2 v 13 w(1)p 256 147 V 13 w(mi)-142 186 y Fe(I)s(N)t Fn([)p Fe(B)r(P)i Fn(+)c Fe(N)t(U)t(M)t Fn(])81 b(t)o(yp)q(e)10 b(OP)p 337 186 V 13 w(1)p 368 186 V 13 w(i)-142 226 y Fe(I)s(N)t Fn([[)p Fe(B)r(P)i Fn(+)c Fe(N)t(U)t(M)t Fn(]])80 b(t)o(yp)q(e)11 b(OP)p 357 226 V 13 w(1)p 388 226 V 12 w(i)-142 265 y Fe(I)s(N)t Fn([)p Fe(AD)q(R)c Fn(+)i([[)p Fe(AS)r(T)j Fd(\000)d Fn(1]]])81 b(t)o(yp)q(e)10 b(OP)p 443 265 V 14 w(1)p 475 265 V 12 w(mi)-142 304 y Fe(I)s(N)t Fn([)p Fe(B)r(P)i Fn(+)c Fe(N)t(U)t(M)i Fn(+)f([[)p Fe(AS)r(T)j Fd(\000)d Fn(1]]])81 b(t)o(yp)q(e)10 b(OP)p 555 304 V 13 w(1)p 586 304 V 13 w(i)-142 344 y Fe(I)s(N)t Fn([[)p Fe(B)r(P)i Fn(+)c Fe(N)t(U)t(M)i Fn(+)e([[)p Fe(AS)r(T)13 b Fd(\000)8 b Fn(1]]]])82 b(t)o(yp)q(e)10 b(OP)p 575 344 V 13 w(1)p 606 344 V 12 w(i)-142 423 y(Instruction)f Fa(OUT)p Fn(.)-142 462 y(Description:)19 b(output)12 b(of)j(the)e(con)o(ten)o(t)g(of)h(the)g(address;)g(the)g(ad-)-142 502 y(dress)d(is)g(sp)q(eci\014ed)f(absolutely)e(or)k(relativ)o(ely)m (.)-142 541 y(Options:)-142 581 y Fe(O)q(U)t(T)5 b Fn([)p Fe(AD)q(R)p Fn(])81 b(t)o(yp)q(e)10 b(OP)p 256 581 V 13 w(1)p 287 581 V 13 w(mi)-142 620 y Fe(O)q(U)t(T)5 b Fn([)p Fe(B)r(P)11 b Fn(+)d Fe(N)t(U)t(M)t Fn(])81 b(t)o(yp)q(e)10 b(OP)p 368 620 V 13 w(1)p 399 620 V 13 w(i)-142 659 y Fe(O)q(U)t(T)5 b Fn([[)p Fe(B)r(P)11 b Fn(+)d Fe(N)t(U)t(M)t Fn(]])80 b(t)o(yp)q(e)11 b(OP)p 388 659 V 13 w(1)p 419 659 V 12 w(i)-142 699 y Fe(O)q(U)t(T)5 b Fn([)p Fe(AD)q(R)i Fn(+)h([[)p Fe(AS)r(T)13 b Fd(\000)8 b Fn(1]]])81 b(t)o(yp)q(e)11 b(OP)p 475 699 V 13 w(1)p 506 699 V 12 w(mi)-142 738 y Fe(O)q(U)t(T)5 b Fn([)p Fe(B)r(P)11 b Fn(+)d Fe(N)t(U)t(M)j Fn(+)d([[)p Fe(AS)r(T)k Fd(\000)d Fn(1]]])81 b(t)o(yp)q(e)11 b(OP)p 587 738 V 13 w(1)p 618 738 V 12 w(i)-142 778 y Fe(O)q(U)t(T)5 b Fn([[)p Fe(B)r(P)11 b Fn(+)d Fe(N)t(U)t(M)i Fn(+)f([[)p Fe(AS)r(T)j Fd(\000)d Fn(1]]]])81 b(t)o(yp)q(e)10 b(OP)p 606 778 V 13 w(1)p 637 778 V 13 w(i)-142 857 y(Instruction)f Fa(MESS)p Fn(.)-142 896 y(Description:)k(put)e(string)f(message)f(to)j (the)e(standard)g(output.)-142 935 y(Options:)k(t)o(yp)q(e)d(OP)p 138 935 V 13 w(1)p 169 935 V 12 w(ma)-142 1057 y Fa(C.6.)22 b(Con)o(trol)14 b(instructions)-142 1111 y Fn(Instruction)9 b Fa(STOP)p Fn(.)-142 1150 y(Description:)j(signalization)7 b(of)k(end)e(of)h(the)g(virtual)f(mac)o(hine)f(run.)-142 1190 y(Options:)14 b(t)o(yp)q(e)d(OP)p 138 1190 V 13 w(0)p 169 1190 V 12 w(ma)-142 1269 y(Instruction)e Fa(INTER)p Fn(.)-142 1308 y(Description:)k(indicating)c(of)i(sync)o(hronou)o(s)e (in)o(terrupt.)-142 1348 y(Options:)14 b(t)o(yp)q(e)d(OP)p 138 1348 V 13 w(0)p 169 1348 V 12 w(ma)-142 1426 y(Instruction)e Fa(IRET)p Fn(.)-142 1466 y(Description:)20 b(return)14 b(from)g(sync)o(hronou)o(s)f(or)i(async)o(hrono)o(us)d(in-)-142 1505 y(terrupt.)-142 1545 y(Options:)i(t)o(yp)q(e)d(OP)p 138 1545 V 13 w(0)p 169 1545 V 12 w(ma)-142 1624 y(Instruction)e Fa(JMP)p Fn(.)-142 1663 y(Description:)k(jump)d(to)h(the)g(address.) -142 1702 y(Options:)j(t)o(yp)q(e)d(OP)p 138 1702 V 13 w(1)p 169 1702 V 12 w(ma)-142 1781 y(Instruction)e Fa(JZ)p Fn(.)-142 1821 y(Description:)k(If)f(last)f(op)q(eration)e(is)j(equal)e (zero,)h(jump)f(to)i(the)f(ad-)-142 1860 y(dress.)-142 1900 y(Options:)j(t)o(yp)q(e)d(OP)p 138 1900 V 13 w(1)p 169 1900 V 12 w(ma)-142 1979 y(Instruction)e Fa(JNZ)p Fn(.)-142 2018 y(Description:)k(If)e(last)g(op)q(eration)e(is)j(not)f (equal)f(zero,)g(jump)g(to)i(the)-142 2057 y(address.)-142 2097 y(Options:)i(t)o(yp)q(e)d(OP)p 138 2097 V 13 w(1)p 169 2097 V 12 w(ma)-142 2176 y(Instruction)e Fa(HAL)m(T)p Fn(.)-142 2215 y(Description:)k(system)d(halt.)-142 2255 y(Options:)k(t)o(yp)q(e)d(OP)p 138 2255 V 13 w(0)p 169 2255 V 12 w(ma)-142 2333 y(Instruction)e Fa(CALL)p Fn(.)-142 2373 y(Description:)17 b(call)12 b(of)h(a)g(function.)19 b(The)13 b(function)e(can)h(b)q(e)h(either)-142 2412 y(user)e(supplied)e(one)i(or)g(in)o(trinsic)f(one.)-142 2452 y(Options:)k(t)o(yp)q(e)d(OP)p 138 2452 V 13 w(1)p 169 2452 V 12 w(ma)-142 2531 y(Instruction)e Fa(RET)p Fn(.)-142 2570 y(Description:)k(return)d(from)g(a)i(function.)-142 2609 y(Options:)i(t)o(yp)q(e)d(OP)p 138 2609 V 13 w(0)p 169 2609 V 12 w(ma)p eop %%Trailer end userdict /end-hook known{end-hook}if %%EOF clif-0.93/doc/clif.1100444 1750 1750 16242 7074036420 12712 0ustar korenkoren.\" Copyright (c) 1998, 1999, 2000 Free Software Foundation -*-Text-*- .\" See section COPYING for conditions for redistribution .\" .\" Set up \*(lq, \*(rq if -man hasn't already set it up. .if @@\*(lq@ \{\ . ds lq " . if t .ds lq `` . if !@@\(lq@ .ds lq "\(lq .\} .if @@\*(rq@ \{\ . ds rq " . if t .ds rq '' . if !@@\(rq@ .ds rq "\(rq .\} .de Id .ds Rv \\$3 .ds Dt \\$4 .. .de Sp .if n .sp .if t .sp 0.4 .. .Id $Id: clif.1,v 1.3 2000/04/09 08:19:27 koren Exp $ .TH Clif 1 "\*(Dt" "GNU Tools" "GNU Tools" .SH NAME clif \- C\-like Interpreter Framework (v0.92) .SH SYNOPSIS .B clif .RI "[ " option " | " filename " ].\|.\|." .SH WARNING The information in this manual page can be incomplete. For full documentation see `The Interpreter Clif Programmer's Guide'. .SH DESCRIPTION .B Clif \- C\-like Interpreter Framework is open-ended system for fast development of programs with C syntax. The program is compiled and if syntactic correct, code is immediately generated. The code is generated for a virtual machine. The virtual machine is a part of the framework. .Sp The .B Clif works in two basic modes as an interpreter and/or as a compiler (see `\|\c .B \-fhandle\-main\c \&\|' option). The interpreter mode is .I default. In the interpreter mode, the .B Clif compiles each function and each loop only once and generated code is executed repetitively. (This is kind of optimization; the source code is not parsed over and over again.) .Sp The compiler mode is entered if `\|\c .B \-fhandle\-main\c \&\|' option is specified. The files are compiled and code is generated. When the compilation phase is finished, .B Clif searches for the `main' function and starts execution of it. .Sp The .B Clif is submitted with subset of .I standard C library. The subset is still under development. Intrinsic functions can be easily enhanced for user's purposes. .Sp There are interface functions supporting automatic control and data acquisition, that can be optionally compiled with .B Clif. .Sp The .B Clif does not recognize bit\-field definition syntax of the .I C language. The .I C preprocessor is not implemented yet. .Sp There could be discrepancies between the .B Clif and the .I ANSI C Standard. We are working on unifying of semantic of the .B Clif with the .I ANSI C Standard. .SH OPTIONS For each command line, one or more .I filename can be specified (usually with .B .ci suffix). The files are parsed in order of specification in the command line. The file .I clif.ini is implicitly opened. It is an initialization file. Options used invariably are specified in the file. .Sp Some of .BI \-f name options have a .BI \-fno\- name form. Default value is always mentioned in the option description. Summary of options follows. Explanations are in next sections. .hy 0 .na .TP .B Overall Options .br \-bc \-c \-copying \-help \-v \-version \-verbose \-warranty .TP .B Options Controlling Clif behavior \-fcall\-by\-reference \-fno\-call\-by\-reference \-fcall\-by\-value \-fno\-call\-by\-value \-fhandle\-main .TP .B Debugging Options \-g \-dy .TP .B Warning Options \-w \-Wcomment \-Wformat \-Wimplicit \-Wreturn\-type \-Wtrigraphs \-Wuninitialized \-Wall \-W \-Waggregate\-return \-Wunused .ad b .hy 1 .SH OVERALL OPTIONS .TP .B "\-bc" option specifies number of 512-Byte pages for the .B Clif environment main memory. The arithmetical and temporary stack is multiple of this option as well. .TP .B "\-c" Compile only. (Not fully supported yet.) .TP .B "\-copying" Show copying. .TP .B "\-help" Show short help. .TP .B "\-v, \-version" Show version. .TP .B "\-verbose" Prints general purpose of the .B Clif and authors. .TP .B "\-warranty" Show warranty. .ad b .hy 1 .SH OPTIONS CONTROLLING CLIF BEHAVIOR .TP .B "\-fcall\-by\-reference" Specifies parameter passing mechanism (default). If explicitly specified, `\|\c .B \-fno\-call\-by\-value\c \&\|' must be specified as well. .TP .B "\-fno\-call\-by\-reference" do not pass parameter by reference. If explicitly specified, `\|\c .B \-fcall\-by\-value\c \&\|' must be specified as well. .TP .B "\-fcall\-by\-value" call by value parameter passing mechanism. If explicitly specified, `\|\c .B \-fno\-call\-by\-reference\c \&\|' must be specified. .TP .B "\-fno\-call\-by\-value" do not pass parameters by value (default). If explicitly specified, `\|\c .B \-fcall\-by\-reference\c \&\|' must be specified. .TP .B "\-fhandle\-main" simulate compiler-like behavior. The files on the command line and included files are compiled. The `main' function must be defined. After parsing pass, the generated code is executed. The main function is the beginning of execution. .ad b .hy 1 .SH DEBUGGING OPTIONS .TP .B "\-g" produce debugging information. The source lines are output during virtual machine code execution. .TP .B "\-dy" dump debugging information during parsing to standard error. .ad b .hy 1 .SH WARNING OPTIONS .TP .B "\-w" Inhibit all warning messages. .TP .B "\-Wcomment" Warn when a comment-start sequence `\|\c .B /*\c \&\|' appears in a comment. .TP .B "\-Wformat" Check calls to `\|\c .B printf\c \&\|', `\|\c .B scanf\c \&\|', etc., to make sure that the arguments supplied have types appropriate to the specified format string. .TP .B \-Wimplicit Warn if a function or parameter is implicitly declared. .TP .B "\-Wreturn\-type" Warn if the return statement is without return value in non-void function, or with a value in \|`\c .B void\c \&\' function. .TP .B "\-Wtrigraphs" Warn about trigraphs usage. .TP .B "\-Wuninitialized" An automatic variable is used without first being initialized. .TP .B "\-Wall" All of the above warnings. .TP .B "\-W" Print extra warning messages. .TP .B "\-Waggregate\-return" Warn if any functions that return structures or unions are defined or called. .TP .B "\-Wunused" Warn whenever a variable is unused aside from its declaration. .SH "FILES" .nf file.ci \fBClif\fR source file clif.ini Initialization file .SH "SEE ALSO" cc(1), gcc(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1). .br .I The Interpreter Clif. Programmer's Guide.\c , L. Koren and T. Hruz .SH BUGS There are many, for sure. Please, help to make this software better and report them to Ludovit Koren . For instructions on reporting bugs, see the Interpreter Clif Programmer's Guide. .SH COPYING Copyright .if t \(co 1998, 1999, 2000 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. .PP Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. .PP Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. .SH SOURCE The .B Clif is available from ftp://www.vm.stuba.sk/pub/csgrp/packages/clif. The online documentation http://www.vm.stuba.sk/~koren/clif.html. .SH AUTHORS See the Interpreter .B Clif Programmer's Guide for the contributors to .B Clif. clif-0.93/doc/guide_programmers.bbl100644 1750 1750 5764 6477003103 16076 0ustar korenkoren\begin{thebibliography}{10} \bibitem{aho} A.~V. Aho and S.~C. Johnson. \newblock {LR} parsing. \newblock {\em Computing Surveys}, 6(2), June 1974. \bibitem{aho2} A.~V. Aho, R.~Sethi, and J.~D. Ullman. \newblock {\em Compilers. Principles, Techniques and Tools}. \newblock Addison-Wesley, 1986. \bibitem{aho1} A.~V. Aho and J.~D. Ullman. \newblock {\em The Theory of Parsing, Translation, and Compiling}, volume 1, 2. \newblock Prentice Hall, Englewood Cliffs, 1972, 1973. \bibitem{ansic} ANSI. \newblock {\em American National Standard for Information Systems - Programming Language C}. \newblock ANSI, Dec. 1989. \newblock X3.159-1989. \bibitem{crisp1} S.~Bandyopadhyay, V.S. Begwani, and R.B. Murray. \newblock Compiling for the crisp processor. \newblock In {\em Proceedings of the IEEE Spring, COMPCON}, pages 96--100, 1987. \bibitem{crisp2} A.D. Berenbaum, D.R. Ditzel, and H.R. McLellan. \newblock Introduction to the crisp instruction set architecture. \newblock In {\em Proceedings of the IEEE Spring, COMPCON}, pages 86--90, 1986. \bibitem{crisp3} A.D. Berenbaum, D.R. Ditzel, and H.R. McLellan. \newblock Architectural innovations in the crisp microprocessor. \newblock In {\em Proceedings of the IEEE Spring, COMPCON}, pages 91--95, 1987. \bibitem{dong} J.J. Dongarra, C.B. Moler, and et~al. \newblock {\em LINPACK User's Guide}. \newblock SIAM, Philadelphia, 1979. \bibitem{fras} C.~W. Fraser and D.~R. Hanson. \newblock {\em A Retargetable C Compiler: Design and Implementation}. \newblock Benjamin/Cummings, 1995. \newblock ISBN 0-8053-1670-1. \bibitem{gries} D.~Gries. \newblock {\em Kompil\'{a}tory \v{c}\'{\i}slicov\'{y}ch po\v{c}\'{\i}ta\v{c}ov}. \newblock Alfa, 1981. \bibitem{kafura} D.G. Kafura and R.G. Lavender. \newblock Concurrent object-oriented language and the inheritance anomaly. \newblock In {\em Proceedings ISIPCALA'93}, pages 183--215, Prague, 1993. \bibitem{ritchie} B.~W. Kernighan and D.~M. Ritchie. \newblock {\em Programovac\'{\i} jazyk {C}}. \newblock Alfa, 1988. \bibitem{lesk} M.~E. Lesk and E.~Schmidt. \newblock Lex - a lexical analyzer generator. \newblock Technical report, Bell Laboratories, Murray Hill, NJ, 1975. \bibitem{sedg} R.~Sedgewick. \newblock {\em Algorithms in C}. \newblock Computer Science. Addison-Wesley, 1990. \newblock ISBN 0-201-51425-7. \bibitem{serp} B.~Serpette, J.~Vuillemin, and J.C. Herv\'{e}. \newblock {B}ig{N}um: A portable and efficient package for arbitrary-precision arithmetic. \newblock Research report, INRIA, 1989. \newblock preprint. \bibitem{steve} W.~R. Stevens. \newblock {\em Advanced Programming in the UNIX Environment}. \newblock Professional Computing Series. Addison-Wesley, 1992. \newblock ISBN 0-201-56317-7. \bibitem{kor} \v{L}. Kore\v{n}. \newblock Small interpreter on the basis of {C}-language. \newblock Technical report, Slovak Technical University, Faculty of Mechanical Engineering, Bratislava, 1993. \bibitem{wirth} N.~Wirth. \newblock {\em Algoritmy a \v{s}trukt\'{u}ry \'{u}dajov}. \newblock Alfa, 1989. \end{thebibliography} clif-0.93/doc/guide_programmers.dvi100644 1750 1750 1210034 7130610643 16166 0ustar korenkoren÷ƒ’À;è TeX output 2000.07.05:1244‹ÿÿÿÿ ÀÙ ýÚÇ ÐÙ¸ þ=% ’ŠÛó>DÓítG®G®cmr17éThe–7tInŒqterpreter“óHÖÆG®G®cmss17ëHClifŽŸ’ˆUProgrammer's‘j¨GuideŽŸ,’•¾Ÿü÷xó0X«Q cmr12ÛŽ’•XL.–ê¨KorešSŽ‘ùÌvn“and“T.“Hr˜‘ùÌvuzŽŽŽŽŽŸ’¤ÍSF‘ÿVor–ê¨v¬rersion“0.93ŽŸ’€§èLast–ê¨upSŽdated“Jan¬ruary“5,“1999ŽŽŽŒ‹* ÀÙ ýÚÇ ÐÙ¸ ÿ[``‘ÛÝqóKñ`y cmr10²Cop•¸ãyrigh“t‘rž²×cŽŽŽ‘UUó !",š cmsy10¸ ŽŽŽ‘ UV²1992,–UU1993,“1994,“1995,“1996,“1997,“1998,“1999‘õUŸýx䎓L.“KoreG‘ú¸ânޤ9ó‘ÛÝqPš¸ãermission–(éis“gran˜ted“to“mak˜e“and“distribute“v˜erbatim“copies“of“this“man˜ual“pro˜vided“the“cop˜yrigh˜t“notice“andŽ© ‘ÛÝqthis–UUpGermission“notice“are“preserv¸ãed“on“all“copies.Ž¡‘ÛÝqPš¸ãermission–ìéis“gran˜ted“to“cop˜y“and“distribute“moGdi ed“v˜ersions“of“this“man˜ual“under“the“conditions“for“v˜erbatimަ‘ÛÝqcop•¸ãying,‘ö2pro“vided–Öalso“that“the“sections“en¸ãtitled“\GNU‘ÕäGeneral“Public“License"“is“included“exactly“as“in“theަ‘ÛÝqoriginal,‘ˆúOur“General“Public“Licenses“areŽ¡‘ôž|designed–¼Gto“makš¸ãe“sure“that“y˜ou“ha˜v˜e“the“freedom“to“distribute“copies“of“free“soft˜w˜are“(and“c˜harge“for“this“serviceŽ¡‘ôž|if–jˆyš¸ãou“wish),‘oÕthat“y˜ou“receiv˜e“source“coGde“or“can“get“it“if“y˜ou“w˜an˜t“it,‘oÕthat“y˜ou“can“c˜hange“the“soft˜w˜are“or“useŽ¡‘ôž|pieces–UUof“it“in“new“free“programs;“and“that“yš¸ãou“kno˜w“y˜ou“can“do“these“things.ަ‘ž|T‘ÿ*ªo–ª protect“yš¸ãour“righ˜ts,‘ÌMw˜e“need“to“mak˜e“restrictions“that“forbid“an˜y˜one“to“den˜y“y˜ou“these“righ˜ts“or“to“ask“y˜ouŽ¡‘ôž|to–surrender“the“righš¸ãts.‘]±These“restrictions“translate“to“certain“respGonsibilities“for“y˜ou“if“y˜ou“distribute“copies“ofŽ¡‘ôž|the›UUsoft•¸ãw“are,˜or˜if˜y“ou˜moGdify˜it.ަ‘ž|F‘ÿ*ªor–ufexample,‘½jif“yš¸ãou“distribute“copies“of“suc˜h“a“program,›½jwhether“gratis“or“for“a“fee,˜yš¸ãou“m˜ust“giv˜e“theŽ¡‘ôž|recipienš¸ãts–tall“the“righ˜ts“that“y˜ou“ha˜v˜e.‘ÍÎY‘ÿ*ªou“m˜ust“mak˜e“sure“that“they‘ÿ*ª,–{­toGo,“receiv˜e–tor“can“get“the“source“coGde.Ž¡‘ôž|And–UUyš¸ãou“m˜ust“sho˜w“them“these“terms“so“they“kno˜w“their“righ˜ts.ަ‘ž|W‘ÿ*ªe–5µprotect“yš¸ãour“righ˜ts“with“t˜w˜o“steps:‘a÷(1)“cop˜yrigh˜t“the“soft˜w˜are,‘<and“(2)“o er“y˜ou“this“license“whic˜h“giv˜esŽ¡‘ôž|yš¸ãou–UUlegal“pGermission“to“cop˜y‘ÿ*ª,“distribute“and/or“moGdify“the“soft˜w˜are.ަ‘ž|Also,›h8for–dqeac¸ãh“author's“protection“and“ours,˜wš¸ãe“w˜an˜t“to“mak˜e“certain“that“ev˜ery˜one“understands“that“thereŽ¡‘ôž|is–ä7no“w•¸ãarran“t“y–ä7for“this“free“soft•¸ãw“are.‘lIf–ä7the“soft•¸ãw“are–ä7is“moGdi ed“bš¸ãy“someone“else“and“passed“on,‘ïw˜e“w˜an˜t“itsŽ¡‘ôž|recipienš¸ãts–gto“kno˜w“that“what“they“ha˜v˜e“is“not“the“original,‘k†so“that“an˜y“problems“in˜troGduced“b˜y“others“will“notŽ¡‘ôž|re ect–UUon“the“original“authors'“reputations.ަ‘ž|Finally‘ÿ*ª,‘Ë:anš¸ãy–³¦free“program“is“threatened“constan˜tly“b˜y“soft˜w˜are“paten˜ts.‘Œ»W‘ÿ*ªe“wish“to“a˜v˜oid“the“danger“thatŽ¡‘ôž|redistributors–]nof“a“free“program“will“individually“obtain“paten¸ãt“licenses,‘in“e ect“making“the“program“proprietary‘ÿ*ª.Ž¡‘ôž|T‘ÿ*ªo›e(prev•¸ãen“t˜this,‘iw“e˜ha“v“e˜made˜it˜clear˜that˜an“y˜paten“t˜m“ust˜bGe˜licensed˜for˜ev“ery“one's˜free˜use˜or˜not˜licensedŽ¡‘ôž|at‘UUall.ަ‘ž|The–UUprecise“terms“and“conditions“for“copš¸ãying,“distribution“and“moGdi cation“follo˜w.ŽŸ!ñÏ‘úâçGNU–ffGENERAL“PUBLIC“LICENSEޤ‘ôž|TERMS–`úAND“CONDITIONS“FŒÌOR“COPYING,‘a½DISTRIBUTIONŽ¡‘ôž|AND‘ffMODIFICA‘þ¦fTIONŽ¡Ÿ5³‘×`²0.ŽŽŽ‘ ž~This–ú–License“applies“to“anš¸ãy“program“or“other“w˜ork“whic˜h“con˜tains“a“notice“placed“b˜y“the“cop˜yrigh˜t“holderŽŸ ‘ ž~saš¸ãying–T½it“ma˜y“bšGe“distributed“under“the“terms“of“this“General“Public“License.‘oþThe“"Program",‘”–b˜elo¸ãw,ŽŽŸK’ã÷®1ŽŽŒ‹³ ÀÙ ýÚÇ‘ÛÝq²2ŽŽ ÐÙ¸ ýK7‘ôÝsrefers–Úto“anš¸ãy“suc˜h“program“or“w˜ork,‘ûïand“a“"w˜ork“based“on“the“Program"“means“either“the“Program“orޤ ‘ôÝsan•¸ãy›Zderiv‘ÿqÇativ“e˜w“ork˜under˜cop“yrigh“t˜la“w:‘OÉthat˜is˜to˜sa“y‘ÿ*ª,‘òa˜w“ork˜con“taining˜the˜Program˜or˜a˜pGortion˜of˜it,Ž¡‘ôÝseither–9vš¸ãerbatim“or“with“moGdi cations“and/or“translated“in˜to“another“language.‘ïr(Hereinafter,‘‰±translationŽ¡‘ôÝsis–UUincluded“without“limitation“in“the“term“"moGdi cation".)‘qÇEacš¸ãh“licensee“is“addressed“as“"y˜ou".Ž©‚‘ôÝsActivities–eÀother“than“copš¸ãying,‘©Ûdistribution“and“moGdi cation“are“not“co˜v˜ered“b˜y“this“License;‘íöthey“areŽ¡‘ôÝsoutside–g÷its“scopGe.‘©¬The“act“of“running“the“Program“is“not“restricted,‘lŸand“the“output“from“the“Program“isŽ¡‘ôÝsco•¸ãv“ered–Ë”only“if“its“con•¸ãten“ts–Ë”constitute“a“wš¸ãork“based“on“the“Program“(indepGenden˜t“of“ha˜ving“bGeen“madeŽ¡‘ôÝsb¸ãy–UUrunning“the“Program).‘qÇWhether“that“is“true“depšGends“on“what“the“Program“do˜es.ŽŸ9‘èU1.ŽŽŽ‘ôÝsY‘ÿ*ªou–Bmaš¸ãy“cop˜y“and“distribute“v˜erbatim“copies“of“the“Program's“source“coGde“as“y˜ou“receiv˜e“it,‘ywin“an˜y“medium,Ž¡‘ôÝsproš¸ãvided–J÷that“y˜ou“conspicuously“and“appropriately“publish“on“eac˜h“cop˜y“an“appropriate“cop˜yrigh˜t“noticeŽ¡‘ôÝsand–¼disclaimer“of“w•¸ãarran“t“y;‘*ïk“eep›¼in“tact˜all˜the˜notices˜that˜refer˜to˜this˜License˜and˜to˜the˜absence˜of˜an“yŽ¡‘ôÝsw•¸ãarran“t“y;–UUand“givš¸ãe“an˜y“other“recipien˜ts“of“the“Program“a“cop˜y“of“this“License“along“with“the“Program.ަ‘ôÝsY‘ÿ*ªou–¬maš¸ãy“c˜harge“a“fee“for“the“ph˜ysical“act“of“transferring“a“cop˜y‘ÿ*ª,‘ÎOand“y˜ou“ma˜y“at“y˜our“option“o er“w˜arran˜t˜yŽ¡‘ôÝsprotection–UUin“exc¸ãhange“for“a“fee.ŽŸ9‘èU2.ŽŽŽ‘ôÝsY‘ÿ*ªou–‹nmaš¸ãy“moGdify“y˜our“cop˜y“or“copies“of“the“Program“or“an˜y“pGortion“of“it,‘˜ôth˜us“forming“a“w˜ork“based“onŽ¡‘ôÝsthe–øProgram,‘R and“copš¸ãy“and“distribute“suc˜h“moGdi cations“or“w˜ork“under“the“terms“of“Section“1“abGo˜v˜e,Ž¡‘ôÝsproš¸ãvided–UUthat“y˜ou“also“meet“all“of“these“conditions:ŽŸÇF‘ùT(a)ŽŽŽ‘ ÝsY‘ÿ*ªou–e\mš¸ãust“cause“the“moGdi ed“ les“to“carry“prominen˜t“notices“stating“that“y˜ou“c˜hanged“the“ les“andŽ¡‘ Ýsthe–UUdate“of“anš¸ãy“c˜hange.ަ‘øˆ(b)ŽŽŽ‘ ÝsY‘ÿ*ªou–gGmš¸ãust“cause“an˜y“w˜ork“that“y˜ou“distribute“or“publish,‘«Äthat“in“whole“or“in“part“con˜tains“or“isŽ¡‘ Ýsderivš¸ãed–dfrom“the“Program“or“an˜y“part“thereof,‘+'to“bGe“licensed“as“a“whole“at“no“c˜harge“to“all“thirdŽ¡‘ Ýsparties–UUunder“the“terms“of“this“License.ަ‘ù¤Ž(c)ŽŽŽ‘ ÝsIf–]²the“moGdi ed“program“normally“reads“commands“in•¸ãteractiv“ely–]²when“run,‘_Êyš¸ãou“m˜ust“cause“it,‘_ÊwhenŽ¡‘ Ýsstarted–c«running“for“sucš¸ãh“in˜teractiv˜e“use“in“the“most“ordinary“w˜a˜y‘ÿ*ª,‘”to“prin˜t“or“displa˜y“an“announcemen˜tŽ¡‘ Ýsincluding–úqan“appropriate“cop•¸ãyrigh“t–úqnotice“and“a“notice“that“there“is“no“w•¸ãarran“t“y–úq(or“else,‘ Ÿsa¸ãying“thatŽ¡‘ Ýsy•¸ãou›âpro“vide˜a˜w“arran“t“y)˜and˜that˜users˜ma“y˜redistribute˜the˜program˜under˜these˜conditions,‘FandŽ¡‘ Ýstelling–²‚the“user“hoš¸ãw“to“view“a“cop˜y“of“this“License.‘‰O(Exception:‘,"if“the“Program“itself“is“in˜teractiv˜eŽ¡‘ Ýsbut–ûXdoGes“not“normally“prinš¸ãt“suc˜h“an“announcemen˜t,‘ Wy˜our“w˜ork“based“on“the“Program“is“not“requiredŽ¡‘ Ýsto–UUprinš¸ãt“an“announcemen˜t.)ŽŸÇF‘ôÝsThese–Àrequiremenš¸ãts“apply“to“the“moGdi ed“w˜ork“as“a“whole.‘±ÙIf“iden˜ti able“sections“of“that“w˜ork“areŽ¡‘ôÝsnot–Ÿ·deriv¸ãed“from“the“Program,‘òOand“can“bšGe“reasonably“considered“indep˜endenš¸ãt“and“separate“w˜orks“inŽ¡‘ôÝsthemselv¸ães,›pgthen–jýthis“License,˜and“its“terms,˜do“not“apply“to“those“sections“when“y¸ãou“distribute“them“asŽ¡‘ôÝsseparate–wš¸ãorks.‘#žBut“when“y˜ou“distribute“the“same“sections“as“part“of“a“whole“whic˜h“is“a“w˜ork“based“onŽ¡‘ôÝsthe–¾šProgram,›Øëthe“distribution“of“the“whole“m¸ãust“bGe“on“the“terms“of“this“License,˜whose“pGermissions“forŽ¡‘ôÝsother–UUlicensees“extend“to“the“enš¸ãtire“whole,“and“th˜us“to“eac˜h“and“ev˜ery“part“regardless“of“who“wrote“it.ަ‘ôÝsThš¸ãus,‘P-it–Näis“not“the“in˜ten˜t“of“this“section“to“claim“righ˜ts“or“con˜test“y˜our“righ˜ts“to“w˜ork“written“en˜tirely“b˜yŽ¡‘ôÝsy•¸ãou;‘}rather,‘vjthe›oÌin“ten“t˜is˜to˜exercise˜the˜righ“t˜to˜con“trol˜the˜distribution˜of˜deriv‘ÿqÇativ“e˜or˜collectiv“e˜w“orksŽ¡‘ôÝsbased–UUon“the“Program.ަ‘ôÝsIn–ævaddition,‘ ¾mere“aggregation“of“another“w¸ãork“not“based“on“the“Program“with“the“Program“(or“with“aŽ¡‘ôÝswš¸ãork–ÀÏbased“on“the“Program)“on“a“v˜olume“of“a“storage“or“distribution“medium“doGes“not“bring“the“otherŽ¡‘ôÝsw¸ãork–UUunder“the“scopGe“of“this“License.ŽŸ9‘èU3.ŽŽŽ‘ôÝsY‘ÿ*ªou–1ämaš¸ãy“cop˜y“and“distribute“the“Program“(or“a“w˜ork“based“on“it,‘iunder“Section“2)“in“ob‘Ž8ject“coGde“orŽ¡‘ôÝsexecutable–ü¦form“under“the“terms“of“Sections“1“and“2“abGo•¸ãv“e›ü¦pro“vided˜that˜y“ou˜also˜do˜one˜of˜the˜follo“wing:ŽŸÇF‘ùT(a)ŽŽŽ‘ ÝsAccompanš¸ãy–÷Sit“with“the“complete“correspGonding“mac˜hine-readable“source“coGde,‘Ówhic˜h“m˜ust“bGe“dis-Ž¡‘ Ýstributed– xunder“the“terms“of“Sections“1“and“2“abGo•¸ãv“e– xon“a“medium“customarily“used“for“soft•¸ãw“areŽ¡‘ Ýsin•¸ãterc“hange;‘UUor,ަ‘øˆ(b)ŽŽŽ‘ ÝsAccompanš¸ãy–it“with“a“written“o er,‘v‘ÿqÇalid“for“at“least“three“y˜ears,‘to“giv˜e“an˜y“third“part˜y‘ÿ*ª,‘for“a“c˜hargeŽ¡‘ Ýsno–õ•more“than“yš¸ãour“cost“of“ph˜ysically“pGerforming“source“distribution,‘¥a“complete“mac˜hine-readableŽ¡‘ Ýscop¸ãy–tFof“the“correspšGonding“source“co˜de,‘|to“b˜e“distributed“under“the“terms“of“Sections“1“and“2“ab˜o•¸ãv“eŽ¡‘ Ýson–UUa“medium“customarily“used“for“soft•¸ãw“are›UUin“terc“hange;˜or,ŽŽŽŒ‹® ÀÙ ýÚÇ’ÓPß²3ŽŽ ÐÙ¸ ýK7‘e™(c)ŽŽŽ‘#ž~Accompanš¸ãy–Üyit“with“the“information“y˜ou“receiv˜ed“as“to“the“o er“to“distribute“correspGonding“sourceޤ ‘#ž~coGde.‘aÚ(This–¥[alternativš¸ãe“is“allo˜w˜ed“only“for“noncommercial“distribution“and“only“if“y˜ou“receiv˜ed“theŽ¡‘#ž~program–UUin“ob‘Ž8ject“cošGde“or“executable“form“with“suc¸ãh“an“o er,“in“accord“with“Subsection“b“ab˜o•¸ãv“e.)ŽŸ-‘ ž~The–'×source“coGde“for“a“wš¸ãork“means“the“preferred“form“of“the“w˜ork“for“making“moGdi cations“to“it.‘éNF‘ÿ*ªorŽ¡‘ ž~an–Texecutable“w¸ãork,‘TScomplete“source“cošGde“means“all“the“source“co˜de“for“all“mo˜dules“it“conš¸ãtains,‘TSplus“an˜yŽ¡‘ ž~assoGciated–<èinš¸ãterface“de nition“ les,‘vÍplus“the“scripts“used“to“con˜trol“compilation“and“installation“of“theŽ¡‘ ž~executable.‘NHo•¸ãw“ev“er,›ÿas–ê/a“spGecial“exception,˜the“source“coGde“distributed“need“not“include“an¸ãything“that“isŽ¡‘ ž~normally–SËdistributed“(in“either“source“or“binary“form)“with“the“ma‘Ž8jor“compGonenš¸ãts“(compiler,–Tk˜ernel,“andŽ¡‘ ž~so–ÌDon)“of“the“opšGerating“system“on“whic¸ãh“the“executable“runs,‘êunless“that“comp˜onen¸ãt“itself“accompaniesŽ¡‘ ž~the‘UUexecutable.ŽŸ¹µ‘ ž~If–ë‡distribution“of“executable“or“ob‘Ž8ject“coGde“is“made“bš¸ãy“o ering“access“to“cop˜y“from“a“designated“place,Ž¡‘ ž~then–l]o ering“equiv‘ÿqÇalenš¸ãt“access“to“cop˜y“the“source“coGde“from“the“same“place“coun˜ts“as“distribution“of“theŽ¡‘ ž~source–UUcošGde,“ev¸ãen“though“third“parties“are“not“comp˜elled“to“cop¸ãy“the“source“along“with“the“ob‘Ž8ject“co˜de.Ž©sj‘×`4.ŽŽŽ‘ ž~Y‘ÿ*ªou–Nðmaš¸ãy“not“cop˜y–ÿ*ª,›P8moGdify“,˜sublicense,˜or–Nðdistribute“the“Program“except“as“expressly“pro¸ãvided“under“thisŽ¡‘ ž~License.‘²Anš¸ãy–ßùattempt“otherwise“to“cop˜y–ÿ*ª,›¡moGdify“,˜sublicense–ßùor“distribute“the“Program“is“v¸ãoid,˜and“willŽ¡‘ ž~automatically–#Ðterminate“yš¸ãour“righ˜ts“under“this“License.‘Ý7Ho˜w˜ev˜er,‘Wnparties“who“ha˜v˜e“receiv˜ed“copies,‘WnorŽ¡‘ ž~righ•¸ãts,‘Véfrom›V˜y“ou˜under˜this˜License˜will˜not˜ha“v“e˜their˜licenses˜terminated˜so˜long˜as˜suc“h˜parties˜remainŽ¡‘ ž~in–UUfull“compliance.ަ‘×`5.ŽŽŽ‘ ž~Y‘ÿ*ªou–Îare“not“required“to“accept“this“License,‘ì>since“yš¸ãou“ha˜v˜e“not“signed“it.‘Û÷Ho˜w˜ev˜er,‘ì>nothing“else“gran˜tsŽ¡‘ ž~y¸ãou–>ŠpšGermission“to“mo˜dify“or“distribute“the“Program“or“its“deriv‘ÿqÇativš¸ãe“w˜orks.‘j.These“actions“are“prohibitedŽ¡‘ ž~b•¸ãy›ìÏla“w˜if˜y“ou˜do˜not˜accept˜this˜License.‘86Therefore,‘®b“y˜moGdifying˜or˜distributing˜the˜Program˜(or˜an“yŽ¡‘ ž~wš¸ãork–Dˆbased“on“the“Program),‘Gäy˜ou“indicate“y˜our“acceptance“of“this“License“to“do“so,‘Gäand“all“its“terms“andŽ¡‘ ž~conditions–UUfor“copš¸ãying,“distributing“or“moGdifying“the“Program“or“w˜orks“based“on“it.ަ‘×`6.ŽŽŽ‘ ž~Eacš¸ãh–time“y˜ou“redistribute“the“Program“(or“an˜y“w˜ork“based“on“the“Program),‘îthe“recipien˜t“automaticallyŽ¡‘ ž~receivš¸ães–§a“license“from“the“original“licensor“to“cop˜y‘ÿ*ª,‘?|distribute“or“moGdify“the“Program“sub‘Ž8ject“to“theseŽ¡‘ ž~terms–×­and“conditions.‘GåY‘ÿ*ªou“maš¸ãy“not“impGose“an˜y“further“restrictions“on“the“recipien˜ts'“exercise“of“the“righ˜tsŽ¡‘ ž~granš¸ãted–UUherein.‘qÇY‘ÿ*ªou“are“not“respGonsible“for“enforcing“compliance“b˜y“third“parties“to“this“License.ަ‘×`7.ŽŽŽ‘ ž~If,‘8–as–1fa“consequence“of“a“court“judgmenš¸ãt“or“allegation“of“paten˜t“infringemen˜t“or“for“an˜y“other“reason“(notŽ¡‘ ž~limited–áíto“patenš¸ãt“issues),‘ùconditions“are“impGosed“on“y˜ou“(whether“b˜y“court“order,‘ùagreemen˜t“or“otherwise)Ž¡‘ ž~that–%†conš¸ãtradict“the“conditions“of“this“License,‘/they“do“not“excuse“y˜ou“from“the“conditions“of“this“License.Ž¡‘ ž~If–3”yš¸ãou“cannot“distribute“so“as“to“satisfy“sim˜ultaneously“y˜our“obligations“under“this“License“and“an˜y“otherŽ¡‘ ž~pGertinenš¸ãt– òobligations,‘9then“as“a“consequence“y˜ou“ma˜y“not“distribute“the“Program“at“all.‘YüF‘ÿ*ªor“example,‘9if“aŽ¡‘ ž~patenš¸ãt–­license“w˜ould“not“pGermit“ro˜y˜alt˜y-free“redistribution“of“the“Program“b˜y“all“those“who“receiv˜e“copiesŽ¡‘ ž~directly–OÃor“indirectly“through“yš¸ãou,‘Pàthen“the“only“w˜a˜y“y˜ou“could“satisfy“bGoth“it“and“this“License“w˜ould“bGeŽ¡‘ ž~to–UUrefrain“en¸ãtirely“from“distribution“of“the“Program.Ž©¹µ‘ ž~If–\ëanš¸ãy“pGortion“of“this“section“is“held“in˜v‘ÿqÇalid“or“unenforceable“under“an˜y“particular“circumstance,‘Žšthe“balanceŽ¡‘ ž~of–›the“section“is“inš¸ãtended“to“apply“and“the“section“as“a“whole“is“in˜tended“to“apply“in“other“circumstances.ަ‘ ž~It–’¼is“not“the“purpGose“of“this“section“to“induce“yš¸ãou“to“infringe“an˜y“paten˜ts“or“other“propGert˜y“righ˜t“claimsŽ¡‘ ž~or–Åûto“conš¸ãtest“v‘ÿqÇalidit˜y“of“an˜y“suc˜h“claims;‘þMthis“section“has“the“sole“purpGose“of“protecting“the“in˜tegrit˜y“ofŽ¡‘ ž~the–æ]free“soft•¸ãw“are–æ]distribution“system,‘üwhicš¸ãh“is“implemen˜ted“b˜y“public“license“practices.‘LÊMan˜y“pGeople“ha˜v˜eŽ¡‘ ž~made–Tgenerous“conš¸ãtributions“to“the“wide“range“of“soft˜w˜are“distributed“through“that“system“in“relianceŽ¡‘ ž~on–™Wconsisten¸ãt“application“of“that“system;‘»Xit“is“up“to“the“author/donor“to“decide“if“he“or“she“is“willing“toŽ¡‘ ž~distribute›UUsoft•¸ãw“are˜through˜an“y˜other˜system˜and˜a˜licensee˜cannot˜impGose˜that˜c“hoice.ަ‘ ž~This–A%section“is“inš¸ãtended“to“mak˜e“thoroughly“clear“what“is“bGeliev˜ed“to“bGe“a“consequence“of“the“rest“of“thisŽ¡‘ ž~License.Ž©sj‘×`8.ŽŽŽ‘ ž~If–$Õthe“distribution“and/or“use“of“the“Program“is“restricted“in“certain“counš¸ãtries“either“b˜y“paten˜ts“or“b˜yŽ¡‘ ž~cop•¸ãyrigh“ted›D[in“terfaces,‘GÀthe˜original˜cop“yrigh“t˜holder˜who˜places˜the˜Program˜under˜this˜License˜ma“y˜addŽ¡‘ ž~an–ÂRexplicit“geographical“distribution“limitation“excluding“those“coun¸ãtries,‘ß¹so“that“distribution“is“pGermittedŽ¡‘ ž~only–_²in“or“among“counš¸ãtries“not“th˜us“excluded.‘ßIn“suc˜h“case,‘bJthis“License“incorpGorates“the“limitation“as“ifŽ¡‘ ž~written–UUin“the“b•Go“dy–UUof“this“License.ަ‘×`9.ŽŽŽ‘ ž~The–"ÒF›ÿ*ªree“Soft•¸ãw“are–"ÒF˜oundation“maš¸ãy“publish“revised“and/or“new“v˜ersions“of“the“General“Public“LicenseŽ¡‘ ž~from–éïtime“to“time.‘/”Sucš¸ãh“new“v˜ersions“will“bGe“similar“in“spirit“to“the“presen˜t“v˜ersion,‘but“ma˜y“di er“inŽ¡‘ ž~detail–UUto“address“new“problems“or“concerns.ŽŽŽŒ‹- ÀÙ ýÚÇ‘ÛÝq²4ŽŽ ÐÙ¸ ýK7‘ôÝsEac•¸ãh›°Œv“ersion˜is˜giv“en˜a˜distinguishing˜v“ersion˜n“um“b•Ger.‘ƒkIf˜the˜Program˜sp“eci es˜a˜v•¸ãersion˜n“um“bGer˜ofޤ ‘ôÝsthis–­License“whicš¸ãh“applies“to“it“and“"an˜y“later“v˜ersion",‘Âóy˜ou“ha˜v˜e“the“option“of“follo˜wing“the“terms“andŽ¡‘ôÝsconditions–ˆeither“of“that“vš¸ãersion“or“of“an˜y“later“v˜ersion“published“b˜y“the“F‘ÿ*ªree“Soft˜w˜are“F‘ÿ*ªoundation.‘].If“theŽ¡‘ôÝsProgram–došGes“not“sp˜ecify“a“vš¸ãersion“n˜um˜bGer“of“this“License,‘÷y˜ou“ma˜y“c˜hoGose“an˜y“v˜ersion“ev˜er“published“b˜yŽ¡‘ôÝsthe–UUF›ÿ*ªree“Soft•¸ãw“are‘UUF˜oundation.Ž©‘ãT10.ŽŽŽ‘ôÝsIf–Üñyš¸ãou“wish“to“incorpGorate“parts“of“the“Program“in˜to“other“free“programs“whose“distribution“conditionsŽ¡‘ôÝsare–+di erenš¸ãt,‘= write“to“the“author“to“ask“for“pGermission.‘ŸHF‘ÿ*ªor“soft˜w˜are“whic˜h“is“cop˜yrigh˜ted“b˜y“the“F‘ÿ*ªreeŽ¡‘ôÝsSoft•¸ãw“are–îF›ÿ*ªoundation,‘±write“to“the“F˜ree“Soft•¸ãw“are‘îF˜oundation;‘ww“e–îsometimes“mak¸ãe“exceptions“for“this.‘OXOurŽ¡‘ôÝsdecision–!´will“bGe“guided“bš¸ãy“the“t˜w˜o“goals“of“preserving“the“free“status“of“all“deriv‘ÿqÇativ˜es“of“our“free“soft˜w˜areŽ¡‘ôÝsand–UUof“promoting“the“sharing“and“reuse“of“soft•¸ãw“are‘UUgenerally‘ÿ*ª.ޤ’¢ó9X«Q ff cmr12äNO‘³/W‘þnðARRANTYŽ¡‘ãT²11.ŽŽŽ‘ôÝsBECAš¸ãUSE–¤-THE“PR˜OGRAM“IS“LICENSED“FREE“OF“CHAR˜GE,‘¤ATHERE“IS“NO“W‘þãARRANTY“F˜ORޤ ‘ôÝsTHE–ôµPR¸ãOGRAM,›ôÍTO“THE“EXTENT“PERMITTED“BY“APPLICABLE“LA‘þãW.˜EX¸ãCEPT“WHEN“OTH-Ž¡‘ôÝsER‘þãWISE›÷ƒST–ÿ*ªA“TED˜IN˜WRITING˜THE˜COPYRIGHT˜HOLDERS˜AND/OR˜OTHER˜P“AR“TIES˜PR¸ãO-Ž¡‘ôÝsVIDE–N‰THE“PR¸ãOGRAM“"AS“IS"›NÊWITHOUT“W‘þãARRANTY“OF“ANY“KIND,˜EITHER“EXPRESSEDŽ¡‘ôÝsOR›ÓIMPLIED,–ÓcINCLUDING,“BUT˜NOT˜LIMITED˜TO,“THE˜IMPLIED˜W‘þãARRANTIES˜OF˜MER-Ž¡‘ôÝsCHANT›ÿ*ªABILITY–ºAND“FITNESS“F¸ãOR“A“P˜AR˜TICULAR“PURPOSE.‘º@THE“ENTIRE“RISK“AS“TO“THEŽ¡‘ôÝsQUALITY–w¡AND“PERFš¸ãORMANCE“OF“THE“PR˜OGRAM“IS“WITH“YOU.‘wªSHOULD“THE“PR˜OGRAMŽ¡‘ôÝsPR•¸ãO“VE–y>DEFECTIVE,›yGYOU“ASSUME“THE“COST“OF“ALL“NECESSAR‘ÿ*ªY“SER‘þãVICING,˜REP‘ÿ*ªAIR“ORŽ¡‘ôÝsCORRECTION.ަ‘ãT12.ŽŽŽ‘ôÝsIN–ÖNO“EVENT“UNLESS“REQUIRED“BY“APPLICABLE“LA‘þãW“OR“A¸ãGREED“TO“IN“WRITING“WILLŽ¡‘ôÝsANY–‹øCOPYRIGHT“HOLDER,‘ŒHOR“ANY“OTHER“P–ÿ*ªAR“TY–‹øWHO“MA‘ÿ*ªY“MODIFY“AND/OR“REDIS-Ž¡‘ôÝsTRIBUTE–nTHE“PRš¸ãOGRAM“AS“PERMITTED“ABO˜VE,‘}BE“LIABLE“TO“YOU“F˜OR“D˜AMA˜GES,‘}IN-Ž¡‘ôÝsCLUDING–S›ANY“GENERAL,“SPECIAL,“INCIDENT‘ÿ*ªAL“OR“CONSEQUENTIAL“D•¸ãAMA“GES‘S›ARISINGŽ¡‘ôÝsOUT–ßÂOF“THE“USE“OR“INABILITY“TO“USE“THE“PR¸ãOGRAM“(INCLUDING“BUT“NOT“LIMITEDŽ¡‘ôÝsTO–KLOSS“OF“Dš¸ãA–ÿ*ªT“A–KOR“D˜A–ÿ*ªT“A–KBEING“RENDERED“INA˜CCURA›ÿ*ªTE“OR“LOSSES“SUST˜AINED“BYŽ¡‘ôÝsYOU–ŠqOR“THIRD“P–ÿ*ªAR“TIES–ŠqOR“A“F‘þãAILURE“OF“THE“PR¸ãOGRAM“TO“OPERA‘ÿ*ªTE“WITH“ANY“OTHERŽ¡‘ôÝsPRš¸ãOGRAMS),‘E>EVEN–E:IF“SUCH“HOLDER“OR“OTHER“P–ÿ*ªAR“TY–E:HAS“BEEN“AD˜VISED“OF“THE“POS-Ž¡‘ôÝsSIBILITY–UUOF“SUCH“D•¸ãAMA“GES.ŽŸ‘_¿òäEND–³/OF“TERMS“AND“CONDITIONSŽŽŽŒ‹Eá ÀÙ ýÚÇ’ÓPß²5ŽŽ ÐÙ¸ ýK7‘äçHoŒÌw–ffto“Apply“These“T›þ¦ferms“to“Y˜our“New“ProgramsŽŸç‘ ž~²If–ŠEyš¸ãou“dev˜elop“a“new“program,‘—and“y˜ou“w˜an˜t“it“to“bšGe“of“the“greatest“p˜ossible“use“to“the“public,‘—the“b˜estޤ ‘ ž~w•¸ãa“y–ê±to“ac•¸ãhiev“e–ê±this“is“to“makš¸ãe“it“free“soft˜w˜are“whic˜h“ev˜ery˜one“can“redistribute“and“c˜hange“under“theseŽ¡‘ ž~terms.ŽŸ‘ ž~T‘ÿ*ªo–«do“so,‘H@attacš¸ãh“the“follo˜wing“notices“to“the“program.‘¸ÉIt“is“safest“to“attac˜h“them“to“the“start“of“eac˜hŽ¡‘ ž~source–I* le“to“most“e ectivš¸ãely“con˜v˜ey“the“exclusion“of“w˜arran˜t˜y;‘Ãand“eac˜h“ le“should“ha˜v˜e“at“least“theŽ¡‘ ž~"cop•¸ãyrigh“t"–UUline“and“a“pGoin¸ãter“to“where“the“full“notice“is“found.Ž©‘"žró$ßꎡ‘"žrCopyright–?ý(C)“19yy‘ úŽ¡¡‘"žrThis–?ýprogram“is“free“software;“you“can“redistribute“it“and/or“modifyŽ¡‘"žrit–?ýunder“the“terms“of“the“GNU“General“Public“License“as“published“byŽ¡‘"žrthe–?ýFree“Software“Foundation;“either“version“2“of“the“License,“orŽ¡‘"žr(at–?ýyour“option)“any“later“version.Ž¡¡‘"žrThis–?ýprogram“is“distributed“in“the“hope“that“it“will“be“useful,Ž¡‘"žrbut–?ýWITHOUT“ANY“WARRANTY;“without“even“the“implied“warranty“ofŽ¡‘"žrMERCHANTABILITY–?ýor“FITNESS“FOR“A“PARTICULAR“PURPOSE.‘ úSee“theŽ¡‘"žrGNU–?ýGeneral“Public“License“for“more“details.Ž¡¡‘"žrYou–?ýshould“have“received“a“copy“of“the“GNU“General“Public“LicenseŽ¡‘"žralong–?ýwith“this“program;“if“not,“write“to“the“Free“SoftwareŽ¡‘"žrFoundation,–?ýInc.,“675“Mass“Ave,“Cambridge,“MA“02139,“USA.ަ‘ ž~²Also–UUadd“information“on“hoš¸ãw“to“con˜tact“y˜ou“b˜y“electronic“and“papGer“mail.ŽŸ‘ ž~If–Éthe“program“is“in•¸ãteractiv“e,‘åmak“e–Éit“output“a“short“notice“likš¸ãe“this“when“it“starts“in“an“in˜teractiv˜e“moGde:Ž©‘"žrÏGnomovision–?ýversion“69,“Copyright“(C)“19yy“name“of“authorŽ¡‘"žrGnomovision–?ýcomes“with“ABSOLUTELY“NO“WARRANTY;“for“details“type“`show“w'.Ž¡‘"žrThis–?ýis“free“software,“and“you“are“welcome“to“redistribute“itŽ¡‘"žrunder–?ýcertain“conditions;“type“`show“c'“for“details.ަ‘ ž~²The–sðhš¸ãypGothetical“commands“`sho˜w“w'“and“`sho˜w“c'“should“sho˜w“the“appropriate“parts“of“the“GeneralŽ¡‘ ž~Public–ÝLicense.‘I­Of“course,‘õthe“commands“yš¸ãou“use“ma˜y“bGe“called“something“other“than“`sho˜w“w'“and“`sho˜wŽ¡‘ ž~c';–UUthey“could“evš¸ãen“bGe“mouse-clic˜ks“or“men˜u“items{whatev˜er“suits“y˜our“program.ŽŸ‘ ž~Y‘ÿ*ªou–gYshould“also“get“yš¸ãour“emplo˜y˜er“(if“y˜ou“w˜ork“as“a“programmer)“or“y˜our“sc˜hoGol,‘–òif“an˜y‘ÿ*ª,‘–òto“sign“a“"cop˜yrigh˜tŽ¡‘ ž~disclaimer"–UUfor“the“program,“if“necessary‘ÿ*ª.‘qÇHere“is“a“sample;“alter“the“names:ަ‘xÏYoyodyne,–?ýInc.,“hereby“disclaims“all“copyright“interest“in“the“programŽ¡‘x`Gnomovision'–?ý(which“makes“passes“at“compilers)“written“by“James“Hacker.Ž¡¡‘x,“1“April“1989Ž¡‘xTy–?ýCoon,“President“of“Viceަ‘ ž~²This–ÖÙGeneral“Public“License“došGes“not“p˜ermit“incorp˜orating“yš¸ãour“program“in˜to“proprietary“programs.Ž¡‘ ž~If–$Xyš¸ãour“program“is“a“subroutine“library‘ÿ*ª,‘Xy˜ou“ma˜y“consider“it“more“useful“to“pGermit“linking“proprietaryŽ¡‘ ž~applications–õwith“the“library‘ÿ*ª.‘Q±If“this“is“what“yš¸ãou“w˜an˜t“to“do,‘Suse“the“GNU‘ôúLibrary“General“Public“LicenseŽ¡‘ ž~instead–UUof“this“License.ŽŽŽŒ‹Qž ÀÙ ýÚÇ‘ÛÝq²6ŽŽ ÐÙ¸Ÿ†9‘êÝqThe–ôÛdoGcumenš¸ãt“explains,‘'commen˜ts“and“sho˜ws“some“decisions,‘'programming“tec˜hniques“and“solutions“in“ó%m#½R cmss10ÐClif.ޤ ‘ÛÝqIts–QpurpšGose“is“to“highlight“some“imp˜oš¸ãrtant“pa˜rts“of“the“implementation“and“to“help“with“pGossible“extensions“fo˜r“newŽ¡‘ÛÝqusers.Ž¡‘êÝqThe–yÏdoGcument“also“helps“authoš¸ãrs“to“have“the“latest“fo˜rm“of“the“implementation“details“in“comp˜rehensible“fo˜rm,Ž¡‘ÛÝqas–UUa“commented“manual.Ž¡‘êÝqThe–è‚doGcument“consists“of“the“Clif“grammaš¸ãr“in“BNF‘èfo˜rm,‘MMdescription“of“the“main“interp˜reter“o˜rganization,Ž¡‘ÛÝqpGossibilities–UUfoš¸ãr“including“new“lib˜ra˜ry“functions“and“conditions“fo˜r“extending“the“language“of“Clif.Ž¡‘êÝqInterrupt–ý]services“as“an“option“foš¸ãr“debugging“a˜re“also“describGed.‘ iÞOptional“graphical“interface“with“graphicŽ¡‘ÛÝqpš¸ãrimitives–UUis“a“pa˜rt“of“the“doGcument“as“w˜ell.Ž¡‘êÝqThe–`¼substantial“paš¸ãrt“of“the“doGcument“is“devoted“to“the“internal“rep˜resentation“of“t˜ypGes“in“Clif.‘“üThe“chapter“willŽ¡‘ÛÝqbGe–UUinteresting“foš¸ãr“users,“who“w˜ant“to“extend“the“Clif“with“new“non“atoma˜ry“data“t˜ypGes.ŽŽŽŒ‹_ ÀÙ ýÚÇ ÐÙ¸ ý›7‘ôž|ëUCon‘ÿ8õtributors– T{to“the“óVÖÆáHG®cmss17ëVClifŽŸ4‘ôž|ÐIn–UUaddition“to‘Š«Ÿý€Ž“Ludov‘þ±Æ‘üN9t“Ko¸ãreU‘úêªn“several“pGeople“contributed“to“the“Clif.ŽŸ‘ž}¸ŽŽŽ‘ ž~ÐT‘ÿ*ªomç‘ûãa‘ÿjª‘û•Us–UUHrU‘úêªuz“pš¸ãrincipal“planning“decisions,“overall“design“and“many“ideas“fo˜r“implementationŽŸ‘ž}¸ŽŽŽ‘ ž~ÐJozef–UURepiskÎ9‘û1Æy“ rst“basic“(and“very“restricted)“implementationŽŽŸK’ã÷®²7ŽŽŒ‹cß ÀÙ ýÚÇ‘ÛÝq²8ŽŽ ÐÙ¸ŽŒ‹ eØ ÀÙ ýÚÇ ÐÙ¸ ý–7‘ôž|óWÂÖN ½q cmbx12ëWChapter‘Ç 1ŽŸ2‘ôž|ëUCompiling‘ T{optionsŽŸ4‘ôž|ÐThere–ˆúaš¸ãre“several“additional“options,‘•ãthat“a˜re“suppGo˜rted“during“a“run“of“con gure“script.‘ ¶They“a˜re“describGed“in“theޤ ‘ôž|follo¸ãwing‘UUsections.Ž©!Ž8‘ôž|ç1.1Ž‘„ßOption‘ff{enable-CONTRŒÌOLŽŸ8ä‘ôž|ÐIf–°9a“command“line“option“{enable-CONTROL‘°wš¸ãas“spGeci ed,‘Ñ?the“synchronous“and“asynchronous“interrupts“a˜re“enabledŽ¡‘ôž|(see‘UU7).ަ‘ôž|ç1.2Ž‘„ßOption‘ff{enable-CODEŽŸ8ä‘ôž|ÐIf–©õa“command“line“option“{enable-CODE‘©Éw¸ãas“spšGeci ed,‘ÌŽŸJ ‘ôž|Ðoption–‡ŽspšGeci es“numb˜er“of“512-Byte“pages“foš¸ãr“the“Clif“environment“main“memo˜ry‘ÿ*ª.‘rThe“a˜rithmetical“and“tempGo˜ra˜ryަ‘ôž|stack–UUis“multiple“of“this“option“as“w¸ãell.Ž¡‘ôž|ç2.3Ž‘„ßOptions–ffconŒÌtrolling“óX‚ÎR6ff cmss12ëXClif‘³/bdCehavio›¼rŽŸ8ä‘ôž|Î-fcall-b®9y-referenceŽŽ‘Sn_Ðcall–UUbš¸ãy“reference“pa˜rameter“passing“mechanism.ޤêj‘ôž|Î-fno-call-b®9y-referenceŽŽ‘cg=Ðdo–UUnot“pass“paš¸ãrameters“b˜y“reference.Ž¡‘ôž|Î-fcall-b®9y-v‘ÿ\ralueŽŽ‘?¼šÐcall–UUbš¸ãy“value“pa˜rameter“passing“mechanism.Ž¡‘ôž|Î-fno-call-b®9y-v‘ÿ\ralueŽŽ‘OµxÐdo–UUnot“pass“paš¸ãrameters“b˜y“value.ŽŸu5‘ ž~F¸ãrom–UUthe“abšGove“mentioned“options,“only“one“should“b˜e“sp˜eci ed“in“p˜ositive“foš¸ãrm“and“one“in“negative“fo˜rm.Ž¡‘ôž|Î-fhandle-mainŽŽ‘>ÇEÐsimulate–#>compiler-likš¸ãe“bGehavio˜r.‘ÛThe“ les“on“the“command“line“and“included“ les“a˜re“compiled.ަ‘ ž~The–ƒ¶`main'“function“must“bšGe“de ned.‘üêAfter“pa¸ãrsing“pass,‘Nthe“generated“co˜de“is“executed.‘üêThe“main“functionަ‘ ž~is–UUthe“bGeginning“of“execution.ŽŽŸK’áw­²11ŽŽŒ‹ kw ÀÙ ýÚÇ‘ÛÝq²12’GîÂÍCHAPTER–UU2.‘ÇINV¸ãOKING“ÐCLIFŽŽ ÐÙ¸ ýK7‘ÛÝqç2.4Ž‘ÃÔDebugging‘ffoptionsޤ8ä‘ÛÝqÎ-gŽŽ‘êrÃÐpš¸ãroGduce–UUdebugging“info˜rmation.‘qÇThe“source“lines“a˜re“output“during“virtual“machine“coGde“execution.Ž©‘ÛÝqÎ-dyŽŽ‘ñ(Ðdump–UUdebugging“infoš¸ãrmation“during“pa˜rsing“to“standa˜rd“erro˜r.ŽŸ!Ž8‘ÛÝqç2.5Ž‘ÃÔW‘þ¦farning‘ffoptionsŽ¡‘ÛÝqÎ-wŽŽ‘íûÐInhibit–UUall“w•¸ãa“rning‘UUmessages.ަ‘ÛÝqÎ-Wcommen®9tŽŽ‘m\ÐW•¸ãa“rn–UUwhen“a“comment-staš¸ãrt“sequence“`/*'“appGea˜rs“in“a“comment.ަ‘ÛÝqÎ-WformatŽŽ‘;˜ÐCheck–®kcalls“to“`p¸ãrintf›±Ç'“and“`scanf˜',–ÏÍetc.,“to–®kmakš¸ãe“sure“that“the“a˜rguments“supplied“have“t˜ypGes“app˜rop˜riateޤ ‘ôÝsto–UUthe“spGeci ed“fo¸ãrmat“string.ަ‘ÛÝqÎ-WimplicitŽŽ‘ë—ÐW•¸ãa“rn–UUif“a“function“oš¸ãr“pa˜rameter“is“implicitly“decla˜red.ަ‘ÛÝqÎ-W‘ÿ «return-t®9ypQÇeŽŽ‘)¨ÐW•¸ãa“rn–üDif“the“return“statement“is“without“return“value“in“non-void“function,‘o¸ãr“with“a“value“in“`void'Ž¡‘ôÝsfunction.ަ‘ÛÝqÎ-WtrigraphsŽŽ‘aDÐW•¸ãa“rn–UUabGout“trigraphs“usage.ަ‘ÛÝqÎ-W‘ÿ «uninitializedŽŽ‘-™ÇÐAn–UUautomatic“va¸ãriable“is“used“without“ rst“bGeing“initialized.ަ‘ÛÝqÎ-W‘ÿ «allŽŽ‘û›ŸÐAll–UUof“the“abGove“w•¸ãa“rnings.ަ‘ÛÝqÎ-WŽŽ‘ð–OÐPrint–UUextra“w•¸ãa“rning‘UUmessages.ަ‘ÛÝqÎ-W‘ÿ «aggregate-returnŽŽ‘C¢¥ÐW•¸ãa“rn–UUif“any“functions“that“return“structures“oš¸ãr“unions“a˜re“de ned“o˜r“called.ަ‘ÛÝqÎ-W‘ÿ «un®9usedŽŽ‘«óÐW•¸ãa“rn–UUwhenever“a“vaš¸ãriable“is“unused“aside“from“its“decla˜ration.ŽŽŽŒ‹ t4 ÀÙ ýÚÇ ÐÙ¸ ý–Ç‘ôž|ëWChapter‘Ç 3ŽŸ2V8‘ôž|ëUErrorsŽŸ:V8‘ôž|ç3.1Ž‘„ßëXClif–³/erro›¼r“messagesŽŸÛ¿‘ôž|ÐIn–UUthis“chapter“is“a“list“of“Clif“erro¸ãr“messages.ŽŸG.‘ôž|ó5ÂÖN  cmbx12à3.1.1Ž‘Þ|Syn tax–€error“messagesŽŸM…¤ ¡‘ žpÏcase‘?ý1000:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,Ž© *«‘ôž|"variable–?ý`%s'“isn't“declared\n",Ž¡‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1001:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"variable–?ý`%s'“was“already“declared\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1002:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"remote–?ýprocedure“%s“is“not“declared\n",ަ‘ôž|proc_name_text[proc]);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1003:Ž¡‘jERROR_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"local–?ývariable“`%s'“was“already“declared\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1004:Ž¡‘jprint_source_line‘?ý();ަ‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"at–?ýthe“%d-th“char,“near“the“`%s'\n",Ž¡‘ôž|char_counter,‘?ýyytext);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1005:Ž¡‘jprint_source_line‘?ý();ަ‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"invalid–?ýtype“of“the“operand,“%d-th“character\n",ަ‘ôž|char_counter);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1006:Ž¡‘jERROR_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"remote–?ýfunction“`%s'“already“declared\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1007:Ž¡‘jERROR_FULL_INFO(line_counter);ŽŽŸK’áw­²13ŽŽŒ‹zb ÀÙ ýÚÇ‘ÛÝq²14’jrXÍCHAPTER‘UU3.‘ÇERR¸ãORSŽŽ ÐÙ¸ ýK7‘û]_Ïfprintfx‘?ý(stderr,Ž© *«‘ÛÝq"remote–?ýfunction“isn't“declared\n");ޤ ‘û]_break;Ž¡‘ðÝecase‘?ý1008:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"remote–?ýfunctions“are“not“in“the“load“table\n");Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý1009:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"`void'–?ýtype“in“expression\n");Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý1010:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"`void'–?ýtype“assigned“to“l_value\n");Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý1011:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"load–?ýcan't“open“file“`%s'\n",ަ‘ÛÝqyytext);Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý1012:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"variable–?ýor“field“`%s'“declared“void\n",Ž¡‘ÛÝqtext);Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý1013:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"switch–?ýquantity“not“an“integer\n");Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý1014:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"case–?ýlabel“does“not“reduce“to“an“integer“constant\n");Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý1015:Ž¡‘û]_ERROR_FULL_INFO(tmp_c->line_number);ަ‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"duplicate–?ýcase“value\n");ަ‘û]_ERROR_FULL_INFO(tmp_m->line_number);ަ‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"this–?ýis“the“first“entry“for“that“value\n");Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý1016:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"case–?ýlabel“not“within“a“switch“statement\n");Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý1017:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"struct–?ýtag“`%s'“was“already“declared\n",ަ‘ÛÝqtext);Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý1018:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"union–?ýtag“`%s'“was“already“declared\n",ަ‘ÛÝqtext);Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý1019:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"enum–?ýtag“`%s'“was“already“declared\n",ަ‘ÛÝqtext);Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý1020:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"conversion–?ýto“non-scalar“type“requested\n");ŽŽŽŒ‹€ ÀÙ ýÚÇ‘ôž|Í3.1.‘ÇÐCLIF–UUERROR“MESSA¸ãGES’TK/²15ŽŽ ÐÙ¸ ýK7‘jÏbreak;ޤ ‘ žpcase‘?ý1021:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,Ž© *«‘ôž|"invalid–?ýtype“argument“of“`->'\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1022:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"invalid–?ýlvalue“in“unary“`&'\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1023:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"storage–?ýsize“of“`%s'“isn't“known\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1024:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"parameter–?ý`%s'“has“incomplete“type\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡¡ŸªY‘ôž|à3.1.2Ž‘Þ|ó7‚ÎR6 cmss12âClif–ê¨compilation“erro¬rr“messagesŽŸȽ¡‘ žpÏcase‘?ý2000:Ž¡‘jprint_source_line‘?ý();ަ‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"invalid–?ýnumber“of“subscripts\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý2001:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"`%s'–?ýis“not“an“array“variable\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý2002:Ž¡‘jprint_source_line‘?ý();ަ‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"invalid–?ýtype“of“array“subscript\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý2003:Ž¡‘jprint_source_line‘?ý();ަ‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"type–?ýof“formal“parameter“does“not“match“previous“declaration\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý2004:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"number–?ýof“formal“parameters“does“not“match“previous“declaration\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý2005:Ž¡‘jprint_source_line‘?ý();ަ‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"name–?ýof“formal“paramter“does“not“match“previous“declaration\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý2006:Ž¡‘jprint_source_line‘?ý();ަ‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"size–?ýof“array“subscript“of“formal“parameter“does“not“match“previous“declaration\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý2007:Ž¡‘jprint_source_line‘?ý();ަ‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ŽŽŽŒ‹‰x ÀÙ ýÚÇ‘ÛÝq²16’jrXÍCHAPTER‘UU3.‘ÇERR¸ãORSŽŽ ÐÙ¸ ýK7‘ÛÝqÏ"number–?ýof“array“subscripts“of“formal“parameter“does“not“match“previous“declaration\n");ޤ ‘û]_break;Ž¡‘ðÝecase–?ý2008“:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,Ž© *«‘ÛÝq"structure–?ýhas“no“member“named“`%s'\n",Ž¡‘ÛÝqtext);Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý2009:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"request–?ýfor“member“`%s'“in“something“not“a“structure“or“union\n",ަ‘ÛÝqtext);Ž¡‘û]_break;Ž¡¡Ÿ5›‘ÛÝqà3.1.3Ž‘qâClif–ê¨control“statement“erro¬rr“messagesŽŸ‘ðÝeÏcase‘?ý3000:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"`break'–?ýoutside“loop“or“switch\n");Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý3001:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"bad–?ýused“`continue'\n");Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý3002:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"default–?ýlabel“not“within“a“switch“statement\n");Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý3003:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"multiple–?ýdefault“labels“in“one“switch\n");ަ‘û]_ERROR_FULL_INFO(fixp->switch1.def_use.line_number);ަ‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"this–?ýis“the“first“default“label\n");Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý3004:Ž¡‘û]_ERROR_FULL_INFO(line_counter);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"duplicate–?ýlabel“`%s'\n",ަ‘ÛÝqtext);Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý3005:Ž¡‘û]_ERROR_FULL_INFO(error_line_number);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"label–?ý`%s'“used“but“not“defined\n",Ž¡‘ÛÝqtext);Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý3006:Ž¡‘û]_ERROR_FULL_INFO(error_line_number);Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"invalid–?ýlvalue“in“assignment\n");Ž¡‘û]_break;Ž¡¡Ÿ5›‘ÛÝqà3.1.4Ž‘qâClif–ê¨run-time“erro¬rr“messagesŽŸ¡‘ðÝeÏcase‘?ý4000:Ž¡‘û]_ERR_NO_INFO;Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"interpreter:–?ýfull“memory\n");Ž¡‘û]_break;Ž¡‘ðÝecase‘?ý4001:Ž¡‘û]_ERR_NO_INFO;ŽŽŽŒ‹’A ÀÙ ýÚÇ‘ôž|Í3.1.‘ÇÐCLIF–UUERROR“MESSA¸ãGES’TK/²17ŽŽ ÐÙ¸ ýK7‘jÏfprintfx‘?ý(stderr,Ž© *«‘ôž|"interpreter:–?ýstack“overflow\n");ޤ ‘jbreak;Ž¡‘ žpcase‘?ý4002:Ž¡‘jERR_NO_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"operating–?ýsystem“out“of“memory\n");Ž¡‘jbreak;Ž¡Ÿb‰‘ôž|à3.1.5Ž‘Þ|âClif–ê¨fatal“erro¬rr“messagesŽŸW¡¡‘ žpÏcase‘?ý5000:Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"Compile–?ýFatal“");Ž¡‘jERR_NO_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"Interpreter–?ýInternal“Error“(unknown“operand“type)“in“line“%d“e-mail:“%s\n",ަ‘ôž|line_counter,‘?ýEMAIL);Ž¡‘jprint_source_line‘?ý();Ž¡‘jbreak;Ž¡‘ žpcase‘?ý5001:Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"Run-time–?ýFatal“");Ž¡‘jERR_NO_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"–?ýInternal“Interpreter“Error“(unknown“instruction)“e-mail:“%s\n",ަ‘ôž|EMAIL);Ž¡‘jprint_source_line‘?ý();Ž¡‘jbreak;Ž¡‘ žpcase‘?ý5002:Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"Compile–?ýFatal“");Ž¡‘jERR_NO_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"–?ýInterpreter“Internal“Error“(error“in“book-keeping)“in“line“%d“e-mail:“%s\n",ަ‘ôž|line_counter,‘?ýEMAIL);Ž¡‘jprint_source_line‘?ý();Ž¡‘jbreak;Ž¡‘ žpcase‘?ý5003:Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"Compile–?ýFatal“");Ž¡‘jERR_NO_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"–?ýInternal“Interpreter“Error“(error“in“operand“type)“in“line“%d“e-mail:“%s\n",ަ‘ôž|line_counter,‘?ýEMAIL);Ž¡‘jprint_source_line‘?ý();Ž¡‘jbreak;Ž¡¡Ÿb‰‘ôž|à3.1.6Ž‘Þ|âClif›ê¨w•¬ra“rning˜messagesŽŸW¡¡‘ žpÏcase‘?ý6000:Ž¡‘jif‘?ý(warning_yes)ަ‘ôž|{Ž¡‘ÿvERROR_FULL_INFO(line_counter);Ž¡‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"remote–?ýfunction“%s“already“declared\n",ަ‘ žptext);Ž¡‘ôž|}Ž¡‘jreturn;Ž¡‘ žpcase‘?ý6001:Ž¡‘jif‘?ý(warning_yes)ަ‘ôž|{Ž¡‘ÿvERROR_FULL_INFO(line_counter);Ž¡‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"`return'–?ýwith“no“value,“in“function“returning“non-void\n");ަ‘ôž|}ŽŽŽŒ‹š6 ÀÙ ýÚÇ‘ÛÝq²18’jrXÍCHAPTER‘UU3.‘ÇERR¸ãORSŽŽ ÐÙ¸ ýK7‘û]_Ïreturn;ޤ ‘ðÝecase‘?ý6002:Ž¡‘û]_if‘?ý(warning_yes)Ž© *«‘ÛÝq{Ž¡‘æ]kERROR_FULL_INFO(line_counter);Ž¡‘æ]kfprintfx‘?ý(stderr,ަ‘ðÝe"`return'–?ýwith“a“value,“in“function“returning“void\n");ަ‘ÛÝq}Ž¡‘û]_return;Ž¡‘ðÝecase‘?ý6003:Ž¡‘û]_if‘?ý(warning_yes)ަ‘ÛÝq{Ž¡‘æ]kif‘?ý(proc)ަ‘ðÝe{Ž¡‘û]_print_file_name‘?ý();ަ‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"–?ýIn“function“`%s':",Ž¡‘ÛÝqproc_name_text[proc]);Ž¡‘û]_ERROR_INFO;Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"unused–?ývariable“`%s'\n",Ž¡‘ÛÝqtext);Ž¡‘ðÝe}Ž¡‘æ]kelseŽ¡‘ðÝe{Ž¡‘û]_print_file_name‘?ý();ަ‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"–?ýIn“block“finishing“at“line“%d:\n",ަ‘ÛÝqline_counter);Ž¡‘û]_ERROR_INFO;Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"unused–?ývariable“`%s'\n",Ž¡‘ÛÝqtext);Ž¡‘ðÝe}Ž¡‘ÛÝq}Ž¡‘û]_return;Ž¡‘ðÝecase‘?ý6004:Ž¡‘û]_if‘?ý(warning_yes)ަ‘ÛÝq{Ž¡‘æ]kERROR_FULL_INFO(error_line_number);Ž¡‘æ]kfprintfx‘?ý(stderr,ަ‘ðÝe"label–?ý`%s'“defined“but“not“used\n",Ž¡‘ðÝetext);Ž¡‘ÛÝq}Ž¡‘û]_return;Ž¡‘ðÝecase‘?ý6005:Ž¡‘û]_if‘?ý(warning_yes)ަ‘ÛÝq{Ž¡‘æ]kERROR_INFO;Ž¡‘æ]kfprintfx‘?ý(stderr,ަ‘ðÝe"–?ý`/*'“within“comment\n");Ž¡‘ÛÝq}Ž¡‘û]_return;Ž¡‘ðÝecase‘?ý6006:Ž¡‘û]_if‘?ý(warning_yes)ަ‘ÛÝq{Ž¡‘æ]kif‘?ý(proc)ަ‘ðÝe{Ž¡‘û]_print_file_name‘?ý();ަ‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"–?ýIn“function“`%s':",Ž¡‘ÛÝqproc_name_text[proc]);Ž¡‘û]_ERROR_INFO;Ž¡‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"`%s'–?ýmight“be“used“uninitialized“in“this“function\n",ަ‘ÛÝqtext);Ž¡‘ðÝe}Ž¡‘æ]kelseŽ¡‘ðÝe{Ž¡‘û]_print_file_name‘?ý();ަ‘û]_fprintfx‘?ý(stderr,ަ‘ÛÝq"–?ýIn“block“finishing“at“line“%d:",ަ‘ÛÝqline_counter);Ž¡‘û]_ERROR_INFO;ŽŽŽŒ‹¡Ý ÀÙ ýÚÇ‘ôž|Í3.1.‘ÇÐCLIF–UUERROR“MESSA¸ãGES’TK/²19ŽŽ ÐÙ¸ ýK7‘jÏfprintfx‘?ý(stderr,ޤ *«‘ôž|"`%s'–?ýmight“be“used“uninitialized“in“the“block\n",Ž¡‘ôž|text);ޤ ‘ žp}Ž¡‘ôž|}Ž¡‘jreturn;Ž¡‘ žpcase‘?ý6007:Ž¡‘jif‘?ý(warning_yes)Ž© *«‘ôž|{Ž¡‘ÿvprint_file_name‘?ý();ަ‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"–?ýIn“function“`%s':",Ž¡‘ žpproc_name_text[proc]);Ž¡‘ÿvERROR_INFO;Ž¡‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"number–?ýof“locals“is“greater“than“the“ANSI“allows\n");ަ‘ôž|}Ž¡‘jreturn;Ž¡‘ žpcase‘?ý6008:Ž¡‘jif‘?ý(warning_yes)ަ‘ôž|{Ž¡‘ÿvprint_file_name‘?ý();ަ‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"–?ýIn“function“`%s':\n",Ž¡‘ žpproc_name_text[proc]);Ž¡‘ÿvERROR_INFO;Ž¡‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"number–?ýof“params“is“greater“than“the“ANSI“allows\n");ަ‘ôž|}Ž¡‘jreturn;Ž¡‘ žpcase‘?ý6009:Ž¡‘jif‘?ý(warning_yes)ަ‘ôž|{Ž¡‘ÿvchar–?ý*tmp_line,“*beg,“*end,“*com;Ž¡‘ÿvint‘?ýn;Ž¡‘ÿvn–?ý=“strlen(line_buf);Ž¡‘ÿvtmp_line–?ý=“malloc(n+1);ަ‘ÿvif–?ý(NULL“==“tmp_line)ަ‘ žp{Ž¡‘jperror‘?ý("");ަ‘jabort‘?ý();Ž¡‘ žp}Ž¡¡‘ÿvstrcpy–?ý(tmp_line,“line_buf);ަ‘ÿvbeg–?ý=“strrchr“(tmp_line,“'(');ަ‘ÿvif–?ý(NULL“==“beg)ަ‘ žp{Ž¡‘jperror‘?ý("");ަ‘jabort‘?ý();Ž¡‘ žp}Ž¡¡‘ÿvbeg++;ަ‘ÿvcom–?ý=“strrchr“(beg,“',');ަ‘ÿvif–?ý(NULL“!=“com)Ž¡‘ žpbeg–?ý=“com“+“1;ަ‘ÿvfor–?ý(;“*beg“==“'“'“||“*beg“==“'\t';“beg++);Ž¡¡‘ÿvend–?ý=“strrchr“(beg,“'“');ަ‘ÿvcom–?ý=“strchr“(beg,“'“');ަ‘ÿvif–?ý(end“!=“com)Ž¡‘ žp*end–?ý=“'\0';Ž¡‘ÿvelseŽ¡‘ žptmp_line[n–?ý-“1]“=“'\0';Ž¡¡‘ÿvERROR_INFO;Ž¡‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"`%s'–?ýdeclared“inside“parameter“list“its“scope“is“only“this“definition“or“declaration,“which“is“probably“not“what“you“want.\n",ަ‘ žpbeg);ަ‘ÿvfree‘?ý(tmp_line);ަ‘ôž|}Ž¡‘jreturn;Ž¡¡ŽŽŒ‹¨° ÀÙ ýÚÇ‘ÛÝq²20’jrXÍCHAPTER‘UU3.‘ÇERR¸ãORSŽŽ ÐÙ¸ ýK7‘ÛÝqà3.1.7Ž‘qâClif–ê¨initialization“erro¬rr“messagesŽŸªª¤ ¡‘ðÝeÏcase‘?ý7000:Ž¡‘û]_print_error_number‘?ý(err_no);ޤ *«‘û]_fprintfx‘?ý(stderr,Ž¡‘ÛÝq"in–?ýrun-string“and/or“in“`clif.ini'“file\n");ޤ ‘û]_break;Ž¡‘ðÝecase‘?ý7001:Ž¡‘û]_print_error_number‘?ý(err_no);ޤ *«‘û]_fprintfx‘?ý(stderr,Ž¡‘ÛÝq"interpreter:–?ýcan't“open“file“%s\n",Ž¡‘ÛÝqargvv[argc_counter]);ޤ ‘û]_break;Ž¡‘ðÝedefault:Ž¡‘û]_fprintfx–?ý(stderr,“"Fatal“error“invalid“error“number“(%d)“e-mail:“%s\n",“err_no,“EMAIL);Ž¡‘û]_break;Ž¡¡ŽŽŒ‹¯é ÀÙ ýÚÇ ÐÙ¸ ý–7‘ôž|ëWChapter‘Ç 4ŽŸ2‘ôž|ëUSyn‘ÿ8õtax– T{of“the“languageŽŸ4‘ôž|ó  b> cmmi10µ<Ž‘üešÐlist‘™˜‰ffŽ–™šstat‘™˜‰ffŽ“0‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðlist‘™˜‰ffŽ–™šstat‘™˜‰ffŽ“0‘UUµ>Ž‘ s<Ž‘ã‘Ðstat‘™˜‰ffŽ“0‘UUµ>ŽŽ¤ ‘'56¸jŽŽ¡‘ôž|Ð;Ž©‘ôž|µ<Ž‘üešÐlist‘™˜‰ffŽ›™šstat‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðlist‘™˜‰ffŽ˜stat‘UUµ>Ž“<Ž‘ã‘Ðstat‘™˜‰ffŽ˜1‘UUµ>ŽŽ¡‘'56¸jŽŽ¡‘ôž|Ð;ަ‘ôž|µ<Ž‘üešÐstat‘™˜‰ffŽ‘™š0‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðdecla¸ãrations‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐstatement‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐRESUME‘UU';'Ž¡‘'56¸jŽ‘)üSÐ';'Ž¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐerro¸ãr‘UUµ>Ž‘ sÐ';'Ž¡‘ôž|;ަ‘ôž|µ<Ž‘üešÐstat‘™˜‰ffŽ‘™š1‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðstatement‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐGOTO–UUIDENT“';'Ž¡‘'56¸jŽ‘)üSÐ';'Ž¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐerro¸ãr‘UUµ>Ž‘ sÐ'¸gÐ'Ž¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐerro¸ãr‘UUµ>Ž‘ sÐ';'Ž¡‘ôž|;ŽŽŸK’áw­²21ŽŽŒ‹²n ÀÙ ýÚÇ‘ÛÝq²22’$ÍCHAPTER–UU4.‘ÇSYNT‘ÿ*ªAX“OF“THE“LANGUA¸ãGEŽŽ ÐÙ¸ ýK7‘ÛÝqµ<Ž‘ã¤Ðjump‘™˜‰ffŽ‘™šstatement‘UUµ>ŽŽ¤ ‘ÛÝqÐ::=–UUBREAK“';'Ž¡‘t+¸jŽ‘;HÐCONTINUE‘UU';'Ž¡‘t+¸jŽ‘;HÐRETURN‘UUµ<Ž– sÐexp¸ãression‘UUµ>Ž“Ð';'Ž¡‘t+¸jŽ‘;HÐRETURN‘UU';'Ž¡‘ÛÝq;ŽŽŽŒ‹¶_ ÀÙ ýÚÇ’ÎPÞ²23ŽŽ ÐÙ¸ ýK7‘ôž|µ<Ž‘üešÐdecla¸ãration‘™˜‰ffŽ‘™šspGeci ers‘UUµ>ŽŽ¤ ‘ôž|Ð::=‘UUµ<Ž‘ sÐsto¸ãrage‘™˜‰ffŽ–™šclass‘™˜‰ffŽ“spGeci er‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐstoš¸ãrage‘™˜‰ffŽ–™šclass‘™˜‰ffŽ“spGeci er‘UUµ>Ž‘ s<Ž‘ã‘Ðdecla˜ration‘™˜‰ffŽ“spGeci ers‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐt¸ãyp•Ge‘™˜‰ffŽ‘™šsp“eci er‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐtš¸ãyp•Ge‘™˜‰ffŽ‘™šsp“eci er‘UUµ>Ž‘ s<Ž‘ã‘Ðdecla˜ration‘™˜‰ffŽ‘™šsp“eci ers‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐt¸ãypGe‘™˜‰ffŽ‘™šquali er‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐt•¸ãypGe‘™˜‰ffŽ›™šquali er‘UUµ>Ž‘ s<Ž‘ã‘Ðdecla“ration‘™˜‰ffŽ˜spGeci ers‘UUµ>ŽŽ¡‘ôž|Ð;Ž¡‘ôž|M‘UU::=Ž¡‘ôž|;ŽŸ‘ôž|µ<Ž‘üešÐdecla¸ãrations‘UUµ>Ž‘ sÐ::=Ž¡‘ôž|M‘UUµ<Ž– sÐdecla¸ãration‘™˜‰ffŽ›™šspGeci ers‘UUµ>Ž“<Ž‘ã‘Ð rst‘™˜‰ffŽ˜dekl‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐREMOTE–UU'¸fÐ'“INTRINSIC“','“STRINGC“'¸gÐ'“IDENT“';'Ž¡‘'56¸jŽ‘)üSÐREMOTE–UU'¸fÐ'“RPC“','“STRINGC“'¸gÐ'“IDENT“';'Ž¡‘'56¸jŽ‘)üSÐUNLO¸ãAD–UUIDENT“';'Ž¡‘ôž|;ŽŽŽŒ‹·· ÀÙ ýÚÇ‘ÛÝq²24’$ÍCHAPTER–UU4.‘ÇSYNT‘ÿ*ªAX“OF“THE“LANGUA¸ãGEŽŽ ÐÙ¸ ýK7‘ÛÝqµ<Ž‘ã¤Ðstatement‘UUµ>Ž– sÐ::=‘UUµ<Ž“ÐlabGeled‘™˜‰ffŽ‘™šstatement‘UUµ>ŽŽ¤ ‘t+¸jŽ‘;Hµ<Ž‘fÐcompGound‘™˜‰ffŽ‘™šstatement‘UUµ>ŽŽ¡‘t+¸jŽŽ¡‘ÛÝqµ<Ž‘ã¤Ðexp¸ãression‘UUµ>Ž‘ sÐ';'Ž¡‘t+¸jŽ‘;Hµ<Ž‘fÐselection‘™˜‰ffŽ‘™šstatement‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐiteration‘™˜‰ffŽ‘™šstatement‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐjump‘™˜‰ffŽ‘™šstatement‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐEXIT‘UU';'Ž¡‘t+¸jŽ‘;HÐCSUSPEND‘UU';'Ž¡‘ÛÝq;ŽŽŽŒ‹¼L ÀÙ ýÚÇ’ÎPÞ²25ŽŽ ÐÙ¸ ýK7‘ôž|µ<Ž‘üešÐselection‘™˜‰ffŽ‘™šstatement‘UUµ>ŽŽ¤ ‘ôž|Ð::=–UUIF“'('“µ<Ž› sÐexp¸ãression“µ>Ž˜Ð')'Ž¡‘ôž|µ<Ž‘üešÐthen‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐSWITCH–UU'('“µ<Ž› sÐexp¸ãression“µ>Ž˜Ð')'Ž¡‘ôž|µ<Ž‘üešÐswitch‘™˜‰ffŽ‘™šb•Go“dy‘UUµ>ŽŽ¡‘ôž|Ð;ŽŽŽŒ‹¾¿ ÀÙ ýÚÇ‘ÛÝq²26’$ÍCHAPTER–UU4.‘ÇSYNT‘ÿ*ªAX“OF“THE“LANGUA¸ãGEŽŽ ÐÙ¸ ýK7‘ÛÝqµ<Ž‘ã¤Ðiteration‘™˜‰ffŽ‘™šstatement‘UUµ>ŽŽ¤ ‘ÛÝqÐ::=‘UUWHILEŽ¡‘ÛÝq'('‘UUµ<Ž– sÐexp¸ãression‘UUµ>Ž“Ð')'Ž¡‘ÛÝqµ<Ž‘ã¤Ðwhile‘™˜‰ffŽ‘™šstat‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐDOŽ¡‘ÛÝqµ<Ž‘ã¤Ðdo‘™˜‰ffŽ–™šwhile‘™˜‰ffŽ“stat‘UUµ>ŽŽ¡‘ÛÝqÐWHILE–UU'('“µ<Ž› sÐexp¸ãression“µ>Ž˜Ð')'“';'Ž¡‘t+¸jŽ‘;HÐF•¸ãOR‘UUµ<Ž› sÐfo“r‘UUµ>Ž˜<Ž‘ã‘Ðfo“r‘™˜‰ffŽ‘™šstat‘UUµ>ŽŽ¡‘ÛÝqÐ;Ž©‘ÛÝqµ<Ž‘ã¤Ðwhile‘™˜‰ffŽ›™šstat‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðstat‘™˜‰ffŽ˜1‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðdo‘™˜‰ffŽ–™šwhile‘™˜‰ffŽ“stat‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž‘ sÐstat‘™˜‰ffŽ‘™š1‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðfo¸ãr‘™˜‰ffŽ›™šstat‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðstat‘™˜‰ffŽ˜1‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðfo¸ãr‘UUµ>Ž› sÐ::=–UU'('“µ<Ž˜Ðexp¸ãression“µ>Ž˜Ð';'Ž¡‘ÛÝqµ<Ž‘ã¤Ðfo•¸ãr‘™˜‰ffŽ‘™šexp“r1‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐ'('‘UU';'Ž¡‘ÛÝqµ<Ž‘ã¤Ðfo•¸ãr‘™˜‰ffŽ‘™šexp“r1‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðfo•¸ãr‘™˜‰ffŽ‘™šexp“r1‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðexp¸ãression‘UUµ>Ž“Ð';'Ž¡‘ÛÝqµ<Ž‘ã¤Ðfo•¸ãr‘™˜‰ffŽ‘™šexp“r2‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐ';'Ž¡‘ÛÝqµ<Ž‘ã¤Ðfo•¸ãr‘™˜‰ffŽ‘™šexp“r2‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðfo•¸ãr‘™˜‰ffŽ‘™šexp“r2‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðexp¸ãression‘UUµ>Ž“Ð')'Ž¡‘t+¸jŽ‘;HÐ')'Ž¡‘ÛÝq;ŽŽŽŒ‹À" ÀÙ ýÚÇ’ÎPÞ²27ŽŽ ÐÙ¸ ýK7‘ôž|µ<Ž‘üešÐt¸ãyp•Ge‘™˜‰ffŽ‘™šsp“eci er‘UUµ>Ž‘ sÐ::=‘UUINTޤ ‘'56¸jŽ‘)üSÐDOUBLEŽ¡‘'56¸jŽ‘)üSÐFLO¸ãA‘ÿ*ªTŽ¡‘'56¸jŽ‘)üSÐCHARŽ¡‘'56¸jŽ‘)üSÐV¸ãOIDŽ¡‘'56¸jŽ‘)üSÐLONGŽ¡‘'56¸jŽ‘)üSÐSHORTŽ¡‘'56¸jŽ‘)üSÐSIGNEDŽ¡‘'56¸jŽ‘)üSÐUNSIGNEDŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐstruct‘™˜‰ffŽ–™šo¸ãr‘™˜‰ffŽ“union‘™˜‰ffŽ“spGeci er‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐenum‘™˜‰ffŽ‘™šspGeci er‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐTYPENAMEŽ¡‘ôž|;Ž©‘ôž|µ<Ž‘üešÐt¸ãypGe‘™˜‰ffŽ‘™šquali er‘UUµ>ŽŽ¡‘ôž|Ð::=‘UUCONSTŽ¡‘'56¸jŽ‘)üSÐV¸ãOLA‘ÿ*ªTILEŽ¡‘ôž|;ަ‘ôž|µ<Ž‘üešÐpGointer‘UUµ>ŽŽ¡‘ôž|Ð::=‘UU'¸Ð'Ž¡‘'56¸jŽ‘)üSÐ'¸Ð'‘UUµ<Ž‘ sÐt¸ãypGe‘™˜‰ffŽ–™šquali er‘™˜‰ffŽ“list‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐ'¸Ð'‘UUµ<Ž‘ sÐpGointer‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐ'¸Ð'‘UUµ<Ž› sÐt¸ãypGe‘™˜‰ffŽ–™šquali er‘™˜‰ffŽ“list‘UUµ>Ž˜<Ž‘ã‘ÐpGointer‘UUµ>ŽŽ¡‘ôž|Ð;ަ‘ôž|µ<Ž‘üešÐt¸ãypGe‘™˜‰ffŽ–™šquali er‘™˜‰ffŽ“list‘UUµ>ŽŽ¡‘ôž|Ð::=‘UUµ<Ž‘ sÐt¸ãypGe‘™˜‰ffŽ‘™šquali er‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐtš¸ãypGe‘™˜‰ffŽ–™šquali er‘™˜‰ffŽ“list‘UUµ>Ž‘ s<Ž‘ã‘Ðt˜ypGe‘™˜‰ffŽ“quali er‘UUµ>ŽŽ¡‘ôž|Ð;ަ‘ôž|µ<Ž‘üešÐstruct‘™˜‰ffŽ–™šo¸ãr‘™˜‰ffŽ“union‘™˜‰ffŽ“spGeci er‘UUµ>ŽŽ¡‘ôž|Ð::=‘UUµ<Ž› sÐstruct‘™˜‰ffŽ–™šo¸ãr‘™˜‰ffŽ“union‘UUµ>Ž˜ÐIDENTŽ¡‘ôž|'¸fÐ'‘UUµ<Ž› sÐstruct‘™˜‰ffŽ–™šdecla¸ãration‘™˜‰ffŽ“list‘UUµ>Ž˜Ð'¸gÐ'Ž¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐstruct‘™˜‰ffŽ–™šo¸ãr‘™˜‰ffŽ“union‘UUµ>ŽŽ¡‘ôž|Ð'¸fÐ'‘UUµ<Ž› sÐstruct‘™˜‰ffŽ–™šdecla¸ãration‘™˜‰ffŽ“list‘UUµ>Ž˜Ð'¸gÐ'Ž¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐstruct‘™˜‰ffŽ–™šo¸ãr‘™˜‰ffŽ“union‘UUµ>Ž‘ sÐIDENTŽ¡‘ôž|;ަ‘ôž|µ<Ž‘üešÐstruct‘™˜‰ffŽ–™šo¸ãr‘™˜‰ffŽ“union‘UUµ>ŽŽ¡‘ôž|Ð::=‘UUSTRUCTŽ¡‘'56¸jŽ‘)üSÐUNIONŽ¡‘ôž|;ަ‘ôž|µ<Ž‘üešÐstruct‘™˜‰ffŽ–™šdecla¸ãration‘™˜‰ffŽ“list‘UUµ>ŽŽ¡‘ôž|Ð::=‘UUµ<Ž‘ sÐstruct‘™˜‰ffŽ‘™šdecla¸ãration‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐstruct‘™˜‰ffŽ–™šdeclaš¸ãration‘™˜‰ffŽ“list‘UUµ>Ž‘ s<Ž‘ã‘Ðstruct‘™˜‰ffŽ“decla˜ration‘UUµ>ŽŽ¡‘ôž|Ð;ަ‘ôž|µ<Ž‘üešÐstruct‘™˜‰ffŽ‘™šdecla¸ãration‘UUµ>ŽŽ¡‘ôž|Ð::=–UUM“µ<Ž› sÐspGeci er‘™˜‰ffŽ–™šquali er‘™˜‰ffŽ“list‘UUµ>Ž˜<Ž‘ã‘Ðstruct‘™˜‰ffŽ“decla•¸ãrato“r‘™˜‰ffŽ‘™šlist‘UUµ>Ž˜Ð';'Ž¡‘ôž|;ަ‘ôž|µ<Ž‘üešÐspGeci er‘™˜‰ffŽ–™šquali er‘™˜‰ffŽ“list‘UUµ>ŽŽ¡‘ôž|Ð::=‘UUµ<Ž‘ sÐt¸ãyp•Ge‘™˜‰ffŽ‘™šsp“eci er‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐt¸ãyp•Ge‘™˜‰ffŽ›™šsp“eci er‘UUµ>Ž‘ s<Ž‘ã‘Ðsp“eci er‘™˜‰ffŽ˜quali er‘™˜‰ffŽ˜list‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐt¸ãypGe‘™˜‰ffŽ‘™šquali er‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐt¸ãyp•Ge‘™˜‰ffŽ›™šquali er‘UUµ>Ž‘ s<Ž‘ã‘Ðsp“eci er‘™˜‰ffŽ˜quali er‘™˜‰ffŽ˜list‘UUµ>ŽŽ¡‘ôž|Ð;ŽŽŽŒ‹Åþ ÀÙ ýÚÇ‘ÛÝq²28’$ÍCHAPTER–UU4.‘ÇSYNT‘ÿ*ªAX“OF“THE“LANGUA¸ãGEŽŽ ÐÙ¸ ýK7‘ÛÝqµ<Ž‘ã¤Ðstruct‘™˜‰ffŽ›™šdecla•¸ãrato“r‘™˜‰ffŽ˜list‘UUµ>ŽŽ¤ ‘ÛÝqÐ::=‘UUµ<Ž‘ sÐstruct‘™˜‰ffŽ‘™šdecla•¸ãrato“r‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐstruct‘™˜‰ffŽ›™šdecla•¸ãrato“r‘™˜‰ffŽ˜list‘UUµ>Ž– sÐ','‘UUµ<Ž“Ðstruct‘™˜‰ffŽ˜decla•¸ãrato“r‘UUµ>ŽŽ¡‘ÛÝqÐ;Ž©]‘ÛÝqµ<Ž‘ã¤Ðstruct‘™˜‰ffŽ‘™šdecla•¸ãrato“r‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž‘ sÐdecla•¸ãrato“r‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐ':'‘qǵ<Ž‘ 8åÐconstant‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐdecla•¸ãrato“r‘UUµ>Ž‘ sÐ':'‘qǵ<Ž‘ 8åÐconstant‘™˜‰ffŽ‘™šexp“ression‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðenum‘™˜‰ffŽ‘™šspGeci er‘UUµ>ŽŽ¡‘ÛÝqÐ::=–UUENUM“'¸fÐ'Ž¡‘ÛÝqµ<Ž‘ã¤Ðenumerato¸ãr‘™˜‰ffŽ‘™šlist‘UUµ>Ž‘ sÐ'¸gÐ'Ž¡‘t+¸jŽ‘;HÐENUM–UUIDENT“'¸fÐ'Ž¡‘ÛÝqµ<Ž‘ã¤Ðenumerato¸ãr‘™˜‰ffŽ‘™šlist‘UUµ>Ž‘ sÐ'¸gÐ'Ž¡‘t+¸jŽ‘;HÐENUM‘UUIDENTŽ¡‘ÛÝq;ަ‘ÛÝqµ<Ž‘ã¤Ðenumerato¸ãr‘™˜‰ffŽ‘™šlist‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž‘ sÐenumerato¸ãr‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐenumeratoš¸ãr‘™˜‰ffŽ‘™šlist‘UUµ>Ž– sÐ','‘UUµ<Ž“Ðenumerato˜r‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðenumerato¸ãr‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUIDENTŽ¡‘t+¸jŽ‘;HÐIDENT–UU'='“µ<Ž‘ sÐconstant‘™˜‰ffŽ‘™šexp¸ãression“µ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðdecla•¸ãrato“r‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž– sÐpGointer‘UUµ>Ž“<Ž‘ã‘Ðdirect‘™˜‰ffŽ‘™šdecla•¸ãrato“r‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐdirect‘™˜‰ffŽ‘™šdecla•¸ãrato“r‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðdirect‘™˜‰ffŽ‘™šdecla•¸ãrato“r‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUIDENTŽ¡‘t+¸jŽ‘;HÐIDENT‘UUµ<Ž‘ sÐlist‘™˜‰ffŽ‘™šdim‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðinitializer‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž‘ sÐassignment‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐ'¸fÐ'Ž¡‘ÛÝqµ<Ž‘ã¤Ðinitializer‘™˜‰ffŽ–™šlist‘™˜‰ffŽ“complete‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðinitializer‘™˜‰ffŽ–™šlist‘™˜‰ffŽ“complete‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž– sÐinitializer‘™˜‰ffŽ‘™šlist‘UUµ>Ž“Ð'¸gÐ'Ž¡‘t+¸jŽ‘;Hµ<Ž‘fÐinitializer‘™˜‰ffŽ‘™šlist‘UUµ>Ž‘ sÐ','‘UU'¸gÐ'Ž¡‘ÛÝq;ަ‘ÛÝqµ<Ž‘ã¤Ðinitializer‘™˜‰ffŽ‘™šlist‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž‘ sÐinitializer‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐinitializer‘™˜‰ffŽ‘™šlist‘UUµ>Ž‘ sÐ','Ž¡‘ÛÝqµ<Ž‘ã¤Ðinitializer‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðt¸ãypGe‘™˜‰ffŽ‘™šname‘UUµ>ŽŽ¡‘ÛÝqÐ::=–UUM“µ<Ž‘ sÐspGeci er‘™˜‰ffŽ–™šquali er‘™˜‰ffŽ“list‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐM‘UUµ<Ž› sÐspGeci er‘™˜‰ffŽ–™šquali er‘™˜‰ffŽ“list‘UUµ>Ž˜<Ž‘ã‘Ðabstract‘™˜‰ffŽ“decla•¸ãrato“r‘UUµ>ŽŽ¡‘ÛÝqÐ;ŽŽŽŒ‹Ò ÀÙ ýÚÇ’ÎPÞ²29ŽŽ ÐÙ¸ ýK7‘ôž|µ<Ž‘üešÐabstract‘™˜‰ffŽ‘™šdecla•¸ãrato“r‘UUµ>ŽŽ¤ ‘ôž|Ð::=‘UUµ<Ž‘ sÐpGointer‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐdirect‘™˜‰ffŽ–™šabstract‘™˜‰ffŽ“decla•¸ãrato“r‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐpGointer‘UUµ>Ž‘ s<Ž‘ã‘Ðdirect‘™˜‰ffŽ–™šabstract‘™˜‰ffŽ“decla•¸ãrato“r‘UUµ>ŽŽ¡‘ôž|Ð;Ž©‘ôž|µ<Ž‘üešÐdirect‘™˜‰ffŽ–™šabstract‘™˜‰ffŽ“decla•¸ãrato“r‘UUµ>ŽŽ¡‘ôž|Ð::=–UU'('“µ<Ž› sÐabstract‘™˜‰ffŽ‘™šdecla•¸ãrato“r‘UUµ>Ž˜Ð')'Ž¡‘'56¸jŽ‘)üSÐ'²[Ð'‘UU'²]Ð'Ž¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐdirect‘™˜‰ffŽ–™šabstract‘™˜‰ffŽ“decla•¸ãrato“r‘UUµ>Ž‘ sÐ'²[Ð'‘UU'²]Ð'Ž¡‘'56¸jŽ‘)üSÐ'²[Ð'‘UUµ<Ž– sÐconstant‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>Ž“Ð'²]Ð'Ž¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐdirect‘™˜‰ffŽ–™šabstract‘™˜‰ffŽ“decla•¸ãrato“r‘UUµ>Ž– sÐ'²[Ð'‘UUµ<Ž“Ðconstant‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>Ž“Ð'²]Ð'Ž¡‘'56¸jŽ‘)üSÐ'('‘UU')'Ž¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐdirect‘™˜‰ffŽ–™šabstract‘™˜‰ffŽ“decla•¸ãrato“r‘UUµ>Ž‘ sÐ'('‘UU')'Ž¡‘'56¸jŽ‘)üSÐ'('‘UUµ<Ž‘ sÐlist‘™˜‰ffŽ–™št¸ãypšGe‘™˜‰ffŽ“sp˜ec‘UUµ>Ž‘ sÐ')'Ž¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐdirect‘™˜‰ffŽ–™šabstract‘™˜‰ffŽ“decla•¸ãrato“r‘UUµ>Ž– sÐ'('‘UUµ<Ž“Ðlist‘™˜‰ffŽ–™št¸ãypšGe‘™˜‰ffŽ“sp˜ec‘UUµ>Ž‘ sÐ')'Ž¡‘ôž|;ަ‘ôž|µ<Ž‘üešÐsto¸ãrage‘™˜‰ffŽ–™šclass‘™˜‰ffŽ“spGeci er‘UUµ>ŽŽ¡‘ôž|Ð::=‘UUTYPEDEFŽ¡‘'56¸jŽ‘)üSÐEXTERNŽ¡‘'56¸jŽ‘)üSÐEXPORT‘™˜‰ffŽ‘™šTŽ¡‘'56¸jŽ‘)üSÐST–ÿ*ªA“TICŽ¡‘'56¸jŽ‘)üSÐA¸ãUTOŽ¡‘'56¸jŽ‘)üSÐREGISTERŽ¡‘ôž|;ŽŽŽŒ‹Üô ÀÙ ýÚÇ‘ÛÝq²30’$ÍCHAPTER–UU4.‘ÇSYNT‘ÿ*ªAX“OF“THE“LANGUA¸ãGEŽŽ ÐÙ¸ ýK7‘ÛÝqµ<Ž‘ã¤Ðlist‘™˜‰ffŽ–™št¸ãypšGe‘™˜‰ffŽ“sp˜ec‘UUµ>Ž› sÐ::=–UUM“µ<Ž˜Ðdecla¸ãration‘™˜‰ffŽ‘™šspGeci ers“µ>ŽŽ¤ ‘t+¸jŽ‘;HÐM‘UUµ<Ž– sÐdecla¸ãration‘™˜‰ffŽ‘™šspGeci ers‘UUµ>Ž“Ð','Ž¡‘ÛÝqµ<Ž‘ã¤Ðlist‘™˜‰ffŽ–™št¸ãypšGe‘™˜‰ffŽ“sp˜ec‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐM‘UUµ<Ž– sÐdecla¸ãration‘™˜‰ffŽ›™šspGeci ers‘UUµ>Ž“<Ž‘ã‘Ðlist‘™˜‰ffŽ˜dim‘™˜‰ffŽ˜o¸ãr‘™˜‰ffŽ˜pGointer‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐM‘UUµ<Ž– sÐdecla¸ãration‘™˜‰ffŽ›™šspGeci ers‘UUµ>Ž“<Ž‘ã‘Ðlist‘™˜‰ffŽ˜dim‘™˜‰ffŽ˜o¸ãr‘™˜‰ffŽ˜pGointer‘UUµ>Ž“Ð','Ž¡‘ÛÝqµ<Ž‘ã¤Ðlist‘™˜‰ffŽ–™št¸ãypšGe‘™˜‰ffŽ“sp˜ec‘UUµ>ŽŽ¡‘ÛÝqÐ;ŽŸ‘ÛÝqµ<Ž‘ã¤Ðlist‘™˜‰ffŽ–™šdim‘™˜‰ffŽ“o¸ãr‘™˜‰ffŽ“pGointer‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðlist‘™˜‰ffŽ‘™šdim‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐpGointer‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐ'('‘UUµ<Ž– sÐpGointer‘UUµ>Ž“Ð')'–UU'('“')'Ž¡‘t+¸jŽ‘;HÐ'('‘UUµ<Ž– sÐpšGointer‘UUµ>Ž“Ð')'–UU'('“µ<Ž‘ sÐlist‘™˜‰ffŽ–™št¸ãyp˜e‘™˜‰ffŽ“sp˜ec‘UUµ>Ž‘ sÐ')'Ž¡‘t+¸jŽ‘;HÐ'('‘UUµ<Ž– sÐpGointer‘UUµ>Ž“Ð')'‘UUµ<Ž“Ðlist‘™˜‰ffŽ‘™šdim‘UUµ>ŽŽ¡‘ÛÝqÐ;ŽŽŽŒ‹ã ÀÙ ýÚÇ’ÎPÞ²31ŽŽ ÐÙ¸ ýK7‘ôž|µ<Ž‘üešÐ rst‘™˜‰ffŽ‘™šdekl‘UUµ>Ž‘ sÐ::=‘UUIDENTޤ ‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ‘™šoptional‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐIDENT‘UUµ<Ž‘ sÐlist‘™˜‰ffŽ‘™šdim‘UUµ>ŽŽ¡‘ôž|<Ž‘üešÐinitializer‘™˜‰ffŽ‘™šoptional‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐpGointer‘UUµ>Ž‘ sÐIDENTŽ¡‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ‘™šoptional‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐpGointer‘UUµ>Ž– sÐIDENT‘UUµ<Ž“Ðlist‘™˜‰ffŽ‘™šdim‘UUµ>ŽŽ¡‘ôž|<Ž‘üešÐinitializer‘™˜‰ffŽ‘™šoptional‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐIDENT‘UU'('Ž¡‘ôž|µ<Ž‘üešÐfunc‘™˜‰ffŽ‘™š rst‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐpGointer‘UUµ>Ž‘ sÐIDENT‘UU'('Ž¡‘ôž|µ<Ž‘üešÐfunc‘™˜‰ffŽ‘™š rst‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐ';'Ž¡‘ôž|;Ž©‘ôž|µ<Ž‘üešÐfunc‘™˜‰ffŽ‘™š rst‘UUµ>Ž‘ sÐ::=‘UU')'Ž¡‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ‘™šoptional‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐlist‘™˜‰ffŽ–™št¸ãypšGe‘™˜‰ffŽ“sp˜ec‘UUµ>Ž‘ sÐ')'Ž¡‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ‘™šoptional‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐlist‘™˜‰ffŽ–™šfoš¸ãrm‘™˜‰ffŽ“pa˜ram‘UUµ>Ž‘ sÐ')'Ž¡‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ‘™šoptional‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐlist‘™˜‰ffŽ–™šfoš¸ãrm‘™˜‰ffŽ“pa˜ram‘UUµ>Ž‘ sÐ')'Ž¡‘ôž|µ<Ž‘üešÐcompGound‘™˜‰ffŽ‘™šstatement‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐ')'Ž¡‘ôž|µ<Ž‘üešÐcompGound‘™˜‰ffŽ‘™šstatement‘UUµ>ŽŽ¡‘ôž|Ð;ަ‘ôž|µ<Ž‘üešÐfunc‘™˜‰ffŽ‘™šrest‘UUµ>Ž‘ sÐ::=‘UU')'Ž¡‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ‘™šoptional‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐlist‘™˜‰ffŽ–™št¸ãypšGe‘™˜‰ffŽ“sp˜ec‘UUµ>Ž‘ sÐ')'Ž¡‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ‘™šoptional‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐlist‘™˜‰ffŽ–™šfoš¸ãrm‘™˜‰ffŽ“pa˜ram‘UUµ>Ž‘ sÐ')'Ž¡‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ‘™šoptional‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐerro¸ãr‘UUµ>Ž‘ sÐ'¸fÐ'Ž¡‘ôž|;ŽŽŽŒ‹ èî ÀÙ ýÚÇ‘ÛÝq²32’$ÍCHAPTER–UU4.‘ÇSYNT‘ÿ*ªAX“OF“THE“LANGUA¸ãGEŽŽ ÐÙ¸ ýK7‘ÛÝqµ<Ž‘ã¤Ðlist‘™˜‰ffŽ‘™šdekl‘UUµ>Ž‘ sÐ::=‘UUIDENTޤ ‘ÛÝqµ<Ž‘ã¤Ðinitializer‘™˜‰ffŽ‘™šoptional‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐIDENT‘UUµ<Ž‘ sÐlist‘™˜‰ffŽ‘™šdim‘UUµ>ŽŽ¡‘ÛÝq<Ž‘ã¤Ðinitializer‘™˜‰ffŽ‘™šoptional‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐIDENT‘UU'('Ž¡‘ÛÝqµ<Ž‘ã¤Ðfunc‘™˜‰ffŽ‘™šrest‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐpGointer‘UUµ>Ž‘ sÐIDENTŽ¡‘ÛÝqµ<Ž‘ã¤Ðinitializer‘™˜‰ffŽ‘™šoptional‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐpGointer‘UUµ>Ž– sÐIDENT‘UUµ<Ž“Ðlist‘™˜‰ffŽ‘™šdim‘UUµ>ŽŽ¡‘ÛÝq<Ž‘ã¤Ðinitializer‘™˜‰ffŽ‘™šoptional‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐpGointer‘UUµ>Ž‘ sÐIDENT‘UU'('Ž¡‘ÛÝqµ<Ž‘ã¤Ðfunc‘™˜‰ffŽ‘™šrest‘UUµ>ŽŽ¡‘ÛÝqÐ;Ž©‘ÛÝqµ<Ž‘ã¤Ðinitializer‘™˜‰ffŽ‘™šoptional‘UUµ>ŽŽ¡‘ÛÝqÐ::=–UU';'“RŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐinitialization‘UUµ>Ž‘ sÐ';'Ž¡‘t+¸jŽ‘;HÐ','–UUR“µ<Ž‘ sÐlist‘™˜‰ffŽ‘™šdekl“µ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐinitialization‘UUµ>ŽŽ¡‘ÛÝqÐ','‘UUµ<Ž‘ sÐlist‘™˜‰ffŽ‘™šdekl‘UUµ>ŽŽ¡‘ÛÝqÐ;Ž¡‘ÛÝqR‘UU::=Ž¡‘ÛÝq;ަ‘ÛÝqµ<Ž‘ã¤Ðinitialization‘UUµ>ŽŽ¡‘ÛÝqÐ::=–UU'='“µ<Ž‘ sÐinitializer“µ>ŽŽ¡‘ÛÝqÐ;ŽŽŽŒ‹!ðË ÀÙ ýÚÇ’ÎPÞ²33ŽŽ ÐÙ¸ ýK7‘ôž|µ<Ž‘üešÐthen‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðstat‘™˜‰ffŽ‘™š1‘UUµ>ŽŽ¤ ‘ôž|ÐELSE‘UUµ<Ž‘ sÐstat‘™˜‰ffŽ‘™š1‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐstat‘™˜‰ffŽ‘™š1‘UUµ>ŽŽ¡‘ôž|Ð;ŽŸ‘ôž|µ<Ž‘üešÐswitch‘™˜‰ffŽ›™šb•Go“dy‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðstat‘™˜‰ffŽ˜1‘UUµ>ŽŽ¡‘ôž|Ð;ŽŽŽŒ‹"õÛ ÀÙ ýÚÇ‘ÛÝq²34’$ÍCHAPTER–UU4.‘ÇSYNT‘ÿ*ªAX“OF“THE“LANGUA¸ãGEŽŽ ÐÙ¸ ýK7‘ÛÝqµ<Ž‘ã¤ÐlabGeled‘™˜‰ffŽ‘™šstatement‘UUµ>ŽŽ¤ ‘ÛÝqÐ::=–UUIDENT“':'Ž¡‘ÛÝqµ<Ž‘ã¤Ðstat‘™˜‰ffŽ‘™š1‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐCASEŽ¡‘ÛÝqµ<Ž‘ã¤Ðconstant‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ':'‘qǵ<Ž‘ 8åÐstat‘™˜‰ffŽ‘™š1‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐDEF–ÿ*ªA¸ãUL“T‘UU':'Ž¡‘ÛÝqµ<Ž‘ã¤Ðstat‘™˜‰ffŽ‘™š1‘UUµ>ŽŽ¡‘ÛÝqÐ;ŽŽŽŒ‹#÷k ÀÙ ýÚÇ’ÎPÞ²35ŽŽ ÐÙ¸ ýK7‘ôž|µ<Ž‘üešÐcompGound‘™˜‰ffŽ‘™šstatement‘UUµ>ŽŽ¤ ‘ôž|Ð::=–UU'¸fÐ'“N“µ<Ž› sÐlist‘™˜‰ffŽ‘™šstat“µ>Ž˜Ð'¸gÐ'Ž¡‘'56¸jŽ‘)üSÐ'¸fÐ'–UUN“µ<Ž‘ sÐlist‘™˜‰ffŽ–™šloGc‘™˜‰ffŽ“dekl‘UUµ>ŽŽ¡‘ôž|<Ž‘üešÐlist‘™˜‰ffŽ‘™šstat‘UUµ>Ž‘ sÐ'¸gÐ'Ž¡‘ôž|;Ž¡‘ôž|NŽ¡‘ôž|::=Ž¡‘ôž|;Ž©ôã‘ôž|µ<Ž‘üešÐlist‘™˜‰ffŽ–™šfoš¸ãrm‘™˜‰ffŽ“pa˜ram‘UUµ>ŽŽ¡‘ôž|Ð::=–UUM“µ<Ž› sÐdecla¸ãration‘™˜‰ffŽ‘™šspGeci ers“µ>Ž˜ÐIDENTŽ¡‘'56¸jŽ‘)üSÐM‘UUµ<Ž– sÐdecla¸ãration‘™˜‰ffŽ‘™šspGeci ers‘UUµ>Ž“ÐIDENT‘UU','Ž¡‘ôž|µ<Ž‘üešÐlist‘™˜‰ffŽ–™šfoš¸ãrm‘™˜‰ffŽ“pa˜ram‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐM‘UUµ<Ž– sÐdecla¸ãration‘™˜‰ffŽ›™šspGeci ers‘UUµ>Ž“ÐIDENT‘UUµ<Ž“Ðlist‘™˜‰ffŽ˜dim‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐM‘UUµ<Ž– sÐdecla¸ãration‘™˜‰ffŽ›™šspGeci ers‘UUµ>Ž“ÐIDENT‘UUµ<Ž“Ðlist‘™˜‰ffŽ˜dim‘UUµ>Ž“Ð','Ž¡‘ôž|µ<Ž‘üešÐlist‘™˜‰ffŽ–™šfoš¸ãrm‘™˜‰ffŽ“pa˜ram‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐM‘UUµ<Ž– sÐdecla¸ãration‘™˜‰ffŽ‘™šspšGeci ers‘UUµ>Ž“<Ž‘ã‘Ðp˜ointer‘UUµ>Ž“ÐIDENTŽ¡‘'56¸jŽ‘)üSÐM‘UUµ<Ž– sÐdecla¸ãration‘™˜‰ffŽ‘™šspšGeci ers‘UUµ>Ž“<Ž‘ã‘Ðp˜ointer‘UUµ>Ž“ÐIDENT‘UU','Ž¡‘ôž|µ<Ž‘üešÐlist‘™˜‰ffŽ–™šfoš¸ãrm‘™˜‰ffŽ“pa˜ram‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐM‘UUµ<Ž– sÐdecla¸ãration‘™˜‰ffŽ‘™šspšGeci ers‘UUµ>Ž“<Ž‘ã‘Ðp˜ointer‘UUµ>Ž“ÐIDENT‘UUµ<Ž“Ðlist‘™˜‰ffŽ‘™šdim‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐM‘UUµ<Ž– sÐdecla¸ãration‘™˜‰ffŽ‘™šspšGeci ers‘UUµ>Ž“<Ž‘ã‘Ðp˜ointer‘UUµ>Ž“ÐIDENT‘UUµ<Ž“Ðlist‘™˜‰ffŽ‘™šdim‘UUµ>Ž“Ð','Ž¡‘ôž|µ<Ž‘üešÐlist‘™˜‰ffŽ–™šfoš¸ãrm‘™˜‰ffŽ“pa˜ram‘UUµ>ŽŽ¡‘ôž|Ð;ަ‘ôž|µ<Ž‘üešÐlist‘™˜‰ffŽ‘™šdim‘UUµ>Ž‘ sÐ::=–UU'²[Ð'“'²]Ð'Ž¡‘'56¸jŽ‘)üSÐ'²[Ð'–UUNUMBERI“'²]Ð'Ž¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐlist‘™˜‰ffŽ‘™šdim‘UUµ>Ž‘ sÐ'²[Ð'–UUNUMBERI“'²]Ð'Ž¡‘ôž|;ަ‘ôž|µ<Ž‘üešÐlist‘™˜‰ffŽ–™šloGc‘™˜‰ffŽ“dekl‘UUµ>ŽŽ¡‘ôž|Ð::=–UUM“µ<Ž› sÐdecla¸ãration‘™˜‰ffŽ‘™šspGeci ers“µ>Ž˜<Ž‘ã‘Ðlist‘™˜‰ffŽ–™šloGc‘™˜‰ffŽ“dekl‘™˜‰ffŽ“1‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐM‘UUµ<Ž– sÐdecla¸ãration‘™˜‰ffŽ‘™šspGeci ers‘UUµ>Ž“Ð';'Ž¡‘'56¸jŽ‘)üSÐM‘UUµ<Ž– sÐdecla¸ãration‘™˜‰ffŽ‘™šspGeci ers‘UUµ>Ž“Ð';'Ž¡‘ôž|µ<Ž‘üešÐlist‘™˜‰ffŽ–™šloGc‘™˜‰ffŽ“dekl‘UUµ>ŽŽ¡‘ôž|Ð;ަ‘ôž|µ<Ž‘üešÐlist‘™˜‰ffŽ–™šloGc‘™˜‰ffŽ“dekl‘™˜‰ffŽ“1‘UUµ>ŽŽ¡‘ôž|Ð::=‘UUIDENTŽ¡‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ–™šoptional‘™˜‰ffŽ“loGc‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐIDENT‘UUµ<Ž‘ sÐlist‘™˜‰ffŽ‘™šdim‘UUµ>ŽŽ¡‘ôž|<Ž‘üešÐinitializer‘™˜‰ffŽ–™šoptional‘™˜‰ffŽ“loGc‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐIDENT–UU'('“')'Ž¡‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ–™šoptional‘™˜‰ffŽ“loGc‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐIDENT–UU'('“µ<Ž‘ sÐlist‘™˜‰ffŽ–™št¸ãypšGe‘™˜‰ffŽ“sp˜ec‘UUµ>Ž‘ sÐ')'Ž¡‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ–™šoptional‘™˜‰ffŽ“loGc‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐIDENT–UU'('“µ<Ž‘ sÐlist‘™˜‰ffŽ–™šfoš¸ãrm‘™˜‰ffŽ“pa˜ram‘UUµ>Ž‘ sÐ')'Ž¡‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ–™šoptional‘™˜‰ffŽ“loGc‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐpGointer‘UUµ>Ž‘ sÐIDENTŽ¡‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ–™šoptional‘™˜‰ffŽ“loGc‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐpGointer‘UUµ>Ž– sÐIDENT‘UUµ<Ž“Ðlist‘™˜‰ffŽ‘™šdim‘UUµ>ŽŽ¡‘ôž|<Ž‘üešÐinitializer‘™˜‰ffŽ–™šoptional‘™˜‰ffŽ“loGc‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐpGointer‘UUµ>Ž‘ sÐIDENT–UU'('“')'Ž¡‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ–™šoptional‘™˜‰ffŽ“loGc‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐpGointer‘UUµ>Ž› sÐIDENT–UU'('“µ<Ž˜Ðlist‘™˜‰ffŽ–™št¸ãypšGe‘™˜‰ffŽ“sp˜ec‘UUµ>Ž‘ sÐ')'Ž¡‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ–™šoptional‘™˜‰ffŽ“loGc‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐpGointer‘UUµ>Ž› sÐIDENT–UU'('“µ<Ž˜Ðlist‘™˜‰ffŽ–™šfoš¸ãrm‘™˜‰ffŽ“pa˜ram‘UUµ>Ž‘ sÐ')'Ž¡‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ–™šoptional‘™˜‰ffŽ“loGc‘UUµ>ŽŽ¡‘ôž|Ð;ަ‘ôž|µ<Ž‘üešÐinitializer‘™˜‰ffŽ–™šoptional‘™˜‰ffŽ“loGc‘UUµ>ŽŽŽŽŒ‹$ùc ÀÙ ýÚÇ‘ÛÝq²36’$ÍCHAPTER–UU4.‘ÇSYNT‘ÿ*ªAX“OF“THE“LANGUA¸ãGEŽŽ ÐÙ¸ ýK7‘ÛÝqÐ::=–UU';'“Pޤ ‘t+¸jŽ‘;HÐ';'‘UUPŽ¡‘ÛÝqµ<Ž‘ã¤Ðlist‘™˜‰ffŽ–™šloGc‘™˜‰ffŽ“dekl‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐloGcal‘™˜‰ffŽ‘™šinitialization‘UUµ>Ž‘ sÐ';'Ž¡‘t+¸jŽ‘;Hµ<Ž‘fÐloGcal‘™˜‰ffŽ‘™šinitialization‘UUµ>Ž‘ sÐ';'Ž¡‘ÛÝqµ<Ž‘ã¤Ðlist‘™˜‰ffŽ–™šloGc‘™˜‰ffŽ“dekl‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐ','–UUP“µ<Ž‘ sÐlist‘™˜‰ffŽ–™šloGc‘™˜‰ffŽ“dekl‘™˜‰ffŽ“1‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐloGcal‘™˜‰ffŽ›™šinitialization‘UUµ>Ž– sÐ','‘UUµ<Ž“Ðlist‘™˜‰ffŽ˜loGc‘™˜‰ffŽ˜dekl‘™˜‰ffŽ˜1‘UUµ>ŽŽ¡‘ÛÝqÐ;Ž¡‘ÛÝqP‘UU::=Ž¡‘ÛÝq;Ž©‘ÛÝqµ<Ž‘ã¤ÐloGcal‘™˜‰ffŽ‘™šinitialization‘UUµ>ŽŽ¡‘ÛÝqÐ::=–UU'='“µ<Ž‘ sÐinitializer“µ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðcall‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðlist‘™˜‰ffŽ‘™špa¸ãram‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐ')'Ž¡‘ÛÝq;ަ‘ÛÝqµ<Ž‘ã¤Ðlist‘™˜‰ffŽ›™špa¸ãram‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðassignment‘™˜‰ffŽ˜exp¸ãression‘UUµ>Ž“Ð')'Ž¡‘t+¸jŽ‘;Hµ<Ž‘fÐassignment‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>Ž‘ sÐ','Ž¡‘ÛÝqµ<Ž‘ã¤Ðlist‘™˜‰ffŽ‘™špa¸ãram‘UUµ>ŽŽ¡‘ÛÝqÐ;ŽŽŽŒ‹% Q ÀÙ ýÚÇ’ÎPÞ²37ŽŽ ÐÙ¸ ýK7‘ôž|µ<Ž‘üešÐp•¸ãrima“ry‘™˜‰ffŽ‘™šexp“ression‘UUµ>ŽŽ¤ ‘ôž|Ð::=‘UUµ<Ž‘ sÐident‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐNUMBERIŽ¡‘'56¸jŽ‘)üSÐNUMBERUIŽ¡‘'56¸jŽ‘)üSÐNUMBERLIŽ¡‘'56¸jŽ‘)üSÐNUMBERLUIŽ¡‘'56¸jŽ‘)üSÐNUMBERDŽ¡‘'56¸jŽ‘)üSÐNUMBERLDŽ¡‘'56¸jŽ‘)üSÐNUMBERFŽ¡‘'56¸jŽ‘)üSÐSTRINGCŽ¡‘'56¸jŽ‘)üSÐWSTRINGCŽ¡‘'56¸jŽ‘)üSÐNUMBERCŽ¡‘'56¸jŽ‘)üSÐ'('‘UUµ<Ž– sÐexp¸ãression‘UUµ>Ž“Ð')'Ž¡‘ôž|;Ž©v½‘ôž|µ<Ž‘üešÐident‘UUµ>Ž‘ sÐ::=‘UUIDENTŽ¡‘ôž|;ަ‘ôž|µ<Ž‘üešÐpGost x‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘ôž|Ð::=‘UUµ<Ž‘ sÐp•¸ãrima“ry‘™˜‰ffŽ‘™šexp“ression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐpGost x‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘ôž|Ð'²[Ð'‘UUµ<Ž– sÐexp¸ãression‘UUµ>Ž“Ð'²]Ð'Ž¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐpGost x‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>Ž‘ sÐ'.'‘qÇIDENTŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐpGost x‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>Ž‘ sÐPTR‘UUIDENTŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐpGost x‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>Ž‘ sÐPPŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐpGost x‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>Ž‘ sÐMMŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐpGost x‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>Ž‘ sÐ'('Ž¡‘ôž|µ<Ž‘üešÐcall‘UUµ>ŽŽ¡‘ôž|Ð;ަ‘ôž|µ<Ž‘üešÐuna•¸ãry‘™˜‰ffŽ‘™šexp“ression‘UUµ>ŽŽ¡‘ôž|Ð::=‘UUµ<Ž‘ sÐpGost x‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐ'&'‘UUµ<Ž‘ sÐuna•¸ãry‘™˜‰ffŽ‘™šexp“ression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐ'¸Ð'‘UUµ<Ž‘ sÐuna•¸ãry‘™˜‰ffŽ‘™šexp“ression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐNEG‘™˜‰ffŽ–™šT‘UUµ<Ž‘ sÐunaš¸ãry‘™˜‰ffŽ“exp˜ression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐNEG‘™˜‰ffŽ–™šB‘UUµ<Ž‘ sÐunaš¸ãry‘™˜‰ffŽ“exp˜ression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐ'+'‘UUµ<Ž‘ sÐuna•¸ãry‘™˜‰ffŽ‘™šexp“ression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐ'-'Ž¡‘ôž|µ<Ž‘üešÐuna•¸ãry‘™˜‰ffŽ‘™šexp“ression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐPP‘UUµ<Ž› sÐuna•¸ãry‘™˜‰ffŽ‘™šexp“ression‘UUµ>Ž˜<Ž‘ã‘Ðae‘™˜‰ffŽ‘™šempt“y‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐMM‘UUµ<Ž› sÐuna•¸ãry‘™˜‰ffŽ‘™šexp“ression‘UUµ>Ž˜<Ž‘ã‘Ðae‘™˜‰ffŽ‘™šempt“y‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐSIZEOF‘UUµ<Ž‘ sÐuna•¸ãry‘™˜‰ffŽ‘™šexp“ression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐSIZEOF–UU'('“µ<Ž› sÐt¸ãypGe‘™˜‰ffŽ‘™šname“µ>Ž˜Ð')'Ž¡‘ôž|;ަ‘ôž|µ<Ž‘üešÐcast‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘ôž|Ð::=‘UUµ<Ž‘ sÐuna•¸ãry‘™˜‰ffŽ‘™šexp“ression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐ'('‘UUµ<Ž– sÐt¸ãypGe‘™˜‰ffŽ›™šname‘UUµ>Ž“Ð')'‘UUµ<Ž“Ðcast‘™˜‰ffŽ˜exp¸ãression‘UUµ>ŽŽ¡‘ôž|Ð;ަ‘ôž|µ<Ž‘üešÐmultiplicative‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘ôž|Ð::=‘UUµ<Ž‘ sÐcast‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐmultiplicative‘™˜‰ffŽ›™šexp¸ãression‘UUµ>Ž– sÐ'¸Ð'‘UUµ<Ž“Ðcast‘™˜‰ffŽ˜exp¸ãression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐmultiplicative‘™˜‰ffŽ›™šexp¸ãression‘UUµ>Ž– sÐ'/'‘UUµ<Ž“Ðcast‘™˜‰ffŽ˜exp¸ãression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐmultiplicative‘™˜‰ffŽ–™šexpš¸ãression‘UUµ>Ž‘ sÐ'µ<Ž‘ÇÐcast‘™˜‰ffŽ“exp˜ression‘UUµ>ŽŽ¡‘ôž|Ð;ަ‘ôž|µ<Ž‘üešÐadditive‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘ôž|Ð::=‘UUµ<Ž‘ sÐmultiplicative‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐadditive‘™˜‰ffŽ›™šexp¸ãression‘UUµ>Ž– sÐ'+'‘UUµ<Ž“Ðmultiplicative‘™˜‰ffŽ˜exp¸ãression‘UUµ>ŽŽŽŽŒ‹&^ ÀÙ ýÚÇ‘ÛÝq²38’$ÍCHAPTER–UU4.‘ÇSYNT‘ÿ*ªAX“OF“THE“LANGUA¸ãGEŽŽ ÐÙ¸ ýK7‘t+¸jŽ‘;Hµ<Ž‘fÐadditive‘™˜‰ffŽ›™šexp¸ãression‘UUµ>Ž– sÐ'-'‘UUµ<Ž“Ðmultiplicative‘™˜‰ffŽ˜exp¸ãression‘UUµ>ŽŽ¤ ‘ÛÝqÐ;Ž©‘ÛÝqµ<Ž‘ã¤Ðshift‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž‘ sÐadditive‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐshift‘™˜‰ffŽ›™šexp¸ãression‘UUµ>Ž– sÐSHIL‘UUµ<Ž“Ðadditive‘™˜‰ffŽ˜exp¸ãression‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐshift‘™˜‰ffŽ›™šexp¸ãression‘UUµ>Ž– sÐSHIR‘UUµ<Ž“Ðadditive‘™˜‰ffŽ˜exp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðrelational‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž‘ sÐshift‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐrelational‘™˜‰ffŽ›™šexp¸ãression‘UUµ>Ž– sÐ'µ<Ð'‘UUµ<Ž“Ðshift‘™˜‰ffŽ˜exp¸ãression‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐrelational‘™˜‰ffŽ›™šexp¸ãression‘UUµ>Ž– sÐ'µ>Ð'‘UUµ<Ž“Ðshift‘™˜‰ffŽ˜exp¸ãression‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐrelational‘™˜‰ffŽ›™šexp¸ãression‘UUµ>Ž– sÐLQ‘UUµ<Ž“Ðshift‘™˜‰ffŽ˜exp¸ãression‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐrelational‘™˜‰ffŽ›™šexp¸ãression‘UUµ>Ž– sÐGQ‘UUµ<Ž“Ðshift‘™˜‰ffŽ˜exp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðequalit•¸ãy‘™˜‰ffŽ‘™šexp“ression‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž‘ sÐrelational‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐequalit•¸ãy‘™˜‰ffŽ›™šexp“ression‘UUµ>Ž– sÐEQ‘™˜‰ffŽ˜A‘UUµ<Ž“Ðrelational‘™˜‰ffŽ˜exp¸ãression‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐequalit•¸ãy‘™˜‰ffŽ›™šexp“ression‘UUµ>Ž– sÐNE‘™˜‰ffŽ˜A‘UUµ<Ž“Ðrelational‘™˜‰ffŽ˜exp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðbit‘™˜‰ffŽ–™šAND‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž‘ sÐequalit•¸ãy‘™˜‰ffŽ‘™šexp“ression‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐbit‘™˜‰ffŽ–™šAND‘™˜‰ffŽ“expš¸ãression‘UUµ>Ž– sÐ'&'‘UUµ<Ž“Ðequalit˜y‘™˜‰ffŽ‘™šexp˜ression‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðexclusive‘™˜‰ffŽ–™šOR‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž‘ sÐbit‘™˜‰ffŽ–™šAND‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐexclusive‘™˜‰ffŽ–™šOR‘™˜‰ffŽ“expš¸ãression‘UUµ>Ž– sÐ'‘ÕU²^ŽŽ‘ªªÐ'‘UUµ<Ž“Ðbit‘™˜‰ffŽ–™šAND‘™˜‰ffŽ“exp˜ression‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðinclusive‘™˜‰ffŽ–™šOR‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž‘ sÐexclusive‘™˜‰ffŽ–™šOR‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐinclusive‘™˜‰ffŽ–™šOR‘™˜‰ffŽ“expš¸ãression‘UUµ>Ž– sÐ'¸jŽ‘ÇÐ'‘UUµ<Ž“Ðexclusive‘™˜‰ffŽ–™šOR‘™˜‰ffŽ“exp˜ression‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðlogical‘™˜‰ffŽ–™šAND‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž‘ sÐinclusive‘™˜‰ffŽ–™šOR‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐlogical‘™˜‰ffŽ–™šAND‘™˜‰ffŽ“exp¸ãression‘UUµ>Ž‘ sÐAND‘™˜‰ffŽ“AŽ¡‘ÛÝqµ<Ž‘ã¤Ðinclusive‘™˜‰ffŽ–™šOR‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðlogical‘™˜‰ffŽ–™šOR‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž‘ sÐlogical‘™˜‰ffŽ–™šAND‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐlogical‘™˜‰ffŽ–™šOR‘™˜‰ffŽ“exp¸ãression‘UUµ>Ž‘ sÐOR‘™˜‰ffŽ“AŽ¡‘ÛÝqµ<Ž‘ã¤Ðlogical‘™˜‰ffŽ–™šAND‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðconditional‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž‘ sÐlogical‘™˜‰ffŽ–™šOR‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐlogical‘™˜‰ffŽ–™šOR‘™˜‰ffŽ“exp¸ãression‘UUµ>Ž‘ sÐ'‘r?'Ž¡‘ÛÝqµ<Ž‘ã¤Ðexp¸ãression‘UUµ>Ž‘ sÐ':'Ž¡‘ÛÝqµ<Ž‘ã¤Ðconditional‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ;ŽŽŽŒ‹'Ä ÀÙ ýÚÇ’ÎPÞ²39ŽŽ ÐÙ¸ ýK7‘ôž|µ<Ž‘üešÐassignment‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¤ ‘ôž|Ð::=‘UUµ<Ž‘ sÐconditional‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐuna•¸ãry‘™˜‰ffŽ‘™šexp“ression‘UUµ>ŽŽ¡‘ôž|Ð'='‘UUµ<Ž‘ sÐassignment‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSµ<Ž‘1ÃqÐuna•¸ãry‘™˜‰ffŽ›™šexp“ression‘UUµ>Ž‘ s<Ž‘ã‘Ðassignment‘™˜‰ffŽ˜opGerato“r‘UUµ>ŽŽ¡‘ôž|Ð;Ž©‘ôž|µ<Ž‘üešÐae‘™˜‰ffŽ‘™šempt¸ãy‘UUµ>Ž‘ sÐ::=Ž¡‘ôž|;ަ‘ôž|µ<Ž‘üešÐassignment‘™˜‰ffŽ‘™šopGerato¸ãr‘UUµ>ŽŽ¡‘ôž|Ð::=–UUMUL‘™˜‰ffŽ›™šASSIGN“µ<Ž‘ sÐae‘™˜‰ffŽ˜empt¸ãy“µ>Ž‘ s<Ž‘ã‘Ðassignment‘™˜‰ffŽ˜exp¸ãression“µ>ŽŽ¡‘'56¸jŽ‘)üSÐDIV‘™˜‰ffŽ–™šASSIGN‘UUµ<Ž› sÐae‘™˜‰ffŽ“empt¸ãy‘UUµ>Ž˜<Ž‘ã‘Ðassignment‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐMOD‘™˜‰ffŽ–™šASSIGN‘UUµ<Ž› sÐae‘™˜‰ffŽ“empt¸ãy‘UUµ>Ž˜<Ž‘ã‘Ðassignment‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐADD‘™˜‰ffŽ–™šASSIGN‘UUµ<Ž› sÐae‘™˜‰ffŽ“empt¸ãy‘UUµ>Ž˜<Ž‘ã‘Ðassignment‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐSUB‘™˜‰ffŽ–™šASSIGN‘UUµ<Ž› sÐae‘™˜‰ffŽ“empt¸ãy‘UUµ>Ž˜<Ž‘ã‘Ðassignment‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐLEFT‘™˜‰ffŽ–™šASSIGN‘UUµ<Ž› sÐae‘™˜‰ffŽ“empt¸ãy‘UUµ>Ž˜<Ž‘ã‘Ðassignment‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐRIGHT‘™˜‰ffŽ–™šASSIGN‘UUµ<Ž› sÐae‘™˜‰ffŽ“empt¸ãy‘UUµ>Ž˜<Ž‘ã‘Ðassignment‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐAND‘™˜‰ffŽ–™šASSIGN‘UUµ<Ž› sÐae‘™˜‰ffŽ“empt¸ãy‘UUµ>Ž˜<Ž‘ã‘Ðassignment‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐXš¸ãOR‘™˜‰ffŽ–™šASSIGN‘UUµ<Ž‘ sÐae‘™˜‰ffŽ“empt˜y‘UUµ>Ž‘ s<Ž‘ã‘Ðassignment‘™˜‰ffŽ“exp˜ression‘UUµ>ŽŽ¡‘'56¸jŽ‘)üSÐOR‘™˜‰ffŽ–™šASSIGN‘UUµ<Ž› sÐae‘™˜‰ffŽ“empt¸ãy‘UUµ>Ž˜<Ž‘ã‘Ðassignment‘™˜‰ffŽ“exp¸ãression‘UUµ>ŽŽ¡‘ôž|Ð;ŽŽŽŒ‹(,h ÀÙ ýÚÇ‘ÛÝq²40’$ÍCHAPTER–UU4.‘ÇSYNT‘ÿ*ªAX“OF“THE“LANGUA¸ãGEŽŽ ÐÙ¸ ýK7‘ÛÝqµ<Ž‘ã¤Ðexp¸ãression‘UUµ>ŽŽ¤ ‘ÛÝqÐ::=‘UUµ<Ž‘ sÐassignment‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐexp¸ãression‘UUµ>Ž‘ sÐ','Ž¡‘ÛÝqµ<Ž‘ã¤Ðassignment‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ;Ž©>€‘ÛÝqµ<Ž‘ã¤Ðconstant‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ::=‘UUµ<Ž‘ sÐconditional‘™˜‰ffŽ‘™šexp¸ãression‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤ÐopGeratoš¸ãr‘UUµ>Ž‘ sÐ::=–UUany“cha˜racter“from“the“set:‘qǸjŽ‘ xáÏ+–?ý-“/“\%“<“>“&“&&‘ ú==“<=“>=“!=“*‘•Rµ<<–UU>>‘ÕU²^ŽŽ‘*ª~ŽŽ‘ ÿÿ!“¸jŽ‘rjŽŽ¦‘ÛÝqµ<Ž‘ã¤ÐnumbšGeri‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðnumb˜er‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐnumb•Geri‘UUµ>Ž‘ s<Ž‘ã‘Ðnumb“er‘UUµ>ŽŽ¦‘ÛÝq<Ž‘ã¤ÐnumbGerc‘UUµ>Ž‘ sÐ::=–UUany“single“cha¸ãracterަ‘ÛÝqµ<Ž‘ã¤ÐnumbšGerd‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðnumb˜eri‘UUµ>Ž“Ð.‘qǵ<Ž‘ 8åÐnumb˜eri‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐ.‘qǵ<Ž‘ 8åÐnumbGeri‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐnumbGeri‘UUµ>Ž‘ sÐ.ަ‘ÛÝqµ<Ž‘ã¤ÐnumbGer‘UUµ>Ž‘ sÐ::=–UUdigit“from“the“set:‘qÇ0,1,2,3,4,5,6,7,8,9ަ‘ÛÝqµ<Ž‘ã¤Ðstringc‘UUµ>Ž‘ sÐ::=–UUSequence“one“oš¸ãr“mo˜re“cha˜racters,“ rst“cha˜racter“is“a“letter“follo˜w˜ed“b˜y“letters“o˜r“digitsަ‘ÛÝqµ<Ž‘ã¤Ðident‘UUµ>Ž‘ sÐ::=–UUSequence“one“oš¸ãr“mo˜re“cha˜racters,“ rst“cha˜racter“is“a“letter“follo˜w˜ed“b˜y“letters“o˜r“digitsަ‘ÛÝqThe–Àóstatement“LOš¸ãAD( le‘™˜‰ffŽ‘™šname);‘òjis“only“p˜roGcessed“b˜y“lexical“analyzer“-“yylex“which“opGens“ le“ó!ý': cmti10Ì le‘‰ffŽ‘®name“Ðand“redirectsŽ¡‘ÛÝqinput–UUto“the“input“from“that“ le.ŽŸ µÇ‘ÛÝqç4.1Ž‘ÃÔSynŒÌtax–ffof“the“graphical“subsystem“languageŽŸ8ä‘ÛÝqµ<Ž‘ã¤Ðlist‘™˜‰ffŽ–™šstat‘™˜‰ffŽ“0‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðlist‘™˜‰ffŽ–™šstat‘™˜‰ffŽ“0‘UUµ>Ž‘ s<Ž‘ã‘Ðstat‘™˜‰ffŽ“0‘UUµ>ŽŽ¡‘t+¸jŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðstat‘™˜‰ffŽ‘™š0‘UUµ>Ž‘ sÐ::=–UUFIELDS“'='“NUMBERIŽ¡‘t+¸jŽ‘;HÐTYPE–UU'='“STRINGŽ¡‘t+¸jŽ‘;HÐPRINT‘™˜‰ffŽ‘™šF¸ãORMA‘ÿ*ªT–UU'='“STRINGŽ¡‘t+¸jŽ‘;HÐON‘™˜‰ffŽ–™šLEA‘þãVE‘™˜‰ffŽ“WINDO¸ãW–UU'='“STRINGŽ¡‘t+¸jŽ‘;HÐDIRECTION–UU'='“STRINGŽ¡‘t+¸jŽ‘;HÐST‘ÿ*ªART‘™˜‰ffŽ›™šTIME–UU'='“µ<Ž‘ sÐs‘™˜‰ffŽ˜time“µ>ŽŽ¡‘t+¸jŽ‘;HÐDURA‘ÿ*ªTION‘™˜‰ffŽ›™šTIME–UU'='“µ<Ž‘ sÐd‘™˜‰ffŽ˜time“µ>ŽŽ¡‘t+¸jŽ‘;HÐW‘™˜‰ffŽ‘™šRESOLUTION–UU'='“NUMBERI“NUMBERIŽ¡‘t+¸jŽ‘;HÐLO¸ãWER–UU'('“NUMBERI“')'“'='“NUMBERDŽ¡‘t+¸jŽ‘;HÐUPPER–UU'('“NUMBERI“')'“'='“NUMBERDŽ¡‘t+¸jŽ‘;HÐSTYLE–UU'('“NUMBERI“')'“'='“NUMBERIŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐerro¸ãr‘UUµ>ŽŽ¡‘ÛÝqÐ;ަ‘ÛÝqµ<Ž‘ã¤Ðd‘™˜‰ffŽ‘™štime‘UUµ>Ž‘ sÐ::=‘UUNUMBERDŽ¡‘t+¸jŽ‘;HÐA¸ãUTOMA‘ÿ*ªTICŽ¡‘ÛÝq;ަ‘ÛÝqµ<Ž‘ã¤Ðs‘™˜‰ffŽ‘™štime‘UUµ>Ž‘ sÐ::=‘UUNUMBERDŽ¡‘t+¸jŽ‘;HÐA¸ãUTOMA‘ÿ*ªTICŽ¡‘ÛÝq;ަ‘ÛÝqµ<Ž‘ã¤ÐnumbšGeri‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðnumb˜er‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐnumb•Geri‘UUµ>Ž‘ s<Ž‘ã‘Ðnumb“er‘UUµ>ŽŽ¦‘ÛÝq<Ž‘ã¤ÐnumbšGerd‘UUµ>Ž– sÐ::=‘UUµ<Ž“Ðnumb˜eri‘UUµ>Ž“Ð.‘qǵ<Ž‘ 8åÐnumb˜eri‘UUµ>ŽŽ¡‘t+¸jŽ‘;HÐ.‘qǵ<Ž‘ 8åÐnumbGeri‘UUµ>ŽŽ¡‘t+¸jŽ‘;Hµ<Ž‘fÐnumbGeri‘UUµ>Ž‘ sÐ.ަ‘ÛÝqµ<Ž‘ã¤ÐnumbGer‘UUµ>Ž‘ sÐ::=–UUdigit“from“the“set:‘qÇ0,1,2,3,4,5,6,7,8,9ŽŽŽŒ‹)4± ÀÙ ýÚÇ ÐÙ¸ ý–7‘ôž|ëWChapter‘Ç 5ŽŸ2‘ôž|ëUIn‘ÿ8õterpreter‘ T{organizationŽŸ:‘ôž|ç5.1Ž‘„ßInstruction–ffset“of“the“virtual“macŒÌhineŽŸ8ä‘ôž|ÐNotation:ޤ ‘ôž|µADGRÇÐ-–UUaddress“of“the“memo¸ãry“cellŽ¡‘ôž|µAS‘“T‘cÐ-–UUthe“a¸ãrithmetic“stack“registerŽ¡‘ôž|µB‘€qP‘cÐ-–UUthe“base“pšGointer,“it“is“used“in“relative“address“mo˜deŽ¡‘ôž|µT–cM‘P“Ð-–UUthe“tempšGo•¸ãra“ry–UUstack“register,“it“is“used“in“addressing“of“temp˜o•¸ãra“ry‘UUva“riablesŽ¡‘ôž|µT–cM‘P“H‘ÏþÐ-–UUthe“tempšGo•¸ãra“ry–UUstack“register,“it“is“used“in“resetting“of“the“temp˜o•¸ãra“ry‘UUstackŽ¡‘ôž|µN–U“M“Ð-–UUo set“in“address“o¸ãr“valueŽ¡‘ôž|µS‘“T‘cRÇI‘ÈâN‘GÐ-–UUa“stringŽ¡‘ôž|µS‘“T‘cAC–·K“Ð-–UUthe“stack“registerŽ¡‘ôž|µF‘cRÇAM‘E‘“Ð-–UUthe“stack“register“used“in“pa¸ãrameter“passing“to“the“intrinsic“functionsŽ¡‘ôž|²[µx²]Ð-–UUa“value“to“which“x“pGoints“toŽ¡‘ôž|µ<Ž‘üešinteg[Ùer‘œr>Ž‘ cÐ-–UUan“integer“literalŽ¡‘ôž|µ<Ž‘üešdoubl2`e‘UU>Ž‘ sÐ-–UUa“double“p¸ãrecision“ oating“pGoint“literalŽ¡‘ôž|µ<Ž‘üešf‘l2`oat‘UU>Ž‘ sÐ-–UUa“single“p¸ãrecision“ oating“pGoint“literalŽ¡‘ôž|µ<Ž‘üešchar‘œr>Ž‘ cÐ-–UUa“b¸ãyteŽ¡¡‘ž|Instructions–Éhave“a“vaš¸ãriable“length.‘_CThe“structure“of“the“instructions“is“the“follo˜wing:‘Vmajo˜r,–(åmino˜r,“immediately‘ÿ*ª.Ž¡‘ôž|Immediately–UUcan“bGe“either“address“oš¸ãr“value.‘qÇIn“the“follo˜wing“table“is“the“summa˜ry“of“instruction“t˜ypGes.ŽŸUê9’¢ÎŸ³€‰ff‡S=¤fdÌͤ™œ„ ff–;¾Ÿüfdt¸ãypGe“¡„ ffŽ‘8³8pa¸ãrameters‘ÌÍŸ™œ„ ffŽ‘rO¯size‘ÌÍŸ™œ„ ffŽŽ©‰ff‡S=Ÿ‰ff‡S=¡Ìͤ™œ„ ff›ÌÍŸüfdOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“ma˜¡„ ffŽ‘CºUmajo¸ãr‘Óꟙœ„ ffŽ‘wQv1‘ ΔŸ™œ„ ffŽŽ¦‰ff‡S=¡Ìͤ™œ„ ff›#ŸüfdOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“mi˜¡„ ffŽ‘CºUmajo¸ãr‘Óꟙœ„ ffŽ‘wQv2‘ ΔŸ™œ„ ffŽŽŸ ÌÍŸ™œ„ ff‘2LÒ„ ffŽ‘C¯«mino¸ãr‘É@Ÿ™œ„ ffŽ’‡ Ÿ™œ„ ffŽŽ¦‰ff‡S=¡Ìͤ™œ„ ff›ÌÍŸüfdOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“ma˜¡„ ffŽ‘CºUmajo¸ãr‘Óꟙœ„ ffŽ‘wQv2‘ ΔŸ™œ„ ffŽŽŸ ÌÍŸ™œ„ ff‘2LÒ„ ffŽ‘@,address‘ E²Ÿ™œ„ ffŽ’‡ Ÿ™œ„ ffŽŽ¦‰ff‡S=¡Ìͤ™œ„ ff›#ŸüfdOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“mi˜¡„ ffŽ‘CºUmajo¸ãr‘Óꟙœ„ ffŽ‘wQv3‘ ΔŸ™œ„ ffŽŽ¤ ÌÍŸ™œ„ ff‘2LÒ„ ffŽ‘C¯«mino¸ãr‘É@Ÿ™œ„ ffŽ’‡ Ÿ™œ„ ffŽŽ¡ÌÍŸ™œ„ ff‘2LÒ„ ffŽ‘@,address‘ E²Ÿ™œ„ ffŽ’‡ Ÿ™œ„ ffŽŽ¦‰ff‡S=ŸfdÌͤ™œ„ ff› ûŸüfdOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“i˜¡„ ffŽ‘CºUmajo¸ãr‘Óꟙœ„ ffŽ‘wQv3‘ ΔŸ™œ„ ffŽŽ¡ÌÍŸ™œ„ ff‘2LÒ„ ffŽ‘C¯«mino¸ãr‘É@Ÿ™œ„ ffŽ’‡ Ÿ™œ„ ffŽŽ¡ÌÍŸ™œ„ ff‘2LÒ„ ffŽ‘DÌvalue‘岟™œ„ ffŽ’‡ Ÿ™œ„ ffŽŽ¦‰ff‡S=ŽŽŽŸ^úª‘ôž|à5.1.1Ž‘Þ|Address–€instructions“and“instructions“on“the“arithmetic“stac kŽŸªª‘ôž|ÐInstruction‘UUÎMO®9VÐ.Ž¡‘ôž|Description:‘)$move–±data“from“the“spšGeci ed“address“to“another“sp˜eci ed“address.‘„ÓThe“addresses“a¸ãre“sp˜eci ed“eitherŽ¡‘ôž|as–±¶2“consecutive“addresses“on“the“aš¸ãrithmetical“stack,‘ÈÎo˜r“one“address“is“on“the“a˜rithmetical“stack“and“the“second“isŽ¡‘ôž|created–UUin“the“tempGo•¸ãra“ry‘UUstack.Ž¡‘ôž|Options:Ž¡‘ôž|²[µAD•GRDz]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS‘“T‘c²]]‘<=$Ðt¸ãyp“e‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡‘ôž|The–è^instruction“is“spGeci c“foš¸ãr“each“data“t˜ypGe.‘MuW˜e“mean“that“the“each“instruction“option“rep˜resents“a“class“of“instruc-Ž¡‘ôž|tions.‘e¹The–1+instructions“in“each“class“di er“bš¸ãy“mino˜r.‘e¹F˜o˜r“example“the“very“ rst“option“is“spGeci c“fo˜r“t˜ypšGe“of“op˜erandŽŽŸK’áw­²41ŽŽŒ‹*AÜ ÀÙ ýÚÇ‘ÛÝq²42’õüøÍCHAPTER–UU5.‘ÇINTERPRETER“OR¸ãGANIZA‘ÿ*ªTIONŽŽ ÐÙ¸ ýK7‘ÛÝqÐdouble,–UU oat,“integer,“cha¸ãr,“etc.ޤ ‘ÛÝqµB‘€qP‘*§¸ ‘þUXŽŽŽ‘㎵S‘“T‘cAC‘·K‘<ô@Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡‘ÛÝqµS‘“T‘cAC‘·K‘~4¸ ‘þUXŽŽŽ‘㎵B‘€qP‘= ³Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡‘ÛÝqµT–cM›P“H‘—¸ ‘þUXŽŽŽ‘㎵T“M˜P‘= ³Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡‘ÛÝqµF–cRÇAM‘E‘Z¥¸ ‘þUXŽŽŽ‘㎵S‘“T“AC‘·K‘<ô@Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡‘ÛÝqµS‘“T–cAC‘·K‘~4¸ ‘þUXŽŽŽ‘㎵F“RÇAM‘E‘<бÐt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡‘ÛÝq²[µAS–“T‘œo²+‘8à1]‘Ǹ ‘þUXŽŽŽ‘㎲[µAS“T‘c²]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡‘ÛÝq²[µAS–“T›c²]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡‘ÛÝq²[µAS–“T›c²]‘Ǹ ‘þUXŽŽŽ‘㎲[µAS“T˜²]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡‘ÛÝq²[µAS–“T›c²]‘в¸ ‘þUXŽŽŽ‘ §(²[(µAS“T‘Q¸–턲1)“+“[µAS‘“T˜²]]‘=LÐt¸ãypGe›dMOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“mi˜²[(µAS›“T‘Q¸–턲2)“+“[µAS˜T‘c²]]‘в¸ ‘þUXŽŽŽ‘ §(²[(µAS˜T‘Q¸“²1)“+“[µAS˜T‘c²]]Ž¡‘ÛÝqÐt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡‘ÛÝqInstruction‘UUÎPUSHAŽ¡‘ÛÝqÐDescription:‘qÇPUSH–UUin“to“the“a¸ãrithmetic“stack.Ž¡‘ÛÝqOptions:Ž¡‘ÛÝq²[µAS‘“T‘c²]‘Ǹ ‘þUXŽŽŽ‘㎲[µAD•GRDz]‘<=$Ðt¸ãyp“e‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“miŽ¡‘ÛÝq²[µAS‘“T‘c²]‘Ǹ ‘þUXŽŽŽ‘㎲[µB‘€qP‘œo²+‘8àµN–U“M“²]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“iŽ¡‘ÛÝq²[µAS‘“T‘c²]‘Ǹ ‘þUXŽŽŽ‘㎲[[µB‘€qP‘œo²+‘8àµN–U“M“²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“iŽ¡‘ÛÝqinstructions–UUaš¸ãre“spGeci c“fo˜r“each“data“t˜ypGe.Ž¡¡‘ÛÝqInstruction‘UUÎPUSHAIÐ.Ž¡‘ÛÝqDescription:‘qÇpush–UUonto“the“a¸ãrithmetic“stack“immediatelyŽ¡‘ÛÝqOptions:Ž¡‘ÛÝq²[[µAS‘“T‘c²]]‘Ǹ ‘þUXŽŽŽ‘㎵N–U“M‘=T?Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“iŽ¡‘ÛÝqThe–UUinstruction“is“spGeci c“foš¸ãr“each“data“t˜ypGe.Ž¡‘ÛÝq²[[µAS–“T›c²]]‘Ǹ ‘þUXŽŽŽ‘㎵S“T˜RÇI‘ÈâN‘G‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“miŽ¡¡‘ÛÝqInstruction‘UUÎPOP‘ÿ «AÐ.Ž¡‘ÛÝqDescription:‘qÇPOP–UUfrom“the“a¸ãrithmetic“stack.Ž¡‘ÛÝqOptions:Ž¡‘ÛÝqThe–UUaš¸ãrithmetic“stack“is“clea˜red.‘=Y–t˜ypGe“OP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“miŽ¡‘ÛÝqThe–UUaš¸ãrithmetic“stack“is“p•Gopp“ed–UUto“the“stack.‘=Y–t˜ypGe“OP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“iŽ¡‘ÛÝqThe–UUinstruction“is“implemented“foš¸ãr“each“basic“data“t˜ypGe.Ž¡‘ÛÝqInstruction‘UUÎX®9CHGŽ¡‘ÛÝqÐDescription:‘qÇExchange›UUt•¸ãw“o˜addresses˜on˜the˜top˜of˜the˜a“rithmetic˜stack.Ž¡‘ÛÝqOptions:Ž¡‘ÛÝq²[µAS›“T‘œo¸‘8à²1]–Ǹ ‘þUX!“²[µAS˜T‘c²]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“maŽ¡ŸÇ‘ÛÝqÎArithmetic-logical‘ÕTinstructionsŽŸªª‘ÛÝqÐAddress–ðÉof“the“result“is“placed“on“the“top“of“the“aš¸ãrithmetic“stack.‘D"Evaluation“is“placed“into“the“tempGo˜ra˜ry“stack.Ž¡‘ÛÝqArithmetic-logical–âNinstructions“aš¸ãre“spGeci c“fo˜r“each“data“t˜ypGe,‘ùOif“it“is“not“stated“otherwise“in“description“of“an“instruc-Ž¡‘ÛÝqtion.Ž¡‘ÛÝqInstruction‘UUÎADDÐ.Ž¡‘ÛÝqDescription:‘UpGerfo•¸ãrm›ða“rithmetic˜addition˜on˜the˜top˜of˜a“rithmetic˜stack˜o“r˜to˜the˜stack˜p•Gointer.‘^¥On˜the˜stack˜can˜b“eŽ¡‘ÛÝqonly–UUp¸ãrošGcessed“an“instruction“mentioned“b˜elo¸ãw“(to“the“stack“p˜ointer“can“b˜e“only“added“an“integer“numb˜er).Ž¡‘ÛÝqOptions:Ž¡‘ÛÝq²[[µAS–“T‘œo¸›8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T‘c²]]˜+˜[[µAS“T‘œo¸˜²1]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡‘ÛÝqµS–“T›cAC‘·K‘~4¸ ‘þUXŽŽŽ‘㎲(µS“T˜AC‘·K‘ïü²+‘8àµN–U“M“²)‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“iŽ¡¡‘ÛÝqInstruction‘UUÎSUBÐ.Ž¡‘ÛÝqDescription:‘ÅpGerfo•¸ãrm›~ôa“rithmetic˜subtraction˜on˜the˜top˜of˜a“rithmetic˜stack˜o“r˜from˜the˜stack˜pGointer.‘î¥On˜the˜stackŽ¡‘ÛÝqcan–ºbšGe“only“p¸ãro˜cessed“an“instruction“mentioned“b˜elo¸ãw“(from“the“stack“p˜ointer“can“b˜e“only“subtracted“an“integerŽ¡‘ÛÝqnumbGer).Ž¡‘ÛÝqOptions:Ž¡‘ÛÝq²[[µAS–“T›œo¸‘8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜¸–8à²1]]“¸“²[[µAS‘“T‘c²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡‘ÛÝqµS–“T›cAC‘·K‘~4¸ ‘þUXŽŽŽ‘㎲(µS“T˜AC‘·K‘ïü¸‘8àµN–U“M“²)‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“iŽ¡¡‘ÛÝqInstruction‘UUÎMUL‘ÿ «TÐ.ŽŽŽŒ‹+P½ ÀÙ ýÚÇ‘ôž|Í5.1.‘ÇINSTRš¸ãUCTION–UUSET“OF“THE“VIR‘ÿ*ªTUAL“MA˜CHINE’ÓUÖ²43ŽŽ ÐÙ¸ ýK7‘ôž|ÐDescription:‘qÇpGerfo•¸ãrm›UUa“rithmetic˜multiplication.ޤ ‘ôž|Options:Ž¡‘ôž|²[[µAS–“T‘œo¸›8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T‘c²]]˜¸˜²[[µAS“T‘œo¸˜²1]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡¡‘ôž|Instruction‘UUÎMODÐ.Ž¡‘ôž|Description:‘qÇpGerfo•¸ãrm›UUa“rithmetic˜mo•Gdulo˜op“eration˜on˜integers.Ž¡‘ôž|Options:Ž¡‘ôž|²[[µAS–“T›œo¸‘8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜¸‘8à²1]]%[[µAS“T‘c²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“maŽ¡¡‘ôž|Instruction‘UUÎDIVÐ.Ž¡‘ôž|Description:‘qÇpGerfo•¸ãrm›UUa“rithmetic˜division.Ž¡‘ôž|Options:Ž¡‘ôž|²[[µAS–“T›œo¸‘8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜¸‘8à²1]]µ=²[[µAS“T‘c²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡¡‘ôž|Instruction‘UUÎORÐ.Ž¡‘ôž|Description:‘qÇpGerfo¸ãrm–UUlogical“inclusive“OR.Ž¡‘ôž|Options:Ž¡‘ôž|²[[µAS–“T›œo¸‘8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜¸‘8à²1]]– ¸jj“²[[µAS‘“T‘c²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡¡‘ôž|Instruction‘UUÎANDÐ.Ž¡‘ôž|Description:‘qÇpGerfo¸ãrm–UUlogical“AND.Ž¡‘ôž|Options:Ž¡‘ôž|²[[µAS–“T›œo¸‘8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜¸‘8à²1]]&&[[µAS“T‘c²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡¡‘ôž|Instruction‘UUÎORBÐ.Ž¡‘ôž|Description:‘qÇpGerfo•¸ãrm›UUbit“wise˜OR˜of˜integers.Ž¡‘ôž|Options:Ž¡‘ôž|²[[µAS–“T›œo¸‘8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜¸‘8à²1]]– ¸j“²[[µAS‘“T‘c²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“maŽ¡¡‘ôž|Instruction‘UUÎANDBÐ.Ž¡‘ôž|Description:‘qÇpGerfo•¸ãrm›UUbit“wise˜AND˜of˜integers.Ž¡‘ôž|Options:Ž¡‘ôž|²[[µAS–“T›œo¸‘8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜¸‘8à²1]]&[[µAS“T‘c²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“maŽ¡¡‘ôž|Instruction‘UUÎEQÐ.Ž¡‘ôž|Description:‘qÇpGerfoš¸ãrm–UUlogical“test“fo˜r“equalit˜y‘ÿ*ª.Ž¡‘ôž|Options:Ž¡‘ôž|²[[µAS–“T›œo¸‘8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜¸‘8à²1]]–Ç==“[[µAS‘“T‘c²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡¡‘ôž|Instruction‘UUÎGRÐ.Ž¡‘ôž|Description:‘qÇpGerfoš¸ãrm–UUlogical“test“fo˜r“greater“than.Ž¡‘ôž|Options:Ž¡‘ôž|²[[µAS–“T›œo¸‘8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜¸‘8à²1]]–ǵ>“²[[µAS‘“T‘c²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡¡‘ôž|Instruction‘UUÎLOÐ.Ž¡‘ôž|Description:‘qÇpGerfoš¸ãrm–UUlogical“test“fo˜r“lo˜w˜er“than.Ž¡‘ôž|Options:Ž¡‘ôž|²[[µAS–“T›œo¸‘8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜¸‘8à²1]]–ǵ<“²[[µAS‘“T‘c²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡¡‘ôž|Instruction‘UUÎLEÐ.Ž¡‘ôž|Description:‘qÇpGerfoš¸ãrm–UUlogical“test“fo˜r“lo˜w˜er“o˜r“equal.Ž¡‘ôž|Options:Ž¡‘ôž|²[[µAS–“T›œo¸‘8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜¸‘8à²1]]–ǵ<²=“[[µAS‘“T‘c²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡¡‘ôž|Instruction‘UUÎGEÐ.Ž¡‘ôž|Description:‘qÇpGerfoš¸ãrm–UUlogical“test“fo˜r“greater“o˜r“equal.Ž¡‘ôž|Options:Ž¡‘ôž|²[[µAS–“T›œo¸‘8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜¸‘8à²1]]–ǵ>²=“[[µAS‘“T‘c²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽŽŽŒ‹,bÖ ÀÙ ýÚÇ‘ÛÝq²44’õüøÍCHAPTER–UU5.‘ÇINTERPRETER“OR¸ãGANIZA‘ÿ*ªTIONŽŽ ÐÙ¸ ýK7¤ ‘ÛÝqÐInstruction‘UUÎNEÐ.Ž¡‘ÛÝqDescription:‘qÇpGerfoš¸ãrm–UUlogical“test“fo˜r“non“equal.Ž¡‘ÛÝqOptions:Ž¡‘ÛÝq²[[µAS–“T›œo¸‘8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜¸‘8à²1]]!–Ç=“[[µAS‘“T‘c²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡¡‘ÛÝqInstruction‘UUÎNEGÐ.Ž¡‘ÛÝqDescription:‘qÇpGerfo¸ãrm–UUlogical“negation.Ž¡‘ÛÝqOptions:Ž¡‘ÛÝq²[[µAS–“T›c²]]‘Ǹ ‘þUXŽŽŽ‘v²!‘ [[µAS“T˜²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡¡‘ÛÝqInstruction‘UUÎNOTÐ.Ž¡‘ÛÝqDescription:‘qÇpšGerfo¸ãrm–UUone's“complement“op˜eration“of“integers.Ž¡‘ÛÝqOptions:Ž¡‘ÛÝq²[[µAS–“T›c²]]‘Ǹ ‘þUXŽŽŽ‘c޲~ŽŽ‘ã[[µAS“T˜²]]‘<=$ÐOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“maŽ¡¡‘ÛÝqInstruction‘UUÎSALÐ.Ž¡‘ÛÝqDescription:‘qÇpGerfo•¸ãrm›UUa“rithmetic˜left˜shift˜of˜integers.Ž¡‘ÛÝqOptions:Ž¡‘ÛÝq²[[µAS–“T›œo¸‘8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜¸‘8à²1]]–ǵ<<“²[[µAS‘“T‘c²]]‘<=$ÐOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“maŽ¡¡‘ÛÝqInstruction‘UUÎSARÐ.Ž¡‘ÛÝqDescription:‘qÇpGerfo•¸ãrm›UUa“rithmetic˜right˜shift˜of˜integers.Ž¡‘ÛÝqOptions:Ž¡‘ÛÝq²[[µAS–“T›œo¸‘8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜¸‘8à²1]]–ǵ>>“²[[µAS‘“T‘c²]]‘<=$ÐOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“maŽ¡¡‘ÛÝqInstruction‘UUÎX®9ORÐ.Ž¡‘ÛÝqDescription:‘qÇpGerfoš¸ãrm–UUlogical“exclusive“OR“of“t˜w˜o“integers.Ž¡‘ÛÝqOptions:Ž¡‘ÛÝq²[[µAS–“T›œo¸‘8à²1]]‘Ǹ ‘þUXŽŽŽ‘㎲[[µAS“T˜¸‘8à²1]]‘€^ŽŽ‘[[µAS“T‘c²]]‘<=$ÐOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“maŽ¡Ÿ£ª‘ÛÝqÎInš®9teger–ÕTand“ oating“pQÇoin˜t“instructionsŽ©»ù‘ÛÝqÐInstruction‘UUÎCVTÐ.Ž¡‘ÛÝqDescription:‘qÇConvert–UUa“signed“quantitš¸ãy“to“a“di erent“signed“data“t˜ypGe.Ž¡‘ÛÝqOptions:Ž¡‘ÛÝqµ<Ž‘ã¤integ[Ùer‘œr>Ž‘ c¸ŽŽŽ‘€!‘UUµ<Ž‘ sdoubl2`e‘UU>ŽŽ¡‘ÛÝq<Ž‘ã¤doubl2`e‘UU>Ž‘ s¸ŽŽŽ‘8é!‘UUµ<Ž‘ sinteg[Ùer‘œr>ŽŽ¡‘ÛÝq<Ž‘ã¤integ[Ùer‘œr>Ž‘ c¸ŽŽŽ‘€!‘UUµ<Ž‘ sf‘l2`oat‘UU>ŽŽ¡‘ÛÝq<Ž‘ã¤f‘l2`oat‘UU>Ž‘ s¸ŽŽŽ‘8é!‘UUµ<Ž‘ sinteg[Ùer‘œr>ŽŽ¡‘ÛÝq<Ž‘ã¤f‘l•2`oat‘UU>Ž‘ s¸ŽŽŽ‘8é!‘UUµ<Ž‘ sdoubl“e‘UU>ŽŽ¡‘ÛÝq<Ž‘ã¤doubl•2`e‘UU>Ž‘ s¸ŽŽŽ‘8é!‘UUµ<Ž‘ sf‘l“oat‘UU>ŽŽ¡‘ÛÝq<Ž‘ã¤char‘œr>Ž‘ c¸ŽŽŽ‘€!‘UUµ<Ž‘ sinteg[Ùer‘œr>ŽŽ¡‘ÛÝq<Ž‘ã¤integ[Ùer‘œr>Ž‘ c¸ŽŽŽ‘€!‘UUµ<Ž‘ schar‘œr>ŽŽ¡‘ÛÝq<Ž‘ã¤doubl2`e‘UU>Ž‘ s¸ŽŽŽ‘8é!‘UUµ<Ž‘ schar‘œr>ŽŽ¡‘ÛÝq<Ž‘ã¤char‘œr>Ž‘ c¸ŽŽŽ‘€!‘UUµ<Ž‘ sdoubl2`e‘UU>ŽŽ¡‘ÛÝq<Ž‘ã¤char‘œr>Ž‘ c¸ŽŽŽ‘€!‘UUµ<Ž‘ sf‘l2`oat‘UU>ŽŽ¡‘ÛÝq<Ž‘ã¤f‘l2`oat‘UU>Ž‘ s¸ŽŽŽ‘8é!‘UUµ<Ž‘ schar‘œr>ŽŽ¡‘ÛÝqÐThe– ¼conversion“to“the“wider“tš¸ãypGe“(mo˜re“bits)“can“bGe“executed“either“on“the“top“of“the“a˜rithmetical“stack“o˜r“oneŽ¡‘ÛÝqopšGerand–UUunder“the“top“of“the“a¸ãrithmetical“stack.‘qÇAb˜ove“instructions“aš¸ãre“of“the“t˜ypGe“OP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“mi.ŽŸ *‘êÝqThere–UUaš¸ãre“not“listed“all“pGossibilities.‘qÇBasically‘ÿ*ª,“there“is“an“instruction“from“each“t˜ypGe“to“every“t˜ypGe.ŽŸ£ª‘ÛÝqà5.1.2Ž‘qStac k‘€instructionsަ‘ÛÝqÐInstruction‘UUÎPUSHÐ.Ž¡‘ÛÝqDescription:‘qÇPush–UUvalue“onto“the“stack.Ž¡‘ÛÝqOptions:Ž¡‘ÛÝq²[µS‘“T‘cAC–·K“²]‘Ǹ ‘þUXŽŽŽ‘㎵B‘€qP‘= ³Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽŽŽŒ‹-o³ ÀÙ ýÚÇ‘ôž|Í5.1.‘ÇINSTRš¸ãUCTION–UUSET“OF“THE“VIR‘ÿ*ªTUAL“MA˜CHINE’ÓUÖ²45ŽŽ ÐÙ¸ ýK7¤ ‘ôž|[µS‘“T›cAC–·K“²]‘Ǹ ‘þUXŽŽŽ‘㎵T˜M‘P˜H‘= "Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡¡‘ôž|²[µS‘“T›cAC–·K“²]‘Ǹ ‘þUXŽŽŽ‘㎵F˜RÇAM‘E‘<бÐt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡¡‘ôž|Instruction‘UUÎPOPÐ.Ž¡‘ôž|Description:‘qÇP¸ãop–UUvalue“from“the“top“of“the“stack.Ž¡‘ôž|Options:Ž¡‘ôž|µB‘€qP‘*§¸ ‘þUXŽŽŽ‘㎲[µS‘“T‘cAC–·K“²]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡‘ôž|µT–cM‘P“H‘—¸ ‘þUXŽŽŽ‘㎲[µS‘“T“AC–·K“²]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡‘ôž|µF–cRÇAM‘E‘Z¥¸ ‘þUXŽŽŽ‘㎲[µS‘“T“AC–·K“²]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“miŽ¡©BÑ‘ôž|à5.1.3Ž‘Þ|T‘þàemp`orary–€stac k“instructionsŽŸªª‘ôž|ÐInstruction‘UUÎCLR‘ÿ «TÐ.Ž¡‘ôž|Description:‘qÇClea•¸ãr›UUtempGo“ra“ry˜stack.Ž¡‘ôž|Options:Ž¡‘ôž|µT–cM›P‘*§¸ ‘þUXŽŽŽ‘㎵T“M˜P“H‘= "Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“maŽ¡¦‘ôž|à5.1.4Ž‘Þ|Input–€and“output“instructionsŽŸªª‘ôž|ÐInstruction‘UUÎINÐ.Ž¡‘ôž|Description:‘qÇinput–UUof“the“value“into“address;“the“address“is“spGeci ed“absolutely“o¸ãr“relatively‘ÿ*ª.Ž¡‘ôž|Options:Ž¡‘ôž|µI‘ÈâN‘²[µAD•GRDz]‘<=$Ðt¸ãyp“e‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“miŽ¡‘ôž|µI‘ÈâN–²[µB‘€qP‘œo²+‘8àµN“U“M“²]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“iŽ¡‘ôž|µI‘ÈâN–²[[µB‘€qP‘œo²+‘8àµN“U“M“²]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“iŽ¡‘ôž|µI‘ÈâN‘²[µADšGR‘L§²+–8à[[µAS‘“T‘œo¸“²1]]]‘<=$Ðt¸ãyp˜e‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“miŽ¡‘ôž|µI‘ÈâN–²[µB‘€qP‘œo²+›8àµN“U“M‘Oû²+˜[[µAS‘“T‘œo¸˜²1]]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“iŽ¡‘ôž|µI‘ÈâN–²[[µB‘€qP‘œo²+›8àµN“U“M‘Oû²+˜[[µAS‘“T‘œo¸˜²1]]]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“iŽ¡¡‘ôž|Instruction‘UUÎOUTÐ.Ž¡‘ôž|Description:‘qÇoutput–UUof“the“content“of“the“address;“the“address“is“spGeci ed“absolutely“o¸ãr“relatively‘ÿ*ª.Ž¡‘ôž|Options:Ž¡‘ôž|µO•GU‘T‘c²[µAD“RDz]‘<=$Ðt¸ãyp“e‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“miŽ¡‘ôž|µOšGU–T‘c²[µB‘€qP‘œo²+‘8àµN“U“M“²]‘<=$Ðt¸ãyp˜e‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“iŽ¡‘ôž|µOšGU–T‘c²[[µB‘€qP‘œo²+‘8àµN“U“M“²]]‘<=$Ðt¸ãyp˜e‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“iŽ¡‘ôž|µO•GU‘T‘c²[µAD“R‘L§²+–8à[[µAS‘“T‘œo¸“²1]]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“miŽ¡‘ôž|µOGU–T‘c²[µB‘€qP‘œo²+›8àµN“U“M‘Oû²+˜[[µAS‘“T‘œo¸˜²1]]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“iŽ¡‘ôž|µOGU–T‘c²[[µB‘€qP‘œo²+›8àµN“U“M‘Oû²+˜[[µAS‘“T‘œo¸˜²1]]]]‘<=$Ðt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“iŽ¡¡‘ôž|Instruction‘UUÎMESSÐ.Ž¡‘ôž|Description:‘qÇput–UUstring“message“to“the“standa¸ãrd“output.Ž¡‘ôž|Options:‘qÇt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“maŽ¡¦‘ôž|à5.1.5Ž‘Þ|Con trol‘€instructionsŽŸªª‘ôž|ÐInstruction‘UUÎSTOPÐ.Ž¡‘ôž|Description:‘qÇsignalization–UUof“end“of“the“virtual“machine“run.Ž¡‘ôž|Options:‘qÇt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“maŽ¡¡‘ôž|Instruction‘UUÎINTERÐ.Ž¡‘ôž|Description:‘qÇindicating–UUof“synchronous“interrupt.Ž¡‘ôž|Options:‘qÇt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“maŽ¡¡‘ôž|Instruction‘UUÎIRETÐ.ŽŽŽŒ‹.} ÀÙ ýÚÇ‘ÛÝq²46’õüøÍCHAPTER–UU5.‘ÇINTERPRETER“OR¸ãGANIZA‘ÿ*ªTIONŽŽ ÐÙ¸ ýK7‘ÛÝqÐDescription:‘qÇreturn–UUfrom“synchronous“o¸ãr“asynchronous“interrupt.ޤ ‘ÛÝqOptions:‘qÇt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“maŽ¡¡‘ÛÝqInstruction‘UUÎJMPÐ.Ž¡‘ÛÝqDescription:‘qÇjump–UUto“the“address.Ž¡‘ÛÝqOptions:‘qÇt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“maŽ¡¡‘ÛÝqInstruction‘UUÎJZÐ.Ž¡‘ÛÝqDescription:‘qÇIf–UUlast“opGeration“is“equal“zero,“jump“to“the“address.Ž¡‘ÛÝqOptions:‘qÇt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“maŽ¡¡‘ÛÝqInstruction‘UUÎJNZÐ.Ž¡‘ÛÝqDescription:‘qÇIf–UUlast“opGeration“is“not“equal“zero,“jump“to“the“address.Ž¡‘ÛÝqOptions:‘qÇt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“maŽ¡¡‘ÛÝqInstruction‘UUÎHAL‘ÿ «TÐ.Ž¡‘ÛÝqDescription:‘qÇsystem‘UUhalt.Ž¡‘ÛÝqOptions:‘qÇt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“maŽ¡¡‘ÛÝqInstruction‘UUÎCALLÐ.Ž¡‘ÛÝqDescription:‘bfcall–6“of“a“function.›g†The“function“can“bGe“either“user“supplied“one“o¸ãr“intrinsic“one.˜The“intrinsic“functionsŽ¡‘ÛÝqaš¸ãre–UUeither“call“b˜y“value“o˜r“call“b˜y“reference.Ž¡‘ÛÝqOptions:‘qÇt¸ãypGe‘UUOP‘™˜‰ffŽ–™š1‘™˜‰ffŽ“maŽ¡¡‘ÛÝqInstruction‘UUÎRETÐ.Ž¡‘ÛÝqDescription:‘qÇreturn–UUfrom“a“function.Ž¡‘ÛÝqOptions:‘qÇt¸ãypGe‘UUOP‘™˜‰ffŽ–™š0‘™˜‰ffŽ“maŽ¡Ÿ#nf‘ÛÝqç5.2Ž‘ÃÔStorage–ffof“v‘ÿ™ariables,“hash“tablesŽŸß{‘ÛÝqÐLoGcal–kand“global“vaš¸ãriable“names“and“addresses“a˜re“sto˜red“in“hash“tables“[10Ž‘ ].‘²ÜStructure“reco˜rd“of“the“hash“table“fo˜rŽ¡‘ÛÝqglobal–UUva¸ãriables“is:ŽŸ¸û¡¡‘ÛÝqÏstruct–?ýtab‘n?Á/*“Hash“table“structure.“*/Ž¡‘ÛÝq{Ž¡‘æ]kchar‘?ý*name;Ž¡‘æ]kint–?ýdef;“/*“Position“in“the“hash“table.“*/Ž¡‘æ]kint–?ýcount;“/*“Is“the“variable“used“at“all?“*/Ž¡‘æ]kint–?ýuse_line_number;“/*“The“first“use“of“the“variable.“*/Ž¡‘æ]kint–?ýl_value_flag;“/*“Is“the“variable“initialized“beforeŽ¡‘ëhthe–?ýuse?“*/Ž¡‘æ]kint–?ýdeclaration_line;“/*“Variable“declaration“line“number.“*/Ž¡‘æ]kstruct–?ýtab“*next;Ž¡‘ÛÝq};Ž¡¡©`É¡¡‘ÛÝqstatic–?ýstruct“tab“*hastab;“/*“Pointer“to“the“hash“table.“*/Ž¡¡¦‘êÝqÐAnother–UUtable“is“foš¸ãr“global“identi ers.‘qÇIts“structure“is“as“follo˜ws:Ž¡ŽŽŒ‹/о ÀÙ ýÚÇ‘ôž|Í5.2.‘ÇSTORA¸ãGE–UUOF“V‘þãARIABLES,“HASH“T‘ÿ*ªABLES’ôuÕ²47ŽŽ ÐÙ¸ ýK7¤ ¡‘ôž|Ïstruct–?ýident_tab‘IÖ/*“Table“of“identifiers.“*/Ž¡‘ôž|{Ž¡‘ÿvstruct–?ýinternal_type“*type;Ž¡‘ÿvint‘?ýbody;Ž¡‘ÿvstruct–?ýident_list_str“*list_formal_param;Ž¡‘ÿvstruct–?ýFIX“*next;Ž¡‘ÿvchar‘?ý*adr;Ž¡‘ôž|};Ž¡¡©Ó~¡¡‘ôž|static–?ýstruct“ident_tab“*identtab;‘¿÷/*“Pointer“to“the“table“of“identifiers.“*/Ž¡¡¦‘ž|ÐThe–structure“internal‘™˜‰ffŽ‘™štš¸ãypGe“is“used“fo˜r“t˜ypGe“of“a“va˜riable,–/Âe.g.‘~a˜rra˜y,“function–etc.‘~The“ eld“b•Go“dy– ags“if“theŽ¡‘ôž|vaš¸ãriable–Åis“decla˜red“o˜r“de ned.‘A±The“DIM‘Äîstructure“is“fo˜r“sto˜ring“of“dimensions“of“a˜rra˜ys“and“has“the“follo˜wing“content:ަ¡¡‘ôž|Ïstruct‘?ýrangeŽ¡‘ôž|{Ž¡‘ÿvint‘?ýlower;Ž¡‘ÿvint‘?ýupper;Ž¡‘ôž|};Ž¡¡¡¦‘ž|ÐThe–UUstructure“FIX“is“used“foš¸ãr“ xing“of“calls“of“the“function“and“loGoks“as“follo˜ws:ަ¡¡‘ôž|Ïstruct–?ýFIX‘$¿ë/*“List“of“addresses“where“to“backpatchŽ¡‘^g*–?ýundefined“function.Ž¡‘^g*/Ž¡‘ôž|{Ž¡‘ÿvchar‘?ý*address;Ž¡‘ÿvstruct–?ýFIX“*next;Ž¡‘ôž|};Ž¡¡¦‘ž|ÐIt–UUis“a“link¸ãed“list.‘qÇaddress“pšGoint“to“the“virtual“machine“co˜de“where“the“call“address“should“b˜e“ xed.Ž¡‘ž|The–É$table“of“lošGcal“va¸ãriables“is“allo˜cated“when“lo˜cal“vaš¸ãriables“a˜re“de ned“fo˜r“the“ rst“time.‘Í4Then,‘æfo˜r“each“newŽ¡‘ôž|blošGck–UUnew“table“is“allo˜cated.‘qÇAfter“return“to“scop˜e“level“zero“the“tables“a¸ãre“deallo˜cated.‘qÇThe“table“lo˜oks“lik¸ãe:ަ¡¡‘ôž|Ïstruct‘?ýident_tab_headerŽ¡‘ôž|{Ž¡‘ÿvint‘?ýscope_level;Ž¡‘ÿvint‘?ýpi_loc;Ž¡‘ÿvint‘?ýoffset;Ž¡‘ÿvchar‘?ý*file_scope;Ž¡‘ÿvstruct–?ýident_tab_header“*previous_level;ŽŽŽŒ‹0“ž ÀÙ ýÚÇ‘ÛÝq²48’õüøÍCHAPTER–UU5.‘ÇINTERPRETER“OR¸ãGANIZA‘ÿ*ªTIONŽŽ ÐÙ¸ ýK7‘æ]kÏstruct–?ýident_tab_loc“*all;ޤ ‘æ]kstruct–?ýtab“*hastab_loc;Ž¡‘æ]kstruct–?ýident_tab_loc“*table;Ž¡‘ÛÝq};Ž¡¡‘ÛÝqstruct–?ýident_tab_loc‘4â/*“Table“of“local“identifiers.“*/Ž¡‘ÛÝq{Ž¡‘æ]kstruct–?ýinternal_type“*type;Ž¡‘æ]kint‘?ýbody;Ž¡‘æ]kint‘?ýoffset;Ž¡‘æ]kchar‘?ý*adr;Ž¡‘æ]kstruct–?ýident_list_str“*list_formal_param;Ž¡‘æ]kstruct–?ýident_tab_loc“*previous;Ž¡‘ÛÝq};Ž¡¡ŸÕæ‘êÝqÐThe–hüstruct“ident‘™˜‰ffŽ–™štab‘™˜‰ffŽ“header–hüis“header“foš¸ãr“the“list“of“tables“fo˜r“lošGcal“identi ers.‘¬¼scop˜e‘™˜‰ffŽ‘™šlevel“is“nesting“level“of“theŽ¡‘ÛÝqbloGck.›ÄThe–Æzero“level“is“the“p¸ãrime“level.˜The“o set“is“size“in“b¸ãytes“that“has“to“bšGe“added“to“the“o set“of“the“lo˜calŽ¡‘ÛÝqva¸ãriable–]in“nested“scopšGe“(i.e.‘ˆøin“the“scop˜e‘™˜‰ffŽ‘™šlevel“+“1,‘^ÿif“the“current“level“is“scop˜e‘™˜‰ffŽ›™šlevel).‘ˆøThe“p¸ãrevious‘™˜‰ffŽ˜level“pGoints“toŽ¡‘ÛÝqthe–Ò4blošGck“scop˜e‘™˜‰ffŽ‘™šlevel“-“1.‘FThe“all“is“a“p˜ointer“to“the“list“of“all“lo˜cal“va¸ãriables.‘FThis“list“can“b˜e“traversed“and“additionalŽ¡‘ÛÝqinfo¸ãrmation–rKcan“bšGe“found.‘ȨThe“hastab‘™˜‰ffŽ‘™šlo˜c“and“table“p˜oint“to“the“hash“table“and“identi er“table,‘yˆresp˜ectively“of“theŽ¡‘ÛÝqcurrent‘UUlevel.Ž¡‘êÝqThe–UUstruct“ident‘™˜‰ffŽ–™štab‘™˜‰ffŽ“loGc–UUconsists“of:Ž©ÞQ‘ÛÝqÎt®9ypQÇeŽŽ‘÷øÐ-–UUinternal“repš¸ãresentation“of“t˜ypGeޤï(‘ÛÝqÎo setŽŽ‘ûš4Ð-–UUo set“of“the“va¸ãriable“in“the“current“levelŽ¡‘ÛÝqÎpreviousŽŽ‘ 3Ð-–UUpGoints“to“the“pš¸ãrevious“decla˜red“va˜riableަ‘ÛÝqP¸ãointer–UUto“the“table“is:ީտ¤ ¡‘ÛÝqÏstatic–?ýstruct“ident_tab_headerŽ¡‘ÛÝq*identtab_loc;‘SÿÐ/*–?ýPointer“to“the“table“of“local“identifiers.“*/Ž¡¡¦‘êÝqÐThe–¤ïinterpš¸ãreter“is“alw˜a˜ys“sea˜rching“fo˜r“va˜riables“in“the“table“of“the“loGcal“identi ers.‘`”If“the“names“do“not“matchŽ¡‘ÛÝqwith–\seaš¸ãrched“name,‘[the“interp˜reter“p˜roGceeds“in“the“table“of“the“global“identi ers.‘WIf“the“interp˜reter“doGes“not“ nd“theŽ¡‘ÛÝqname–UUof“the“vaš¸ãriable“in“the“hash“table,“it“announces“an“erro˜r.Ž¡‘êÝqStructures–UUof“the“hash“tables“of“intrinsic“functions“aš¸ãre“the“follo˜wing:ަ¡¡‘ÛÝqÏstruct–?ýremote_tab‘D?Ù/*“Hash“table“structure“for“intrinsicŽ¡‘\*‘?ýfunctions.Ž¡‘\*/Ž¡‘ÛÝq{Ž¡‘æ]kchar‘?ý*name;Ž¡‘æ]kvoid–?ý(*adr)“PROTO((char“**));Ž¡‘æ]kstruct–?ýremote_tab“*next;Ž¡‘ÛÝq};Ž¡¡¦¡¡‘ÛÝqstruct–?ýremote_has_tab‘/?å/*“Hash“table“structure“for“intrinsicŽŽŽŒ‹1šq ÀÙ ýÚÇ‘ôž|Í5.2.‘ÇSTORA¸ãGE–UUOF“V‘þãARIABLES,“HASH“T‘ÿ*ªABLES’ôuÕ²49ŽŽ ÐÙ¸ ýK7‘^gÏ*‘?ýfunctions.ޤ ‘^g*/Ž¡‘ôž|{Ž¡‘ÿvchar‘?ý*name;Ž¡‘ÿvint‘?ýoffset;Ž¡‘ÿvstruct–?ýremote_has_tab“*next;Ž¡‘ôž|};Ž¡¡©Ó~‘ž|ÐIntrinsic–=»functions“aš¸ãre“initially“sto˜red“in“the“list“remote‘™˜‰ffŽ‘™štab.‘iéThe“functions“a˜re“loaded“from“this“list“into“the“hashŽ¡‘ôž|table–UUof“the“remote‘™˜‰ffŽ–™šhas‘™˜‰ffŽ“tab–UUstructure.‘qÇPš¸ãointers“to“these“structures“a˜re:ަ¡¡‘ôž|Ïstruct–?ýremote_has_tab“*hastab_remote;Ž¡¡¦¡¡‘ôž|struct‘?ýremote_tabŽ¡‘ôž|*remote_ptr_C;‘SÿÐ/*–?ýPointer“to“the“structure“of“remoteŽ¡‘^g*–?ýfunction“table.Ž¡‘^g*/Ž¡¡¦‘ž|ÐHash–UUfunction“is“as“follo¸ãws:ަ¡¡‘ôž|Ï/*Ž¡‘ùÞy*–?ýHash“function.Ž¡‘ùÞy*/Ž¡‘ôž|static–?ýunsigned“intŽ¡‘ôž|hash_code–?ý(s,“size)Ž¡‘ÿvchar‘9¿ß*s;Ž¡‘ÿvunsigned–?ýint“size;Ž¡‘ôž|{Ž¡‘ÿvint‘D?Ùc–?ý=“0;Ž¡¡‘ÿvwhile‘?ý(*s)Ž¡‘ žp{Ž¡‘jc–?ý=“c“<<“1“^“(*s);Ž¡‘js++;Ž¡‘ žp}Ž¡‘ÿvif–?ý(0“>“c)Ž¡‘ žpc–?ý=“(-c);Ž¡‘ÿvreturn–?ý(c“%“size);Ž¡‘ôž|}Ž¡¡¦‘ôž|µM‘AX‘bz‰ffŽŽ‘b|H‘ÏþAS‘èâÐis–UUsize“of“the“hash“table.Ž¡‘ž|In–UUaddition,“there“is“a“table“of“de ned“t¸ãypGes:ަ¡¡‘ôž|Ïstatic–?ýstruct“ident_tab_headerŽŽŽŒ‹2¤¼ ÀÙ ýÚÇ‘ÛÝq²50’õüøÍCHAPTER–UU5.‘ÇINTERPRETER“OR¸ãGANIZA‘ÿ*ªTIONŽŽ ÐÙ¸ ýK7‘ÛÝqÏ*tagtab;–?ý/*“Pointer“to“the“table“of“tags.“*/ޤ ¡Ÿ'±‘êÝqÐIn–ßthis“table“aš¸ãre“sto˜red“new“t˜ypGes“and“structure“tags,‘IÂetc.‘¼fF˜o˜r“t˜ypšGes,‘IÂthe“lazy“allo˜cation“is“used,‘IÂi.e.‘¼ftable“isŽ¡‘ÛÝqallošGcated–UUonly“when“ rst“t¸ãyp˜e“is“declaš¸ãred“o˜r“de ned.ŽŸ# °‘ÛÝqç5.3Ž‘ÃÔFixation–ffand“f‘yšixativŒÌe“structuresŽŸÄ…‘ÛÝqÐWš¸ãe–ŒÕuse“f‘±Çixation“in“the“statements‘3Tif,–šµwhile,“fo˜r,“continue,“b˜reak,“return–ŒÕand“switch.‘GThe“f‘±Çixation“a˜re“used“in“theŽ¡‘ÛÝqlošGop–UUstatements“b˜ecause“of“nested“lo˜ops“oš¸ãr“unkno˜wn“length“of“the,“lošGop“resp˜ectively‘ÿ*ª.ŽŸ Iì‘êÝqFixative–UUstructures“aš¸ãre“follo˜wing:ŽŸq¡¡‘ÛÝqÏ/*Ž¡‘án*‘?ýcontrol.hŽ¡‘án*Ž¡‘án*–?ýHeader“of“fixative“structures.Ž¡‘án*/Ž¡¡‘ÛÝq#ifndef‘?ý_CONTROL_HŽ¡‘ÛÝq#define‘?ý_CONTROL_HŽ¡¡‘ÛÝqtypedef‘?ýstructŽ¡‘ÛÝq{Ž¡‘ánint‘?ýmajor;Ž¡‘ánchar‘?ý*jmp;Ž¡‘ánchar‘?ý*jz;Ž¡‘ëhstruct–?ýcont1“*cnext;Ž¡‘ánstruct–?ýbreak1“*bnext;Ž¡‘ÛÝq}‘?ýWHILE1;Ž¡¡‘ÛÝqtypedef‘?ýstructŽ¡‘ÛÝq{Ž¡‘ánint‘?ýmajor;Ž¡‘ánchar–?ý*jn;“/*“Label“of“the“JZ“*/Ž¡‘ánchar–?ý*jmp2;“/*“Label“of“the“JMP.“The“first“JMP“*/Ž¡‘ÛÝq/*–?ýinstruction.“It“is“between“expr2“*/Ž¡‘ÛÝq/*–?ýand“expr3.“*/Ž¡‘ánchar–?ý*jmp3;“/*“Address“where“to“jump“if“all“*/Ž¡‘ÛÝq/*–?ýstatements“of“the“loop“are“*/Ž¡‘ÛÝq/*–?ýdone.“(See“manual)“*/Ž¡‘ánstruct–?ýbreak1“*bnext;Ž¡‘ánstruct–?ýcont1“*cnext;Ž¡‘ÛÝq}‘?ýFOR1;Ž¡¡‘ÛÝqstruct‘?ýbreak1Ž¡‘ÛÝq{Ž¡‘ánchar‘?ý*adr;Ž¡‘ánstruct–?ýbreak1“*next;Ž¡‘ÛÝq};Ž¡¡‘ÛÝqstruct‘?ýcont1Ž¡‘ÛÝq{Ž¡‘ánchar‘?ý*adr;Ž¡‘ánstruct–?ýcont1“*next;Ž¡‘ÛÝq};ŽŽŽŒ‹3©Ñ ÀÙ ýÚÇ‘ôž|Í5.3.‘ÇF›¸åIXA‘ÿ*ªTION–UUAND“F˜IXA‘ÿ*ªTIVE“STR¸ãUCTURES’÷d²51ŽŽ ÐÙ¸ ýK7¤ ‘ôž|Ïtypedef‘?ýstructŽ¡‘ôž|{Ž¡‘ùÞyint‘?ýmajor;Ž¡‘ùÞychar‘?ý*jz;Ž¡‘ùÞychar‘?ý*jmp;Ž¡‘ôž|}‘?ýIF1;Ž¡¡‘ôž|struct‘?ýdefault_usageŽ¡‘žd{Ž¡‘ÿvint–?ýline_number;“/*“Line“number“where“the“default“labelŽ¡‘^swas–?ýused.“*/Ž¡‘ÿvint–?ýdef_flag;“/*“Flag“if“the“default“label“was“used.Ž¡‘^sIt–?ýcan“be“used“only“once“per“switchŽ¡‘^sstatement.–?ý(ANSI)“*/Ž¡‘ÿvchar–?ý*adr;“/*“Address“where“to“jump“to“in“theŽ¡‘^svirtual–?ýmachine“code.“*/Ž¡‘ôž|};Ž¡¡‘ôž|typedef‘?ýstructŽ¡‘žd{Ž¡‘ÿvint‘?ýmajor;Ž¡‘ÿvchar‘?ý*jz;Ž¡‘ÿvchar‘?ý*jmp;Ž¡‘ÿvstruct–?ýdefault_usage“def_use;Ž¡‘ÿvstruct–?ýbreak1“*bnext;Ž¡‘ÿvstruct–?ýlist_const1“*next;Ž¡‘ôž|}‘?ýSWITCH1;Ž¡¡‘ôž|struct–?ýlist_const1“/*“The“list“of“labels“in“switchŽ¡‘^sstatement–?ýis“created.“The“list“isŽ¡‘^sat–?ýthe“end“of“switch“statementŽ¡‘^schecked–?ýif“labels“in“this“list“areŽ¡‘^snot–?ýduplicit.“If“there“are“duplicitŽ¡‘^serror–?ýmessage“is“issued.“*/Ž¡‘žd{Ž¡‘ÿvint–?ýline_number;“/*“Line“number“where“the“label“wasŽ¡‘^sused–?ýin“the“switch“statement.“*/Ž¡‘ÿvint–?ýconstant;“/*“Label“in“switch“statement.“*/Ž¡‘ÿvstruct–?ýlist_const1“*next;Ž¡‘ôž|};Ž¡¡‘ôž|union‘?ýfixŽ¡‘ôž|{Ž¡‘ùÞyWHILE1‘?ýwhile1;Ž¡‘ùÞyFOR1‘?ýfor1;Ž¡‘ùÞyIF1‘?ýif1;Ž¡‘ùÞySWITCH1‘?ýswitch1;Ž¡‘žd};Ž¡¡©d8¡¡‘ôž|union–?ýfix“*fixp;‘IÖ/*“Pointer“to“the“fixative“stack.“*/Ž¡¡¦‘ž|ÐThe–å xation“of“foš¸ãr“statement“is“fully“optimized,‘ i.e.‘!there“a˜re“no“jumps“on“jumps.‘!It“is“tested“if“all“pa˜rts,‘ i.e.ŽŽŽŒ‹4°  ÀÙ ýÚÇ‘ÛÝq²52’õüøÍCHAPTER–UU5.‘ÇINTERPRETER“OR¸ãGANIZA‘ÿ*ªTIONŽŽ ÐÙ¸ ýõ»æŸÞ9Ÿ’÷?‘R©ÁÐwhile–UU(“exp¸ãr“)ŽŽŽŸ©ºW‘lWû¸fŽŽŽŸÀØÝ‘féÂÐstatŽŽŽŸ×@‡‘lWû¸gŽŽŽŸòÂh‘iIÂÐ....ŽŽŽ‘n¤ÉŸ€ˆF„ ÕffŽ‘n×üŸmqóäO£ line10¬6ŽŽŽ‘n×ü ÿw £„fffmì‘öžÌÍ-ŽŽŸ§`R’Ý%¬ÐjzŽŽŽ’ÕµŸâhÈ„jûXffŽ’ÕEèŸâhȬ?ŽŽ‘êNŸâ›ü„ffU[š‘ª¤fžÌÍŽŽ‘D*/ŸÕ…f„ff›{‘æd…žÌÍŽŽ‘CöüŸÕR3„DIHffŽ‘D*/Ÿ›ë6ŽŽŽŸ²ÁÞ‘. ±ÐjmpŽŽŽ‘D*/Ÿ‘<„ff°Æ‘öžÌͬ-ŽŽŽŽŽ’#(ÉŸ‘ë‰ff9´ˆŸ9ï„9ïffŸú# ‘ŤÐexp¸ãrŽŽ‘8缄9ïffŽžff‰ff9´ˆŽŽŽŸ¯üÉ’5kðjz‘UUJZŽŽŽ’#(ÉŸ»¶¸‰ff9´ˆŸ9ï„9ïffŸû¾w‘…¥statŽŽ‘8缄9ïffŽžff‰ff9´ˆŽŽŽŸÚª–’,†˜jmp‘UUJMPŽŽŽ’?ÏÚŸ‘ë„9ïffŽ’@ Ÿ‘ë¬?ŽŽ’?ÏÚŸ¤ó „°ÆffŽ’@ Ÿ¤ó ?ŽŽ’?ÏÚŸ»¶¸„°ÆffŽ’@ Ÿ»¶¸?ŽŽ’?ÏÚŸÏ¡m„°ÆffŽ’@ ŸÏ¡m?ŽŽ’?ÏÚŸñÆ„RffŽ’@ ŸñÆ?ŽŽ’U@Ÿã¿U„ff*­Í‘ÕR3žÌÍŽŽ’" ŸãŒ"„[ `ffŽ’U@Ÿ’Â6ŽŽŽ’U@Ÿˆ²õ„ff*­Í‘öžÌÍ-ŽŽ’N<üŸ­¯ü„ff"$¤‘öžÌÍ-ŽŽ’p.mŸé<è„;ÀffŽ’pa Ÿé<è?ŽŽ’@ Ÿép„ff0^“‘Ï¡mžÌÍŽŽŽŽŽŽŸ’kð²Figure–UU5.1:‘qÇFixation“in“ÐwhileŽŽŽŸ`¯‘ÛÝqexpš¸ãr2–UUand“exp˜r3“a˜re“in“the“fo˜r“statement.ޤ ‘êÝqThe–UUstatement“bš¸ãreak,“continue“a˜re“ xed“to“the“end“of“the“most“inner“loGop.Ž¡‘êÝqAnother–†|case“is“the“statement“return.›=The“f‘±Çixation“is“made“another“w•¸ãa“y–†|as“it“is“mentioned“abGove.˜The“f‘±ÇixativeŽ¡‘ÛÝqstructure‘UUis:Ž©8Û¡¡‘ÛÝqÏstruct–?ýreturn1‘$¿ë/*“List“of“addresses“where“to“backpatchŽ¡‘\*–?ýreturns“from“a“function.Ž¡‘\*/Ž¡‘ÛÝq{Ž¡‘æ]kchar‘?ý*adr;Ž¡‘æ]kstruct–?ýreturn1“*next;Ž¡‘ÛÝq};Ž¡¡¦¡¡‘ÛÝqstruct–?ýreturn1“*rp;“/*“Pointer“for“backpatch“address“of“*/Ž¡‘ÛÝq/*–?ýreturn“in“a“function.“*/Ž¡¡¦‘êÝqÐThe–š epilogue“of“the“pš¸ãroGcedure“is“ xed“in“this“case“(i.e.‘A©the“epilogue“is“alw˜a˜ys“executed,‘«óbGefo˜re“the“control“ o˜wŽ¡‘ÛÝqreaches‘UUcaller).Ž¡‘êÝqThe–)statement“switch“has“complicated“ xative“structure.‘íY‘ÿ*ªou“can“follo¸ãw“it“in“the“comments“attached“to“theŽ¡‘ÛÝq xative–UUstructure.‘qÇIt“can“bšGe“b˜e“cleaš¸ãrer“from“the“ g.“5.7“as“w˜ell.Ž¡‘êÝqSee–UU gures“5.1,“5.2,“5.3,“5.4,“5.5,“5.6,“5.7“fo¸ãr“the“all“cases“of“the“f‘±Çixations.Ž¡‘êÝqUnconditional–ªspš¸ãrogram“b˜ranching“is“suppGo˜rted“b˜y“a“goto“statement.‘8ÑThe“goto“statement“has“the“follo˜wing“ xativeŽ¡‘ÛÝqstructure:ަ¡¡‘ÛÝqÏstruct–?ýgoto_adr“/*“List“of“addresses“with“gotoŽ¡‘ëhstatements–?ýfor“the“current“label.“*/Ž¡‘ÛÝq{Ž¡‘æ]kchar–?ý*adr;“/*“Address“of“the“goto“statement.“*/Ž¡‘æ]kint–?ýline_number;“/*“Line“number“of“the“goto“statement.“*/Ž¡‘æ]kstruct–?ýgoto_adr“*gnext;Ž¡‘ÛÝq};Ž¡¡ŽŽŒ‹5· ÀÙ ýÚÇ‘ôž|Í5.3.‘ÇF›¸åIXA‘ÿ*ªTION–UUAND“F˜IXA‘ÿ*ªTIVE“STR¸ãUCTURES’÷d²53ŽŽ ÐÙ¸ þqœ”ŸÞ9Ÿ—„¨‘ti°Ðfoš¸ãr–UU(“exp˜r1;“exp˜r2;“exp˜r3“)ŽŽŽŸ®GÀ’¨ D¸fŽŽŽŸÅfF’¢Ÿ ÐstatŽŽŽŸÛÍð’¨ D¸gŽŽŽŸòÂh’¤ÿ Ð....ŽŽŽ’ªZŸ€ˆF„îøffŽ’ªE ÿz™N¬6ŽŽŽ’ªZ ÿp™Q„5«ffŽ’ªE ÿhc¦6ŽŽŽ’ªE ÿ^–Õ„ffzX¡‘öžÌÍ-ŽŽ’$²³Ÿä¯{„†KÙffŽ’$åæŸä¯{?ŽŽ’»Ÿ—Ÿä⯄ffiFO‘–¹±žÌÍŽŽŸ¢Òæ’)„dÐjnŽŽŽ‘ckšŸ×:p„ff;À‘Ä?ážÌͬŽŽ‘c8gŸ×=„[ `ffŽ‘ckšŸ…úÝ6ŽŽŽ‘ckš ÿ|.„ffApå‘öžÌÍ-ŽŽ’¤©LŸ‚Îü„ÔffŽ’¤ÜŸ‚Îü?ŽŽ’ªE ÿpÌ„„ffDIH‘öžÌÍ-ŽŽ’î£ZŸ«ÇÄ;.rffŽ’îÖŸ«ÇÃ?ŽŽ’»Ÿ—Ÿ«úó„ff36ö‘ÌÉ žÌÍŽŽŸ:’ø]²Ðjmp1ŽŽŽŸÉ„ö‘Gõ¸jmp3ŽŽŽ‘ckšŸžR´„ff;À‘Ä?ážÌͬŽŽŸ«í¿‘r£…Ðjmp2ŽŽŽŽŽŽ’Xå= ÿ5ĉfe)l¶ŸOö„OöfeŸõØŽ‘(Ÿì„OöfeŽžfe‰fe)l¶ŽŽŽ’Xå= ÿGÕ°‰fe)l¶ŸOö„OöfeŸõØŽ‘(Ÿì„OöfeŽžfe‰fe)l¶ŽŽŽ’Xå=Ÿ„Å’‰fe)l¶ŸOö„OöfeŸõØŽ‘(Ÿì„OöfeŽžfe‰fe)l¶ŽŽŽ’Xå=ŸÁµt‰fe)l¶ŸOö„OöfeŸõØŽ‘(Ÿì„OöfeŽžfe‰fe)l¶ŽŽŽ’mhf ÿGÕ°„OöfeŽŽ’mhf ÿb=£„ýfeŽŽ’mhfŸ„Å’„ 'ûfeŽŽ’mhfŸÁµt„_ôfeŽŽ’mhfŸþ¥V„WõfeŽ’m›˜Ÿþ¥V¬?ŽŽ’M¨ ÿhˆÒ„fdOöŽ’LèvŸîe^„†¾feŽŽ’M¨Ÿî˜„fd ð‘öžÌÎ-ŽŽ’ã ÿvÀË„fd /úŽ’‹àWŸµ…z„>÷áfeŽŽ’m›˜Ÿµ¸¬„fdwñ‘ሞÌÎŽŽ’yË’Ÿà`—„fd ðŽ’šPŸà-e„aÐfeŽŽ’m›˜ ÿ~àÇ„fd,¯ê‘ÓPžÌÎŽŽ’G«Ÿ¡h¶„fdgóŽ’FÐyŸ¡5„„_wÑfeŽŽ’G« ÿAðå„fd&—í‘öžÌÎ-ŽŽ ÿ+e¾’bk+óo´‹Ç cmr9Åexpr1ŽŽŽŽ ÿTª’bk+expr2ŽŽŽŽ ÿlež’bá{jn‘TJZŽŽŽŽ ÿx•˜’X'Œjmp2‘TJMPŽŽŽŽŸõŒ’bk+expr3ŽŽŽŽŸ¥E‚’cØjJMPŽŽŽŽŸÍån’eß²statŽŽŽŽŸâ5d’cØjJMPŽŽŽŽ ÿ?µ´’O%mjmp1ŽŽŽŽ ÿ|¥–’%Mjmp3ŽŽŽŽŽŽŽŽŸ’­0ˆ²Figure–UU5.2:‘qÇFixation“in“Ðfo¸ãrŽŽŽ lŸÞ9 ÿ7ò&‘c¨:if–UU(“exp¸ãr“)ŽŽŽ ÿNµ>‘uræ¸fŽŽŽ ÿf?r‘m„­Ðstat1ŽŽŽ ÿ|;n‘uræ¸gŽŽŽŸ“÷i‘pd®ÐelseŽŽŽŸ©Áž‘uræ¸fŽŽŽŸÁD‹‘m„­Ðstat2ŽŽŽŸ×@‡‘uræ¸gŽŽŽŸòÂh‘rd­Ð....ŽŽŽ‘w¿´ ÿ%ƒ1„ ÎffŽ‘wòç ÿyc¬6ŽŽŽ‘wòç ÿ ¬–„ffG!«‘öžÌÍ-ŽŽ’¾á_Ÿ~†„„#ffŽ’¿’Ÿ~†?ŽŽ’‰9Ÿ±¹„ff6Y‘Éð§žÌÍŽŽ ÿS/]’ÄóÐjzŽŽŽ’‰9 ÿw £„ffsÞ‘öžÌͬ-ŽŽ’¥EäŸà³¿„iFOffŽ’¥yŸà³¿?ŽŽ’‰9Ÿàæò„ffsÞ‘ãŒ"žÌÍŽŽŸ¸r¤’«ÏwÐjmpŽŽŽŽŽŽ’Xÿ ÿö™‰ff9´ˆŸ9ï„9ïffŸú# ‘Ťexp¸ãrŽŽ‘8缄9ïffŽžff‰ff9´ˆŽŽŽŸžêw’*œ&jz‘UUJZŽŽŽ’XÿŸª¤f‰ff9´ˆŸ9ï„9ïffŸü*%‘¤stat1ŽŽ‘8缄9ïffŽžff‰ff9´ˆŽŽŽŸÉ˜D’!¶Îjmp‘UUJMPŽŽŽ’XÿŸÕR3‰ff9´ˆŸ9ï„9ïffŸü*%‘¤stat2ŽŽ‘8缄9ïffŽžff‰ff9´ˆŽŽŽ’5 ÿö™„9ïffŽ’53C ÿö™¬?ŽŽ’5Ÿ“áN„°ÆffŽ’53CŸ“áN?ŽŽ’5Ÿª¤f„°ÆffŽ’53CŸª¤f?ŽŽ’5Ÿ¾„°ÆffŽ’53CŸ¾?ŽŽ’5ŸÕR3„°ÆffŽ’53CŸÕR3?ŽŽ’5ŸñÆ„9ïffŽ’53CŸñÆ?ŽŽ’IøŸœª„ffÑöžÌÍ-ŽŽ’_­ÝŸÏ¡m„36öffŽ’_áŸÏ¡m?ŽŽ’53CŸÏÔ „ff*­Í‘ÕR3žÌÍŽŽ’ RCŸìK„$ýffŽ’ …vŸìK?ŽŽ’ …vŸìH~„ff*­Í‘öžÌÍ-ŽŽ’ …vŸÇKw„ff aŒ‘ôžtžÌÍŽŽŽŽŽŽŸ’°‰²Figure–UU5.3:‘qÇFixation“in“ÐifŽŽŽŽŽŒ‹6Á• ÀÙ ýÚÇ‘ÛÝq²54’õüøÍCHAPTER–UU5.‘ÇINTERPRETER“OR¸ãGANIZA‘ÿ*ªTIONŽŽ ÐÙ¸ ý÷´ŸÞ9Ÿ•=õ’®„K¸fŽŽŽŸ©ë·’«vÐ....ŽŽŽŸÃ »’îõcontinue;ŽŽŽŸ×qç’«v....ŽŽŽŸðJU’®„K¸gŽŽŽ’æàrŸëƒŸ„-†0ffŽ’ç¥ŸëƒŸ¬?ŽŽ’žŸë¶Ò„ff$ý‘ÛùžÌÍŽŽŸÔæ‚’íjÐjmpŽŽŽ’ÐPŸ¾0¢„ffÑöžÌͬ-ŽŽŽŽŽŽŸ’ˆz(²Figure–UU5.4:‘qÇFixation“of“ÐcontinueŽŽŽ ô†EŸÞ9 ÿ|4'’««è¸fŽŽŽŸáé’¨¯Ð....ŽŽŽŸª:’¡ub¸ãreak;ŽŽŽŸ¾h’¨¯....ŽŽŽŸ×@‡’««è¸gŽŽŽŸð{²’¨¯Ð....ŽŽŽ’¿>;Ÿ¥&Ó„ff*­Í‘öžÌͬ-ŽŽ’é¸ÕŸà"„;.rffŽ’éìŸà"?ŽŽ’¿>;ŸàUF„ff*­Í‘ÕR3žÌÍŽŽŸÄ÷Š’ðBhÐjmpŽŽŽŽŽŽŽŸ’Žó ²Figure–UU5.5:‘qÇFixation“of“Ðb¸ãreakŽŽŽ öÅ´ŸÞ9 ÿyô¸’§gT¸fŽŽŽŸŽ¢z’¤YÐ....ŽŽŽŸ§zè’ŠUŠreturn–UU(“exp¸ãr“);ŽŽŽŸ¼(ª’¤Y....ŽŽŽŸÕ’§gT¸gŽŽŽŸî„fd ÀŽ’GöŸÏ¶¼„‚°feŽ’H)9ŸÏ¶¼?ŽŽ’GöŸ¯)L„‚°feŽ’H)9Ÿ¯)L?ŽŽ’7| ÿ&p܉fe!Z:ŸF¸„F¸feŸ÷ܤޑ p„F¸feŽžfe‰fe!Z:ŽŽŽ’7| ÿ=:D‰fe!Z:ŸF¸„F¸feŸ÷ܤޑ p„F¸feŽžfe‰fe!Z:ŽŽŽ’7| ÿT¬‰fe!Z:ŸF¸„F¸feŸ÷ܤޑ p„F¸feŽžfe‰fe!Z:ŽŽŽ’7| ÿj͉fe!Z:ŸF¸„F¸feŸ÷ܤޑ p„F¸feŽžfe‰fe!Z:ŽŽŽ’7|Ÿ–|‰fe!Z:ŸF¸„F¸feŸ÷ܤޑ p„F¸feŽžfe‰fe!Z:ŽŽŽ’Gö ÿ=:D„‚°feŽ’H)9 ÿ=:D?ŽŽ’Gö ÿT¬„‚°feŽ’H)9 ÿT¬?ŽŽ’GöŸ–|„‚°feŽ’H)9Ÿ–|?ŽŽ’7| þ§|t‰fe!Z:ŸF¸„F¸feŸ÷ܤޑ p„F¸feŽžfe‰fe!Z:ŽŽŽ’7| þ¾E܉fe!Z:ŸF¸„F¸feŸ÷ܤޑ p„F¸feŽžfe‰fe!Z:ŽŽŽ’7| þÕD‰fe!Z:ŸF¸„F¸feŸ÷ܤޑ p„F¸feŽžfe‰fe!Z:ŽŽŽ’7| þëØ¬‰fe!Z:ŸF¸„F¸feŸ÷ܤޑ p„F¸feŽžfe‰fe!Z:ŽŽŽ’7| ÿ¢‰fe!Z:ŸF¸„F¸feŸ÷ܤޑ p„F¸feŽžfe‰fe!Z:ŽŽŽ’Gö þ¾EÜ„‚°feŽ’H)9 þ¾EÜ?ŽŽ’Gö þÕD„‚°feŽ’H)9 þÕD?ŽŽ’Gö þëØ¬„‚°feŽ’H)9 þëØ¬?ŽŽ’Gö ÿ¢„‚°feŽ’H)9 ÿ¢?ŽŽ’7|Ÿæ€$‰fe!Z:ŸF¸„F¸feŸ÷ܤޑ p„F¸feŽžfe‰fe!Z:ŽŽŽ’7|Ÿ¯)L‰fe!Z:ŸF¸„F¸feŸ÷ܤޑ p„F¸feŽžfe‰fe!Z:ŽŽŽ’Xoñ ÿEÒ„fd ÄŽ’bÇ ÿg‹¼„".feŽŽ’H)9 ÿg¾î„fd ÀŽ’Gö ÿjÍ„AXfeŽ’H)9 ÿjÍ?ŽŽ’3} ÿ\Z:„fd⎒2ÍKŸ•Œ„8÷„feŽŽ’3}Ÿ•Q¾„fd(¼‘öžÌÎ-ŽŽŸ„×Ô’]™½óÙ“ Rcmr7±-ŽŽŽŽ þÙñH’]™½-ŽŽŽŽ ÿ@{œ’[ù-ŽŽŽŽ þ²á(’@‚ýexprŽŽŽŽ þÞÓL’B©==ŽŽŽŽ ÿ f’>„ÄbreakŽŽŽŽ þõœ´’>åstatzr‰ffdFŽ‘Þ¸1ŽŽŽŽ ÿFþL’B©==ŽŽŽŽ ÿ]Ç´’>åstatzr‰ffdFŽ‘Þ¸2ŽŽŽŽŸ‹Z„’B©==ŽŽŽŽŸ£Ä˜’>åstatzr‰ffdFŽ‘Þ¸3ŽŽŽŽŸÛp’>åstatzr‰ffdFŽ‘Þ¸4ŽŽŽŽŸðD,’>„ÄbreakŽŽŽŽŸ¸íT’>„ÄbreakŽŽŽŽ þÈ ä’5¢ió†›Zcmr5°consth‡‰ff ­Ž–s4exprh‡‰ff ­Ž“1ŽŽŽŽ ÿ04ä’5¢iconsth‡‰ff ­Ž–s4exprh‡‰ff ­Ž“2ŽŽŽŽ ÿt‘’5¢iconsth‡‰ff ­Ž–s4exprh‡‰ff ­Ž“3ŽŽŽŽŽŽŽŽŸ’¥Él²Figure–UU5.7:‘qÇFixation“of“ÐswitchŽŽŽŽŽŒ‹8ÑO ÀÙ ýÚÇ‘ÛÝq²56’õüøÍCHAPTER–UU5.‘ÇINTERPRETER“OR¸ãGANIZA‘ÿ*ªTIONŽŽ ÐÙ¸ ýK7‘ÛÝqÏstruct–?ýgoto_tab“/*“Hash“table“structure“for“gotoޤ ‘ëhlabels.‘?ý*/Ž¡‘ÛÝq{Ž¡‘æ]kchar–?ý*name;“/*“Name“of“the“label.“*/Ž¡‘æ]kchar–?ý*label_adr;“/*“Address“of“the“label“in“theŽ¡‘ëhgenerated–?ýcode.“*/Ž¡‘æ]kint–?ýline_number;“/*“Line“number“of“the“label“in“theŽ¡‘ëhsource–?ýfile.“*/Ž¡‘æ]kstruct–?ýgoto_adr“*gnext;“/*“List“of“goto's“to“the“label.“*/Ž¡‘æ]kstruct–?ýgoto_tab“*next;Ž¡‘ÛÝq};Ž¡¡©ˆ¡¡‘ÛÝqstatic–?ýstruct“goto_tab“*hastab_goto;“/*“Pointer“to“the“hashŽ¡‘ëhtable.‘?ý*/Ž¡¡¦‘êÝqÐIf–/-labGels“oš¸ãr“goto's“a˜re“encountered“during“pa˜rsing,‘6Ïthe“addresses“of“coGde“a˜re“put“into“the“ xative“structure.‘eAfterŽ¡‘ÛÝqsuccessful–UUcompilation,“addresses“of“goto's“aš¸ãre“ xed“to“the“co˜rrespšGonding“lab˜els.‘qÇThen“the“co˜de“is“executed.Ž© "‘êÝqThe–Ï_goto“statement“can“appGeaš¸ãr“only“in“the“level“one“(all“statements“that“a˜re“compiled)“statements.‘ßäThe“gotoŽ¡‘ÛÝqcannot–UUjump“to“a“labGel“across“functions.ŽŸ"Gz‘ÛÝqç5.4Ž‘ÃÔPšŒÌarameter–ffpassing“mec˜hanismŽŸy*‘ÛÝqÐP•¸ãa“rameters›Øïa“re˜passed˜b“y˜reference˜[10Ž‘ ].‘HPThe˜pa“rameters˜a“re˜over˜the˜pGointer˜BP‘ØÐ(µB‘€qP‘£¥²+‘@µof–f“setÐ),‘ñÐi.e.‘HPto•¸ãw“a“rd˜greaterŽ¡‘ÛÝqaddresses.‘HÿLoGcal–Úüvaš¸ãriables“a˜re“bGelo˜w“the“BP‘ÚÝ(µB‘€qP‘§À¸‘D1µof–f“setÐ),‘óui.e.‘Hÿto˜w˜a˜rd–Úülesser“addresses.‘HÿThe“pa˜rameters“a˜re“pushedŽ¡‘ÛÝqonto–ŽÜthe“stack“in“the“reverse“oš¸ãrder“as“they“appGea˜r“in“the“function“call.‘]The“ rst“pa˜rameter“has“o set“less“than“theŽ¡‘ÛÝqlast–UUpaš¸ãrameter“(the“ rst“pa˜rameter“is“closer“to“the“BP).“The“last“pa˜rameter“is“the“deepGest“pa˜rameter“on“the“stack.ަ‘êÝqAddresses–ƒof“the“paš¸ãrameters“a˜re“sto˜red“in“the“stack.‘©QDuring“compilation“of“the“list“of“fo˜rmal“pa˜rameters“it“isŽ¡‘ÛÝqleaving–Ì7out“the“place“foš¸ãr“them“in“the“stack.‘ÖlIt“causes“di erent“accesses“to“the“pa˜rameters“and“the“loGcal“va˜riables,Ž¡‘ÛÝqb•Gecause›.Ÿlo“cal˜va•¸ãriables˜a“re˜sto“red˜b“y˜value˜(only˜one˜indirection,‘6]pa“rameters˜need˜t“w“o˜indirections).‘dàDi erent˜virtualŽ¡‘ÛÝqmachine–UUinstructions“must“bGe“generated“foš¸ãr“pa˜rameters“and“loGcal“va˜riables.Ž©"Gz‘ÛÝqç5.5Ž‘ÃÔStacŒÌkŽŸy*‘ÛÝqÐThe–Ÿ«stack“is“used“foš¸ãr“sto˜ring“of“the“addresses“of“pa˜rameters“and“fo˜r“the“loGcal“va˜riables“as“it“w˜as“mentioned“inŽ¡‘ÛÝqsection–T25.4.‘qfThe“lošGcation“of“pa¸ãrameters“and“lo˜cal“va¸ãriables“is“dep˜ending“on“the“level“in“which“the“function“is“called.Ž¡‘ÛÝqThe–UUpaš¸ãrameters“and“the“loGcal“va˜riables“a˜re“destro˜y˜ed“after“a“return“from“the“p˜roGcedure.ަ‘ÛÝqç5.6Ž‘ÃÔCompiled‘ffstatemenŒÌtŽŸy*‘ÛÝqÐThe–éõstatements“mentioned“on“the“level“1“(µ<Ž‘ÇÐlist‘™˜‰ffŽ‘™šstat“µ>Ž‘ ±Ð(see“appšGendix“4))“a¸ãre“compiled.‘MüPro˜cedures“a¸ãre“also“compiled.Ž¡‘ÛÝqThe–¸Up¸ãrošGcedures“must“b˜e“p¸ãro˜cessed“when“they“aš¸ãre“called.‘šÆThe“p˜roGcedures“usually“consist“of“p˜rologue,‘Ñepilogue“andŽ¡‘ÛÝqb•Go“dy‘ÿ*ª.‘qÇThe–UUfolloš¸ãwing“instructions“a˜re“in“the“p˜rologue:ŽŸª#‘ëhÏGEN_PUSHb;Ž¡‘ëhGEN_PUSHt;Ž¡‘ëhGEN_MOVt;Ž¡‘ëhGEN_MOVbs;Ž¡‘ëhGEN_SUBss(count);ŽŸˆ‘êÝqÐIt–JŒis“namely:‘lcÎPUSH‘J‰²[µS‘“T›cAC–·K“²]‘Ǹ ‘þUXŽŽŽ‘㎵B‘€qP˜Ð,‘L´ÎPUSH‘J‰²[µS‘“T˜AC“K“²]‘Ǹ ‘þUXŽŽŽ‘㎵T˜M–P˜H‘ÏþÐ,‘L´ÎMO®9V‘J‰µT˜M“P˜H‘—¸ ‘þUXŽŽŽ‘㎵T˜M“P˜Ð,‘L´ÎMO®9VŽ¡‘ÛÝqµS–“T›cAC‘·K‘~4¸ŽŽŽ‘ šª!‘ǵB‘€qP‘Ý Ðand‘y‘ÎSUB‘yYµS“T˜AC‘·K‘~4¸ ‘þUXŽŽŽ‘㎲(µS“T˜AC‘·K‘8w¸‘[µcount²)–y‘Ð(see“5.1).‘(†The“epilogue“of“the“p¸ãroGcedure“is“generated:ŽŽŽŒ‹9Ýì ÀÙ ýÚÇ‘ôž|Í5.6.‘ÇCOMPILED‘UUST–ÿ*ªA“TEMENT’Hk5²57ŽŽ ÐÙ¸ ýK7‘^sÏGEN_MOVsb;ޤ ‘^sGEN_POPt;Ž¡‘^sGEN_POPb;Ž¡‘^sGEN_RET;ŽŸ‘ž|ÐThese–ø}instructions“a¸ãre:‘¸ÎMO®9V›øSµS‘“T–cAC‘·K‘Ž ¸ ‘þUXŽŽŽ‘ ózµB‘€qP“Ð,‘!GÎPOP˜µT“M‘P“H‘§¸ ‘þUXŽŽŽ‘ óz²[µS‘“T“AC–·K“²]Ð,‘!GÎPOP˜µB‘€qP‘:“¸ ‘þUXŽŽŽ‘ óz²[µS‘“T‘cAC“K“²]Ž¡‘ôž|Ðand–UUÎRET“Ðreturn“to“the“caller“(i.e.‘qÇthe“instruction“ÎCALLÐ).Ž¡‘ž|The–UUpš¸ãroGcedure“call“is“also“compiled.‘qÇThe“reason“is“that“the“list“of“the“pa˜rameters“can“contain“exp˜ressions.ŽŽŽŒ‹:ìJ ÀÙ ýÚÇ‘ÛÝq²58’õüøÍCHAPTER–UU5.‘ÇINTERPRETER“OR¸ãGANIZA‘ÿ*ªTIONŽŽ ÐÙ¸ŽŒ‹;î± ÀÙ ýÚÇ ÐÙ¸ ý–“½‘ôž|ëWChapter‘Ç 6ŽŸ2\.‘ôž|ëUDi eren–ÿ8õt› T{lev“el˜of˜user˜in“terfaces˜to˜theŽŸ‘ôž|in‘ÿ8õterpreter‘ T{ëVClifŽŸ:\.‘ôž|ç6.1Ž‘„ßInŒÌtrinsic‘fffunctionsŽŸç‘ôž|ÐIntrinsic–2×functions“aš¸ãre“link˜ed“to“the“compiler.‘fHThe“user“should“upGdate“t˜w˜o“tables“and“write“an“intrinsic“function“in“Cޤ ‘ôž|o•¸ãr›è©F“ORTRAN‘èŽthen˜to˜link˜the˜object˜co•Gde˜of˜the˜compiler˜with˜the˜tables˜and˜with˜the˜co“de˜of˜the˜intrinsic˜function.Ž¡‘ôž|This›UUw•¸ãa“y˜is˜enriched˜the˜compiler˜with˜a˜new˜intrinsic˜function.‘qÇThe˜structures˜of˜the˜tables˜a“re˜as˜follo“ws:ŽŸÌæ¡¡‘ôž|Ï/*Ž¡‘ùÞy*‘?ýintrinsic.hŽ¡‘ùÞy*Ž¡‘ùÞy*–?ýList“of“intrinsic“functions.Ž¡‘ùÞy*/Ž¡¡‘ôž|#ifndef‘?ý_INTRINSIC_HŽ¡‘ôž|#define‘?ý_INTRINSIC_HŽ¡¡‘ôž|#include‘?ýŽ¡‘ôž|#include‘?ý"myintrinsic.c"Ž¡¡‘ôž|#ifdef‘?ýCONTROLŽ¡‘ôž|#include‘?ý"example/apl.c"Ž¡‘ôž|#endifŽ¡¡‘ôž|typedef–?ývoid“(*INTRINSIC_FUNCTION)“PROTO((char“**));Ž¡¡‘ôž|struct‘?ýINTRŽ¡‘ôž|{Ž¡‘ôž|char‘?ý*name;Ž¡‘ôž|INTRINSIC_FUNCTION‘?ýadr;Ž¡‘ôž|}‘?ýintr_name[]=Ž¡‘ôž|{{"cclose",‘?ý(INTRINSIC_FUNCTION)cclose},Ž¡‘#Þa{"cgetc",‘?ý(INTRINSIC_FUNCTION)cgetc},Ž¡‘ùÞy{"chclose",‘?ý(INTRINSIC_FUNCTION)chclose},Ž¡‘ùÞy{"chflush",‘?ý(INTRINSIC_FUNCTION)chflush},Ž¡‘ùÞy{"chopen",‘?ý(INTRINSIC_FUNCTION)chopen},Ž¡‘ùÞy{"chwrite",‘?ý(INTRINSIC_FUNCTION)chwrite},Ž¡‘#Þa{"copen",‘?ý(INTRINSIC_FUNCTION)copen},Ž¡‘#Þa{"cputc",‘?ý(INTRINSIC_FUNCTION)cputc},Ž¡‘#Þa{"exp",‘?ý(INTRINSIC_FUNCTION)exp_},Ž¡‘ùÞy{"fflush",‘?ý(INTRINSIC_FUNCTION)cfflush},ŽŽŸK’áw­²59ŽŽŒ‹<ï1 ÀÙ ýÚÇ‘ÛÝq²60‘.23ÍCHAPTER–UU6.‘ÇDIFFERENT“LEVEL“OF“USER“INTERF‘þãA¸ãCES“TO“THE“INTERPRETER“ÐCLIFŽŽ ÐÙ¸ ýK7‘ VÏ{"fprintf",‘?ý(INTRINSIC_FUNCTION)cfprintf},ޤ ‘ V{"fscanf",‘?ý(INTRINSIC_FUNCTION)cfscanf},Ž¡‘án{"printf",‘?ý(INTRINSIC_FUNCTION)cprintf},Ž¡‘ V{"scanf",‘?ý(INTRINSIC_FUNCTION)cscanf},Ž¡‘ V{"sin",‘?ý(INTRINSIC_FUNCTION)sin_}Ž¡‘ÛÝq#ifdef‘?ýCONTROLŽ¡‘án,Ž¡‘ V{"green_func",‘?ý(INTRINSIC_FUNCTION)green_func},Ž¡‘ V{"csigpause",‘?ý(INTRINSIC_FUNCTION)csigpause},Ž¡‘ V{"open_termo",‘?ý(INTRINSIC_FUNCTION)open_termo},Ž¡‘ V{"read_termo",‘?ý(INTRINSIC_FUNCTION)read_termo},Ž¡‘ V{"write_termo",‘?ý(INTRINSIC_FUNCTION)write_termo},Ž¡‘ V{"close_termo",‘?ý(INTRINSIC_FUNCTION)close_termo},Ž¡‘ V{"init_wait",‘?ý(INTRINSIC_FUNCTION)init_wait}Ž¡‘ÛÝq#endifŽ¡‘ÛÝq};Ž¡¡¡¡‘ÛÝq/*Ž¡‘án*–?ýNumber“of“intrinsic“functions.Ž¡‘án*/Ž¡‘ÛÝq#define–?ýSIZE_REM“sizeof(intr_name)/sizeof(intr_name[0])Ž¡¡¡¡‘ÛÝq/*Ž¡‘án*–?ýSize“of“an“array“of“intrinsic“functions.Ž¡‘án*/Ž¡‘ÛÝqvoid–?ý(*(f[SIZE_REM]))“PROTO((char“**));Ž¡¡©;¸‘êÝqÐThe–-unames“of“the“intrinsic“functions“aš¸ãre“sto˜red“in“hash“table“(mentioned“ea˜rlier).‘ú(The“compiler“kno˜ws“abGoutŽ¡‘ÛÝqthe–™ânames“of“the“intrinsic“function“from“its“initializing“paš¸ãrt.‘?nWhen“the“remote“k˜eyw˜o˜rd“is“pa˜rsed,‘«remote“functionsŽ¡‘ÛÝqaš¸ãre–K loaded“into“the“hash“table“of“remote“functions.‘T©Only“remote“functions“p˜reviously“decla˜red“a˜re“kno˜wn“to“theŽ¡‘ÛÝqenvironment.‘–˜If–¶ðthere“aš¸ãre“any“decla˜ration“after“remote“statement“the“names“a˜re“kno˜wn“but“have“no“co˜rrespGondingŽ¡‘ÛÝqcošGde.‘qÇThe–UUexample“of“the“remote“statement“usage“can“b˜e“found“in“the“`io.ci'.ŽŸ Nî‘êÝqThe›Jéb•Go“dy˜of˜remote˜function˜o•¸ãr˜decla“ration˜of˜the˜header˜resp•Gectively˜must˜b“e˜in˜the˜ le˜`myintrinsic.c'.‘ùContinuingŽ¡‘ÛÝqin–UUthe“abšGove“example“the“ le“`myintrinsic.c'“should“lo˜ok“lik¸ãe:ŽŸŠ¥‘ÛÝqÏdouble–?ýplus(double“*a,double“*b)Ž¡‘ÛÝq{Ž¡‘ÛÝqprintf("a=%g\n",*a);Ž¡‘ÛÝqprintf("b=%g\n",*b);Ž¡‘ÛÝqreturn(*a+*b);Ž¡‘ÛÝq}Ž¡¦¡¡‘ÛÝqdouble–?ýsin_(a)char“**a;{return(sin(*(double“*)“a[0]));}Ž¡¡¦‘êÝqÐF•¸ão“r–UUthe“pš¸ãropGer“function“of“the“compiler“user“should“k˜eep“the“follo˜wing“steps:ަ‘êÝr¸ŽŽŽ‘ôÝsÐUpGdate–`=the“va¸ãriable“intr‘™˜‰ffŽ‘™šname.‘’~The“ rst“ eld“is“a“name“of“the“intrinsic“function;‘e±the“second“ eld“is“the“nameŽ¡‘ôÝsof–UUthe“user“supplied“function.ŽŽŽŒ‹=õv ÀÙ ýÚÇ‘ôž|Í6.2.‘ÇMAIN–UUAREAS“OF“ALLOCA›ÿ*ªTED“MEMOR˜Y’ùòH²61ŽŽ ÐÙ¸ ýK7‘ž}¸ŽŽŽ‘ ž~ÐW¸ãrite–UUthe“coGde“of“a“new“intrinsic“function“in“the“ le“`myintrinsic.c'.ŽŸõÌ‘ž}¸ŽŽŽ‘ ž~ÐCompile–UUremote“call“subsystem.‘qÇLink“new“version“of“the“compiler.ŽŸ!‰¯‘ôž|ç6.2Ž‘„ßMain–ffareas“of“allos3cated“memoryŽŸ8ä‘ôž|ÐThe–‡jalloGcated“memoš¸ãry“of“the“interp˜reter“is“split“to“t˜w˜o“pa˜rts.‘The“ rst“pa˜rt“is“static.‘The“user“can“not“change“theޤ ‘ôž|size–UUof“these“memoš¸ãry“a˜reas“at“run-time,“only“b˜y“recompiling“the“interp˜reter.‘qÇThe“size“is“as“follo˜ws:Ž©怡¡‘ôž|Ï#define–?ýPAGE‘)ÿè512‘$¿ë/*“Size“of“a“page.“*/Ž¡‘ôž|#define–?ýSIZE_HAS‘¿÷1999‘$¿ë/*“Size“of“hash“table.“*/Ž¡‘ôž|#define–?ýSIZE_HAS_LOC“401‘î/*“Size“of“hash“table“for“locals.“*/Ž¡‘ôž|#define–?ýSIZE_HAS_GOTO“257‘?ñ/*“Size“of“hash“table“for“gotoŽ¡‘ùÞylabels.‘?ý*/Ž¡‘ôž|#define–?ýMAX_IDENT‘ÿô1999‘?ñ/*“Max“number“of“variables“*/Ž¡‘ôž|#define–?ýMAX_IDENT_LOC‘ ú401‘ÿô/*“Max“number“of“local“variables.“*/Ž¡‘ôž|#define–?ýSIZE_ADR_STACK“256‘ÿô/*“Size“of“address“stack“(obsolete).“*/Ž¡‘ôž|#define–?ýSIZE_STRUCT_FIX“256‘¿÷/*“Size“of“the“stack“of“fixative“structures.“*/Ž¡‘ôž|#define–?ýSIZE_REMOTE“1999‘î/*“Size“of“hash“table“for“remote“functionŽ¡‘ùÞynames.‘?ý*/Ž¡¡¦‘ž|ÐMacros‘ÑuÎSIZE‘°¡‰ffs4Ž–#ÕHAS,›ŠySIZE‘°¡‰ffs4Ž“HAS‘°¡‰ffs4Ž“LOC,˜SIZE‘°¡‰ffs4Ž“HAS‘°¡‰ffs4Ž“GOTO,˜MAX‘°¡‰ffs4Ž“IDENT,˜MAX‘°¡‰ffs4Ž“IDENT‘°¡‰ffs4Ž“LOC,Ž¡‘ôž|SIZE‘°¡‰ffs4Ž‘#ÕREMOTE‘Ü…Ða•¸ãre›ܨp“rimes˜acco“rding˜to˜[18Ž‘ ].‘¿If˜y“ou˜w“ant˜to˜change˜these˜macros˜y“ou˜should˜change˜them˜toŽ¡‘ôž|pš¸ãrimes–UUagain“fo˜r“bšGetter“p˜erfo¸ãrmance“of“hash“functions.Ž¡‘ž|The–UUsecond“pa¸ãrt“isަ¡¡‘ôž|Ï#define–?ýSIZE_SPACE‘ ú210‘$¿ë/*“Memory“size“in“pages.“*/Ž¡‘ôž|#define–?ýSIZE_ARIT_STACK“7‘?ñ/*“Size“of“the“arithmetical“stack“in“pages.“*/Ž¡‘ôž|#define–?ýSIZE_TMP_STACK“52‘?ñ/*“Size“of“stack“of“temporaries“in“pages.“*/Ž¡¡¦‘ž|ÐEach–0£size“is“spšGeci ed“b¸ãy“numb˜er“of“pages“(P‘ÿ*ªAš¸ãGE‘0š512“B).“The“user“can“change“these“sizes.‘eŒThe“easiest“w˜a˜y“is“toŽ¡‘ôž|run–UUthe“interpš¸ãreter“with“the“pa˜rameter“/b•Gc=µ<Ðnumb“erµ>Ð.‘qÇE.g.ަ‘ôž|Ïclif‘?ý/bc=5ަ‘ž|ÐStaš¸ãrting–šTthe“interp˜reter“with“a˜rgument“5“caused“that“the“size“of“the“memo˜ry‘ÿ*ª,‘«“size“of“the“a˜rithmetical“stack“andŽ¡‘ôž|size–O¨of“the“tempGo•¸ãra“ry–O¨stack“aš¸ãre“lo˜w˜ered“to“half“compa˜red“to“the“default“set“(default“is“constant“equal“10).‘oãThe“userŽ¡‘ôž|can–UUextend“the“size“of“the“three“memoš¸ãry“pa˜rts“if“the“interp˜reter“is“ran“with“the“a˜rgument“greater“than“10.ŽŸ!‰¯‘ôž|ç6.3Ž‘„ßHash–fftables“and“hash“functionŽŸ8ä‘ôž|ÐThe–Nmost“impšGo¸ãrtant“is“that“the“size“of“the“hash“table“must“b˜e“a“p•¸ãrime.‘[pW“e–Nchose“the“pš¸ãrimes“1999“fo˜r“the“size“of“theŽ¡‘ôž|global–UUhash“table“and“401“fo¸ãr“the“size“of“the“loGcal“hash“table.Ž¡‘ž|Wš¸ãe–UUchose“the“follo˜wing“hash“function:ަ¡¡‘ôž|Ï/*Ž¡‘ùÞy*–?ýHash“function.Ž¡‘ùÞy*/Ž¡‘ôž|static–?ýunsigned“intŽŽŽŒ‹>ÿ$ ÀÙ ýÚÇ‘ÛÝq²62‘.23ÍCHAPTER–UU6.‘ÇDIFFERENT“LEVEL“OF“USER“INTERF‘þãA¸ãCES“TO“THE“INTERPRETER“ÐCLIFŽŽ ÐÙ¸ ýK7‘ÛÝqÏhash_code–?ý(s,“size)ޤ ‘æ]kchar‘9¿ß*s;Ž¡‘æ]kunsigned–?ýint“size;Ž¡‘ÛÝq{Ž¡‘æ]kint‘D?Ùc–?ý=“0;Ž¡¡‘æ]kwhile‘?ý(*s)Ž¡‘ðÝe{Ž¡‘û]_c–?ý=“c“<<“1“^“(*s);Ž¡‘û]_s++;Ž¡‘ðÝe}Ž¡‘æ]kif–?ý(0“>“c)Ž¡‘ðÝec–?ý=“(-c);Ž¡‘æ]kreturn–?ý(c“%“size);Ž¡‘ÛÝq}Ž¡¡Ÿ‘êÝqÐThe–Uàcoš¸ãre“of“the“hash“function“is“one“bit“shifting“and“then“the“result“is“X˜OR-ed“with“the“ASCIGI‘Užvalue“of“theŽ¡‘ÛÝqcha•¸ãracter.‘ ¸The›áûp“roblems˜ma“y˜a“rise˜when˜the˜va“riable's˜identi er˜is˜longer˜than˜the˜size˜of˜the˜integer˜on˜theŽ¡‘ÛÝqcomputer.ŽŸ!Ž8‘ÛÝqç6.4Ž‘ÃÔAdding–ffnew“data“tŒÌyps3eŽŸ8ä‘ÛÝqÐThe–UUuser“has“to“follo¸ãw“these“steps:Ž¡¤‘êÝr¸ŽŽŽ‘ôÝsÐUpšGdate–UUthe“ le“`cast.h'“with“cast“op˜eratoš¸ãrs“fo˜r“the“new“data“t˜ypGe.Ž¡‘êÝr¸ŽŽŽ‘ôÝsÐUpšGdate–„¡the“ le“`geninstr.h'“with“app•¸ãrop“riate–„¡instructions“fo¸ãr“the“virtual“machine.‘ÿªUser“can“b˜e“inspired“b¸ãyŽ© ‘ôÝsp•¸ãrevious‘UUt“ypGes.Ž¡‘êÝr¸ŽŽŽ‘ôÝsÐUpšGdate–UUthe“ le“`t¸ãyp˜e.h'.‘qÇT‘ÿ*ªo“de ne“the“constant“of“new“data“t¸ãyp˜e.Ž¡‘êÝr¸ŽŽŽ‘ôÝsÐEnrich–UUthe“ le“`instr.h'“with“a“new“structure“foš¸ãr“a“new“instruction“of“the“virtual“p˜roGcesso˜r“if“it“is“needed.Ž¡‘êÝr¸ŽŽŽ‘ôÝsÐUpšGdate–UUthe“scanner“in“ le“`ls.l'“with“the“pattern“matching“of“the“new“data“t¸ãyp˜e“constant.Ž¡‘êÝr¸ŽŽŽ‘ôÝsÐEnrich–UUthe“list“in“ le“`k•¸ãeyw“o“rd.gpGerf‘±Ç'–UUwith“needed“tok¸ãens“name.Ž¡‘êÝr¸ŽŽŽ‘ôÝsÐUpšGdate–óƒthe“gramma¸ãr“of“the“language“in“ le“`ys.y'.‘Q,An“user“should“b˜e“seaš¸ãrching“fo˜r“p˜reviously“de ned“data“t˜ypGeަ‘ôÝs(i.e.›i£INT)‘<ãand–<éhe/she“has“to“tak¸ãe“inspiration“from“the“surrounding“structures.˜Namely“the“follo¸ãwing“functionsަ‘ôÝsshould–UUbGe“rea¸ãrranged:ަ¡uÎ{ŽŽŽ‘ ÝsÐThe–3•function“`exe'“(`virtual‘™˜‰ffŽ‘™šmachine.c').‘f‡Instructions“of“the“virtual“machine“a¸ãre“executed“in“the“function.ޤuÎ{ŽŽŽ‘ ÝsÐThe–UUfunction“`init'“(`comp‘™˜‰ffŽ‘™šmaint.c').‘qÇUpGdate“the“a•¸ãrra“y›UU`p“ri'˜with˜the˜new˜data˜t“ypGe.Ž¡uÎ{ŽŽŽ‘ ÝsÐThe–UUfunction“`implicit‘™˜‰ffŽ–™šcast'‘ªª(comp‘™˜‰ffŽ“maint.c)–UUcontents“all“pGossible“options“of“implicit“cast“instructions.Ž¡uÎ{ŽŽŽ‘ ÝsÐThe–UUfunction“`l‘™˜‰ffŽ–™švalue‘™˜‰ffŽ“cast'‘ªª(comp‘™˜‰ffŽ“maint.c)–UUis“casting“to“the“µ<Ž‘ sÐl‘™˜‰ffŽ‘™švalue“µ>ŽŽŽŽŒ‹? I ÀÙ ýÚÇ ÐÙ¸ ý–;}‘ôž|ëWChapter‘Ç 7ŽŸ2î‘ôž|ëUIn‘ÿ8õterrupt‘ T{servicesŽŸ5Ze‘ôž|ÐAs–*Bit“wš¸ãas“mentioned“ea˜rlier“t˜w˜o“t˜ypGes“of“interrupts“a˜re“implemented“synchronous“and“asynchronous“(see“1).‘clEach“ofޤ ‘ôž|them–Š…call“a“spGeci c“service“function.›WThe“interp¸ãreter“is“interrupted“only“if“the“virtual“machine“is“running.˜InterruptŽ¡‘ôž|handling–Û®functions“aš¸ãre“system“depGendent.‘ÒTherefo˜re“these“functions“should“bšGe“sp˜eci c“foš¸ãr“each“platfo˜rm.‘ÒCurrentŽ¡‘ôž|pGo•¸ãrts›ªîa“re˜on˜CD‘ªØ4680˜( le˜`inter‘™˜‰ffŽ–™šhandl‘™˜‰ffŽ“svr3.c'),‘ÀUDEC‘ªØ5000/240˜( le˜`inter‘™˜‰ffŽ“handl‘™˜‰ffŽ“bsd.c').‘r“There˜is˜a˜pGo•¸ãrt˜fo“r˜LinuxŽ¡‘ôž|(using–BSD-likš¸ãe“signals),‘USVR4“pGo˜rt“( le“`inter‘™˜‰ffŽ–™šhandl‘™˜‰ffŽ“svr4.c')–and“generic“POSIX‘pGo˜rt“( le“`inter‘™˜‰ffŽ–™šhandl‘™˜‰ffŽ“pGosix.c')[16Ž‘ ].Ž¡‘ôž|The–)Ücon guration“of“ours“CD‘)¦4680“is“rather“confusing,‘^þthat“is“why“wš¸ãe“need“spGeci c“interrupt“handler“fo˜r“it.‘ï]T‘ÿ*ªoŽ¡‘ôž|further––Scomplicate“things,‘¦’the“new“terminal“setting“is“added“to“these“ les“as“wš¸ãell.‘4ÀBecause“each“platfo˜rm“to“whichŽ¡‘ôž|w•¸ãe›éDpGo“rted˜Clif˜has˜a˜spGeci c˜terminal˜handling,‘@this˜pa“rt˜is˜spGecially˜designed˜fo“r˜them˜as˜w“ell.‘-•Most˜of˜currentlyŽ¡‘ôž|pGo•¸ãrted›UUplatfo“rms˜can˜use˜the˜generic˜POSIX˜implementation˜as˜w“ell.‘qÇHo“w“ever,˜it˜a“rises˜t“w“o˜p“roblems:Ž© Ê‘ž}¸ŽŽŽ‘ ž~ÐF•¸ão“r–®the“ le“`inter‘™˜‰ffŽ–™šhandl‘™˜‰ffŽ“svr3.c',›¯Äit–®cannot“bGe“compiled“afterw•¸ãa“rds,˜bGecause–®it“kno¸ãws“the“functions“but“only“inŽ¡‘ ž~SVR4–ÐémoGde“and“the“default“is“SVR3“(CD4680).‘ä‚If“wš¸ãe“switch“to“the“default“SVR4“some“other“functions“a˜reŽ¡‘ ž~not‘UUkno¸ãwn.ŽŸ¸‘ž}¸ŽŽŽ‘ ž~ÐSome–œwof“platfoš¸ãrms“need“to“push“newline“into“the“input“stream“and“some“do“not.‘G.W˜e“use“interrupt“(DC4)“toŽ¡‘ ž~bš¸ãreak–¹the“run“of“the“virtual“machine“as“w˜ell“as“to“resume“the“run“if“it“is“p˜ressed“again.‘^“After“p˜ressing“DC‘«4“fo˜rŽ¡‘ ž~the–UUsecond“time,“the“resume“statement“is“internally“generated.ŽŸÜ‘ ž~In–™Minterrupt“handler,›¾èon“some“platfo¸ãrms,˜there“must“not“bGe“a“newline“chaš¸ãracter“(o˜r“is“generated“automatically“b˜yŽ¡‘ ž~the–KŒterminal“line“discipline),›Mon“others,˜it“must“bGe“pushed“b¸ãy“interrupt“handler“function.‘n„See“sections“7.1,“7.2.ަ‘ž|Generally‘ÿ*ª,‘ã{user–Ç maš¸ãy“use“`inter‘™˜‰ffŽ–™šhandl‘™˜‰ffŽ“pGosix.c'–Ç whenever“app˜rop˜riate.‘ÆðIf“the“interrupt“doGes“not“function,‘ã{the“userŽ¡‘ôž|should–UUconsider“to“add“the“folloš¸ãwing“line“to“the“interrupt‘™˜‰ffŽ‘™šservice“just“after“assignment“to“handler“va˜riableޤ§‘jÏioctl–?ý(handle_fd,“TIOCSTI,“"\n");ŽŸ¸‘ž|ÐThe–UUfollo¸ãwing“function“registers“interrupt“handler:Ž¡¤ ¡‘ôž|Ï#include‘?ýŽ¡‘ôž|#include‘?ýŽ¡‘ôž|#include‘?ýŽ¡‘ôž|#include‘?ýŽ¡¡‘ôž|#define–?ýOFF(x,“y)“(x)“&“(~(y))Ž¡‘ôž|#define–?ýON(x,“y)“(x)“|“(y)Ž¡‘ôž|#define–?ýSPACE“0x20Ž¡‘ôž|#define–?ýNL“'\n'Ž¡¡‘ôž|int–?ýhandler“=“0;Ž¡‘ôž|int‘?ýhandle_fd;Ž¡‘ôž|struct–?ýtermio“term,term_initial;Ž¡¡‘ôž|RETSIGTYPE–?ý(*interrupt_handler)“(void);Ž¡‘ôž|RETSIGTYPE–?ýinterrupt_service“PROTO((void));ŽŽŸK’áw­²63ŽŽŒ‹@( ÀÙ ýÚÇ‘ÛÝq²64’"¤ÍCHAPTER–UU7.‘ÇINTERR¸ãUPT“SER‘þãVICESŽŽ ÐÙ¸ ýK7‘ÛÝqÏvoid–?ýinterrupt_register“PROTO((void));ޤ ‘ÛÝqvoid–?ýterm_restore“PROTO((void));Ž¡¡‘ÛÝqRETSIGTYPE–?ýfatal_handler“PROTO((void));Ž¡‘ÛÝqvoid–?ýfatal_handler_register“PROTO((void));Ž¡‘ÛÝqextern–?ýjmp_buf“jmpbuf;Ž¡‘ÛÝqextern–?ýint“error_count;Ž¡¡‘ÛÝq/*Ž¡‘án*–?ýRegisters“interrupt“handler.Ž¡‘án*/Ž¡‘ÛÝqvoidŽ¡‘ÛÝqinterrupt_register‘?ý()Ž¡‘ÛÝq{Ž¡‘æ]kinterrupt_handler–?ý=“interrupt_service;Ž¡‘æ]khandle_fd–?ý=“fileno“(stdin);Ž¡‘æ]kioctl–?ý(handle_fd,“TCGETA,“&term);Ž¡‘æ]kterm_initial–?ý=“term;Ž¡‘æ]kterm.c_cc[0]–?ý=“0x14;“/*“DC4“*/Ž¡‘æ]kterm.c_cc[5]–?ý=“0x12;“/*“DC2“*/Ž¡‘æ]kterm.c_lflag–?ý=“OFF(term.c_lflag,“LNEW_CTLECH);“/*“dalsi“flag“ktory“ma“pre“nas“vyznam“je“:“term.c_lflag=ON(term.c_lflag,NOFLSH);*/Ž¡‘æ]kioctl–?ý(handle_fd,“TCSETA,“&term);Ž¡‘æ]ksigset–?ý(SIGINT,“interrupt_handler);Ž¡‘ÛÝq}Ž¡¡©Ç‘êÝqÐon–N}the“CD‘N{4680.›oVia“ioGctl“system“call“is“reset“interrupt“signal“to“DC4.˜Via“sigset“system“call“is“set“the“interruptŽ¡‘ÛÝqhandler.‘qÇOn–UUthe“DEC“5000/240“loGoks“the“function“as“follo¸ãws:ŽŸB9¡¡‘ÛÝqÏ/*Ž¡‘án*–?ýRegisters“interrupt“handler.Ž¡‘án*/Ž¡‘ÛÝqvoidŽ¡‘ÛÝqinterrupt_register‘?ý()Ž¡‘ÛÝq{Ž¡‘æ]kinterrupt_handler–?ý=“interrupt_service;Ž¡‘æ]khandle_fd–?ý=“fileno“(stdin);Ž¡‘æ]kioctl–?ý(handle_fd,“TCGETA,“&term);Ž¡‘æ]kterm_initial–?ý=“term;Ž¡‘æ]kterm.c_cc[0]–?ý=“0x14;“/*“DC4“*/Ž¡‘æ]kterm.c_cc[5]–?ý=“0x12;“/*“DC2“*/Ž¡‘æ]kioctl–?ý(handle_fd,“TCSETA,“&term);Ž¡‘æ]kvec.sv_handler–?ý=“interrupt_handler;Ž¡‘æ]ksigvec–?ý(SIGINT,“&vec,“&ovec);Ž¡‘ÛÝq}Ž¡¡¦‘êÝqÐThe–UUinterrupt“handler“is“set“here“through“the“system“call“sigvec.ŽŸ @r‘êÝqWhen–UUthe“interp¸ãreter“session“terminates,“the“terminal“is“reset“to“the“initial“values:ŽŸB9¡¡‘ÛÝqÏ/*Ž¡‘án*–?ýRestores“setting“of“the“terminal“at“the“termination“of“Clif“session.Ž¡‘án*/ŽŽŽŒ‹A"d ÀÙ ýÚÇ‘ôž|Í7.1.‘ÇSYNCHR•¸ãONOUS›UUINTERR“UPT˜SER‘þãVICE˜FUNCTION’Ê+)²65ŽŽ ÐÙ¸ ýK7‘ôž|Ïvoidޤ ‘ôž|term_restore‘?ý()Ž¡‘ôž|{Ž¡‘ÿvioctl–?ý(handle_fd,“TCSETA,“&term_initial);Ž¡‘ôž|}Ž¡¡Ÿ+:L‘ôž|ç7.1Ž‘„ßSync•ŒÌhronous›ffin“terrupt˜service˜functionŽŸ“î‘ôž|ÐThe–UUfunction“is“as“follo¸ãws:Ž©áó¡¡‘ôž|Ï/*Ž¡‘ùÞy*–?ýSynchronous“interrupt“service.Ž¡‘ùÞy*/Ž¡‘ôž|voidŽ¡‘ôž|interrupt_service_sync‘?ý()Ž¡‘ôž|{Ž¡‘ÿvhandler–?ý=“1;Ž¡‘ôž|}Ž¡¡Ÿ)‘ž|ÐThe–#½virtual“machine“instruction“ÎINTER‘#°Ðis“calling“the“function“interrupt‘™˜‰ffŽ–™šservice‘™˜‰ffŽ“sync–#½in“which“the“handler“is“setŽ¡‘ôž|to– À1.‘•Befoš¸ãre“the“next“instruction“is“executed,‘9[the“handler“is“check˜ed.‘•If“it“is“set“the“virtual“machine“switches“itsŽ¡‘ôž|context.‘qÇThe–UUcontext“of“the“virtual“machine“is“stoš¸ãred“in“the“follo˜wing“structure:ަ¡¡‘ôž|Ïstruct‘?ýCONTEXTŽ¡‘ôž|{Ž¡‘ÿvchar‘?ý*bp;Ž¡‘ÿvchar‘?ý*frame;Ž¡‘ÿvchar‘?ý*kodp;Ž¡‘ÿvchar‘?ý*kodp1;Ž¡‘ÿvchar‘?ý*kodp2;Ž¡‘ÿvchar‘?ý*kodp3;Ž¡‘ÿvchar‘?ý*kodp4;Ž¡‘ÿvchar‘?ý*pc;Ž¡‘ÿvchar‘?ý*stack;Ž¡‘ÿvchar‘?ý*tmp;Ž¡‘ÿvchar‘?ý*tmph;Ž¡‘ôž|#ifdef‘?ýFLEX_SCANNERŽ¡‘ÿvvoid‘?ý*state;Ž¡‘ôž|#elseŽ¡‘ÿvint–?ý(*input)“PROTO((void));Ž¡‘ôž|#endifŽ¡‘ÿvstruct–?ýCONTEXT“*previous;Ž¡‘ôž|};Ž¡¡Ÿ)‘ž|ÐThere–UUa¸ãre“no“restriction“on“the“use“of“the“statements.‘qÇThe“statement“resume“resumes“after“an“interrupt.ŽŽŽŒ‹B*  ÀÙ ýÚÇ‘ÛÝq²66’"¤ÍCHAPTER–UU7.‘ÇINTERR¸ãUPT“SER‘þãVICESŽŽ ÐÙ¸ ýK7‘ÛÝqç7.2Ž‘ÃÔAsync•ŒÌhronous›ffin“terrupt˜service˜functionŽŸ»y‘ÛÝqÐNot–i%only“synchronous“interrupt“is“pš¸ãrovided“b˜y“the“interp˜reter,‘®but“also“asynchronous“interrupt.‘­8Only“the“virtualޤ ‘ÛÝqmachine–Ђcan“bGe“interrupted.‘ãMThe“user“interrupts“the“virtual“machine“bš¸ãy“p˜ressing“the“DC4“k˜ey‘ÿ*ª.‘ãMAs“it“is“mentionedŽ¡‘ÛÝqabGove–øathere“aš¸ãre“no“restrictions“on“the“use“of“the“statements.‘RËThe“user“can“interrupt“mo˜re“than“once.‘RËThe“interp˜reterŽ¡‘ÛÝqinterrupt–£¬level“can“rise.‘\ÌT‘ÿ*ªo“return“to“resume“initially“interrupted“p¸ãrogram,‘·Athe“user“should“spšGecify“equal“numb˜er“ofŽ¡‘ÛÝqthe–UUresume“statements“to“the“interrupts.‘qÇIf“the“interrupt“level“is“again“zero“initially“interrupted“p¸ãrogram“continues.ŽŸ E"‘êÝqThe–«gcontext“of“the“virtual“machine“is“stoš¸ãred“in“the“same“structure“as“fo˜r“the“synchronous“interrupt.‘süThe“asyn-Ž¡‘ÛÝqchronous–UUinterrupt“service“function“is“the“follo¸ãwing:Ž©Y©¡¡‘ÛÝqÏ/*Ž¡‘án*–?ýAsynchronous“interrupt“handler.Ž¡‘án*/Ž¡‘ÛÝqvoidŽ¡‘ÛÝqinterrupt_service‘?ý()Ž¡‘ÛÝq{Ž¡‘ÛÝq#ifdef‘?ýDEBUG_INTERŽ¡‘æ]kprintfx‘?ý("interrupt\n");Ž¡‘ÛÝq#endifŽ¡‘æ]kif–?ý((clif_interrupt_level“>“0)“||“(!virtual_machine_suspended))Ž¡¡‘ÛÝq/*Ž¡‘án*–?ýTest“of“the“virtual“machine“running“and“the“level“of“interrupt.Ž¡‘án*–?ýInterrupt“is“only“accepted“if“the“virtual“machine“is“running.Ž¡‘án*/Ž¡¡‘ðÝe{Ž¡‘ÛÝq#ifdef‘?ýDEBUG_INTERŽ¡‘û]_printfx–?ý("virtual“machine“is“running,“interrupt“accepted\n");Ž¡‘ÛÝq#endifŽ¡‘û]_handler–?ý=“1;Ž¡‘ðÝe}Ž¡‘æ]kreturn;Ž¡‘ÛÝq}Ž¡¡Ÿ‡‘êÝqÐThe–UUfunction“is“valid“foš¸ãr“CDC.“The“asynchronous“interrupt“service“function“fo˜r“DEC“is“as“follo˜ws:ަ¡¡‘ÛÝqÏ/*Ž¡‘án*–?ýAsynchronous“interrupt“service.Ž¡‘án*/Ž¡‘ÛÝqRETSIGTYPEŽ¡‘ÛÝqinterrupt_service‘?ý()Ž¡‘ÛÝq{Ž¡‘ÛÝq#ifdef‘?ýDEBUG_INTERŽ¡‘æ]kprintfx‘?ý("interrupt\n");Ž¡‘ÛÝq#endifŽ¡‘æ]kif–?ý((clif_interrupt_level“>“0)“||“(!virtual_machine_suspended))Ž¡¡‘ÛÝq/*Ž¡‘án*–?ýTest“of“the“virtual“machine“running“and“the“level“of“interrupt.Ž¡‘án*–?ýAn“interrupt“is“only“accepted“if“the“virtual“machine“is“running.Ž¡‘án*/Ž¡ŽŽŒ‹C/Å ÀÙ ýÚÇ‘ôž|Í7.3.‘ÇINTERPRETER–UUINPUT“FUNCTIONS’Ç¢²67ŽŽ ÐÙ¸ ýK7‘ žpÏ{ޤ ‘ôž|#ifdef‘?ýDEBUG_INTERŽ¡‘jprintfx–?ý("virtual“machine“is“running,“interrupt“accepted\n");Ž¡‘ôž|#endifŽ¡‘jhandler–?ý=“1;Ž¡‘ôž|#ifdef‘?ýHAVE_TIOCSTIŽ¡‘jioctl–?ý(handle_fd,“TIOCSTI,“"\n");Ž¡‘ôž|#endifŽ¡‘ žp}Ž¡‘ÿvreturn;Ž¡‘ôž|}Ž¡Ÿ'±‘ž|ÐSwitching–ºHof“the“virtual“machine“to“a“new“context“is“connected“with“switching“of“the“interp¸ãreter“input.‘>The“di er-Ž¡‘ôž|ent–ÐÚfunction“foš¸ãr“each“platfo˜rm“exists“bGecause“of“features“of“the“stream“on“those“platfo˜rms.‘EžThe“CDC‘йstream“contentsŽ¡‘ôž|interrupt–³­chaš¸ãracter“as“w˜ell“as“newline“cha˜racter.‘ŒÐThe“DEC‘³•stream“only“contents“interrupt“cha˜racter.‘ŒÐTherefo˜re“w˜eŽ¡‘ôž|must–UUput“into“the“DEC“stream“any“chaš¸ãracter“bGefo˜re“the“interp˜reter“input“is“switched.ŽŸ I쑞|The–,yinterpš¸ãreter“input“is“switched“to“the“standa˜rd“input.‘÷2Returning“from“the“interrupt“the“interp˜reter“input“isŽ¡‘ôž|switched–UUto“the“initially“set“input.ŽŸ# °‘ôž|ç7.3Ž‘„ßInŒÌterpreter–ffinput“functionsŽŸÄ…‘ôž|ÐThere–åAaš¸ãre“three“interp˜reter“input“functions.‘LkThe“ rst“function“is“initialized“at“the“bGeginning“of“the“interp˜reter“session.Ž¡‘ôž|DepšGending–‰;on“the“numb˜er“of“paš¸ãrameters“of“the“run-string“the“interp˜reter“input“is“either“in“run-string“spGeci ed“p˜rogramŽ¡‘ôž|oš¸ãr–ìéthe“standa˜rd“input“(function“used“in“this“case“is“input‘™˜‰ffŽ‘™šk˜omp).‘NùWhen“the“virtual“machine“p˜roGcess“the“instruction“ofŽ¡‘ôž|synchronous–Â@interrupt“oš¸ãr“if“the“asynchronous“interrupt“happGened“the“input“is“switched“to“the“standa˜rd“input“(functionŽ¡‘ôž|input‘™˜‰ffŽ‘™šstd).‘0}If–‘uthe“virtual“machine“is“interrupted“b¸ãy“the“user“the“input“is“switched“to“the“input“from“the“bu er“(functionŽ¡‘ôž|input‘™˜‰ffŽ‘™šbuf).›߇The–yêinput“from“the“bu er“is“the“same“as“it“is“b¸ãy“synchronous“interrupt.˜After“p¸ãroGcessing“it“the“input“isŽ¡‘ôž|switched–UUto“the“standaš¸ãrd“input.‘qÇThe“mentioned“input“functions“follo˜w:ŽŸq¡¡‘ôž|Ï/*Ž¡‘ùÞy*‘?ýinput.cŽ¡‘ùÞy*Ž¡‘ùÞy*–?ýInitialization“of“the“main“compilerŽ¡‘ùÞy*–?ýand“redefinition“of“its“input“functions.Ž¡‘ùÞy*–?ýDifferent“input“function“are“used“duringŽ¡‘ùÞy*–?ýsynchronous“and“asynchronous“interruptŽ¡‘ùÞy*‘?ýhandling.Ž¡‘ùÞy*/Ž¡¡‘ôž|#include‘?ýŽ¡‘ôž|#include‘?ýŽ¡‘ôž|#include‘?ý"global.h"Ž¡‘ôž|#include‘?ý"lex_t.h"Ž¡‘ôž|#include‘?ý"input.h"Ž¡¡‘ôž|extern–?ýFILEATTR“pf,“spf[];Ž¡‘ôž|#ifndef‘?ýFLEX_SCANNERŽ¡‘ôž|extern–?ýint“yylineno;Ž¡‘ôž|extern–?ýint“yytchar;Ž¡‘ôž|extern–?ýchar“*yysptr,“yysbuf[];Ž¡¡‘ôž|extern–?ýint“getcx“PROTO((FILE“*));Ž¡‘ôž|static–?ýint“buf_pointer“=“0;Ž¡‘ôž|#elseŽ¡‘ôž|extern–?ýFILE“*yyin;ŽŽŽŒ‹D8ˆ ÀÙ ýÚÇ‘ÛÝq²68’"¤ÍCHAPTER–UU7.‘ÇINTERR¸ãUPT“SER‘þãVICESŽŽ ÐÙ¸ ýK7‘ÛÝqÏ#endifޤ ¡‘ÛÝq#define–?ýU(x)“xŽ¡¡‘ÛÝqint–?ý(*input)“PROTO((void));Ž¡¡‘ÛÝqchar–?ýstring_resume[]="resume;";“/*“Buffer“for“input“by“returnŽ¡‘án*–?ýfrom“asynchronous“interrupt.Ž¡‘án*/Ž¡‘ÛÝqextern–?ýint“no_compile_only;“/*“Flag“in“the“case“of“errors“or“*/Ž¡‘ÛÝq/*–?ýcompile“only.“*/Ž¡‘ÛÝqextern–?ýint“handle_main;“/*“If“set,“compiler“like“behavior.“*/Ž¡‘ÛÝqextern–?ýint“source_line_number;Ž¡‘ÛÝq/*–?ýSource“line“number.“Detecting“if“*/Ž¡‘ÛÝq/*–?ýthe“current“line“was“already“*/Ž¡‘ÛÝq/*–?ýprinted.“Using“in“error“messages.“*/Ž¡‘ÛÝqextern–?ývoid“exit_file_scope“PROTO((void));Ž¡¡‘ÛÝq#ifndef‘?ýFLEX_SCANNERŽ¡‘ÛÝq/*Ž¡‘án*–?ýRedefinition“of“the“input“for“the“main“compiler.Ž¡‘án*/Ž¡‘ÛÝqintŽ¡‘ÛÝqinput_komp‘?ý()Ž¡‘ÛÝq{Ž¡‘ÛÝq#ifdef‘?ýDEBUG_INTERŽ¡‘æ]kprintfx("in–?ýfront“of“getc“in“input\n");Ž¡‘ÛÝq#endifŽ¡‘æ]kyytchar=yysptr>yysbuf?U(*--yysptr):getcx(pf.fp);Ž¡‘ÛÝq#ifdef‘?ýDEBUG_INTERŽ¡‘æ]kprintfx("behind–?ýof“getc“in“input,“read“character“%c“-“%x\n",Ž¡‘æ]kyytchar,‘?ýyytchar);Ž¡‘ÛÝq#endifŽ¡‘æ]kif(yytchar–?ý==“'\n')“/*“LF“*/Ž¡‘ðÝe{Ž¡‘û]_yylineno++;Ž¡‘û]_spf[s].line_counter++;Ž¡‘û]_char_counter–?ý=“0;Ž¡‘û]_line_buf[0]–?ý=“0;Ž¡‘ðÝe}Ž¡‘æ]kif(yytchar–?ý==“EOF)“/*“Is“current“char“EOF?“*/Ž¡‘ðÝe{Ž¡‘û]_if–?ý(s“>“0)Ž¡‘ÛÝq{Ž¡‘æ]kspf[s].line_counter–?ý=“1;“/*“Counting“lines“from“beginning.“*/Ž¡‘æ]ksource_line_number–?ý=“0;“/*“Resetting“line“number“in“the“*/Ž¡‘æ]k/*–?ýpresence“of“errors.“*/Ž¡‘æ]kfclose‘?ý(spf[s].fp);Ž¡‘æ]kexit_file_scope‘?ý();Ž¡‘æ]ks–?ý=“s“-“1;Ž¡‘æ]kif–?ý(!“s“&&“!“no_compile_only)Ž¡‘ðÝereturn‘?ý0;Ž¡¡‘æ]k/*–?ýIf“we“want“compiler-like“behavior,“don't“switch“toŽ¡‘öbstdin.‘?ý*/Ž¡‘æ]kif–?ý(!“s“&&“handle_main)Ž¡‘ðÝereturn‘?ý0;Ž¡ŽŽŒ‹EC ÀÙ ýÚÇ‘ôž|Í7.3.‘ÇINTERPRETER–UUINPUT“FUNCTIONS’Ç¢²69ŽŽ ÐÙ¸ ýK7‘ÿvÏpf–?ý=“spf[s];“/*“Move“to“the“next“opened“file.“*/ޤ ‘ôž|}Ž¡‘ôž|#ifdef‘?ýDEBUG_INTERŽ¡‘jprintfx–?ý("in“front“of“the“second“getc“in“input\n");Ž¡‘ôž|#endifŽ¡‘jyytchar–?ý=“yysptr>yysbuf?U(*--yysptr):getcx(pf.fp);“/*“The“first“char“*/Ž¡‘ôž|#ifdef‘?ýDEBUG_INTERŽ¡‘jprintfx–?ý("behind“of“the“second“getc“in“input,“read“character“%c“-“%x\n",Ž¡‘^gyytchar,‘?ýyytchar);Ž¡‘ôž|#endifŽ¡‘ žp}Ž¡‘ÿvreturn‘?ý(yytchar);Ž¡‘ôž|}Ž¡¡‘ôž|/*Ž¡‘ùÞy*–?ýRedefinition“of“the“input“for“the“main“compiler.Ž¡‘ùÞy*–?ýIt“is“used“during“an“interrupt.Ž¡‘ùÞy*/Ž¡‘ôž|intŽ¡‘ôž|input_std‘?ý()Ž¡‘ôž|{Ž¡‘ôž|#ifdef‘?ýDEBUG_INTERŽ¡‘ÿvprintfx–?ý("in“front“of“the“third“getc“in“input\n");Ž¡‘ôž|#endifŽ¡‘ÿvyytchar–?ý=“yysptr>yysbuf?U(*--yysptr):getcx(stdin);Ž¡‘ôž|#ifdef‘?ýDEBUG_INTERŽ¡‘ÿvprintfx–?ý("behind“of“the“third“getc“in“input,“read“character“%c“-“%x\n",Ž¡‘^syytchar,‘?ýyytchar);Ž¡‘ôž|#endifŽ¡‘ÿvif–?ý(yytchar“==“'\n')“/*“LF“*/Ž¡‘ žp{Ž¡‘jyylineno++;Ž¡‘jspf[s].line_counter++;Ž¡‘jchar_counter–?ý=“0;Ž¡‘jline_buf[0]–?ý=“0;Ž¡‘ žp}Ž¡¡‘ôž|#ifndef‘?ýNOT_MSWIN_AND_YES_DOSŽ¡‘ÿvif‘?ý(HANDLER_TEST)Ž¡‘ žp{Ž¡‘jHANDLER_SET;Ž¡‘jinput–?ý=“input_buf;Ž¡‘jbuf_pointer–?ý=“0;Ž¡‘jreturn‘?ý(input_buf());Ž¡‘ žp}Ž¡‘ôž|#endifŽ¡‘ÿvreturn‘?ý(yytchar);Ž¡‘ôž|}Ž¡¡‘ôž|/*Ž¡‘ùÞy*–?ýRedefinition“of“the“input“for“the“main“compiler.Ž¡‘ùÞy*–?ýIt“is“used“by“return“from“an“interrupt.Ž¡‘ùÞy*/Ž¡‘ôž|intŽ¡‘ôž|input_buf‘?ý()Ž¡‘ôž|{Ž¡‘ÿvyytchar–?ý=“yysptr>yysbuf?U(*--yysptr):string_resume[buf_pointer++];Ž¡‘ÿvif–?ý(yytchar“==“'\n')“/*“LF“*/ŽŽŽŒ‹FJàÀÙ ýÚÇ‘ÛÝq²70’"¤ÍCHAPTER–UU7.‘ÇINTERR¸ãUPT“SER‘þãVICESŽŽ ÐÙ¸ ýK7‘ðÝeÏ{ޤ ‘û]_yylineno++;Ž¡‘û]_spf[s].line_counter++;Ž¡‘û]_char_counter–?ý=“0;Ž¡‘û]_line_buf[0]–?ý=“0;Ž¡‘ðÝe}Ž¡‘æ]kreturn‘?ý(yytchar);Ž¡‘ÛÝq}Ž¡¡‘ÛÝq#elseŽ¡¡¡‘ÛÝqintŽ¡‘ÛÝqterminate_buffer‘?ý()Ž¡‘ÛÝq{Ž¡‘æ]kfclose‘?ý(spf[s].fp);Ž¡‘æ]kspf[s].fp–?ý=“NULL;Ž¡‘æ]kspf[s].name–?ý=“NULL;Ž¡‘æ]kspf[s--].line_counter–?ý=“1;Ž¡‘æ]ksource_line_number–?ý=“0;Ž¡‘æ]kexit_file_scope‘?ý();Ž¡¡‘æ]k/*‘ úDo–?ýnot“switch“to“stdin,“if“the“user“wants“compiler-likeŽ¡‘û]_behavior.‘ ú*/Ž¡‘æ]kif–?ý(!“s“&&“handle_main)Ž¡‘ðÝereturn‘?ý1;Ž¡¡‘æ]kreturn–?ý(!“s“&&“!“no_compile_only);Ž¡‘ÛÝq}Ž¡¡‘ÛÝq#endif–?ý/*“FLEX_SCANNER“*/Ž¡¡‘ÛÝq/*Ž¡‘án*–?ýInitialization“of“the“main“compiler“input.Ž¡‘án*/Ž¡‘ÛÝqintŽ¡‘ÛÝqinit_input–?ý(argc1,“argv1)Ž¡‘æ]kint‘?ýargc1;Ž¡‘æ]kchar‘?ý*argv1[];Ž¡‘ÛÝq{Ž¡‘æ]kint‘?ýb;Ž¡¡‘ÛÝq#ifndef‘?ýFLEX_SCANNERŽ¡‘æ]kinput–?ý=“input_komp;Ž¡‘ÛÝq#endifŽ¡‘æ]ks–?ý=“argc1“-“1;Ž¡‘æ]kspf[0].fp–?ý=“stdin;Ž¡‘æ]kspf[0].name–?ý=“"stdin";Ž¡‘æ]kspf[0].line_counter–?ý=“1;Ž¡‘æ]kfor–?ý(b“=“1;“b“<“argc1;“b++)Ž¡¡‘ÛÝq/*–?ýFile“opening“and“storing“their“pointer.“*/Ž¡¡‘ðÝe{Ž¡‘û]_spf[argc1–?ý-“b].fp“=“fopen(argv1[b],"r");Ž¡‘û]_spf[argc1–?ý-“b].name“=“argv1[b];Ž¡‘û]_spf[argc1–?ý-“b].line_counter“=“1;Ž¡‘û]_if–?ý(spf[argc1-b].fp“==“NULL)ŽŽŽŒ‹GQz ÀÙ ýÚÇ‘ôž|Í7.3.‘ÇINTERPRETER–UUINPUT“FUNCTIONS’Ç¢²71ŽŽ ÐÙ¸ ýK7‘ôž|Ï{ޤ ‘ÿvs–?ý=“argc1“-“b;Ž¡‘ÿverror_message‘?ý(7001);Ž¡‘ÿvreturn‘?ý(-1);Ž¡‘ôž|}Ž¡‘ žp}Ž¡‘ôž|/*Ž¡‘ùÞy*–?ýTakes“the“first“file“pointer“from“the“stack.Ž¡‘ùÞy*/Ž¡‘ôž|#ifdef‘?ýFLEX_SCANNERŽ¡‘ÿvyyin–?ý=“spf[s].fp;Ž¡‘ôž|#elseŽ¡‘ÿvpf.fp–?ý=“spf[s].fp;Ž¡‘ôž|#endifŽ¡‘ÿvreturn‘?ý0;Ž¡‘ôž|}Ž¡¡ŽŽŒ‹HVÿ ÀÙ ýÚÇ‘ÛÝq²72’"¤ÍCHAPTER–UU7.‘ÇINTERR¸ãUPT“SER‘þãVICESŽŽ ÐÙ¸ŽŒ‹IX¸ ÀÙ ýÚÇ ÐÙ¸ ý–H‘ôž|ëWChapter‘Ç 8ŽŸ2þ‘ôž|ëUGraphic‘ T{in‘ÿ8õterfaceŽŸ4þ‘ôž|ÐAs–'Äwš¸ãas“mentioned“ea˜rlier“there“a˜re“the“four“intrinsic“functions“fo˜r“p˜rogramming“graphics“output“channels.‘éThereޤ ‘ôž|aš¸ãre–„*the“follo˜wing:‘ÏqchopGen(),–ßchwrite(),“ch ush()–„*and“chclose().‘þEIn“addition,‘ßthese“functions“a˜re“used“as“a“graphicalŽ¡‘ôž|interface–¢ufrom“user“pGoint“of“view.‘Y'These“functions“aš¸ãre“calling“graphic“p˜rimitives“functions.‘Y'The“graphics“p˜rimitivesŽ¡‘ôž|functions–UUaš¸ãre“the“follo˜wing:‘qÇwindo˜w(),“move(),“dra˜w()“and“dra˜w‘™˜‰ffŽ‘™špGoint().ŽŸ!꽑ôž|ç8.1Ž‘„ßGraphic‘ffprimitivŒÌesŽŸXý‘ôž|à8.1.1Ž‘Þ|F‘þàunction‘€âwindo¬rw()Ž©ÊÑôž|ÐThe–šDfunction“is“used“in“creating“the“windoš¸ãw“that“matches“the“scopGe“of“displa˜y˜ed“va˜riable“as“w˜ell“as“the“size“of“theŽ¡‘ôž|windoš¸ãw–UUin“pixels.‘qÇThe“function“follo˜ws:ŽŸTø¡¡‘ôž|Ï/*Ž¡‘ùÞy*–?ýCreates“a“window“from“user's“coordinates.Ž¡‘ùÞy*–?ýCounts“world“coordinates.Ž¡‘ùÞy*–?ýhandle“-“is“handle“of“the“windowŽ¡‘ùÞy*–?ýn“-“specifies“line“in“the“window“(user“can“have“more“lines“in“the“window)Ž¡‘ùÞy*–?ýrest“are“coordinatesŽ¡‘ùÞy*/Ž¡‘ôž|static‘?ývoidŽ¡‘ôž|window–?ý(handle,“n,“x_left,“y_down,“x_right,“y_up)Ž¡‘Þmint–?ýhandle,“n;Ž¡‘Þmdouble–?ýx_left,“y_down,“x_right,“y_up;Ž¡‘ôž|{Ž¡‘ÿvchannel[handle].member[n].ax‘?ý=Ž¡‘ žp(channel[handle].w_resolution[0]–?ý-“1)“/“(fabs(x_left“-“x_right));Ž¡‘ÿvchannel[handle].member[n].ay‘?ý=Ž¡‘ žp(channel[handle].w_resolution[1]–?ý-“1)“/“(fabs(y_down“-“y_up));Ž¡‘ôž|}Ž¡¡ŸCù‘ž|ÐThe–òAhandle“is“the“handle“of“the“channel,›{the“n“spGeci es“the“displa•¸ãy“ed‘òAva“riable,˜the‘òAx‘™˜‰ffŽ–™šleft,˜y‘™˜‰ffŽ“do¸ãwn,˜x‘™˜‰ffŽ“right‘òAandŽ¡‘ôž|y‘™˜‰ffŽ‘™šup–UUspšGecify“scop˜e“of“the“n-th“displa•¸ãy“ed‘UUva“riable.ŽŸÎK‘ôž|à8.1.2Ž‘Þ|F‘þàunction‘€âmove()ަ‘ôž|ÐThe–UUfunction“is“used“foš¸ãr“moving“curso˜r“to“the“spšGeci ed“p˜osition.‘qÇIt“lo˜oks“likš¸ãe“follo˜w:ŽŸTø¡¡‘ôž|Ï/*ŽŽŸK’áw­²73ŽŽŒ‹JY2 ÀÙ ýÚÇ‘ÛÝq²74’& 6ÍCHAPTER–UU8.‘ÇGRAPHIC“INTERF‘þãA¸ãCEŽŽ ÐÙ¸ ýK7‘ánÏ*–?ýMoves“cursor“to“the“specified“position.ޤ ‘án*–?ýhandle“-“is“handle“of“the“windowŽ¡‘án*–?ýn“-“specifies“line“in“the“window“(user“can“have“more“lines“in“the“window)Ž¡‘án*–?ýx,“y“-“coordinatesŽ¡‘án*/Ž¡‘ÛÝqstatic‘?ývoidŽ¡‘ÛÝqmove–?ý(handle,“n,“x,“y)Ž¡‘öbint–?ýhandle,“n;Ž¡‘öbdouble–?ýx,“y;Ž¡‘ÛÝq{Ž¡‘æ]kd_move((int)floor–?ý((x“-“channel[handle].start_time)Ž¡‘öb*‘?ýchannel[handle].member[n].ax),Ž¡‘ánchannel[handle].w_resolution[1]–?ý-“1Ž¡‘án-–?ý(int)floor“((y“-“channel[handle].member[n].lower)Ž¡‘\*‘?ýchannel[handle].member[n].ay));Ž¡‘ÛÝq}Ž¡¡ŸnÍ‘êÝqÐwhere–Œƒhandle“is“the“handle“of“the“channel,›šOn“spGeci es“the“displa•¸ãy“ed‘Œƒva“riable,˜x–Œƒand“y“spšGecify“the“p˜osition“in“theŽ¡‘ÛÝqwindoš¸ãw–UUto“which“curso˜r“is“moved.Ž©•‘ÛÝqà8.1.3Ž‘qF‘þàunction‘€âdra¬rw()ŽŸÞü‘ÛÝqÐThe–UUfunction“draš¸ãw()“is“the“follo˜wing:ŽŸŠ€¡¡‘ÛÝqÏ/*Ž¡‘án*–?ýDraws“a“line“from“the“cursor“position“to“the“point“of“coordinates.Ž¡‘án*–?ýhandle“-“is“handle“of“the“windowŽ¡‘án*–?ýn“-“specifies“line“in“the“window“(user“can“have“more“lines“in“the“window)Ž¡‘án*–?ýx,“y“-“coordinatesŽ¡‘án*/Ž¡‘ÛÝqstatic‘?ývoidŽ¡‘ÛÝqdraw–?ý(handle,“n,“x,“y)Ž¡‘æ]kint–?ýhandle,“n;Ž¡‘æ]kdouble–?ýx,“y;Ž¡‘ÛÝq{Ž¡‘æ]kd_draw–?ý(handle,“n,Ž¡‘æ]k(int)floor–?ý((x“-“channel[handle].start_time)Ž¡‘û]_*‘?ýchannel[handle].member[n].ax),Ž¡‘æ]kchannel[handle].w_resolution[1]–?ý-“1Ž¡‘æ]k-–?ý(int)floor“((y“-“channel[handle].member[n].lower)Ž¡‘ÛÝq*‘?ýchannel[handle].member[n].ay));Ž¡‘ÛÝq}Ž¡¡¦‘ÛÝqà8.1.4Ž‘qF‘þàunction‘€âdra¬rw‘´x‰ff†fŽ‘:ÞpSŽoint()ŽŸÞü¡¡‘ÛÝqÏ/*Ž¡‘án*–?ýDraws“a“point“from“the“coordinates.Ž¡‘án*–?ýhandle“-“is“handle“of“the“windowŽ¡‘án*–?ýn“-“specifies“line“in“the“window“(user“can“have“more“lines“in“the“window)Ž¡‘án*–?ýx,“y“-“coordinatesŽ¡‘án*/ŽŽŽŒ‹Kad ÀÙ ýÚÇ‘ôž|Í8.1.‘ÇGRAPHIC‘UUPRIMITIVES’QîÆ²75ŽŽ ÐÙ¸ ýK7‘ôž|Ïstatic‘?ývoidޤ ‘ôž|draw_point–?ý(handle,“n,“x,“y)Ž¡‘ÿvint–?ýhandle,“n;Ž¡‘ÿvdouble–?ýx,“y;Ž¡‘ôž|{Ž¡‘ÿvd_point–?ý(handle,“n,Ž¡‘^s(int)floor–?ý((x“-“channel[handle].start_time)Ž¡‘^g*‘?ýchannel[handle].member[n].ax),Ž¡‘^schannel[handle].w_resolution[1]–?ý-“1Ž¡‘^s-–?ý(int)floor“((y“-“channel[handle].member[n].lower)Ž¡‘ùÞy*‘?ýchannel[handle].member[n].ay));Ž¡‘ôž|}Ž¡¡ŽŽŒ‹Li ÀÙ ýÚÇ‘ÛÝq²76’& 6ÍCHAPTER–UU8.‘ÇGRAPHIC“INTERF‘þãA¸ãCEŽŽ ÐÙ¸ŽŒ‹Mk ÀÙ ýÚÇ ÐÙ¸ ý–7‘ôž|ëWChapter‘Ç 9ŽŸ2‘ôž|ëUIn–ÿ8õternal› T{represen“tation˜of˜t“yp‘Ç esŽŸ:‘ôž|ç9.1Ž‘„ßRepresenšŒÌtation–ffof“a“t˜yps3eŽŸ8ä‘ôž|ÐThe–UUpš¸ãropGer“internal“rep˜resentation“structure“has“to“uniquely“answ˜er“the“follo˜wing“questions:ŽŸq摞}¸ŽŽŽ‘ ž~Ða•¸ãrra“y‘ÿ*ª,–UUsimple“vaš¸ãriable,“function“with“o˜r“without“expGo˜rting“pa˜rameter“t˜ypGesŽŸÇ(‘ž}¸ŽŽŽ‘ ž~Ðfunction–UUt¸ãypGe“(distance):Ž©ª½‘Þ€Î{ŽŽŽ‘#ž~ÐglobalޤÇ(‘Þ€Î{ŽŽŽ‘#ž~ÐloGcalŽ¡‘Þ€Î{ŽŽŽ‘#ž~ÐintrinsicŽ¡‘Þ€Î{ŽŽŽ‘#ž~ÐremoteŽŸœ}‘Þ€Î{ŽŽŽŸø‘#ž~Ð.ޤ‘#ž~.Ž¡‘#ž~.ŽŽŽ¦‘ž}¸ŽŽŽ‘ ž~Ða¸ãrithmetic‘UUclass:ަ‘Þ€Î{ŽŽŽ‘#ž~ÐintegerŽ¡‘Þ€Î{ŽŽŽ‘#ž~ÐdoubleŽŸœ}‘Þ€Î{ŽŽŽŸø‘#ž~Ð.ޤ‘#ž~.Ž¡‘#ž~.ŽŽŽ¦‘ž}¸ŽŽŽ‘ ž~Ðif–UUit“is“an“a•¸ãrra“y–UU-“list“of“dimensionsŽŸÇ(‘ž}¸ŽŽŽ‘ ž~Ðif–UUit“is“a“function:ަ‘Þ€Î{ŽŽŽ‘#ž~Ðlist–UUof“paš¸ãrameter“t˜ypšGe“sp˜eci ers“(optional)Ž¡‘Þ€Î{ŽŽŽ‘#ž~Ðlist–UUof“foš¸ãrmal“pa˜rameters“(optional)ަ‘ž}¸ŽŽŽ‘ ž~Ðif–UUit“is“a“function“-“it“is“a“de nition“oš¸ãr“decla˜ration“(b•Go“dy‘UU ag)ޤÇ(‘ž}¸ŽŽŽ‘ ž~ÐaddressŽ¡‘ž}¸ŽŽŽ‘ ž~Ðif–UUit“is“a“function“de nition,“it“wš¸ãas“already“fo˜rmally“called“(fo˜rmal“call“backpatching)Ž©q摞|W•¸ãe›Ãðw“ould˜lik“e˜to˜have˜an˜internal˜structure˜that˜is˜much˜wider˜then˜the˜actual˜t“yp•Ge˜p“ossibilities˜in˜C.˜But˜theޤ ‘ôž|semantic– actions“aš¸ãre“only“de ned“fo˜r“the“subset“of“C-lik˜e“t˜ypGe“de nitions“and“decla˜rations.‘(Therefo˜re“w˜e“chose“theŽ¡‘ôž|follo¸ãwing‘UUstructure:ަ¡‘ôž|Ï/*–?ýInternal“type“structure.“*/Ž¡‘ôž|struct‘?ýinternal_typeŽ¡‘ôž|{Ž¡‘ÿvstruct–?ýinternal_type“*input;Ž¡‘ÿvstruct–?ýinternal_type“*arity;Ž¡‘ÿvchar‘?ý*field_name;ŽŽŸK’áw­²77ŽŽŒ‹Nk’ ÀÙ ýÚÇ‘ÛÝq²78’ÆGšÍCHAPTER–UU9.‘ÇINTERNAL“REPRESENT–ÿ*ªA“TION–UUOF“TYPESŽŽ ÐÙ¸ ÿ;„ŸÝ€’o`² ÿR˜@¬Ž’vಠÿH˜@Ž’}àæ ÿ?CÆŽ’}àæ ÿ?CÆ7ŽŽ‘þ± ÿEóZ„”-feŽ‘þä: ÿEóZ?ŽŽ‘xg þ‚Þ¢Ž‘xg þ‰MŽ‘#PD þ~A Ž‘#PD þ~A 1ŽŽ‘,óÉ þŽÏ…„fd.Ž‘,óÉ þ¥c²„fd.Ž‘,óÉ ÿý„fd.Ž‘8~H ÿãË„r³KfeŽŽ‘8±z þ¼ß„fd"QÞŽ‘8±z þÓsA„fd"QÞŽ‘8±z þên„fd"QÞŽ‘8±z ÿ‚Єfd"QÞŽ‘[X þšZŽ‘bƒX þZŽ‘h¥– þˆ.Ž‘h¥– þˆ.7ŽŽ’Ÿ§ þšZŽ’§' þZŽ’­œŽ þ‡½ÜŽ’­œŽ þ‡½Ü7ŽŽ’å2 þšZŽ’ì² þZŽ’òÔC þˆ.Ž’òÔC þˆ.7ŽŽ’ˆßµ þw ñ„ Ö|feŽŽ’‰ç þl}§„fdÎÒiŽ’W² ÿ/_-„øfeŽ’WåP ÿ/_-?ŽŽ‘,d þw ñ‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ‘q—… þŽÏ…„fd.Ž‘q—… þ¥c²„fd.Ž‘q—… ÿý„fd.Ž‘q1  þw ñ‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ‘}" ÿãË„r³KfeŽŽ‘}U6 þ¼ß„fd"QÞŽ‘}U6 þÓsA„fd"QÞŽ‘}U6 þên„fd"QÞŽ‘}U6 ÿ‚Єfd"QÞŽ’ˆßµ ÿEóZ„”-feŽ’‰ç ÿEóZ?ŽŽ’·"v þŽÏ…„fd.Ž’·"v þ¥c²„fd.Ž’·"v ÿý„fd.Ž’¶¼ þw ñ‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ’Â¬õ ÿãË„r³KfeŽŽ’Âà' þ¼ß„fd"QÞŽ’Âà' þÓsA„fd"QÞŽ’Âà' þên„fd"QÞŽ’Âà' ÿ‚Єfd"QÞŽ’ûÆ2 þŽÏ…„fd.Ž’ûÆ2 þ¥c²„fd.Ž’ûÆ2 ÿý„fd.Ž’û_Í þw ñ‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ’P± ÿãË„r³KfeŽŽ’ƒã þ¼ß„fd"QÞŽ’ƒã þÓsA„fd"QÞŽ’ƒã þên„fd"QÞŽ’ƒã ÿ‚Єfd"QÞŽ’AQ# ÿF&Œ„fd.Ž’AQ# ÿ]¡î„fd.Ž’AQ#ŸÐU9„fd.Ž’@ê¾ ÿ/_-‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ’LÛ¢ŸÐ"„r³KfeŽŽ’MÔ ÿt6„fd"QÞŽ’MÔŸ‹±}„fd"QÞŽ’MÔŸ¢Eª„fd"QÞŽ’MÔŸ¹Á „fd"QÞŽ’…ôß ÿF&Œ„fd.Ž’…ôß ÿ]¡î„fd.Ž’…ôߟÐU9„fd.Ž’…Žz ÿ/_-‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ’‘^ŸÐ"„r³KfeŽŽ’‘² ÿt6„fd"QÞŽ’‘²Ÿ‹±}„fd"QÞŽ’‘²Ÿ¢Eª„fd"QÞŽ’‘²Ÿ¹Á „fd"QÞŽ‘çhØ þŽÏ…„fd.Ž‘çhØ þ¥c²„fd.Ž‘çhØ ÿý„fd.Ž‘çs þw ñ‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ‘òóW ÿãË„r³KfeŽŽ‘ó&‰ þ¼ß„fd"QÞŽ‘ó&‰ þÓsA„fd"QÞŽ‘ó&‰ þên„fd"QÞŽ‘ó&‰ ÿ‚Єfd"QÞŽ‘çhØ ÿ]¡î„fd.Ž‘çhØ ÿt6„fd.Ž‘çhØŸçЛ„fd.Ž‘çs ÿEóZ‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ‘òóWŸçi„sš€feŽŽ‘ó&‰Ÿ‹±}„fd"QÞŽ‘ó&‰Ÿ¢Eª„fd"QÞŽ‘ó&‰Ÿ¹Á „fd"QÞŽ‘ó&‰ŸÐU9„fd"QÞŽ‘q—… ÿ]¡î„fd.Ž‘q—… ÿt6„fd.Ž‘q—…ŸçЛ„fd.Ž‘q1  ÿEóZ‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ‘}"Ÿçi„sš€feŽŽ‘}U6Ÿ‹±}„fd"QÞŽ‘}U6Ÿ¢Eª„fd"QÞŽ‘}U6Ÿ¹Á „fd"QÞŽ‘}U6ŸÐU9„fd"QÞŽ þ°î1‘/†;²AŽŽŽŽ þ¾zL‘/©ÊTŽŽŽŽ þÌg‘/©ÊTŽŽŽŽ þÚy·‘/˜RŽŽŽŽ þèí‘1xIŽŽŽŽ þöy"‘/»BŽŽŽŽ ÿ=‘/†;UŽŽŽŽ ÿÛ¹‘/©ÊTŽŽŽŽ ÿãË‘/ßEŽŽŽŽ þŠJ‘36-INPUTŽŽŽŽ þ ¬w‘2ïARITYŽŽŽŽ þóÑ>«Z°MemoryŽŽŽŽ þüË•‘DÑ™SizeŽŽŽŽ þμ‘HqŸÅ0ŽŽŽŽ þæ7h‘BGSINTŽŽŽŽ ÿ*Û$‘-„e²OUTPUTŽŽŽŽ ÿ*Û$‘sVOUTPUTŽŽŽŽ þ°î1‘u,AŽŽŽŽ þ¾zL‘u4»TŽŽŽŽ þÌg‘u4»TŽŽŽŽ þÚy·‘u"ôRŽŽŽŽ þèí‘wôIŽŽŽŽ þöy"‘uFBŽŽŽŽ ÿ=‘u,UŽŽŽŽ ÿÛ¹‘u4»TŽŽŽŽ ÿãË‘ujEŽŽŽŽ þŠJ‘xÁINPUTŽŽŽŽ þ ¬w‘xzARITYŽŽŽŽ þóÃ’ƒO°MemoryŽŽŽŽ þüË•’‰uUSizeŽŽŽŽ ÿF÷’4hDOMAINŽŽŽŽ þæ7h’‡ŒoClassŽŽŽŽ þÜH!’‰:ªAritŽŽŽŽ þųô’„ümExp,rortŽŽŽŽ þμ’‡ÏTÓyp,reŽŽŽŽ ÿ*Û$’·³²OUTPUTŽŽŽŽ þ°î1’¹´èAŽŽŽŽ þ¾zL’¹ØwTŽŽŽŽ þÌg’¹ØwTŽŽŽŽ þÚy·’¹Æ°RŽŽŽŽ þèí’»¦°IŽŽŽŽ þöy"’¹ê=BŽŽŽŽ ÿ=’¹´èUŽŽŽŽ ÿÛ¹’¹ØwTŽŽŽŽ ÿãË’º ÌEŽŽŽŽ þŠJ’½dÚINPUTŽŽŽŽ þ ¬w’½¾ARITYŽŽŽŽ þóÃ’ÈÚ°MemoryŽŽŽŽ þüË•’ÏFSizeŽŽŽŽ ÿF÷’Æ¿YDOMAINŽŽŽŽ þæ7h’Í`ClassŽŽŽŽ þÜH!’ÎÅ›AritŽŽŽŽ þųô’ʇ^Exp,rortŽŽŽŽ þμ’ÍZ TÓyp,reŽŽŽŽ ÿ*Û$’ý>²OUTPUTŽŽŽŽ þ°î1’ÿ?ÙAŽŽŽŽ þ¾zL’ÿchTŽŽŽŽ þÌg’ÿchTŽŽŽŽ þÚy·’ÿQ¡RŽŽŽŽ þèí’1¡IŽŽŽŽ þöy"’ÿu.BŽŽŽŽ ÿ=’ÿ?ÙUŽŽŽŽ ÿÛ¹’ÿchTŽŽŽŽ ÿãË’ÿ˜½EŽŽŽŽ þŠJ’ïËINPUTŽŽŽŽ þ ¬w’¨¯ARITYŽŽŽŽ þóÃ’ }ðMemoryŽŽŽŽ þüË•’¤SizeŽŽŽŽ ÿF÷’ cDOMAINŽŽŽŽ þæ7h’»ClassŽŽŽŽ þÜH!’iWAritŽŽŽŽ þųô’+Exp,rortŽŽŽŽ þμ’ýÈTÓyp,reŽŽŽŽŸã`’AῲOUTPUTŽŽŽŽ ÿi,m’Cã•AŽŽŽŽ ÿv¸ˆ’D$TŽŽŽŽŸ„D£’D$TŽŽŽŽŸ‘о’Cõ]RŽŽŽŽŸŸ\Ù’EÕ]IŽŽŽŽŸ­Ð)’DêBŽŽŽŽŸ»\D’Cã•UŽŽŽŽŸÇõ’D$TŽŽŽŽŸÐ"’DŠŽF‘ÿz©unctionŽŽŽŽ þ®8’’‚GF‘ÿz©unctionŽŽŽŽ þ®8’’ȹ;F‘ÿz©unctionŽŽŽŽ þ®8’’ uÂF‘ÿz©unctionŽŽŽŽ ÿfvÎ’RçèF‘ÿz©unctionŽŽŽŽ ÿfvÎ’–¤oF‘ÿz©unctionŽŽŽŽ ÿF÷‘> .ÅNULLŽŽŽŽŸù­‘èੲOUTPUTŽŽŽŽŸÝ®"‘ëTŽŽŽŽ ÿÀš‘êâAŽŽŽŽŸŽ3ê‘ëTŽŽŽŽŸ›À‘ëTŽŽŽŽŸ©L ‘êôGRŽŽŽŽŸ¶Ø;‘ìÔGIŽŽŽŽŸÅK‹‘ëÔBŽŽŽŽŸÒצ‘êâUŽŽŽŽŸçi‘ë;cEŽŽŽŽ ÿX곑î’qINPUTŽŽŽŽ ÿpf‘îKUARITYŽŽŽŽŸÂ•ì‘ù i°MemoryŽŽŽŽŸËþ‘ÿF¨SizeŽŽŽŽŸ†úB‘æ®Å0ŽŽŽŽŸŽo‘æ®0ŽŽŽŽŸµ Ñ‘ü¼bINTŽŽŽŽŸù­‘sV²OUTPUTŽŽŽŽŸÝ®"‘u4»TŽŽŽŽ ÿÀš‘u,AŽŽŽŽŸŽ3ê‘u4»TŽŽŽŽŸ›À‘u4»TŽŽŽŽŸ©L ‘u"ôRŽŽŽŽŸ¶Ø;‘wôIŽŽŽŽŸÅK‹‘uFBŽŽŽŽŸÒצ‘u,UŽŽŽŽŸçi‘ujEŽŽŽŽ ÿX곑xÁINPUTŽŽŽŽ ÿpf‘xzARITYŽŽŽŽŸÂ•ì’ƒO°MemoryŽŽŽŽŸËþ’‰uUSizeŽŽŽŽŸ†úB’[Å0ŽŽŽŽŸŽo’[0ŽŽŽŽŸµ Ñ’†ëINTŽŽŽŽŸã`‘ø=NULLŽŽŽŽŸã`’‚­êNULLŽŽŽŽ þ¸'Ù‘Bè³°ClassŽŽŽŽŽŽŽŽŸ‘%a;²Figure–UU9.1:‘qÇRepresenš¸ãtation“of“the“t˜ypGe“declaration“Ðint“a(int“b,“int“c(.....),“....);ŽŽŽŸCz‘æ]kÏint‘?ýoffset;ޤ ‘æ]kstruct–?ýattr“attribute;Ž¡‘æ]kstruct–?ýinternal_type“*output;Ž¡‘ÛÝq};Ž¡¡¤†ó‘êÝqÐRepš¸ãresentation–UUof“the“t˜ypGe“decla˜ration:Ž©¨°‘ÛÝqÏint–?ýa(int“b,“int“c(.....),“....);Ž¡‘êÝqÐis–ðin“the“ gure“9.1.›!˜The“structure“membGer“attribute“is“a“substructure.˜The“structure“membšGer“output“is“p˜ointerޤ ‘ÛÝqto–UUthe“structure“internal‘™˜‰ffŽ‘™št¸ãypGe.ŽŸ !½‘êÝqStructure–UUattr“has“the“folloš¸ãwing“fo˜rm:ަ¡‘ÛÝqÏ/*–?ýType“attribute.“*/Ž¡‘ÛÝqstruct‘?ýattrŽ¡‘ÛÝq{Ž¡‘æ]kenum–?ýintern_func_class“function_class;ŽŽŽŒ‹Or£ ÀÙ ýÚÇ‘ôž|Í9.2.‘ÇC-LANGUA¸ãGE–UUSUBSET“OF“TYPE’ ùi²79ŽŽ ÐÙ¸ þøeŸÝ€’ÌSã ÿEóZ‰fe.ÜYŸ.„.feŸèø9Ž‘.„.feŽžfe‰fe.ÜYŽŽŽ’ÌºH ÿ[Ó„„fd.Ž ÿn—«’Ýg?10ŽŽŽŽ ÿV5’ßç?0ŽŽŽŽ’úÉ× ÿ @„fd ÝŽ’·‚ ÿ;Þ„.feŽŽ’âg@ ÿ;P„fd ƒtŽ’â4 ÿEóZ„ Ö|feŽ’âg@ ÿEóZ¬?ŽŽ’R ÿEóZ„”-feŽ’Ã„ ÿEóZ?ŽŽ’´W± þ‚Þ¢Ž’¾W± þ‰MŽ’Â/Ž þ~A Ž’Â/Ž þ~A 1ŽŽ’ËÓ þŽÏ…„fd.Ž’ËÓ þ¥c²„fd.Ž’ËÓ ÿý„fd.Ž’×]’ ÿãË„r³KfeŽŽ’×Ä þ¼ß„fd"QÞŽ’×Ä þÓsA„fd"QÞŽ’×Ä þên„fd"QÞŽ’×Ä ÿ‚Єfd"QÞŽ’ù⢠þšZŽ’b¢ þZŽ’„à þˆ.Ž’„à þˆ.7ŽŽ’Ël® þw ñ‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ’vÏ þŽÏ…„fd.Ž’vÏ þ¥c²„fd.Ž’vÏ ÿý„fd.Ž’N ÿãË„r³KfeŽŽ’4€ þ¼ß„fd"QÞŽ’4€ þÓsA„fd"QÞŽ’4€ þên„fd"QÞŽ’4€ ÿ‚Єfd"QÞŽ’†H" þŽÏ…„fd.Ž’†H" þ¥c²„fd.Ž’†H" ÿý„fd.Ž’…á½ þw ñ‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ’‘Ò¡ ÿãË„r³KfeŽŽ’’Ó þ¼ß„fd"QÞŽ’’Ó þÓsA„fd"QÞŽ’’Ó þên„fd"QÞŽ’’Ó ÿ‚Єfd"QÞŽ’†H" ÿ]¡î„fd.Ž’†H" ÿt6„fd.Ž’†H"ŸçЛ„fd.Ž’…á½ ÿEóZ‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ’‘Ò¡Ÿçi„sš€feŽŽ’’ÓŸ‹±}„fd"QÞŽ’’ÓŸ¢Eª„fd"QÞŽ’’ÓŸ¹Á „fd"QÞŽ’’ÓŸÐU9„fd"QÞŽ’j þw ñ‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ’>†^ ÿ @„fd ÝŽ’Ft  ÿ;Þ„.feŽŽ’&#Ç ÿ;P„fd ƒtŽ’%ð• ÿEóZ„ Ö|feŽ’&#Ç ÿEóZ?ŽŽ’j ÿEóZ‰fe.ÜYŸ.„.feŸèø9Ž‘.„.feŽžfe‰fe.ÜYŽŽŽ’vÏ ÿ[Ó„„fd.Ž þ°î1’Îe…²AŽŽŽŽ þ¾zL’ΉTŽŽŽŽ þÌg’ΉTŽŽŽŽ þÚy·’ÎwMRŽŽŽŽ þèí’ÐWMIŽŽŽŽ þöy"’ΚÚBŽŽŽŽ ÿ=’Îe…UŽŽŽŽ ÿÛ¹’ΉTŽŽŽŽ ÿã˒ξiEŽŽŽŽ þŠJ’ÒwINPUTŽŽŽŽ þ ¬w’ÑÎ[ARITYŽŽŽŽ þóÃ’ÝŠ¤°MemoryŽŽŽŽ þüË•’ã°ãSizeŽŽŽŽ þμ’çPéÅ0ŽŽŽŽ þæ7h’á&INTŽŽŽŽ ÿ*Û$’Ìc¯²OUTPUTŽŽŽŽ ÿ*Û$’î OUTPUTŽŽŽŽ þ°î1’ðvAŽŽŽŽ þ¾zL’TŽŽŽŽ þÌg’TŽŽŽŽ þÚy·’>RŽŽŽŽ þèí’â>IŽŽŽŽ þöy"’%ËBŽŽŽŽ ÿ=’ðvUŽŽŽŽ ÿÛ¹’TŽŽŽŽ ÿãË’IZEŽŽŽŽ þŠJ’ hINPUTŽŽŽŽ þ ¬w’YLARITYŽŽŽŽ þóÃ’".`°MemoryŽŽŽŽ þüË•’(TŸSizeŽŽŽŽ ÿF÷’ ²DOMAINŽŽŽŽ þæ7h’&k¹ClassŽŽŽŽ þÜH!’(ôAritŽŽŽŽ þųô’#Û·Exp,rortŽŽŽŽ þμ’&®eTÓyp,reŽŽŽŽ ÿ*Û$’‡¿ó²OUTPUTŽŽŽŽ þ°î1’‰ÁÉAŽŽŽŽ þ¾zL’‰åXTŽŽŽŽ þÌg’‰åXTŽŽŽŽ þÚy·’‰Ó‘RŽŽŽŽ þèí’‹³‘IŽŽŽŽ þöy"’‰÷BŽŽŽŽ ÿ=’‰ÁÉUŽŽŽŽ ÿÛ¹’‰åXTŽŽŽŽ ÿãË’Š­EŽŽŽŽ þŠJ’q»INPUTŽŽŽŽ þ ¬w’*ŸARITYŽŽŽŽ þóÃ’—ÿ³°MemoryŽŽŽŽ þüË•’ž%òSizeŽŽŽŽ ÿF÷’•åDOMAINŽŽŽŽ þæ7h’œ= ClassŽŽŽŽ þÜH!’ëGAritŽŽŽŽ þųô’™­ Exp,rortŽŽŽŽ þμ’œ¸TÓyp,reŽŽŽŽ þ¸'Ù’œ= ClassŽŽŽŽ þ¸'Ù’&k¹ClassŽŽŽŽ þ®8’’–÷²F‘ÿz©unctionŽŽŽŽ þ®8’’ÝiØF‘ÿz©unctionŽŽŽŽ þ®8’’!&_F‘ÿz©unctionŽŽŽŽŸù­’‡¿ó²OUTPUTŽŽŽŽŸÝ®"’‰åXTŽŽŽŽ ÿÀš’‰ÁÉAŽŽŽŽŸŽ3ê’‰åXTŽŽŽŽŸ›À’‰åXTŽŽŽŽŸ©L ’‰Ó‘RŽŽŽŽŸ¶Ø;’‹³‘IŽŽŽŽŸÅK‹’‰÷BŽŽŽŽŸÒצ’‰ÁÉUŽŽŽŽŸçi’Š­EŽŽŽŽ ÿXê³’q»INPUTŽŽŽŽ ÿpf’*ŸARITYŽŽŽŽŸÂ•ì’—ÿ³°MemoryŽŽŽŽŸËþ’ž%òSizeŽŽŽŽŸ†úB’¡ÅøÅ0ŽŽŽŽŸŽo’¡Åø0ŽŽŽŽŸµ Ñ’››¬INTŽŽŽŽŸã`’—^‡NULLŽŽŽŽ ÿV5’#£Æ²0ŽŽŽŽ ÿn—«’!#Æ20ŽŽŽŽ ÿF÷’Ûoö°DOMAINŽŽŽŽ þ¸'Ù’ß áÅClassŽŽŽŽŽŽŽŽŸ‘\ ô²Figure–UU9.2:‘qÇRepresenš¸ãtation“of“the“t˜ypGe“declaration“Ðint“a[10][20];ŽŽŽŸî%‘ÿvÏint‘?ýexport_type;ޤ ‘ÿvenum–?ýtype_qual“type_qualifier;Ž¡‘ÿvenum–?ýstorage_class_specifier“storage_class_specifier;Ž¡‘ÿvenum–?ýintern_arit_class“arit_class;Ž¡‘ÿvint‘?ýmemory_size;Ž¡‘ÿvchar‘?ý*domain;Ž¡‘ôž|};Ž¡¡Ÿ鯑ž|ÐThe–&Ufunction‘™˜‰ffŽ‘™šclass“can“bGe“simple“va¸ãriable,–/¼matrix,“intrinsic›&Ufunction,“function,“remote˜function,“µ:–ª¨:“:Ž‘¸Ð(full˜listing˜ofŽ¡‘ôž|pšGossibilities–ocan“b˜e“found“in“`t¸ãyp˜e.h'“ le).‘¾ÔThe“domain“p˜ointer“has“the“t¸ãyp˜e“sp˜eci c“fo•¸ãrm.‘¾ÔF“o“r–oexample“foš¸ãr“the“t˜ypGeŽ¡‘ôž|decla¸ãration–UUÏint‘?ýa[10][20];Ð,“the“internal“structure“is“in“the“ gure“9.2.Ž¡‘ž|In–íthe“ gure“9.1,‘)there“is“a“general“foš¸ãrm“of“rep˜resentation“of“a“t˜ypGe“decla˜ration.‘_OT–ÿ*ªypically“,‘)the–íC-lik˜e“decla˜rationsŽ¡‘ôž|and– Mde nitions“have“other“foš¸ãrms,‘i.e.‘Ythere“a˜re“not“decla˜rations“of“functions“in“a“function“decla˜ration.‘YTherefo˜re,‘theŽ¡‘ôž|n-aš¸ãry–UUtree“pGointed“out“in“the“ gure“9.1“is“simpli ed“to“the“list“of“identi ers“o˜r“bina˜ry“tree“9.3,“respGectively‘ÿ*ª.ŽŸ!Š@‘ôž|ç9.2Ž‘„ßC-language–ffsubset“of“tŒÌyps3eŽŸ8ä‘ôž|ÐSome–UUtš¸ãypical“patterns“a˜re“in“ gures“9.4,“9.5,“9.6.ŽŽŽŒ‹PŽ® ÀÙ ýÚÇ‘ÛÝq²80’ÆGšÍCHAPTER–UU9.‘ÇINTERNAL“REPRESENT–ÿ*ªA“TION–UUOF“TYPESŽŽ ÐÙ¸ ÿ-nƒŸÞ9‘x*a ÿ;Þ„b—feŽ‘x]“ ÿ;Þ¬?ŽŽ’À* þlJuŽ’šÀ* þhõ Ž’Ÿ­z þgQJŽ’Ÿ­z þgQJ1ŽŽ‘_úü þx;X„fd0Å.Ž‘_úü þï„fd0Å.Ž‘_úü ÿ Šâ„fd0Å.Ž‘_”— þ_¥‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ‘ll° ÿ W°„yìófeŽŽ‘lŸâ þ©†„fd$ HŽ‘lŸâ þÁc„fd$ HŽ‘lŸâ þÙÅ´„fd$ HŽ‘lŸâ þò(K„fd$ HŽ‘_úü ÿS²§„fd0Å.Ž‘_úü ÿl>„fd0Å.Ž‘_úüŸæ1„fd0Å.Ž‘_”— ÿ;Þ‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ‘ll°ŸåÎÿ„yìófeŽŽ‘lŸâŸ„wÕ„fd$ HŽ‘lŸâŸœÚl„fd$ HŽ‘lŸâŸµ=„fd$ HŽ‘lŸâŸÍŸš„fd$ HŽ’©"Á þx;X„fd0Å.Ž’©"Á þï„fd0Å.Ž’©"Á ÿ Šâ„fd0Å.Ž’µ”u ÿ W°„yìófeŽŽ’Ùçï þ„­ Ž’ágï þz­ Ž’èçï þp­ Ž’é› þpyÙŽ’é› þpyÙ7ŽŽ’¨¼\ þ_¥‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’µÇ§ þ©†„fd$ HŽ’µÇ§ þÁc„fd$ HŽ’µÇ§ þÙÅ´„fd$ HŽ’µÇ§ þò(K„fd$ HŽ’òJ† þx;X„fd0Å.Ž’òJ† þï„fd0Å.Ž’òJ† ÿ Šâ„fd0Å.Ž’þ¼: ÿ W°„yìófeŽŽ’#´ þ„­ Ž’*´ þz­ Ž’2´ þp­ Ž’26` þpyÙŽ’26` þpyÙ7ŽŽ’ñä! þ_¥‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’þïl þ©†„fd$ HŽ’þïl þÁc„fd$ HŽ’þïl þÙÅ´„fd$ HŽ’þïl þò(K„fd$ HŽ ÿ6>‘`B¢ó'Kñ`y ó3 cmr10ÒOUTPUTŽŽŽŽ þ£‘cpAŽŽŽŽ þ«‚ó‘c@_TŽŽŽŽ þ¹öC‘c@_TŽŽŽŽ þÈi“‘c,èRŽŽŽŽ þ×Ä‘e:‚IŽŽŽŽ þæ7h‘cSÖBŽŽŽŽ þôª¸‘cpUŽŽŽŽ ÿhi‘c@_TŽŽŽŽ ÿ W°‘czÆEŽŽŽŽ þs„‘f~çINPUTŽŽŽŽ þ‹æ´‘f1 ARITYŽŽŽŽ þãÉ‘s€÷°MemoryŽŽŽŽ þíq‘y§6SizeŽŽŽŽ ÿÓ§‘qfIDOMAINŽŽŽŽ þÕy‘w¾PClassŽŽŽŽ þË2‘yl‹AritŽŽŽŽ þ²¼›‘u.NExp,rortŽŽŽŽ þ¼«â‘xüTÓyp,reŽŽŽŽ þ¤IK‘w¾PClassŽŽŽŽ þ˜‹š‘pªÓF‘ÿz©unctionalŽŽŽŽŸù­‘`B¢ÒOUTPUTŽŽŽŽŸÛ߸‘c@_TŽŽŽŽ ÿx†ò‘cpAŽŽŽŽŸ†úB‘c@_TŽŽŽŽŸ•m’‘c@_TŽŽŽŽŸ£àâ‘c,èRŽŽŽŽŸ²T2‘e:‚IŽŽŽŽŸÁ®·‘cSÖBŽŽŽŽŸÐ"‘cpUŽŽŽŽŸåÎÿ‘czÆEŽŽŽŽ ÿNûl‘f~çINPUTŽŽŽŽ ÿg^‘f1 ARITYŽŽŽŽŸ¾ù‘s€÷°MemoryŽŽŽŽŸÈè_‘y§6SizeŽŽŽŽ ÿÀš‘}G<Å0ŽŽŽŽŸ˜#1‘}G<0ŽŽŽŽŸ°…È‘wðINTŽŽŽŽŸáJö‘rßËNULLŽŽŽŽ þ×Ä’®bGÒIŽŽŽŽ ÿhi’¬h$TŽŽŽŽ ÿ6>’©jgOUTPUTŽŽŽŽ þ£’¬A5AŽŽŽŽ þ«‚ó’¬h$TŽŽŽŽ þ¹öC’¬h$TŽŽŽŽ þÈi“’¬T­RŽŽŽŽ þæ7h’¬{›BŽŽŽŽ þôª¸’¬A5UŽŽŽŽ ÿ W°’¬¢‹EŽŽŽŽ þs„’¯¦¬INPUTŽŽŽŽ þ‹æ´’¯XÎARITYŽŽŽŽ þãÉ’¼¨¼°MemoryŽŽŽŽ þíq’ÂÎûSizeŽŽŽŽ þ¤IK’Æ>ÿ²0ŽŽŽŽ þ¼«â’Æ>ÿ0ŽŽŽŽ þÕy’¿”TINTŽŽŽŽ þ×Ä’÷Š ÒIŽŽŽŽ ÿhi’õéTŽŽŽŽ ÿ6>’ò’,OUTPUTŽŽŽŽ þ£’õhúAŽŽŽŽ þ«‚ó’õéTŽŽŽŽ þ¹öC’õéTŽŽŽŽ þÈi“’õ|rRŽŽŽŽ þæ7h’õ£`BŽŽŽŽ þôª¸’õhúUŽŽŽŽ ÿ W°’õÊPEŽŽŽŽ þs„’øÎqINPUTŽŽŽŽ þ‹æ´’ø€“ARITYŽŽŽŽ þãÉ’аMemoryŽŽŽŽ þíq’ öÀSizeŽŽŽŽ þ¤IK’fIJ0ŽŽŽŽ þ¼«â’fÄ0ŽŽŽŽ þÕy’¼INTŽŽŽŽ ÿÓ§’ºþþNULLŽŽŽŽ ÿÓ§’&ÃNULLŽŽŽŽŽŽŽŽŸ‘?Ö‘Figure–UU9.3:‘qÇRepresenš¸ãtation“of“t˜ypical“C-lik˜e“function“declaration.ŽŽŽ ´u+ŸÝ€’¸lŸÍè_¬Ž’®lŸÒè_Ž’§TWŸÖs䎎’ÂlŸÍè_HŽ’ÌlŸÒè_HŽ’Ó„ÃŸÖsäHŽŽ’ӄß镎’Ʉß’ÂlŸñŒŽŽ’ÝQ‘ŸôBO„AºfeŽŽ’݄ßé•HŽ’ç„ßî•HŽ’îœùŸñŒHŽŽŸÞ•W’Ý„ÃÛbŽŽŽŽŸÿË’»h in¬rtŽŽŽŽŸÿË’ö‰cŽŽŽŽŸÞ•W’ Oêin¬rtŽŽŽŽŸÀÇ‚’¿|aŽŽŽŽŸüc,’ØKã[‘ê¨]ŽŽŽŽŽŽŽŽŸ‘F‹ì²Figure–UU9.4:‘qÇT‘ÿ*ªree“pattern“of“the“declaration“Ðint“a(int“b[“],int“c);ŽŽŽŽŽŒ‹Q¡$ ÀÙ ýÚÇ‘ôž|Í9.2.‘ÇC-LANGUA¸ãGE–UUSUBSET“OF“TYPE’ ùi²81ŽŽ ÐÙ¸ þ& ºŸÝ€’¿®ýŸÒצ‰feåŸ Œ„ ŒfeŸù9óŽ‘6„ ŒfeŽžfe‰feåŽŽŽ’ÀbŸØv„fd6Ž’ÚÇ3Ÿð¥{‰feåŸ Œ„ ŒfeŸù9óŽ‘6„ ŒfeŽžfe‰feåŽŽŽ’Û-˜ŸöCë„fd6Ž’Ã¡}Ÿ¬}¶¬Ž’¹¡}Ÿ±}¶Ž’²‰GŸµ ;ŽŽ’Í¡}Ÿ¬}¶Hޒס}Ÿ±}¶HŽ’Þ¹³Ÿµ ;HŽŽ’Þ¹³ŸÇ•쎒Թ³ŸÌ•쎒͡}ŸÐ!qŽŽ’è¹³ŸÇ•ìHŽ’ò¹³ŸÌ•ìHŽ’ùÑéŸÐ!qHŽŽ’ùÑéŸç_!Ž’ïÑéŸë^!Ž’è¹³Ÿíïa!ŽŽ’ÑéŸç_aŽ’ ÑéŸë^aŽ’êŸíïaaŽŽŸ½*®’«„ÚÛin¬rtŽŽŽŽŸŸ\ْʱaŽŽŽŽŸ½*®’è¹³[‘ê¨]ŽŽŽŽŸÝ®"’þ™ [‘ê¨]ŽŽŽŽŽŽŽŽŸ‘nÅݲFigure–UU9.5:‘qÇT‘ÿ*ªree“pattern“of“the“declaration“Ðint“a[“][“][“];ŽŽŽ †LŸÝ€‘sÑ™ŸÅK‹‰feåŸ Œ„ ŒfeŸù9óŽ‘6„ ŒfeŽžfe‰feåŽŽŽ‘t7þŸÊéû„fd6Ž‘SN%Ÿ¤È‰feåŸ Œ„ ŒfeŸù9óŽ‘6„ ŒfeŽžfe‰feåŽŽŽ‘S´ŠŸªf‡„fd6Ž’bÝŸð¥{‰feåŸ Œ„ ŒfeŸù9óŽ‘6„ ŒfeŽžfe‰feåŽŽŽ’ÉBŸöCë„fd6Ž’õßiŸÐ"‰feåŸ Œ„ ŒfeŸù9óŽ‘6„ ŒfeŽžfe‰feåŽŽŽ’öEΟÕÀw„fd6Ž‘<(o ÿf ¬Ž‘2(o ÿk Ž‘+9 ÿn—ŽŽ‘F(o ÿf HŽ‘P(o ÿk HŽ‘W@¥ ÿn—HŽŽ‘W@¥Ÿ#ÆŽ‘M@¥Ÿ†#ÆŽ‘F(oŸ‰¯KŽŽ‘a@¥Ÿ#ÆHŽ‘k@¥Ÿ†#ÆHŽ‘rXÛŸ‰¯KHŽŽ‘a@¥ ÿ}ÎphŽ‘k@¥ ÿyhŽ‘u@¥Ÿ#ÄhŽ‘@¥Ÿ‚ÎnhŽ’‰@¥Ÿ„yhŽ’“@¥Ÿ†#ÂhŽ’@¥Ÿ‡ÎlhŽ’§@¥Ÿ‰yhŽ’±@¥Ÿ‹#ÀhŽ’»@¥ŸŒÎjhŽ’Å@¥ŸŽyhŽ’Ï@¥Ÿ#¾hŽ’Ù@¥Ÿ‘ÎhhŽ’ã@¥Ÿ“yhŽ’í@¥Ÿ•#¼hŽ’÷@¥Ÿ–ÎfhŽ’ùÑ韗;ŸhŽŽ’’ÜOŸ¼¿pŽ’ˆÜOŸÁ¿pŽ’ÄŸÅJõŽŽ’œÜOŸ¼¿pHŽ’¦ÜOŸÁ¿pHŽ’­ô…ŸÅJõHŽŽ‘rXÛŸœ;üŽ‘hXÛŸ¡;üŽ‘a@¥Ÿ¤ÇŽŽ‘|XÛŸœ;üHŽ’†XÛŸ¡;üHŽ’qŸ¤ÇHŽŽ’ùÑ韬}¶Ž’ïÑ韱}¶Ž’è¹³Ÿµ ;ŽŽ’Ñ韬}¶HŽ’ Ñ韱}¶HŽ’êŸµ ;HŽŽ’Ñ韩(`hŽ’ ÑéŸªÓ hŽ’Ñ韬}´hŽ’!Ñ韮(^hŽ’+Ñ韯ÓhŽ’5Ñ韱}²hŽ’?Ñ音(\hŽ’IÑ韴ÓhŽ’SÑ韶}°hŽ’]Ñ韸(ZhŽ’gÑ韹ÓhŽ’qÑ韻}®hŽ’{Ñ韽(XhŽ’…Ñ韾ÓhŽ’ÑéŸÀ}¬hŽ’™ÑéŸÂ(VhŽ’œc-ŸÂ•hŽŽ’5m“Ÿè`Ž’+m“Ÿí`Ž’$U]Ÿð¤åŽŽ’?m“Ÿè`HŽ’Im“Ÿí`HŽ’P…ÉŸð¤åHŽŽ’êŸÇ•쎒 êŸÌ•쎒ÑéŸÐ!qŽŽ’êŸÇ•ìHŽ’(êŸÌ•ìHŽ’0UŸÐ!qHŽŽ ÿv¸ˆ‘$ ÌÛin¬rtŽŽŽŽ ÿX곑C8qaŽŽŽŽ ÿv¸ˆ‘a@¥bŽŽŽŽŸ¤È’5ycŽŽŽŽŸ”†]‘?$in¬rtŽŽŽŽŸ¿àM’áµFin¬rtŽŽŽŽŸ‘о‘wû[‘ê¨]ŽŽŽŽŸ²T2’—£o[‘ê¨]ŽŽŽŽŸ½*®’¦“[]ŽŽŽŽŸÝ®"’:4³[‘ê¨]ŽŽŽŽŽŽŽŽŸ‘=²Figure–UU9.6:‘qÇT‘ÿ*ªree“pattern“of“the“declaration“Ðint“a(int“b[“][“]µ:–ª¨:“:Ž› ª§Ð,“int“c[“][“]µ:–ª¨:“:Ž˜Ð,µ:–ª¨:“:Ž˜Ð);ŽŽŽŽŽŒ‹R®O ÀÙ ýÚÇ‘ÛÝq²82’ÆGšÍCHAPTER–UU9.‘ÇINTERNAL“REPRESENT–ÿ*ªA“TION–UUOF“TYPESŽŽ ÐÙ¸ ýK7‘êÝqÐIn–¼xthe“folloš¸ãwing“ gures,‘Û there“a˜re“some“internal“rep˜resentations“of“C-language“t˜ypGes“( g.“9.7,–Û 9.8,“9.9,“9.10,“9.11).ޤ ‘ÛÝqThe–cËrest“of“this“chapter“describšGes“considerations“ab˜out“di erent“language“constructions“that“aš¸ãre“using“internal‘™˜‰ffŽ‘™št˜ypGeŽ¡‘ÛÝqstructures,–UUbut“aš¸ãre“no“necessa˜ry“fully“implemented.Ž©è•‘ÛÝqà9.2.1Ž‘qIn• ternal›€represen“tation˜of˜ât¬rypSŽedefŽŸªª‘ÛÝqÐThe–â;tš¸ãypGedef“t˜ypGe“has“the“function‘™˜‰ffŽ‘™šclass“Ìtyp–ÿ}'e“defÐ.‘zWhere–â;the“t˜ypGedef“is“used“t˜ypically“only“the“pa˜rt“where“the“ rstŽ¡‘ÛÝqoutput–UUpGoints“is“takš¸ãen“and“this“is“the“internal“t˜ypGe“de nition“of“the“t˜ypGedef“(see“ g.“9.7).ަ‘ÛÝqà9.2.2Ž‘qIn• ternal›€represen“tation˜of˜p`oin“terŽŸªª‘ÛÝqÐThe–N÷pšGointer“t¸ãyp˜e“has“the“function‘™˜‰ffŽ‘™šclass“Ìp‘ÿ}'ointerÐ.‘o¨The“level“of“indirection“is“equal“to“the“numb˜er“of“the“internal‘™˜‰ffŽ‘™št¸ãyp˜eŽ¡‘ÛÝqstructures–UU(see“ g.“9.8).ަ‘ÛÝqà9.2.3Ž‘qIn• ternal›€represen“tation˜of˜en“umerationŽŸªª‘ÛÝqÐThe–™þenumeration“tš¸ãypGe“has“the“function‘™˜‰ffŽ‘™šclass“Ìenumer‘ÿ}'ationÐ.‘?ÂThe“t˜ypšGe“of“enumeration“memb˜ers“a¸ãre“integer“(seeŽ¡‘ÛÝq g.‘UU9.9).ަ‘ÛÝqà9.2.4Ž‘qIn• ternal›€represen“tation˜of˜structureŽŸªª‘ÛÝqÐThe– structure“tš¸ãypGe“has“the“function‘™˜‰ffŽ‘™šclass“Ìstructur‘ÿ}'eÐ.‘îáThe“t˜ypGe“of“structure“ elds“is“the“same“as“fo˜r“simple“va˜riablesŽ¡‘ÛÝqo•¸ãr›UUa“rra“ys˜(see˜ g.˜9.10).ަ‘ÛÝqà9.2.5Ž‘qIn• ternal›€represen“tation˜of˜âunionŽŸªª‘ÛÝqÐThe–UUunion“tš¸ãypGe“has“the“function‘™˜‰ffŽ‘™šclass“ÌunionÐ.‘qÇEach“ eld“of“the“has“its“o˜wn“subt˜ypGe“(see“ g.“9.11).ŽŸ!‘ÛÝqç9.3Ž‘ÃÔCošs3ding–ffof“C-language“subset“of“tŒÌyp˜e“and“exp˜ort“tŒÌyp˜eŽŸ8ä‘ÛÝqÎNote:‘qÇÐnot–UUimplemented“y¸ãet.Ž¡‘ÛÝqThere–›íis“a“bit“foš¸ãr“input“and“a“bit“fo˜r“output.‘3úThe“bGoth“bits“indicate“p˜resent“of“input“and“output“structure,‘ÁrespGectively‘ÿ*ª.Ž¡‘ÛÝqThe–ú5 rst“32“bits“after“current“32“bits“is“an“output“membšGer.‘SgThe“structure“memb˜er“domain“indicate“ho¸ãw“many“32-bitŽ¡‘ÛÝqw•¸ão“rds›çEa“re˜reserved˜fo“r˜the˜domain˜info“rmation.‘'—Currently‘ÿ*ª,‘ Ádomain˜info“rmation˜a“re˜2˜32-bit˜w“o“rds˜fo“r˜a“rra“ys˜and˜aŽ¡‘ÛÝq32-bit›NÏw•¸ão“rd˜fo“r˜enumeration˜t“yp•Ge.‘ošThe˜structure˜memb“er˜a•¸ãrit‘™˜‰ffŽ‘™šclass˜de nes˜an˜atoma“ry˜t“yp•Ge.‘ošThe˜structure˜memb“erŽ¡‘ÛÝqexpšGo•¸ãrt‘™˜‰ffŽ‘™št“yp˜e–óáindicates“if“the“t¸ãyp˜e“should“b˜e“exp˜o¸ãrted.‘QKThe“structure“memb˜er“function‘™˜‰ffŽ‘™šclass“has“only“t•¸ãw“o–óáoptions“lo˜calŽ¡‘ÛÝqand–B¯remote,‘Fjnoš¸ãw.‘kThe“structure“membGer“a˜rit˜y“indicates“the“distance“in“numbGer“of“32-bit“w˜o˜rds“to“the“continuing“ofŽ¡‘ÛÝqthe‘UUstructure.Ž¡‘êÝqW•¸ãe›UUp“ropGose˜this˜a“rrangements˜of˜bits:ŽŸi&’€íŸ½³5‰ffšKl¤fdÌͤ™œ„ ff– â$Ÿüfdbit“¡„ ffŽ‘)UY#–UUof“bits‘ÌÍŸ™œ„ ffŽ‘[c–name‘(X/Ÿ™œ„ ffŽŽ©‰ffšKlŸ‰ffšKl¡Ìͤ™œ„ ff–÷yŸüfd0“¡„ ffŽ‘5øè(1)‘p\Ÿ™œ„ ffŽ‘[c–input‘)4¢Ÿ™œ„ ffŽŽ¦‰ffšKl¡Ìͤ™œ„ ff–÷yŸüfd1“¡„ ffŽ‘5øè(1)‘p\Ÿ™œ„ ffŽ‘[c–output‘"û½Ÿ™œ„ ffŽŽ¦‰ffšKl¡Ìͤ™œ„ ff– ÌΟüfd2-4“¡„ ffŽ‘5øè(3)‘p\Ÿ™œ„ ffŽ‘[c–domain‘ ;¼Ÿ™œ„ ffŽŽ¦‰ffšKl¡Ìͤ™œ„ ff– ÌΟüfd5-7“¡„ ffŽ‘5øè(3)‘p\Ÿ™œ„ ffŽ‘[c–memo¸ãry‘™˜‰ffŽ‘™šsize‘ !Ÿ™œ„ ffŽŽ¦‰ffšKl¡Ìͤ™œ„ ff–LΟüfd8-13“¡„ ffŽ‘5øè(6)‘p\Ÿ™œ„ ffŽ‘[c–a¸ãrit‘™˜‰ffŽ‘™šclass‘ÛŸ™œ„ ffŽŽ¦‰ffšKl¡Ìͤ™œ„ ff– wyŸüfd14“¡„ ffŽ‘5øè(1)‘p\Ÿ™œ„ ffŽ‘[c–expšGo•¸ãrt‘™˜‰ffŽ‘™št“yp˜e‘®Ÿ™œ„ ffŽŽ¦‰ffšKl¡Ìͤ™œ„ ff–ÌÍŸüfd15-19“¡„ ffŽ‘5øè(5)‘p\Ÿ™œ„ ffŽ‘[c–function‘™˜‰ffŽ‘™šclass‘ÌÍŸ™œ„ ffŽŽ¦‰ffšKl¡Ìͤ™œ„ ff–ÌÍŸüfd20-29“¡„ ffŽ‘3xç(10)‘ð[Ÿ™œ„ ffŽ‘[c–a•¸ãrit“y‘,m„Ÿ™œ„ ffŽŽ¦‰ffšKlŸ‰ffšKl¡Ìͤ™œ„ ff–LΟüfd0-29“¡„ ffŽ‘3xç(30)‘ð[Ÿ™œ„ ffŽ‘[c–Ÿøüóú±u cmex10«PŽ’š9Ÿ™œ„ ffŽŽ¦‰ffšKlŽŽŽŸL¡?‘êÝqÐWš¸ãe–UUuse“30“bits“of“each“32“bit“w˜o˜rd.‘qÇ2“bits“a˜re“left“unused.Ž¡‘êÝqExample–¤of“Ïextern–?ýint“a(int“b,“int“c[][10],“....)...–¤Ðis“in“the“ gure“9.12“and“bit“rep¸ãresentation“in“theŽ¡‘ÛÝqfolloš¸ãwing–UUtable“(note“that“Ï[]“Ðis“internally“rep˜resented“as“-2,“i.e.‘qÇ0x fe):ŽŽŽŒ‹S·œ ÀÙ ýÚÇ‘ôž|Í9.3.‘ÇCODING–UUOF“C-LANGUA¸ãGE“SUBSET“OF“TYPE“AND“EXPOR‘ÿ*ªT“TYPE‘z˲83ŽŽ ÐÙ¸ŸôQ ŸÝ€‘‚ ÿS²§„fd0Å.Ž‘‚ ÿl>„fd0Å.Ž‘‚Ÿæ1„fd0Å.Ž‘¯ ÿ;Þ‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’‹óÈŸåÎÿ„yìófeŽŽ’Œ&úŸ„wÕ„fd$ HŽ’Œ&úŸœÚl„fd$ HŽ’Œ&úŸµ=„fd$ HŽ’Œ&úŸÍŸš„fd$ HŽŸù­‘ɺÒOUTPUTŽŽŽŽŸÛ߸’‚ÇwTŽŽŽŽ ÿx†ò’‚ ˆAŽŽŽŽŸ†úB’‚ÇwTŽŽŽŽŸ•m’’‚ÇwTŽŽŽŽŸ£àâ’‚´RŽŽŽŽŸ²T2’„ÁšIŽŽŽŽŸÁ®·’‚ÚîBŽŽŽŽŸÐ"’‚ ˆUŽŽŽŽ ÿNûl’†ÿINPUTŽŽŽŽ ÿg^’…¸!ARITYŽŽŽŽŸ¾ù’“°MemoryŽŽŽŽŸÈè_’™.NSizeŽŽŽŽ ÿÀš’œÎTÅ0ŽŽŽŽŸ˜#1’œÎT0ŽŽŽŽŸ°…È’–¤INTŽŽŽŽŸáJö’’fãNULLŽŽŽŽ’ÈCt ÿ;Þ‰fe1‘øŸ0Å.„0Å.feŸçiŽ‘0Å.„0Å.feŽžfe‰fe1‘øŽŽŽ’ȩ٠ÿS²§„fd0Å.Ž’ùo þüþÇ„fd Ö|Ž’Q ÿ*Û$„.feŽŽ’á p ÿ+V„fd#9Ž’àÙ> ÿ;Þ„AºfeŽ’á p ÿ;Þ¬?ŽŽ ÿN7’ÞO£Ò0ŽŽŽŽ ÿfvÎ’ÞO£3ŽŽŽŽ’k9 ÿ;Þ‰fe1‘øŸ0Å.„0Å.feŸçiŽ‘0Å.„0Å.feŽžfe‰fe1‘øŽŽŽ’Ñž ÿS²§„fd0Å.Ž’B–Ì þüþÇ„fd Ö|Ž’M: ÿ*Û$„.feŽŽ’*45 ÿ+V„fd#9Ž’* ÿ;Þ„AºfeŽ’*45 ÿ;Þ¬?ŽŽ ÿN7’'whÒ0ŽŽŽŽ ÿfvÎ’'wh3ŽŽŽŽ’Ñž þï„fd0Å.Ž’Ñž ÿ Šâ„fd0Å.Ž’v„ þ©†„fd$ HŽ’v„ þÁc„fd$ HŽ’v„ þÙÅ´„fd$ HŽ’ùo þ„­ ¬Ž’ï þz­ Ž’o þp­ Ž’•³ þpyÙŽ’•³ þpyÙ7ŽŽ’—±y ÿ;Þ„b—feŽ’—ä« ÿ;Þ?ŽŽ’°GB þlJuŽ’ºGB þhõ Ž’¿4’ þgQJŽ’¿4’ þgQJ1ŽŽ‘‚ þx;X„fd0Å.Ž‘¯ þ_¥‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’ȩ٠þx;X„fd0Å.Ž’È©Ù þï„fd0Å.Ž’È©Ù ÿ Šâ„fd0Å.Ž’ÕN¿ þ©†„fd$ HŽ’ÕN¿ þÁc„fd$ HŽ’ÕN¿ þÙÅ´„fd$ HŽ’ÕN¿ þò(K„fd$ HŽ’Ñž þx;X„fd0Å.Ž’CR ÿ W°„yìófeŽŽ’k9 þ_¥‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’v„ þò(K„fd$ HŽ‘‚ þï„fd0Å.Ž‘‚ ÿ Šâ„fd0Å.Ž’‹óÈ ÿ W°„yìófeŽŽ’Œ&ú þ©†„fd$ HŽ’Œ&ú þÁc„fd$ HŽ’Œ&ú þÙÅ´„fd$ HŽ’Œ&ú þò(K„fd$ HŽ’Õ ÿ W°„yìófeŽŽ’ÈCt þ_¥‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’—±y þ_¥„¬øfeŽ’—ä« þ_¥?ŽŽ‘‚ ýŸy¨„fd0Å.Ž‘‚ ý·Ü?„fd0Å.Ž‘‚ þ1É2„fd0Å.Ž‘¯ ý†ã߉fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’‹óÈ þ1–„yìófeŽŽ’Œ&ú ýÐ>Ö„fd$ HŽ’Œ&ú ýè¡m„fd$ HŽ’Œ&ú þ„fd$ HŽ’Œ&ú þf›„fd$ HŽ þ×Ä’$ÒIŽŽŽŽ þ£’ðAŽŽŽŽ þ«‚ó’TŽŽŽŽ þ¹öC’TŽŽŽŽ þÈi“’ŠRŽŽŽŽ þæ7h’*xBŽŽŽŽ ÿ6>‘ɺOUTPUTŽŽŽŽ þs„’†ÿINPUTŽŽŽŽ þ‹æ´’…¸!ARITYŽŽŽŽ þãÉ’“°MemoryŽŽŽŽ þíq’™.NSizeŽŽŽŽ þÕy’—EhClassŽŽŽŽ þË2’˜ó£AritŽŽŽŽ þ²¼›’”µfExp,rortŽŽŽŽ þ¼«â’—ˆTÓyp,reŽŽŽŽ þ¤IK’—EhClassŽŽŽŽ þ˜‹š’1ëF‘ÿz©unctionalŽŽŽŽ þôª¸’ËÈMÒUŽŽŽŽ ÿ W°’Ì)£EŽŽŽŽ þ¼«â’寲0ŽŽŽŽ ÿhi’ÒTŽŽŽŽ ÿ6>’DOUTPUTŽŽŽŽ þôª¸’ðUŽŽŽŽ ÿ W°’QhEŽŽŽŽ þs„’U‰INPUTŽŽŽŽ þ‹æ´’«ARITYŽŽŽŽ þãÉ’%W™°MemoryŽŽŽŽ þíq’+}ØSizeŽŽŽŽ þ¤IK’.íܲ0ŽŽŽŽ þ¼«â’.íÜ0ŽŽŽŽ þÕy’(C1INTŽŽŽŽ þ£’‚ ˆÒAŽŽŽŽ þ«‚ó’‚ÇwTŽŽŽŽ þ¹öC’‚ÇwTŽŽŽŽ þÈi“’‚´RŽŽŽŽ þ×Ä’„ÁšIŽŽŽŽ þæ7h’‚ÚîBŽŽŽŽ þôª¸’‚ ˆUŽŽŽŽ ÿhi’‚ÇwTŽŽŽŽ ÿ W°’ƒÞEŽŽŽŽŸåÎÿ’ƒÞEŽŽŽŽ þ×Ä’Íé_IŽŽŽŽ ÿhi’Ëï’ÈñOUTPUTŽŽŽŽ þ£’ËÈMAŽŽŽŽ þ«‚ó’ËïÖ„fd$ HŽ’Áøò ýè¡m„fd$ HŽ’Áøò þ„fd$ HŽ’Áøò þf›„fd$ HŽ’µT  ÿS²§„fd0Å.Ž’µT  ÿl>„fd0Å.Ž’µT Ÿæ1„fd0Å.Ž’´í§ ÿ;Þ‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’ÁÅÀŸåÎÿ„yìófeŽŽ’ÁøòŸ„wÕ„fd$ HŽ’ÁøòŸœÚl„fd$ HŽ’ÁøòŸµ=„fd$ HŽ’ÁøòŸÍŸš„fd$ HŽ ÿ6>’µ›²ÒOUTPUTŽŽŽŽ þs„’»×÷INPUTŽŽŽŽ þ‹æ´’»ŠARITYŽŽŽŽ þãÉ’ÈÚ°MemoryŽŽŽŽ þíq’ÏFSizeŽŽŽŽ þÕy’Í`ClassŽŽŽŽ þË2’ÎÅ›AritŽŽŽŽ þ²¼›’ʇ^Exp,rortŽŽŽŽ þ¼«â’ÍZ TÓyp,reŽŽŽŽ þ¤IK’Í`ClassŽŽŽŽ þ˜‹š’ÆãF‘ÿz©unctionalŽŽŽŽ þ£’¸r€ÒAŽŽŽŽ þ«‚󒸙oTŽŽŽŽ þ¹öC’¸™oTŽŽŽŽ þÈi“’¸…øRŽŽŽŽ þ×Ä’º“’IŽŽŽŽ þæ7h’¸¬æBŽŽŽŽ þôª¸’¸r€UŽŽŽŽ ÿhi’¸™oTŽŽŽŽ ÿ W°’¸ÓÖEŽŽŽŽŸåÎÿ’¸ÓÖEŽŽŽŽ þEtŽ’µ›²OUTPUTŽŽŽŽ þ'¦¹’¸™oTŽŽŽŽ ýÄMó’¸r€AŽŽŽŽ ýÒÁC’¸™oTŽŽŽŽ ýá4“’¸™oTŽŽŽŽ ýï§ã’¸…øRŽŽŽŽ ýþ3’º“’IŽŽŽŽ þ u¸’¸¬æBŽŽŽŽ þé’¸r€UŽŽŽŽ ýšÂm’»×÷INPUTŽŽŽŽ ý³%’»ŠARITYŽŽŽŽ þ À’ÈÚ°MemoryŽŽŽŽ þ¯`’ÏFSizeŽŽŽŽ þ-÷’È8ÛÅNULLŽŽŽŽ ýüLɒ̂ϺClassŽŽŽŽ ýóD·’Ï5cAritŽŽŽŽ ýãê2’̺üTÎ9yp1ÆeŽŽŽŽ ýÚâ ’Ê›ÎExp1ÆortŽŽŽŽ ýˇ›’Ì‚ÏClassŽŽŽŽ ý‰’ÄÔµF‘ÿj«unctionalŽŽŽŽ ÿÓ§’Å¢ÅDomainŽŽŽŽŸù­’µ›²ÒOUTPUTŽŽŽŽŸÛ߸’¸™oTŽŽŽŽ ÿx†ò’¸r€AŽŽŽŽŸ†úB’¸™oTŽŽŽŽŸ•m’’¸™oTŽŽŽŽŸ£àâ’¸…øRŽŽŽŽŸ²T2’º“’IŽŽŽŽŸÁ®·’¸¬æBŽŽŽŽŸÐ"’¸r€UŽŽŽŽ ÿNûl’»×÷INPUTŽŽŽŽ ÿg^’»ŠARITYŽŽŽŽŸ¾ù’ÈÚ°MemoryŽŽŽŽŸÈè_’ÏFSizeŽŽŽŽ ÿÀš’Ò LÅ0ŽŽŽŽŸ˜#1’Ò L0ŽŽŽŽŸáJö’È8ÛNULLŽŽŽŽŸ°…È’ÇBCHARŽŽŽŽŽŽŽŽŸ‘gh^²Figure–UU9.8:‘qÇInš¸ãternal“represen˜tation“of“Ðcha˜r“**a;ŽŽŽŽŽŒ‹UÙÈ ÀÙ ýÚÇ‘ôž|Í9.3.‘ÇCODING–UUOF“C-LANGUA¸ãGE“SUBSET“OF“TYPE“AND“EXPOR‘ÿ*ªT“TYPE‘z˲85ŽŽ ÐÙ¸ þTŸÝ€’ÔÛ%Ÿ§°è„fd Ö|Ž’ß~oŸÕE„.feŽŽ’¼xŽŸÕÀw„fd#9Ž’¼E\ŸåÎÿ„AºfeŽ’¼xŽŸåÎÿ¬?ŽŽ’£¯’ŸåÎÿ‰fe1‘øŸb—„b—feŸóÎµŽ‘0Å.„b—feŽžfe‰fe1‘øŽŽŽŸøÆX’¹»ÁÒ0ŽŽŽŽ’‹³` ÿü–¬Ž’•³` ÿ§AŽ’š ° ÿkŽ’š ° ÿk1ŽŽ‘Zî2 ÿ"íy„fd0Å.Ž‘Z‡Í ÿ W°‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’¤÷ ÿ"íy„fd0Å.Ž’¤÷ ÿ;P„fd0Å.Ž’¤÷Ÿµ=„fd0Å.Ž’°ºÝ ÿS²§„fd$ HŽ’°ºÝ ÿl>„fd$ HŽ’°ºÝŸ„wÕ„fd$ HŽ’°ºÝŸœÚl„fd$ HŽ‘Zî2 ÿ;P„fd0Å.Ž‘Zî2Ÿµ=„fd0Å.Ž‘g_柵 Ñ„yìófeŽŽ‘g“ ÿS²§„fd$ HŽ‘g“ ÿl>„fd$ HŽ‘g“Ÿ„wÕ„fd$ HŽ‘g“ŸœÚl„fd$ HŽ’°‡«Ÿµ Ñ„yìófeŽŽ’£¯’ ÿ W°‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’6e ÿ;P„fd0Å.Ž’6eŸµ=„fd0Å.Ž’C g ÿS²§„fd$ HŽ’C g ÿl>„fd$ HŽ’C gŸ„wÕ„fd$ HŽ’ê ÿ/_-Ž’%‚ê ÿ%_-Ž’-ê ÿ_-Ž’-)– ÿ+úŽ’-)– ÿ+ú7ŽŽ’6e ÿ"íy„fd0Å.Ž’B×5Ÿµ Ñ„yìófeŽŽ’5ÿ ÿ W°‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’C gŸœÚl„fd$ HŽ’í=¼ ÿ;P„fd0Å.Ž’í=¼Ÿµ=„fd0Å.Ž’ù⢠ÿS²§„fd$ HŽ’ù⢠ÿl>„fd$ HŽ’ù⢟„wÕ„fd$ HŽ’ÔÛ% ÿ/_-Ž’Ü[% ÿ%_-Ž’ãÛ% ÿ_-Ž’äÑ ÿ+úŽ’äÑ ÿ+ú7ŽŽ’í=¼ ÿ"íy„fd0Å.Ž’ù¯pŸµ Ñ„yìófeŽŽ’ì×W ÿ W°‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’ù⢟œÚl„fd$ HŽ’꟧°è„fd Ö|Ž’(¦4ŸÕE„.feŽŽ’ SŸÕÀw„fd#9Ž’m!ŸåÎÿ„AºfeŽ’ SŸåÎÿ?ŽŽ’ì×WŸåÎÿ‰fe1‘øŸb—„b—feŸóÎµŽ‘0Å.„b—feŽžfe‰fe1‘øŽŽŽ’g*¯Ÿ§°è„fd Ö|Ž’qÍùŸÕE„.feŽŽ’NÈŸÕÀw„fd#9Ž’N”æŸåÎÿ„AºfeŽ’NÈŸåÎÿ?ŽŽ’5ÿŸåÎÿ‰fe1‘øŸb—„b—feŸóÎµŽ‘0Å.„b—feŽžfe‰fe1‘øŽŽŽŸÈè_‘[5ØÒOUTPUTŽŽŽŽ ÿ6>‘arINPUTŽŽŽŽ ÿ6˜Õ‘a$?ARITYŽŽŽŽŸŽ3ê‘nt-°MemoryŽŽŽŽŸ˜#1‘tšlSizeŽŽŽŽ ÿÀš‘r±†ClassŽŽŽŽ ÿuÑS‘t_ÁAritŽŽŽŽ ÿ]n¼‘p!„Exp,rortŽŽŽŽ ÿg^‘rô2TÓyp,reŽŽŽŽ ÿNûl‘r±†ClassŽŽŽŽ ÿC=»‘kž F‘ÿz©unctionalŽŽŽŽŸŸ\Ù’§4kÒUŽŽŽŽŸµ Ñ’§•ÁEŽŽŽŽ ÿg^’Á25²0ŽŽŽŽ ÿGÁÄ‘^ ¦ÒAŽŽŽŽ ÿV5‘^3•TŽŽŽŽ ÿd¨d‘^3•TŽŽŽŽ ÿs´‘^ RŽŽŽŽŸ‚v9‘`-¸IŽŽŽŽŸé‰‘^G BŽŽŽŽŸŸ\Ù‘^ ¦UŽŽŽŽŸ«Š‘^3•TŽŽŽŽŸµ Ñ‘^müEŽŽŽŽŸ‚v9’©U}IŽŽŽŽŸ«Š’§[ZTŽŽŽŽŸÈè_’¤]OUTPUTŽŽŽŽ ÿGÁÄ’§4kAŽŽŽŽ ÿV5’§[ZTŽŽŽŽ ÿd¨d’§[ZTŽŽŽŽ ÿs´’§GãRŽŽŽŽŸé‰’§nÑBŽŽŽŽ ÿ6>’ª™âINPUTŽŽŽŽ ÿ6˜Õ’ªLARITYŽŽŽŽŸŽ3ê’·›ò°MemoryŽŽŽŽŸ˜#1’½Â1SizeŽŽŽŽ ÿNûl’Á25²0ŽŽŽŽ ÿÀš’º‡ŠINTŽŽŽŽŸ°…È’³ÔÅDomainŽŽŽŽŸ°…È‘j¬ÈDomainŽŽŽŽŸµ Ñ’9åKÒEŽŽŽŽŸ‚v9’;¥IŽŽŽŽ ÿGÁÄ’9ƒõAŽŽŽŽ ÿV5’9ªäTŽŽŽŽ ÿd¨d’9ªäTŽŽŽŽ ÿs´’9—mRŽŽŽŽŸé‰’9¾[BŽŽŽŽŸ«Š’9ªäTŽŽŽŽŸÈè_’6­'OUTPUTŽŽŽŽŸŸ\Ù’9ƒõUŽŽŽŽ ÿ6>’<élINPUTŽŽŽŽ ÿ6˜Õ’<›ŽARITYŽŽŽŽŸŽ3ê’Ië|°MemoryŽŽŽŽŸ˜#1’P»SizeŽŽŽŽ ÿNûl’S¿²0ŽŽŽŽ ÿg^’S¿0ŽŽŽŽ ÿÀš’L×INTŽŽŽŽŸ°…È’F$ÅDomainŽŽŽŽŸµ Ñ’ð½†ÒEŽŽŽŽŸ‚v9’ò}BIŽŽŽŽ ÿGÁÄ’ð\0AŽŽŽŽ ÿV5’ðƒTŽŽŽŽ ÿd¨d’ðƒTŽŽŽŽ ÿs´’ðo¨RŽŽŽŽŸé‰’ð––BŽŽŽŽŸ«Š’ðƒTŽŽŽŽŸÈè_’í…bOUTPUTŽŽŽŽŸŸ\Ù’ð\0UŽŽŽŽ ÿ6>’óÁ§INPUTŽŽŽŽ ÿ6˜Õ’ósÉARITYŽŽŽŽŸŽ3ê’÷°MemoryŽŽŽŽŸ˜#1’éöSizeŽŽŽŽ ÿNûl’ Yú²0ŽŽŽŽ ÿg^’ Yú0ŽŽŽŽ ÿÀš’¯OINTŽŽŽŽŸ°…È’üüRÅDomainŽŽŽŽŸøÆX’ã†Ò1ŽŽŽŽŸøÆX’L K2ŽŽŽŽŽŽŽŽŸ‘Rpƒ²Figure–UU9.9:‘qÇInš¸ãternal“represen˜tation“of“Ðenum“num“¸f“Ðone,“t˜w˜o,“three“¸gÐ;ŽŽŽ K¢ŸÝ€’‘ž ÿGÁĬŽ’›ž ÿDloŽ’  î ÿBÈ™Ž’  î ÿBÈ™1ŽŽ‘`Yp ÿS²§„fd0Å.Ž‘_ó  ÿ;Þ‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’©5 ÿS²§„fd0Å.Ž’©5 ÿl>„fd0Å.Ž’©5Ÿæ1„fd0Å.Ž’¶&Ÿ„wÕ„fd$ HŽ’¶&ŸœÚl„fd$ HŽ’¶&Ÿµ=„fd$ HŽ’¶&ŸÍŸš„fd$ HŽ‘`Yp ÿl>„fd0Å.Ž‘`YpŸæ1„fd0Å.Ž‘lË$ŸåÎÿ„yìófeŽŽ‘lþVŸ„wÕ„fd$ HŽ‘lþVŸœÚl„fd$ HŽ‘lþVŸµ=„fd$ HŽ‘lþVŸÍŸš„fd$ HŽ’µòéŸåÎÿ„yìófeŽŽ’©Рÿ;Þ‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’;п ÿl>„fd0Å.Ž’;пŸæ1„fd0Å.Ž’Hu¥Ÿ„wÕ„fd$ HŽ’Hu¥ŸœÚl„fd$ HŽ’Hu¥Ÿµ=„fd$ HŽ’#n( ÿ`$[Ž’*î( ÿV$[Ž’2n( ÿL$[Ž’2”Ô ÿKñ(Ž’2”Ô ÿKñ(7ŽŽ’;п ÿS²§„fd0Å.Ž’HBsŸåÎÿ„yìófeŽŽ’;jZ ÿ;Þ‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’Hu¥ŸÍŸš„fd$ HŽ’ò¨ú ÿl>„fd0Å.Ž’ò¨úŸæ1„fd0Å.Ž’ÿMàŸ„wÕ„fd$ HŽ’ÿMàŸœÚl„fd$ HŽ’ÿMàŸµ=„fd$ HŽ’ÚFc ÿ`$[Ž’áÆc ÿV$[Ž’éFc ÿL$[Ž’ém ÿKñ(Ž’ém ÿKñ(7ŽŽ’ò¨ú ÿS²§„fd0Å.Ž’ÿ®ŸåÎÿ„yìófeŽŽ’òB• ÿ;Þ‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’ÿMàŸÍŸš„fd$ HŽŸù­‘`¡ÒOUTPUTŽŽŽŽ ÿNûl‘fÝ[INPUTŽŽŽŽ ÿg^‘f}ARITYŽŽŽŽŸ¾ù‘sßk°MemoryŽŽŽŽŸÈè_‘zªSizeŽŽŽŽŸ°…È‘xÄClassŽŽŽŽŸ¦–‘yÊÿAritŽŽŽŽŸŽ3ê‘uŒÂExp,rortŽŽŽŽŸ˜#1‘x_pTÓyp,reŽŽŽŽ ÿÀš‘xÄClassŽŽŽŽ ÿté‘q GF‘ÿz©unctionalŽŽŽŽŸÐ"’¬Ÿ©ÒUŽŽŽŽŸåÎÿ’­ÿEŽŽŽŽŸ˜#1’Æs²0ŽŽŽŽ ÿx†ò‘cwäÒAŽŽŽŽŸ†úB‘cžÓTŽŽŽŽŸ•m’‘cžÓTŽŽŽŽŸ£àâ‘c‹\RŽŽŽŽŸ³;g‘e˜öIŽŽŽŽŸÁ®·‘c²JBŽŽŽŽŸÐ"‘cwäUŽŽŽŽŸÛ߸‘cžÓTŽŽŽŽŸåÎÿ‘cÙ:EŽŽŽŽŸ³;g’®À»IŽŽŽŽŸÛ߸’¬Æ˜TŽŽŽŽŸù­’©ÈÛOUTPUTŽŽŽŽ ÿx†ò’¬Ÿ©AŽŽŽŽŸ†úB’¬Æ˜TŽŽŽŽŸ•m’’¬Æ˜TŽŽŽŽŸ£àâ’¬³!RŽŽŽŽŸÁ®·’¬ÚBŽŽŽŽ ÿNûl’° INPUTŽŽŽŽ ÿg^’¯·BARITYŽŽŽŽŸ¾ù’½0°MemoryŽŽŽŽŸÈè_’Ã-oSizeŽŽŽŽ ÿÀš’Æs²0ŽŽŽŽŸ°…È’¿òÈINTŽŽŽŽŸáJö’¹?ËÅDomainŽŽŽŽŸáJö‘pDomainŽŽŽŽŸåÎÿ’?P‰ÒEŽŽŽŽŸ³;g’AEIŽŽŽŽ ÿx†ò’>ï3AŽŽŽŽŸ†úB’?"TŽŽŽŽŸ•m’’?"TŽŽŽŽŸ£àâ’?«RŽŽŽŽŸÁ®·’?)™BŽŽŽŽŸÛ߸’?"TŽŽŽŽŸù­’<eOUTPUTŽŽŽŽŸÐ"’>ï3UŽŽŽŽ ÿNûl’BTªINPUTŽŽŽŽ ÿg^’BÌARITYŽŽŽŽŸ¾ù’OVº°MemoryŽŽŽŽŸÈè_’U|ùSizeŽŽŽŽ ÿÀš’Xìý²0ŽŽŽŽŸ˜#1’Xìý0ŽŽŽŽŸ°…È’RBRINTŽŽŽŽŸáJö’KUÅDomainŽŽŽŽŸåÎÿ’ö(ÄÒEŽŽŽŽŸ³;g’÷è€IŽŽŽŽ ÿx†ò’õÇnAŽŽŽŽŸ†úB’õî]TŽŽŽŽŸ•m’’õî]TŽŽŽŽŸ£àâ’õÚæRŽŽŽŽŸÁ®·’öÔBŽŽŽŽŸÛ߸’õî]TŽŽŽŽŸù­’òð OUTPUTŽŽŽŽŸÐ"’õÇnUŽŽŽŽ ÿNûl’ù,åINPUTŽŽŽŽ ÿg^’øßARITYŽŽŽŽŸ¾ù’.õ°MemoryŽŽŽŽŸÈè_’ U4SizeŽŽŽŽ ÿÀš’Å8²0ŽŽŽŽŸ˜#1’Å80ŽŽŽŽŸ°…È’ INTŽŽŽŽŸáJö’gÅDomainŽŽŽŽŽŽŽŽŸ‘Sþ½²Figure–UU9.10:‘qÇInš¸ãternal“represen˜tation“of“Ðstruct“a“¸f“Ðint“a,“int“b,“int“c¸gÐ;ŽŽŽŽŽŒ‹VâàÀÙ ýÚÇ‘ÛÝq²86’ÆGšÍCHAPTER–UU9.‘ÇINTERNAL“REPRESENT–ÿ*ªA“TION–UUOF“TYPESŽŽ ÐÙ¸ þ4iŸÝ€‘x]“ ÿGÁĬŽ’‚]“ ÿDloŽ’‡Jã ÿBÈ™Ž’‡Jã ÿBÈ™1ŽŽ‘G˜e ÿS²§„fd0Å.Ž‘G2 ÿ;Þ‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’À* ÿS²§„fd0Å.Ž’À* ÿl>„fd0Å.Ž’À*Ÿæ1„fd0Å.Ž’eŸ„wÕ„fd$ HŽ’eŸœÚl„fd$ HŽ’eŸµ=„fd$ HŽ’eŸÍŸš„fd$ HŽ‘G˜e ÿl>„fd0Å.Ž‘G˜eŸæ1„fd0Å.Ž‘T ŸåÎÿ„yìófeŽŽ‘T=KŸ„wÕ„fd$ HŽ‘T=KŸœÚl„fd$ HŽ‘T=KŸµ=„fd$ HŽ‘T=KŸÍŸš„fd$ HŽ’1ÞŸåÎÿ„yìófeŽŽ’YÅ ÿ;Þ‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’#´ ÿl>„fd0Å.Ž’#´Ÿæ1„fd0Å.Ž’/´šŸ„wÕ„fd$ HŽ’/´šŸœÚl„fd$ HŽ’/´šŸµ=„fd$ HŽ’ ­ ÿ`$[Ž’- ÿV$[Ž’­ ÿL$[Ž’ÓÉ ÿKñ(Ž’ÓÉ ÿKñ(7ŽŽ’#´ ÿS²§„fd0Å.Ž’/hŸåÎÿ„yìófeŽŽ’"©O ÿ;Þ‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’/´šŸÍŸš„fd$ HŽ’Ùçï ÿl>„fd0Å.Ž’ÙçïŸæ1„fd0Å.Ž’æŒÕŸ„wÕ„fd$ HŽ’æŒÕŸœÚl„fd$ HŽ’æŒÕŸµ=„fd$ HŽ’Á…X ÿ`$[Ž’ÉX ÿV$[Ž’Ð…X ÿL$[Ž’Ð¬ ÿKñ(Ž’Ð¬ ÿKñ(7ŽŽ’Ùçï ÿS²§„fd0Å.Ž’æY£ŸåÎÿ„yìófeŽŽ’ÙŠ ÿ;Þ‰fe1‘ø Ã¸„øfeŸžu¤Ž‘0Å.„øfeŽžfe‰fe1‘øŽŽŽ’æŒÕŸÍŸš„fd$ HŽŸù­‘Gà ÒOUTPUTŽŽŽŽ ÿNûl‘NPINPUTŽŽŽŽ ÿg^‘MÎrARITYŽŽŽŽŸ¾ù‘[`°MemoryŽŽŽŽŸÈè_‘aDŸSizeŽŽŽŽŸ°…È‘_[¹ClassŽŽŽŽŸ¦–‘a ôAritŽŽŽŽŸŽ3ê‘\Ë·Exp,rortŽŽŽŽŸ˜#1‘_žeTÓyp,reŽŽŽŽ ÿÀš‘_[¹ClassŽŽŽŽ ÿté‘XH¤Ì΄ff–ÌÍŸþ32°31“¡„ffŽ‘ýßžŸÌ΄ffŽ‘ F¾ŸÌ΄ffŽ‘­ÞŸÌ΄ffŽ‘,þŸÌ΄ffŽ‘;|ŸÌ΄ffŽ‘Jã>ŸÌ΄ffŽ‘Qq24‘ÌÍŸÌ΄ff‘™š„ffŽ‘ožŸÌ΄ffŽ‘~¾ŸÌ΄ffŽ’æÞŸÌ΄ffŽ’MþŸÌ΄ffŽ’¬µŸÌ΄ffŽ’¼>ŸÌ΄ffŽ’Ëƒ^ŸÌ΄ffŽ’Úê~ŸÌ΄ff–™š„ff“„ffŽ’å±15‘ÌÍŸÌ΄ffŽ’ÞŸÌ΄ffŽ’†þŸÌ΄ffŽ’îŸÌ΄ffŽ’/U>ŸÌ΄ffŽ’>¼^ŸÌ΄ffŽ’N#~ŸÌ΄ffŽ’]ŠžŸÌ΄ff‘™š„ffŽ’e½Ñ7‘ÌÍŸÌ΄ffŽ’~XÞŸÌ΄ffŽ’¿þŸÌ΄ffŽ’'ŸÌ΄ffŽ’¬Ž>ŸÌ΄ffŽ’»õ^ŸÌ΄ffŽ’Ë\~ŸÌ΄ffŽ’ѱ0‘ÌÍŸÌ΄ffŽŽ‘ÛÝq¤34‰ffÿ`©32ÌͤÌ΄ff–€]Ÿþ320“¡„ffŽ‘Î@0‘ÌÍŸÌ΄ffŽ‘(5`0‘ÌÍŸÌ΄ffŽ‘7œ€0‘ÌÍŸÌ΄ffŽ‘G 0‘ÌÍŸÌ΄ffŽ‘VjÀ0‘ÌÍŸÌ΄ffŽ‘eÑà0‘ÌÍŸÌ΄ffŽ‘vì0‘€]ŸÌ΄ff‘™š„ffŽ’Š@0‘ÌÍŸÌ΄ffŽ’™n`0‘ÌÍŸÌ΄ffŽ’¨Õ€0‘ÌÍŸÌ΄ffŽ’¸< 0‘ÌÍŸÌ΄ffŽ’Ç£À0‘ÌÍŸÌ΄ffŽ’× à0‘ÌÍŸÌ΄ffŽ’ær0‘ÌÍŸÌ΄ffŽ’õÙ 0‘ÌÍŸÌ΄ff–™š„ff“„ffŽ’ óÐ0‘€]ŸÌ΄ffŽ’€0‘ÌÍŸÌ΄ffŽ’+u 0‘ÌÍŸÌ΄ffŽ’:ÜÀ0‘ÌÍŸÌ΄ffŽ’JCà0‘ÌÍŸÌ΄ffŽ’Y«0‘ÌÍŸÌ΄ffŽ’i 0‘ÌÍŸÌ΄ffŽ’xy@0‘ÌÍŸÌ΄ff‘™š„ffŽ’‰à`0‘ÌÍŸÌ΄ffŽ’™G€0‘ÌÍŸÌ΄ffŽ’¨® 0‘ÌÍŸÌ΄ffŽ’¸À0‘ÌÍŸÌ΄ffŽ’Ç|à0‘ÌÍŸÌ΄ffŽ’Öä0‘ÌÍŸÌ΄ffŽ’æK 1‘ÌÍŸÌ΄ffŽ’õ²@1‘ÌÍŸÌ΄ffŽŽ¡‰ffÿ`¦ÌͤÌ΄ff–€]Ÿþ320“¡„ffŽ‘Î@0‘ÌÍŸÌ΄ffŽ‘(5`0‘ÌÍŸÌ΄ffŽ‘7œ€0‘ÌÍŸÌ΄ffŽ‘G 0‘ÌÍŸÌ΄ffŽ‘VjÀ0‘ÌÍŸÌ΄ffŽ‘eÑà0‘ÌÍŸÌ΄ffŽ‘vì0‘€]ŸÌ΄ff‘™š„ffŽ’Š@0‘ÌÍŸÌ΄ffŽ’™n`0‘ÌÍŸÌ΄ffŽ’¨Õ€0‘ÌÍŸÌ΄ffŽ’¸< 0‘ÌÍŸÌ΄ffŽ’Ç£À0‘ÌÍŸÌ΄ffŽ’× à0‘ÌÍŸÌ΄ffŽ’ær0‘ÌÍŸÌ΄ffŽ’õÙ 0‘ÌÍŸÌ΄ff–™š„ff“„ffŽ’ óÐ1‘€]ŸÌ΄ffŽ’€1‘ÌÍŸÌ΄ffŽ’+u 0‘ÌÍŸÌ΄ffŽ’:ÜÀ0‘ÌÍŸÌ΄ffŽ’JCà0‘ÌÍŸÌ΄ffŽ’Y«0‘ÌÍŸÌ΄ffŽ’i 0‘ÌÍŸÌ΄ffŽ’xy@1‘ÌÍŸÌ΄ff‘™š„ffŽ’‰à`0‘ÌÍŸÌ΄ffŽ’™G€0‘ÌÍŸÌ΄ffŽ’¨® 0‘ÌÍŸÌ΄ffŽ’¸À0‘ÌÍŸÌ΄ffŽ’Ç|à0‘ÌÍŸÌ΄ffŽ’Öä0‘ÌÍŸÌ΄ffŽ’æK 0‘ÌÍŸÌ΄ffŽ’õ²@0‘ÌÍŸÌ΄ffŽŽ¡‰ffÿ`¦ÌͤÌ΄ff–€]Ÿþ320“¡„ffŽ‘Î@0‘ÌÍŸÌ΄ffŽ‘(5`0‘ÌÍŸÌ΄ffŽ‘7œ€0‘ÌÍŸÌ΄ffŽ‘G 0‘ÌÍŸÌ΄ffŽ‘VjÀ0‘ÌÍŸÌ΄ffŽ‘eÑà0‘ÌÍŸÌ΄ffŽ‘vì0‘€]ŸÌ΄ff‘™š„ffŽ’Š@0‘ÌÍŸÌ΄ffŽ’™n`0‘ÌÍŸÌ΄ffŽ’¨Õ€0‘ÌÍŸÌ΄ffŽ’¸< 1‘ÌÍŸÌ΄ffŽ’Ç£À0‘ÌÍŸÌ΄ffŽ’× à0‘ÌÍŸÌ΄ffŽ’ær0‘ÌÍŸÌ΄ffŽ’õÙ 0‘ÌÍŸÌ΄ff–™š„ff“„ffŽ’ óÐ0‘€]ŸÌ΄ffŽ’€0‘ÌÍŸÌ΄ffŽ’+u 0‘ÌÍŸÌ΄ffŽ’:ÜÀ0‘ÌÍŸÌ΄ffŽ’JCà0‘ÌÍŸÌ΄ffŽ’Y«0‘ÌÍŸÌ΄ffŽ’i 0‘ÌÍŸÌ΄ffŽ’xy@1‘ÌÍŸÌ΄ff‘™š„ffŽ’‰à`0‘ÌÍŸÌ΄ffŽ’™G€0‘ÌÍŸÌ΄ffŽ’¨® 0‘ÌÍŸÌ΄ffŽ’¸À0‘ÌÍŸÌ΄ffŽ’Ç|à0‘ÌÍŸÌ΄ffŽ’Öä0‘ÌÍŸÌ΄ffŽ’æK 0‘ÌÍŸÌ΄ffŽ’õ²@0‘ÌÍŸÌ΄ffŽŽ¡‰ffÿ`¦ÌͤÌ΄ff–€]Ÿþ320“¡„ffŽ‘Î@0‘ÌÍŸÌ΄ffŽ‘(5`0‘ÌÍŸÌ΄ffŽ‘7œ€0‘ÌÍŸÌ΄ffŽ‘G 0‘ÌÍŸÌ΄ffŽ‘VjÀ0‘ÌÍŸÌ΄ffŽ‘eÑà0‘ÌÍŸÌ΄ffŽ‘vì0‘€]ŸÌ΄ff‘™š„ffŽ’Š@1‘ÌÍŸÌ΄ffŽ’™n`0‘ÌÍŸÌ΄ffŽ’¨Õ€0‘ÌÍŸÌ΄ffŽ’¸< 0‘ÌÍŸÌ΄ffŽ’Ç£À0‘ÌÍŸÌ΄ffŽ’× à0‘ÌÍŸÌ΄ffŽ’ær0‘ÌÍŸÌ΄ffŽ’õÙ 0‘ÌÍŸÌ΄ff–™š„ff“„ffŽ’ óÐ0‘€]ŸÌ΄ffŽ’€0‘ÌÍŸÌ΄ffŽ’+u 0‘ÌÍŸÌ΄ffŽ’:ÜÀ0‘ÌÍŸÌ΄ffŽ’JCà0‘ÌÍŸÌ΄ffŽ’Y«0‘ÌÍŸÌ΄ffŽ’i 0‘ÌÍŸÌ΄ffŽ’xy@0‘ÌÍŸÌ΄ff‘™š„ffŽ’‰à`0‘ÌÍŸÌ΄ffŽ’™G€0‘ÌÍŸÌ΄ffŽ’¨® 0‘ÌÍŸÌ΄ffŽ’¸À0‘ÌÍŸÌ΄ffŽ’Ç|à0‘ÌÍŸÌ΄ffŽ’Öä0‘ÌÍŸÌ΄ffŽ’æK 1‘ÌÍŸÌ΄ffŽ’õ²@1‘ÌÍŸÌ΄ffŽŽ¡‰ffÿ`¦ÌͤÌ΄ff–€]Ÿþ320“¡„ffŽ‘Î@0‘ÌÍŸÌ΄ffŽ‘(5`0‘ÌÍŸÌ΄ffŽ‘7œ€0‘ÌÍŸÌ΄ffŽ‘G 0‘ÌÍŸÌ΄ffŽ‘VjÀ0‘ÌÍŸÌ΄ffŽ‘eÑà0‘ÌÍŸÌ΄ffŽ‘vì0‘€]ŸÌ΄ff‘™š„ffŽ’Š@0‘ÌÍŸÌ΄ffŽ’™n`0‘ÌÍŸÌ΄ffŽ’¨Õ€0‘ÌÍŸÌ΄ffŽ’¸< 0‘ÌÍŸÌ΄ffŽ’Ç£À0‘ÌÍŸÌ΄ffŽ’× à0‘ÌÍŸÌ΄ffŽ’ær0‘ÌÍŸÌ΄ffŽ’õÙ 0‘ÌÍŸÌ΄ff–™š„ff“„ffŽ’ óÐ0‘€]ŸÌ΄ffŽ’€0‘ÌÍŸÌ΄ffŽ’+u 0‘ÌÍŸÌ΄ffŽ’:ÜÀ0‘ÌÍŸÌ΄ffŽ’JCà0‘ÌÍŸÌ΄ffŽ’Y«0‘ÌÍŸÌ΄ffŽ’i 0‘ÌÍŸÌ΄ffŽ’xy@1‘ÌÍŸÌ΄ff‘™š„ffŽ’‰à`0‘ÌÍŸÌ΄ffŽ’™G€0‘ÌÍŸÌ΄ffŽ’¨® 0‘ÌÍŸÌ΄ffŽ’¸À0‘ÌÍŸÌ΄ffŽ’Ç|à0‘ÌÍŸÌ΄ffŽ’Öä0‘ÌÍŸÌ΄ffŽ’æK 0‘ÌÍŸÌ΄ffŽ’õ²@0‘ÌÍŸÌ΄ffŽŽ¡‰ffÿ`¦ÌͤÌ΄ff–€]Ÿþ320“¡„ffŽ‘Î@0‘ÌÍŸÌ΄ffŽ‘(5`0‘ÌÍŸÌ΄ffŽ‘7œ€0‘ÌÍŸÌ΄ffŽ‘G 0‘ÌÍŸÌ΄ffŽ‘VjÀ0‘ÌÍŸÌ΄ffŽ‘eÑà0‘ÌÍŸÌ΄ffŽ‘vì0‘€]ŸÌ΄ff‘™š„ffŽ’Š@0‘ÌÍŸÌ΄ffŽ’™n`0‘ÌÍŸÌ΄ffŽ’¨Õ€1‘ÌÍŸÌ΄ffŽ’¸< 1‘ÌÍŸÌ΄ffŽ’Ç£À0‘ÌÍŸÌ΄ffŽ’× à0‘ÌÍŸÌ΄ffŽ’ær0‘ÌÍŸÌ΄ffŽ’õÙ 0‘ÌÍŸÌ΄ff–™š„ff“„ffŽ’ óÐ0‘€]ŸÌ΄ffŽ’€0‘ÌÍŸÌ΄ffŽ’+u 0‘ÌÍŸÌ΄ffŽ’:ÜÀ0‘ÌÍŸÌ΄ffŽ’JCà0‘ÌÍŸÌ΄ffŽ’Y«0‘ÌÍŸÌ΄ffŽ’i 0‘ÌÍŸÌ΄ffŽ’xy@1‘ÌÍŸÌ΄ff‘™š„ffŽ’‰à`0‘ÌÍŸÌ΄ffŽ’™G€0‘ÌÍŸÌ΄ffŽ’¨® 0‘ÌÍŸÌ΄ffŽ’¸À0‘ÌÍŸÌ΄ffŽ’Ç|à1‘ÌÍŸÌ΄ffŽ’Öä0‘ÌÍŸÌ΄ffŽ’æK 0‘ÌÍŸÌ΄ffŽ’õ²@0‘ÌÍŸÌ΄ffŽŽ¡‰ffÿ`¦ÌͤÌ΄ff–€]Ÿþ320“¡„ffŽ‘Î@0‘ÌÍŸÌ΄ffŽ‘(5`0‘ÌÍŸÌ΄ffŽ‘7œ€0‘ÌÍŸÌ΄ffŽ‘G 0‘ÌÍŸÌ΄ffŽ‘VjÀ0‘ÌÍŸÌ΄ffŽ‘eÑà0‘ÌÍŸÌ΄ffŽ‘vì0‘€]ŸÌ΄ff‘™š„ffŽ’Š@0‘ÌÍŸÌ΄ffŽ’™n`0‘ÌÍŸÌ΄ffŽ’¨Õ€0‘ÌÍŸÌ΄ffŽ’¸< 0‘ÌÍŸÌ΄ffŽ’Ç£À0‘ÌÍŸÌ΄ffŽ’× à0‘ÌÍŸÌ΄ffŽ’ær0‘ÌÍŸÌ΄ffŽ’õÙ 0‘ÌÍŸÌ΄ff–™š„ff“„ffŽ’ óÐ0‘€]ŸÌ΄ffŽ’€0‘ÌÍŸÌ΄ffŽ’+u 0‘ÌÍŸÌ΄ffŽ’:ÜÀ0‘ÌÍŸÌ΄ffŽ’JCà0‘ÌÍŸÌ΄ffŽ’Y«0‘ÌÍŸÌ΄ffŽ’i 0‘ÌÍŸÌ΄ffŽ’xy@0‘ÌÍŸÌ΄ff‘™š„ffŽ’‰à`0‘ÌÍŸÌ΄ffŽ’™G€0‘ÌÍŸÌ΄ffŽ’¨® 0‘ÌÍŸÌ΄ffŽ’¸À0‘ÌÍŸÌ΄ffŽ’Ç|à0‘ÌÍŸÌ΄ffŽ’Öä0‘ÌÍŸÌ΄ffŽ’æK 0‘ÌÍŸÌ΄ffŽ’õ²@0‘ÌÍŸÌ΄ffŽŽ¡‰ffÿ`¦ÌͤÌ΄ff–€]Ÿþ321“¡„ffŽ‘Î@1‘ÌÍŸÌ΄ffŽ‘(5`1‘ÌÍŸÌ΄ffŽ‘7œ€1‘ÌÍŸÌ΄ffŽ‘G 1‘ÌÍŸÌ΄ffŽ‘VjÀ1‘ÌÍŸÌ΄ffŽ‘eÑà1‘ÌÍŸÌ΄ffŽ‘vì1‘€]ŸÌ΄ff‘™š„ffŽ’Š@1‘ÌÍŸÌ΄ffŽ’™n`1‘ÌÍŸÌ΄ffŽ’¨Õ€1‘ÌÍŸÌ΄ffŽ’¸< 1‘ÌÍŸÌ΄ffŽ’Ç£À1‘ÌÍŸÌ΄ffŽ’× à1‘ÌÍŸÌ΄ffŽ’ær1‘ÌÍŸÌ΄ffŽ’õÙ 1‘ÌÍŸÌ΄ff–™š„ff“„ffŽ’ óÐ1‘€]ŸÌ΄ffŽ’€1‘ÌÍŸÌ΄ffŽ’+u 1‘ÌÍŸÌ΄ffŽ’:ÜÀ1‘ÌÍŸÌ΄ffŽ’JCà1‘ÌÍŸÌ΄ffŽ’Y«1‘ÌÍŸÌ΄ffŽ’i 1‘ÌÍŸÌ΄ffŽ’xy@1‘ÌÍŸÌ΄ff‘™š„ffŽ’‰à`1‘ÌÍŸÌ΄ffŽ’™G€1‘ÌÍŸÌ΄ffŽ’¨® 1‘ÌÍŸÌ΄ffŽ’¸À1‘ÌÍŸÌ΄ffŽ’Ç|à1‘ÌÍŸÌ΄ffŽ’Öä1‘ÌÍŸÌ΄ffŽ’æK 1‘ÌÍŸÌ΄ffŽ’õ²@0‘ÌÍŸÌ΄ffŽŽ¡‰ffÿ`¦ÌͤÌ΄ff–€]Ÿþ320“¡„ffŽ‘Î@0‘ÌÍŸÌ΄ffŽ‘(5`0‘ÌÍŸÌ΄ffŽ‘7œ€0‘ÌÍŸÌ΄ffŽ‘G 0‘ÌÍŸÌ΄ffŽ‘VjÀ0‘ÌÍŸÌ΄ffŽ‘eÑà0‘ÌÍŸÌ΄ffŽ‘vì0‘€]ŸÌ΄ff‘™š„ffŽ’Š@0‘ÌÍŸÌ΄ffŽ’™n`0‘ÌÍŸÌ΄ffŽ’¨Õ€0‘ÌÍŸÌ΄ffŽ’¸< 0‘ÌÍŸÌ΄ffŽ’Ç£À0‘ÌÍŸÌ΄ffŽ’× à0‘ÌÍŸÌ΄ffŽ’ær0‘ÌÍŸÌ΄ffŽ’õÙ 0‘ÌÍŸÌ΄ff–™š„ff“„ffŽ’ óÐ0‘€]ŸÌ΄ffŽ’€0‘ÌÍŸÌ΄ffŽ’+u 0‘ÌÍŸÌ΄ffŽ’:ÜÀ0‘ÌÍŸÌ΄ffŽ’JCà0‘ÌÍŸÌ΄ffŽ’Y«0‘ÌÍŸÌ΄ffŽ’i 0‘ÌÍŸÌ΄ffŽ’xy@1‘ÌÍŸÌ΄ff‘™š„ffŽ’‰à`0‘ÌÍŸÌ΄ffŽ’™G€0‘ÌÍŸÌ΄ffŽ’¨® 0‘ÌÍŸÌ΄ffŽ’¸À0‘ÌÍŸÌ΄ffŽ’Ç|à1‘ÌÍŸÌ΄ffŽ’Öä0‘ÌÍŸÌ΄ffŽ’æK 0‘ÌÍŸÌ΄ffŽ’õ²@0‘ÌÍŸÌ΄ffŽŽ¡‰ffÿ`¦ÌͤÌ΄ff–€]Ÿþ320“¡„ffŽ‘Î@0‘ÌÍŸÌ΄ffŽ‘(5`0‘ÌÍŸÌ΄ffŽ‘7œ€0‘ÌÍŸÌ΄ffŽ‘G 0‘ÌÍŸÌ΄ffŽ‘VjÀ0‘ÌÍŸÌ΄ffŽ‘eÑà0‘ÌÍŸÌ΄ffŽ‘vì0‘€]ŸÌ΄ff‘™š„ffŽ’Š@0‘ÌÍŸÌ΄ffŽ’™n`0‘ÌÍŸÌ΄ffŽ’¨Õ€0‘ÌÍŸÌ΄ffŽ’¸< 0‘ÌÍŸÌ΄ffŽ’Ç£À0‘ÌÍŸÌ΄ffŽ’× à0‘ÌÍŸÌ΄ffŽ’ær0‘ÌÍŸÌ΄ffŽ’õÙ 0‘ÌÍŸÌ΄ff–™š„ff“„ffŽ’ óÐ0‘€]ŸÌ΄ffŽ’€0‘ÌÍŸÌ΄ffŽ’+u 0‘ÌÍŸÌ΄ffŽ’:ÜÀ0‘ÌÍŸÌ΄ffŽ’JCà0‘ÌÍŸÌ΄ffŽ’Y«0‘ÌÍŸÌ΄ffŽ’i 0‘ÌÍŸÌ΄ffŽ’xy@0‘ÌÍŸÌ΄ff‘™š„ffŽ’‰à`0‘ÌÍŸÌ΄ffŽ’™G€0‘ÌÍŸÌ΄ffŽ’¨® 0‘ÌÍŸÌ΄ffŽ’¸À0‘ÌÍŸÌ΄ffŽ’Ç|à0‘ÌÍŸÌ΄ffŽ’Öä0‘ÌÍŸÌ΄ffŽ’æK 0‘ÌÍŸÌ΄ffŽ’õ²@0‘ÌÍŸÌ΄ffŽŽ¡‰ffÿ`¦ÌͤÌ΄ff–€]Ÿþ320“¡„ffŽ‘Î@0‘ÌÍŸÌ΄ffŽ‘(5`0‘ÌÍŸÌ΄ffŽ‘7œ€0‘ÌÍŸÌ΄ffŽ‘G 0‘ÌÍŸÌ΄ffŽ‘VjÀ0‘ÌÍŸÌ΄ffŽ‘eÑà0‘ÌÍŸÌ΄ffŽ‘vì0‘€]ŸÌ΄ff‘™š„ffŽ’Š@0‘ÌÍŸÌ΄ffŽ’™n`0‘ÌÍŸÌ΄ffŽ’¨Õ€0‘ÌÍŸÌ΄ffŽ’¸< 0‘ÌÍŸÌ΄ffŽ’Ç£À0‘ÌÍŸÌ΄ffŽ’× à0‘ÌÍŸÌ΄ffŽ’ær0‘ÌÍŸÌ΄ffŽ’õÙ 0‘ÌÍŸÌ΄ff–™š„ff“„ffŽ’ óÐ0‘€]ŸÌ΄ffŽ’€0‘ÌÍŸÌ΄ffŽ’+u 0‘ÌÍŸÌ΄ffŽ’:ÜÀ0‘ÌÍŸÌ΄ffŽ’JCà0‘ÌÍŸÌ΄ffŽ’Y«0‘ÌÍŸÌ΄ffŽ’i 0‘ÌÍŸÌ΄ffŽ’xy@0‘ÌÍŸÌ΄ff‘™š„ffŽ’‰à`0‘ÌÍŸÌ΄ffŽ’™G€0‘ÌÍŸÌ΄ffŽ’¨® 0‘ÌÍŸÌ΄ffŽ’¸À0‘ÌÍŸÌ΄ffŽ’Ç|à1‘ÌÍŸÌ΄ffŽ’Öä0‘ÌÍŸÌ΄ffŽ’æK 1‘ÌÍŸÌ΄ffŽ’õ²@0‘ÌÍŸÌ΄ffŽŽ¡‰ffÿ`¦ÌÍŸÌ΄ff’ú¯hŸþ32óO Ú\cmmi5³:–::“:Ž’þ²ú„ffŽŽ¡‰ffÿ`ŽŽŽŸBçΑÛÝqç9.4Ž‘ÃÔNotes–ffto“the“implemenšŒÌtation“of“in˜ternal“t˜yps3esŽŸ8ä‘ÛÝqÐEach–•tš¸ãypGe“is“copied“when“it“is“de ned“in“structure,–»†union,“o˜r–•enumeration.‘1±It“is“copied“only“in“one“level“(not“recursive).ޤ ‘ÛÝqThe–ü reason“is“that“the“ eld‘™˜‰ffŽ‘™šname“is“assigned“to“the“tš¸ãypGes“in“aggregate.‘T Each“ eld“has“to“have“its“o˜wn“rep˜resentationŽ¡‘ÛÝqof–UUthe“t¸ãypGe.Ž¡‘êÝqF•¸ão“r–UUdeallošGcation“of“t¸ãyp˜es,“cyclic“de nition“must“b˜e“check¸ãed“to“avoid“endless“lo˜ops.Ž¡‘êÝqPš¸ãointers–šMto“aggregates“should“bGe“the“same.‘@®There“is“only“one“instance“of“each“t˜ypGe.‘@®If“the“simila˜r“aggregate“isŽ¡‘ÛÝqdecla•¸ãred›ÀJmo“re˜than˜once˜it˜is˜considered˜to˜bGe˜not˜compatible.‘@(In˜the˜ gure˜9.13,‘Þit˜is˜a˜real˜example˜of˜the˜follo“wingŽ¡‘ÛÝqstructure‘UUde nition:Ž©‘ÛÝqÏstruct–?ýd“{Ž¡‘æ]kstruct–?ýc“*a;Ž¡‘æ]kstruct–?ýd“*b;Ž¡‘ÛÝq};ަ‘ÛÝqÐwhere–UUthe“c“structure“is:ަ‘ÛÝqÏstruct–?ýc“{Ž¡‘æ]kint‘?ýa;Ž¡‘æ]kint‘?ýb;Ž¡‘ÛÝq};ŽŽŽŒ‹Wû( ÀÙ ýÚÇ‘ôž|Í9.4.‘ÇNOTES–UUTO“THE“IMPLEMENT–ÿ*ªA“TION–UUOF“INTERNAL“TYPES’¡Àw²87ŽŽ ÐÙ¸Ÿ™|Ÿç€’KõŸ„wÕ„fdk>Ž’„„Ÿ·¿p„3zÍfeŽŽ’fé^Ÿ·ò¢„fdÍÕŽ’f¶,ŸÈ*„AºfeŽ’fé^ŸÈ*¬?ŽŽ’PÖŸÈ*‰fe.ÜYŸ60l„60lfeŸäçÊŽ‘.„60lfeŽžfe‰fe.ÜYŽŽŽ’Q<„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ’€›“ þKþ„fd.Ž’€›“ þa§+„fd.Ž’€›“ þÔZv„fd.Ž’€5. þ3dj‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ’Œ& þÔ'D„r³KfeŽŽ’ŒYD þy"„fd"QÞŽ’ŒYD þ¶º„fd"QÞŽ’ŒYD þ¦Jç„fd"QÞŽ’ŒYD þ½ÆI„fd"QÞŽ’—ãàÿ6Ó„”-feŽ’˜õ ÿ6Ó?ŽŽ’Æ&„ þKþ„fd.Ž’Æ&„ þa§+„fd.Ž’Æ&„ þÔZv„fd.Ž’ÅÀ þ3dj‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ’Ñ± þÔ'D„r³KfeŽŽ’Ñä5 þy"„fd"QÞŽ’Ñä5 þ¶º„fd"QÞŽ’Ñä5 þ¦Jç„fd"QÞŽ’Ñä5 þ½ÆI„fd"QÞŽ’ Ê@ þKþ„fd.Ž’ Ê@ þa§+„fd.Ž’ Ê@ þÔZv„fd.Ž’ cÛ þ3dj‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ’T¿ þÔ'D„r³KfeŽŽ’‡ñ þy"„fd"QÞŽ’‡ñ þ¶º„fd"QÞŽ’‡ñ þ¦Jç„fd"QÞŽ’‡ñ þ½ÆI„fd"QÞŽ’PU1 ÿj„fd.Ž’PU1 ÿåg„fd.Ž’PU1ŸŒ˜²„fd.Ž’OîÌ þ뢦‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ’[ß°ŸŒe€„r³KfeŽŽ’\â ÿ0y”„fd"QÞŽ’\â ÿGôö„fd"QÞŽ’\â ÿ^‰#„fd"QÞŽ’\â ÿv…„fd"QÞŽ’”øí ÿj„fd.Ž’”øí ÿåg„fd.Ž’”øíŸŒ˜²„fd.Ž’”’ˆ þ뢦‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ’ ƒlŸŒe€„r³KfeŽŽ’ ¶ž ÿ0y”„fd"QÞŽ’ ¶ž ÿGôö„fd"QÞŽ’ ¶ž ÿ^‰#„fd"QÞŽ’ ¶ž ÿv…„fd"QÞŽ‘ölæ þKþ„fd.Ž‘ölæ þa§+„fd.Ž‘ölæ þÔZv„fd.Ž‘ö þ3dj‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ‘÷e þÔ'D„r³KfeŽŽ‘*— þy"„fd"QÞŽ‘*— þ¶º„fd"QÞŽ‘*— þ¦Jç„fd"QÞŽ‘*— þ½ÆI„fd"QÞŽ‘ölæ ÿåg„fd.Ž‘ölæ ÿ0y”„fd.Ž‘öl柤„fd.Ž‘ö ÿ6Ó‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ‘÷eŸ£àâ„sš€feŽŽ‘*— ÿGôö„fd"QÞŽ‘*— ÿ^‰#„fd"QÞŽ‘*— ÿv…„fd"QÞŽ‘*—ŸŒ˜²„fd"QÞŽ’€›“ ÿåg„fd.Ž’€›“ ÿ0y”„fd.Ž’€›“Ÿ¤„fd.Ž’€5. ÿ6Ó‰fe.ÜY ¸><„¸><feŸ£à⎑.„¸><feŽžfe‰fe.ÜYŽŽŽ’Œ&Ÿ£àâ„sš€feŽŽ’ŒYD ÿGôö„fd"QÞŽ’ŒYD ÿ^‰#„fd"QÞŽ’ŒYD ÿv…„fd"QÞŽ’ŒYDŸŒ˜²„fd"QÞŽ’Ã|Ÿ„wÕ„fdk>Ž’È@ˆŸ·¿p„3zÍfeŽŽ’ª¥åŸ·ò¢„fdÍÕŽ’ªr³ŸÈ*„AºfeŽ’ª¥åŸÈ*?ŽŽ’”’ˆŸÈ*‰fe.ÜYŸ60l„60lfeŸäçÊŽ‘.„60lfeŽžfe‰fe.ÜYŽŽŽ’”øíŸãL’„fd.Ž þm1ª‘>ŠI²AŽŽŽŽ þz½Å‘>­ØTŽŽŽŽ þˆIà‘>­ØTŽŽŽŽ þ–½0‘>œRŽŽŽŽ þ¥0€‘@|IŽŽŽŽ þ²¼›‘>¿žBŽŽŽŽ þÀH¶‘>ŠIUŽŽŽŽ þË2‘>­ØTŽŽŽŽ þÔ'D‘>ã-EŽŽŽŽ þF[ÑB:;INPUTŽŽŽŽ þ\ïð‘AóARITYŽŽŽŽ þ°ü‘M¯h°MemoryŽŽŽŽ þ¹‘SÕ§SizeŽŽŽŽ þŠÿ‘Wu­Å0ŽŽŽŽ þ¢zá‘QKaINTŽŽŽŽ þç‘<ˆs²OUTPUTŽŽŽŽ þç’‚dOUTPUTŽŽŽŽ þm1ª’„:AŽŽŽŽ þz½Å’„8ÉTŽŽŽŽ þˆIà’„8ÉTŽŽŽŽ þ–½0’„'RŽŽŽŽ þ¥0€’†IŽŽŽŽ þ²¼›’„JBŽŽŽŽ þÀH¶’„:UŽŽŽŽ þË2’„8ÉTŽŽŽŽ þÔ'D’„nEŽŽŽŽ þF[Ã’‡Å,INPUTŽŽŽŽ þ\ïð’‡~ARITYŽŽŽŽ þ°ü’’S$°MemoryŽŽŽŽ þ¹’˜ycSizeŽŽŽŽ þЊp’8vDOMAINŽŽŽŽ þ¢zá’–}ClassŽŽŽŽ þ˜‹š’˜>¸AritŽŽŽŽ þ÷m’”{Exp,rortŽŽŽŽ þŠÿ’–Ó)TÓyp,reŽŽŽŽ þç’Æ· ²OUTPUTŽŽŽŽ þm1ª’ȸöAŽŽŽŽ þz½Å’ÈÜ…TŽŽŽŽ þˆIà’ÈÜ…TŽŽŽŽ þ–½0’ÈʾRŽŽŽŽ þ¥0€’ʪ¾IŽŽŽŽ þ²¼›’ÈîKBŽŽŽŽ þÀH¶’ȸöUŽŽŽŽ þË2’ÈÜ…TŽŽŽŽ þÔ'D’ÉÚEŽŽŽŽ þF[Ã’ÌhèINPUTŽŽŽŽ þ\ïð’Ì!ÌARITYŽŽŽŽ þ°ü’×Þ°MemoryŽŽŽŽ þ¹’ÞTSizeŽŽŽŽ þЊp’ÕÃgDOMAINŽŽŽŽ þ¢zá’ÜnClassŽŽŽŽ þ˜‹š’ÝÉ©AritŽŽŽŽ þ÷m’Ù‹lExp,rortŽŽŽŽ þŠÿ’Ü^TÓyp,reŽŽŽŽ þç’ B²OUTPUTŽŽŽŽ þm1ª’CçAŽŽŽŽ þz½Å’gvTŽŽŽŽ þˆIà’gvTŽŽŽŽ þ–½0’U¯RŽŽŽŽ þ¥0€’5¯IŽŽŽŽ þ²¼›’yŽ‘qÈÐis“needed.Ž¡‘ÛÝqÎpQÇoin®9ter‘°¡‰ffs4Ž‘#ÕcastŽŽ‘êpÐcheck–UUfoš¸ãr“pGointer“casts“in“µ<Ž‘ sÐl‘™˜‰ffŽ‘™švalue“µ>Ž‘qÈÐis“needed.‘qÇIssues“app˜rop˜riate“erro˜r“message.Ž¡‘ÛÝqÎarra®9y‘°¡‰ffs4Ž‘#ÕsubscriptŽŽ‘-(ýÐinitialization–UUof“the“dim“vaš¸ãriable“with“subscripts“acco˜rding“to“the“a˜rra˜y“de nition.Ž¡‘ÛÝqÎput‘°¡‰ffs4Ž–#Õarra®9y‘°¡‰ffs4Ž“subscriptŽŽ‘BŒÌÐstoš¸ãre–UUsubscripts“in“internal‘™˜‰ffŽ‘™št˜ypGe“structure.Ž¡‘ÛÝqÎERR‘°¡‰ffs4Ž–#ÕNO‘°¡‰ffs4Ž“INF®9OŽŽŽ¡‘ÛÝqERR•®9OR‘°¡‰ffs4Ž‘#ÕINF“OŽŽŽ¡‘ÛÝqERRš®9OR‘°¡‰ffs4Ž–#ÕFULL‘°¡‰ffs4Ž“INF˜OŽŽ‘MºKÐfoš¸ãrmatting–UUmacros“fo˜r“erro˜r“message.Ž¡‘ÛÝqÎerror‘°¡‰ffs4Ž‘#ÕmessageŽŽ‘&ÅtÐaccoš¸ãrding–UUto“the“numbGer“send,“p˜rint“the“erro˜r“message.Ž¡‘ÛÝqÎprin®9t‘°¡‰ffs4Ž–#Õ le‘°¡‰ffs4Ž“nameŽŽŽ¡‘ÛÝqprin®9t‘°¡‰ffs4Ž–#Õsource‘°¡‰ffs4Ž“lineŽŽŽ¡‘ÛÝqprinš®9t‘°¡‰ffs4Ž–#Õerror‘°¡‰ffs4Ž“n˜um˜bQÇerŽŽŽ¡‘ÛÝqprinš®9t‘°¡‰ffs4Ž–#Õline‘°¡‰ffs4Ž“n˜um˜bQÇerŽŽ‘:}åÐfunctions–UUfoš¸ãrmatting“erro˜r“messages.Ž¡‘ÛÝqÎt®9ypQÇe2stringŽŽ‘äÕÐconverts–UUinternal“tš¸ãypGe“to“string“rep˜resentation“fo˜r“erro˜r“messages.Ž¡‘ÛÝqÎt®9ypQÇe‘°¡‰ffs4Ž‘#ÕtransformŽŽ‘,ƒOÐtransfoš¸ãrmation–UUof“t˜ypGe.‘qÇIt“is“used“when“the“intrinsic“(remote)“functions“a˜re“called.Ž¡‘ÛÝqÎadd‘°¡‰ffs4Ž–#Õto‘°¡‰ffs4Ž“spQÇec‘°¡‰ffs4Ž“listŽŽ‘.åþÐcreate–alist“of“spGeci ers“of“function“declaš¸ãration“and/o˜r“de nition“to“the“internal‘™˜‰ffŽ‘™št˜ypGe“structure.Ž© ‘ôÝsThis–UUfunction“is“used“during“structure“de nition“as“w¸ãell.Ž¡‘ÛÝqÎadd‘°¡‰ffs4Ž–#Õto‘°¡‰ffs4Ž“iden®9t‘°¡‰ffs4Ž“listŽŽ‘2ªøÐcreate–UUlist“of“identi ers“during“the“function“declaš¸ãration“and/o˜r“de nition.Ž¡‘ÛÝqÎcompare2treesŽŽ‘)TÐÐcompa•¸ãre›W‹t“w“o˜trees˜fo“r˜equalit“y‘ÿ*ª.‘xiCheck˜if˜the˜de nition˜of˜the˜function˜co“rrespGonds˜with˜its˜p“roto-ަ‘ôÝst¸ãypGe.Ž¡‘ÛÝqÎcop•®9y‘°¡‰ffs4Ž‘#Õt“ypQÇeŽŽ‘4ÅÐcop•¸ãy›ËÇinternal‘™˜‰ffŽ‘™št“ypGe˜structure.‘ÕIt˜is˜used˜during˜function˜decla“ration˜and/o“r˜de nition˜and˜structureަ‘ôÝsde nition.‘`–Wš¸ãe–!Âneed“a“cop˜y“bGecause“the“t˜ypšGe“can“b˜e“slo¸ãwly“added,‘,i.e.‘`–on“one“line“can“b˜e“mo¸ãre“identi ers“suchަ‘ôÝsas–UUsimple“vaš¸ãriables,“a˜rra˜ys,“function“p˜rotot˜ypGes“and“all“of“them“have“slightly“di erent“rep˜resentation.Ž¡‘ÛÝqÎadd‘°¡‰ffs4Ž–#Õsubs‘°¡‰ffs4Ž“to‘°¡‰ffs4Ž“spQÇec‘°¡‰ffs4Ž“listŽŽ‘HãcÐcreate–” internal‘™˜‰ffŽ‘™štš¸ãypGe“fo˜r“function“decla˜ration“if“only“t˜ypšGe“sp˜eci er“and“range“of“a•¸ãrra“y‘” w“ereަ‘ôÝsin–UUthe“function“p•¸ãrotot“ypGe.Ž¡‘ÛÝqÎclear‘°¡‰ffs4Ž–#Õinš®9ternal‘°¡‰ffs4Ž“t˜ypQÇeŽŽ‘>*SÐcleaš¸ãr–UUinternal“t˜ypGe.Ž¡‘ÛÝqÎsearc®9h‘°¡‰ffs4Ž–#Õduplicate‘°¡‰ffs4Ž“labQÇelsŽŽ‘RóáÐafter–UUeach“new“labGel“declaš¸ãration“w˜e“need“to“check“fo˜r“duplication.Ž¡‘ÛÝqÎadd‘°¡‰ffs4Ž–#Õconstan®9t‘°¡‰ffs4Ž“to‘°¡‰ffs4Ž“listŽŽ‘C©ƒÐcreate–UUlist“of“constants“of“switch.Ž¡‘ÛÝqÎadd‘°¡‰ffs4Ž–#Õdefault‘°¡‰ffs4Ž“to‘°¡‰ffs4Ž“ xpŽŽ‘?Š˜Ðthe–UUsame“as“abšGove“but“fo¸ãr“default“lab˜el;“check“fo¸ãr“only“one“default.Ž¡‘ÛÝqÎfunc‘°¡‰ffs4Ž–#Õdef‘°¡‰ffs4Ž“sŽŽ‘AÙÐF•¸ãunctions›UUfo“r˜setting˜and˜resetting˜of˜the˜ ag˜of˜function˜de nition˜o“r˜decla“ration˜context.Ž¡‘ÛÝqÎen®9ter‘°¡‰ffs4Ž‘#ÕscopQÇeŽŽŽ¡‘ÛÝqexit‘°¡‰ffs4Ž‘#ÕscopQÇeŽŽ‘cXÐfunctions–UUchanging“scopšGe“(hash“tables“of“lo˜cals)“up˜on“nesting“level.Ž¡‘ÛÝqÎmo®9v2lv‘ÿ\ralueŽŽŽ¡‘ÛÝqmo•®9v“e2lv‘ÿ\ralueŽŽ‘¸Ðgenerate–UUp¸ãropGer“ÎMO®9V“Ðinstruction.Ž¡‘ÛÝqÎt®9ypQÇe‘°¡‰ffs4Ž‘#ÕcompareŽŽ‘%¢÷Ðcompaš¸ãre–UUif“pGointers“a˜re“compatible.Ž¡‘ÛÝqÎcyclic‘°¡‰ffs4Ž‘#ÕdefŽŽ‘øTÐ nd–UUcycles“in“pGointer“de nitions“and“decla¸ãrations.Ž¡‘ÛÝqÎput2tableŽŽ‘È ÐCombination–UUof“all“hashing“tables.‘qÇChoGose“the“app•¸ãrop“riate–UUone“and“put“the“va¸ãriable“there.ŽŽŽŒ‹[Xé ÀÙ ýÚÇ‘ôž|Í10.3.‘ÇFILE‘UU`CONTR¸ãOL.H'’`+6²91ŽŽ ÐÙ¸ ýK7‘ôž|Îget‘°¡‰ffs4Ž–#Õn®9um‘°¡‰ffs4Ž“argsŽŽ‘< ÁÐNumbGer–Nú§ÐallošGcation–UUof“the“hash“table“of“lo˜cal“va¸ãriables.ަ‘ÛÝqÎallo•QÇcate‘°¡‰ffs4Ž›#Õlo“c‘°¡‰ffs4Ž˜tablesŽŽ‘;wÐallošGcation–gof“table“of“identi ers“of“lo˜cal“va¸ãriables.‘\ÍIt“is“used“each“time“a“new“blo˜ck“is“entered.ަ‘ÛÝqÎclear‘°¡‰ffs4Ž–#Õhash‘°¡‰ffs4Ž“tab‘°¡‰ffs4Ž“declarationŽŽŽ¦‘ÛÝqclear‘°¡‰ffs4Ž–#Õhash‘°¡‰ffs4Ž“tabŽŽŽ¦‘ÛÝqclear‘°¡‰ffs4Ž–#Õhash‘°¡‰ffs4Ž“tab‘°¡‰ffs4Ž“next‘°¡‰ffs4Ž“declarationŽŽŽ¦‘ÛÝqclear‘°¡‰ffs4Ž–#Õhash‘°¡‰ffs4Ž“tab‘°¡‰ffs4Ž“nextŽŽ‘B¾Ðfunctions–§foš¸ãr“initialization“of“di erent“pa˜rts“of“hash“table.‘‚¼These“functions“a˜re“used“afterŽ¡‘ôÝsbloGck–UUis“exited.ަ‘ÛÝqÎpQÇoin®9tŽŽ‘û/Ðreturns–UUthe“address“of“global“vaš¸ãriable“o˜r“null“if“it“is“not“decla˜red.‘qÇIt“p˜rints“an“erro˜r“message“as“w˜ell.ަ‘ÛÝqÎpQÇoin®9t‘°¡‰ffs4Ž‘#ÕcallŽŽ‘JÐIt–UUis“usedަ‘Ýr¸ŽŽŽ‘ ÝsÐto–UU nd“if“the“identi er“has“a“function“t¸ãypGeޤæ8‘Ýr¸ŽŽŽ‘ ÝsÐto–UU x“the“address“(if“the“(foš¸ãrmal)“call“w˜as“done“p˜rio˜r“to“the“de nition“of“the“function)Ž¡‘Ýr¸ŽŽŽ‘ ÝsÐto–UUadd“the“address“to“the“list“of“addresses“where“to“ x“later.ަ‘ÛÝqÎhasŽŽŽŽŽŒ‹_šÍ ÀÙ ýÚÇ‘ôž|Í10.14.‘ÇFILE‘UU`T‘ÿ*ªABLES.C'’f²R²95ŽŽ ÐÙ¸ ýK7‘ôž|ÎputstructŽŽ‘(•ãÐthe–ƒfunctions“aš¸ãre“used“fo˜r“sto˜ring“global“va˜riables“into“the“hash“table.‘ûThe“alloGcation“of“the“memo˜ry“isŽ© ‘ ž~also–UUdone“in“the“functions.ޤ䌑ôž|Îputstruct‘°¡‰ffs4Ž‘#Õb•QÇo“dyŽŽ‘Eö!Ðsets›UUapp•¸ãrop“riate˜va“riables˜that˜the˜function˜w“as˜de ned˜(not˜only˜decla“red).Ž¡‘ôž|ÎloQÇokupŽŽ‘zâÐreturns–UUpGointer“to“the“hash“table“where“the“vaš¸ãriable“is“sto˜red.Ž¡‘ôž|Îhash‘°¡‰ffs4Ž‘#ÕcoQÇdeŽŽ‘+€ÓÐsee‘UU5.2.Ž¡‘ôž|Îhash‘°¡‰ffs4Ž–#ÕcošQÇde‘°¡‰ffs4Ž“lo˜cŽŽ‘>£Ðthe–UUsame“as“abšGove“but“fo¸ãr“lo˜cal“va¸ãriables.Ž¡‘ôž|Îp•QÇoin®9t‘°¡‰ffs4Ž‘#Õlo“cŽŽ‘&T Ðreturns–UUpšGointer“to“the“hash“table“of“lo˜cal“va¸ãriables.Ž¡‘ôž|Îhas‘°¡‰ffs4Ž‘#ÕloQÇcŽŽŽ¡‘ôž|putstruct‘°¡‰ffs4Ž‘#ÕloQÇcŽŽ‘;³Ðfunctions–UUaš¸ãre“used“fo˜r“sto˜ring“loGcal“va˜riables“into“the“hash“table.Ž¡‘ôž|Îlo•QÇokup‘°¡‰ffs4Ž‘#Õlo“cŽŽ‘-þ²Ðreturns–UUpšGointer“to“the“hash“table“where“the“lo˜cal“vaš¸ãriable“is“sto˜red.Ž¡‘ôž|Îadd‘°¡‰ffs4Ž–#ÕspQÇec‘°¡‰ffs4Ž“to‘°¡‰ffs4Ž“hasŽŽ‘HÅ@Ðto–Æñthe“function,‘ãXthe“spšGeci ers“(t¸ãyp˜e“infoš¸ãrmation)“of“pa˜rameters“a˜re“added.‘ÆœIf“the“function“w˜asަ‘ ž~already–UUdeclaš¸ãred“it“ nds“out“if“decla˜ration“and“de nition“(o˜r“t˜w˜o“decla˜rations)“match.Ž¡‘ôž|Îadd‘°¡‰ffs4Ž–#Õiden®9t‘°¡‰ffs4Ž“to‘°¡‰ffs4Ž“hasŽŽ‘LŠ:Ðthe–çinfoš¸ãrmation“in“hash“table“abGout“function“identi ers“of“fo˜rmal“pa˜rameters“is“added.‘'If“theަ‘ ž~function–UUwš¸ãas“already“decla˜red“it“ nds“out“if“decla˜ration“and“de nition“(o˜r“t˜w˜o“decla˜rations)“match.Ž¡‘ôž|Îlink‘°¡‰ffs4Ž‘#ÕfunctionŽŽ‘9ÐuÐsets–UUaddresses“of“remote“functions.Ž¡‘ôž|Îset‘°¡‰ffs4Ž‘#Õv‘ÿ\ralueŽŽ‘%é¹Ðgathers–ÛSinfoš¸ãrmation“fo˜r“checking“sets“of“loGcal“va˜riables“(used“fo˜r“issuing“w˜a˜rnings).‘ÂThe“info˜rmation“isަ‘ ž~checkš¸ãed–UUafter“compilation“of“a“function“and/o˜r“bloGck.Ž¡‘ôž|Î x‘°¡‰ffs4Ž–#Õand‘°¡‰ffs4Ž“clear‘°¡‰ffs4Ž“goto‘°¡‰ffs4Ž“tableŽŽ‘o‹ãÐscans–Zthe“goto“labšGel“table;‘\u x“addresses“of“gotos.‘€This“is“p¸ãro˜cessed“after“the“return“toަ‘ ž~the–UUlevel“zero“of“paš¸ãrsing“(just“bGefo˜re“the“virtual“machine“runs).Ž¡‘ôž|Îhas‘°¡‰ffs4Ž‘#ÕgotoŽŽ‘#ÿÐadds–UUa“labGel“into“the“hash“table“if“it“w¸ãas“not“already“in.‘qÇIt“adds“address“of“the“goto“to“the“list“of“gotos.Ž¡‘ôž|Îhas‘°¡‰ffs4Ž‘#ÕlabQÇelŽŽ‘&;~Ðadds–9‰a“labGel“into“the“hash“table.‘hƒIf“it“wš¸ãas“in,‘?issues“an“erro˜r“message.‘hƒIt“adds“address“of“the“labGel“to“theަ‘ ž~internal‘UUrep¸ãresentation.Ž¡‘ôž|ÎloQÇokup‘°¡‰ffs4Ž–#Õgoto‘°¡‰ffs4Ž“tableŽŽ‘Rf Ðreturns–UUaddress“of“the“hash“table“where“the“labGel“is“sto¸ãred.Ž¡‘ôž|Îhash‘°¡‰ffs4Ž–#ÕcoQÇde‘°¡‰ffs4Ž“gotoŽŽ‘E]„Ðhash–UUfunction“fo¸ãr“goto“labGels.Ž¡‘ôž|Îalign‘°¡‰ffs4Ž‘#ÕmemoryŽŽ‘>Þ¬Ðused–UUfoš¸ãr“alloGcation“of“va˜riables.‘qÇEach“t˜ypšGe“has“to“b˜e“p¸ãrop˜erly“aligned.Ž¡‘ôž|ÎscopQÇe‘°¡‰ffs4Ž–#Õo set‘°¡‰ffs4Ž“getŽŽŽ¡‘ôž|scopQÇe‘°¡‰ffs4Ž–#Õo set‘°¡‰ffs4Ž“setŽŽ‘FJ¬ÐFš¸ãunctions–¿set“and“get“global“o set“(valid“fo˜r“whole“table).‘?«The“functions“a˜re“used“if“nesting“scopGeަ‘ ž~is–UUgreater“than“zero,“i.e.‘qÇat“least“t•¸ãw“o–UUdi erent“bloGcks“exist.Ž¡‘ôž|Îmo•®9v“e‘°¡‰ffs4Ž–#Õo set‘°¡‰ffs4Ž“alignedŽŽ‘ZrÓÐadjusting–UUo sets“accoš¸ãrding“to“size“of“t˜ypGe.Ž¡‘ôž|Îlo•QÇokup‘°¡‰ffs4Ž‘#Õt®9yp“eŽŽ‘5Ò>Ðreturns–UUaddress“of“the“hash“table“where“the“tš¸ãypGe“is“sto˜red.Ž¡‘ôž|Îhas‘°¡‰ffs4Ž‘#Õt®9ypQÇeŽŽŽ¡‘ôž|putstruct‘°¡‰ffs4Ž‘#Õt®9ypQÇeŽŽ‘Bí?Ðpš¸ãroGcess–UUtags“and“t˜ypGe“names.‘qÇInfo˜rmation“is“put“into“the“hash“table.Ž¡‘ôž|Îputstruct‘°¡‰ffs4Ž–#Õt®9ypšQÇe‘°¡‰ffs4Ž“b˜o˜dyŽŽ‘c¢ÒÐalloGcates–UUspace“foš¸ãr“the“t˜ypGe“if“it“is“necessa˜ry‘ÿ*ª.Ž¡‘ôž|Îadd‘°¡‰ffs4Ž–#ÕspšQÇec‘°¡‰ffs4Ž“to‘°¡‰ffs4Ž“t®9yp˜eŽŽ‘NtæÐadds–UUinfoš¸ãrmation“abGout“t˜ypšGe“sp˜eci ers“of“struct,“union“o¸ãr“enum“ elds“to“the“hash“table.Ž¡‘ôž|Îadd‘°¡‰ffs4Ž–#Õidenš®9t‘°¡‰ffs4Ž“to‘°¡‰ffs4Ž“t˜ypQÇeŽŽ‘R9àÐadds–UUidenti ers“of“struct,“union“o¸ãr“enum“ elds“to“the“hash“table.Ž¡‘ôž|ÎalloQÇcate‘°¡‰ffs4Ž‘#Õv‘ÿ\rarŽŽ‘4;ÐalloGcates–UUmemoš¸ãry“fo˜r“global“va˜riable.Ž¡‘ôž|ÎalloQÇcate‘°¡‰ffs4Ž‘#ÕstructŽŽ‘A÷çÐcounts–UUmemo¸ãry“size“of“structures.Ž¡‘ôž|Î nd‘°¡‰ffs4Ž‘#Õmem®9bQÇerŽŽ‘9Â>Ðreturns–òûo set“in“the“currently“paš¸ãrsed“structure“(dereference“of“it“is“pa˜rsed)“o˜r“-1“if“name“is“not“aަ‘ ž~membGer.ŽŽŽŒ‹`¨ ÀÙ ýÚÇ‘ÛÝq²96’0‡¡ÍCHAPTER–UU10.‘ÇFILES“OF“THE“ÐCLIFŽŽ ÐÙ¸ ýK7‘ÛÝqÎo set‘°¡‰ffs4Ž–#Õaggregate‘°¡‰ffs4Ž“mem®9bQÇerŽŽ‘\åNÐjust–UUa“wrappšGer“ab˜ove“the“fo¸ãrmer“function.ޤåö‘ÛÝqÎalloQÇcate‘°¡‰ffs4Ž‘#ÕaggregateŽŽ‘;­–Ðcounts–UUmemo¸ãry“size“of“structures“(calls“alloGcate‘™˜‰ffŽ‘™šstruct)“and“aligns“o sets“of“aggregate“ elds.Ž¡‘ÛÝqÎputstruct‘°¡‰ffs4Ž‘#ÕstaticŽŽ‘/XüÐStatic–UUvaš¸ãriables“a˜re“put“into“tables.Ž¡‘ÛÝqÎen®9ter‘°¡‰ffs4Ž–#Õ le‘°¡‰ffs4Ž“scopQÇeŽŽŽ¡‘ÛÝqexit‘°¡‰ffs4Ž–#Õ le‘°¡‰ffs4Ž“scopQÇeŽŽ‘&aÓÐhave–UUspšGecial“meaning.‘qÇThey“a¸ãre“used“in“ le“scop˜e“static“va¸ãriables.Ž¡‘ÛÝqÎt®9ypQÇedef‘°¡‰ffs4Ž‘#ÕpŽŽ‘ÄÆÐIf–„Ùthe“name“is“declaš¸ãred“as“t˜ypGedef“return“it“as“TYPENAME‘„¤tok˜en“-“true“(1);‘ÊXIDENT‘„¤-“false“(0),‘®‹otherwise.Ž¡‘ÛÝqÎget‘°¡‰ffs4Ž–#Õdeclaration‘°¡‰ffs4Ž“lineŽŽ‘B_¦ÐReturns–UUthe“declaš¸ãration“line“of“a“va˜riable.‘qÇCalled“from“erro˜r‘™˜‰ffŽ‘™šmessage“function.Ž¡‘ÛÝqÎmemory‘°¡‰ffs4Ž‘#ÕsizeŽŽ‘ 8ÐDuring–¦einitialization“of“va•¸ãriables,‘º©w“alk–¦erecursively“doš¸ãwn“the“t˜ypGe“and“set“the“size“of“the“subt˜ypGe“ofŽ© ‘ôÝsan‘UUaggregate.Ž¡‘ÛÝqÎc•®9hec“k‘°¡‰ffs4Ž–#Õinit‘°¡‰ffs4Ž“brac•®9k“etŽŽ‘:´ÿÐThe–ûright“initialization“b•¸ãrack“eting–ûhas“the“same“numbšGer“of“b•¸ãrack“ets–ûas“is“the“numb˜er“ofަ‘ôÝssubt¸ãypšGes.‘qÇThe–UUfunction“checks“the“numb˜er“of“subt¸ãyp˜es.‘qÇThe“return“value“is“in“level“va¸ãriable.Ž¡‘ÛÝqÎget‘°¡‰ffs4Ž–#Õmemory‘°¡‰ffs4Ž“sizeŽŽ‘3¾AÐF•¸ão“r–²the“ rst“initializer“of“the“vaš¸ãriable,‘ÉLthe“numbGer“of“subt˜ypGes“is“evaluated“and“returned“fromަ‘ôÝsthe›/fcheck‘™˜‰ffŽ–™šinit‘™˜‰ffŽ“b•¸ãrack“et˜function.‘e"If˜the˜numbGer˜of˜b“rack“et˜is˜less˜than˜numbGer˜of˜subt“ypGes˜a˜w“a“rning˜is˜p“rinted.ަ‘ôÝsThe–UUreturn“value“is“the“memo¸ãry“size“of“the“aggregate.Ž¡‘ÛÝqÎget‘°¡‰ffs4Ž–#Õ eld‘°¡‰ffs4Ž“sizeŽŽ‘þGÐIt–UUis“called“during“the“vaš¸ãriable“initialization.‘qÇThe“size“of“a“sub-t˜ypGe“of“the“aggregate“is“returned.Ž¡‘ÛÝqÎnoninitialized‘°¡‰ffs4Ž‘#ÕloQÇcŽŽ‘7 ÐIf–UUthe“loGcal“vaš¸ãriable“w˜as“not“initialized“during“decla˜ration,“the“usage“counter“must“bGe“reset.ŽŸ!‚¦‘ÛÝqç10.15Ž‘÷File‘ff`tŒÌyps3e.h'ŽŸ8ä‘ÛÝqÎINTERNAL‘°¡‰ffs4Ž‘#ÕTYPEŽŽ‘CD²Ðmacro–UUfo¸ãr“unfolding“enum“constants.Ž¡‘ÛÝqÎin®9tern‘°¡‰ffs4Ž–#Õarit‘°¡‰ffs4Ž“classŽŽ‘0<ÒÐenumeration–UUtš¸ãypGe“fo˜r“internal“a˜rithmetical“class“(see“9.1).Ž¡‘ÛÝqÎP‘ÿ «ARŽŽ‘ùLÐ ag–UUfoš¸ãr“fo˜rmal“pa˜rameter.Ž¡‘ÛÝqÎV‘þ¸äARŽŽ‘ù™ÚÐ ag–UUfoš¸ãr“loGcal“va˜riable.Ž¡‘ÛÝqÎin®9tern‘°¡‰ffs4Ž–#Õfunc‘°¡‰ffs4Ž“classŽŽ‘3¥µÐenumeration–UUtš¸ãypGe“fo˜r“internal“function“class“(see“9.1).Ž¡‘ÛÝqÎYESŽŽ‘÷€÷Ð ag–UUfoš¸ãr“remote“function“with“expGo˜rted“t˜ypGe“of“pa˜rameters.Ž¡‘ÛÝqÎNOT‘°¡‰ffs4Ž‘#ÕDEFINEDŽŽ‘3ý›Ðnot–Wãde ned“range“foš¸ãr“a˜rra˜ys.‘yrIt“is“used“mainly“fo˜r“fo˜rmal“pa˜rameters.‘yrF˜o˜r“example,‘X‡Ïint‘?ýz(intަ‘ôÝsb[][3][3])Ð,–UUthe“ rst“subscript“of“the“foš¸ãrmal“pa˜rameter“Ïb“Ðhas“unde ned“size.Ž¡‘ÛÝqÎGLOBAL‘°¡‰ffs4Ž‘#ÕTYPEŽŽ‘5(Ðmacro–UUfo¸ãr“unfolding“enum“constants.Ž¡‘ÛÝqÎglobal‘°¡‰ffs4Ž‘#Õt®9ypQÇeŽŽ‘úÐenumeration–UUtš¸ãypGe“fo˜r“t˜ypšGe“ ag“used“in“remote“functions“with“exp˜oš¸ãrt“t˜ypGes.Ž¡‘ÛÝqÎt®9ypQÇe‘°¡‰ffs4Ž‘#ÕqualŽŽ‘rýÐenumeration–UUtš¸ãypGe“fo˜r“t˜ypGe“quali ers.Ž¡‘ÛÝqÎstorage‘°¡‰ffs4Ž–#Õclass‘°¡‰ffs4Ž“spQÇeci erŽŽ‘MoDÐenumeration–UUtš¸ãypGe“fo˜r“sto˜rage“class“spGeci ers.Ž¡‘ÛÝqÎPOINTER‘°¡‰ffs4Ž‘#ÕPŽŽŽ¡‘ÛÝqSTR®9UCT‘°¡‰ffs4Ž‘#ÕPŽŽŽ¡‘ÛÝqUNION‘°¡‰ffs4Ž‘#ÕPŽŽŽ¡‘ÛÝqENUM‘°¡‰ffs4Ž‘#ÕPŽŽŽ¡‘ÛÝqARRA‘ÿ «Y‘°¡‰ffs4Ž‘#ÕPŽŽŽ¡‘ÛÝqSIMPLE‘°¡‰ffs4Ž‘#ÕPŽŽŽ¡‘ÛÝqLOCAL‘°¡‰ffs4Ž‘#ÕPŽŽŽ¡‘ÛÝqREMOTE‘°¡‰ffs4Ž‘#ÕPŽŽ‘ (MÐp•¸ãredicates›UUfo“r˜the˜ eld˜function˜class˜in˜the˜internal˜t“ypGe˜(see˜9.1).ŽŽŽŒ‹aº¤ ÀÙ ýÚÇ‘ôž|Í10.16.‘ÇFILE‘UU`VIR‘ÿ*ªTUAL‘™˜‰ffŽ‘™šMA¸ãCHINE.C'’+Š{²97ŽŽ ÐÙ¸ ýK7‘ôž|ÎST–ÿ «A“TIC‘°¡‰ffs4Ž‘#ÕPŽŽ‘/tÐp•¸ãredicate›UUfo“r˜the˜ eld˜sto“rage˜class˜spGeci er˜in˜the˜internal˜t“ypGe˜(see˜9.1).ޤ‘ôž|ÎV®9OID‘°¡‰ffs4Ž‘#ÕPŽŽŽ¡‘ôž|CHAR‘°¡‰ffs4Ž‘#ÕPŽŽŽ¡‘ôž|SHOR‘ÿ «T‘°¡‰ffs4Ž‘#ÕPŽŽŽ¡‘ôž|INTEGER‘°¡‰ffs4Ž‘#ÕPŽŽŽ¡‘ôž|LONG‘°¡‰ffs4Ž‘#ÕPŽŽŽ¡‘ôž|FLO®9A‘ÿ «T‘°¡‰ffs4Ž‘#ÕPŽŽŽ¡‘ôž|DOUBLE‘°¡‰ffs4Ž‘#ÕPŽŽŽ¡‘ôž|SIGNED‘°¡‰ffs4Ž‘#ÕPŽŽŽ¡‘ôž|UNSIGNED‘°¡‰ffs4Ž‘#ÕPŽŽŽ¡‘ôž|UNUSED‘°¡‰ffs4Ž‘#ÕPŽŽ‘7Ðp•¸ãredicates›UUfo“r˜the˜ eld˜attribute˜a“rit˜class˜in˜the˜internal˜t“ypGe˜(see˜9.1).Ž¡‘ôž|ÎTYPES‘°¡‰ffs4Ž–#ÕEQ‘°¡‰ffs4Ž“PŽŽ‘@tHÐcompaš¸ãres–UUif“subt˜ypGe“of“the“ eld“attribute“a˜rit“class“is“compatible.Ž¡‘ôž|ÎCONST‘°¡‰ffs4Ž‘#ÕPŽŽ‘-ôÐp•¸ãredicate›UUfo“r˜const˜t“ypGe˜quali er.Ž©!Ž8‘ôž|ç10.16Ž‘)¸File‘ff`virtual‘øÒ‰ffÜ+Ž‘ÔýmacŒÌhine.c'ŽŸ8ä‘ôž|ÎexecŽŽ‘WYÐwrappGer–UUto“run“the“virtual“machine.‘qÇIt“checks“if“a“virtual“machine“instruction“w¸ãas“not“interrupted.Ž¡‘ôž|ÎexeŽŽ‘ :éÐall–UUinstructions“of“the“virtual“machine“a¸ãre“coGded“in“this“function.Ž¡‘ôž|ÎvtrueŽŽ‘ŽtÐlogical–UUtrue.‘qÇThe“value“is“stoš¸ãred“on“the“tempGo˜ra˜ry“stack.Ž¡‘ôž|ÎvfalseŽŽ‘Ë=Ðlogical–UUfalse.‘qÇThe“value“is“stoš¸ãred“on“the“tempGo˜ra˜ry“stack.Ž¡‘ôž|Îdiv‘°¡‰ffs4Ž‘#Õy®9esŽŽ‘÷öÐinteger‘UUdivision.Ž¡‘ôž|Îdivd‘°¡‰ffs4Ž‘#Õy®9esŽŽ‘#[‚Ðdouble‘UUdivision.Ž¡‘ôž|Îdivf‘°¡‰ffs4Ž‘#Õy®9esŽŽ‘ {ƒÐ oat‘UUdivision.Ž¡‘ôž|Îdiv•®9c‘°¡‰ffs4Ž‘#Õy“esŽŽ‘!ŸÐcha¸ãr‘UUdivision.Ž¡‘ôž|ÎmoQÇd‘°¡‰ffs4Ž‘#Õy®9esŽŽ‘#[‚ÐmoGdulus.Ž¡‘ôž|Îmo•®9v“e‘°¡‰ffs4Ž›#Õstac“k‘°¡‰ffs4Ž˜alignedŽŽ‘Y+µÐthe›UUtempGo•¸ãra“ry˜stack˜has˜to˜bGe˜alw“a“ys˜aligned.ަ‘ôž|ç10.17Ž‘)¸File‘ff`ys.h'ޤ8ä‘ôž|ÎyyparseŽŽ‘ G¬Ðfunction‘UUp•¸ãrotot“ypGe.ަ‘ôž|ç10.18Ž‘)¸File‘ff`ys.y'Ž¡‘ôž|ÐSome–Yþrules“in“the“grammaš¸ãr“a˜re“not“designed“as“stated“in“[4Ž‘].‘ÁIt“is“pa˜rtially“bGecause“of“one“pass“compiler“design“andޤ ‘ôž|fully–UUinterpš¸ãretative“app˜roach.‘qÇCompilation“of“this“ le“ma˜y“cause“p˜roblems“(see“section“12.1).Ž¡‘ž|The–tbiggest“discrepancies“bGet•¸ãw“een›tStanda“rd˜ANSI–eC“and˜Clif˜implementation˜is˜in˜pa¸ãrameter˜passing˜mechanismŽ¡‘ôž|(see–͉section“5.4).‘ÚcThe“bit- elds“and“p•¸ãrep“roGcessing–͉directives“aš¸ãre“not“y˜et“suppGo˜rted.‘ÚcThe“Clif“has“no“p˜rep˜roGcessingŽ¡‘ôž|option.‘œThis–¯ñstu “will“bšGe“included“as“so˜on“as“p˜ossible.‘œThe“goal“is“convergence“of“the“framew•¸ão“rk–¯ñto“the“Standa¸ãrdŽ¡‘ôž|ANSI–UUC“spGeci cation.ŽŽŽŒ‹bÊœ ÀÙ ýÚÇ‘ÛÝq²98’0‡¡ÍCHAPTER–UU10.‘ÇFILES“OF“THE“ÐCLIFŽŽ ÐÙ¸ŽŒ‹cÕr ÀÙ ýÚÇ ÐÙ¸ ý–7‘ôž|ëWChapter‘Ç 11ŽŸ2‘ôž|ëUSome– T{implemen‘ÿ8õtation“detailsŽŸ:‘ôž|ç11.1Ž‘!žxPŒÌost x–ffopšs3erators“(p˜ost x“incremenšŒÌt“and“decremen˜t)Ž©8ä‘ôž|ÐCompilation–UUof“pGost x“increment“and“decrement“is“based“on“the“follo¸ãwing“observation:ޤ‘ž}¸ŽŽŽ‘ ž~ÐOn–UUthe“top“of“the“a¸ãrithmetic“stack“is“the“address“of“the“opGerand:Ž¡‘Þ€Î{ŽŽŽ‘#ž~ÐIf–UUthe“opGerand“is“an“a•¸ãrra“y‘ÿ*ª,–UU nish“evaluation“of“the“o set.ޤ‘Þ€Î{ŽŽŽ‘#ž~ÐIf–UUthe“opGerand“is“a“structure“o¸ãr“union,“ nish“evaluation“of“the“o set.Ž¡‘Þ€Î{ŽŽŽ‘#ž~ÐIf–UUthe“opšGerand“is“a“p˜ointer,“add“the“size“of“the“object“it“p˜oints“to.ޤ‘ž}¸ŽŽŽ‘ ž~ÐCreate–UUa“copš¸ãy“of“the“value,“which“is“sto˜red“on“the“top“of“the“a˜rithmetic“stack.Ž¡‘ž}¸ŽŽŽ‘ ž~ÐExchange›UUt•¸ãw“o˜addresses˜of˜the˜top˜most˜opGerands˜on˜the˜a“rithmetic˜stack.Ž¡‘ž}¸ŽŽŽ‘ ž~ÐCreate–UUaddress“copš¸ãy“of“the“top“most“opGerand“on“the“a˜rithmetic“stack.Ž¡‘ž}¸ŽŽŽ‘ ž~ÐPush–UUsecond“opGerand“on“the“a¸ãrithmetic“stack.Ž¡‘ž}¸ŽŽŽ‘ ž~ÐAdd›UUt•¸ãw“o˜top˜most˜opGerands.Ž¡‘ž}¸ŽŽŽ‘ ž~ÐMove–UUthe“value“on“the“top“of“the“aš¸ãrithmetic“stack“to“the“top“most“but“last“address“on“the“a˜rithmetic“stack.Ž¡‘ž}¸ŽŽŽ‘ ž~ÐPš¸ãop–UUthe“a˜rithmetic“stack.ŽŸ!Ž8‘ôž|ç11.2Ž‘!žxAggregate‘ffassigningަ‘ôž|ÐIf–`the“right“side“opšGerand“and“the“left“side“op˜erand“aš¸ãre“aggregates“of“the“same“t˜ypGe,‘+"move“a“b˜yte“instructions“a˜reޤ ‘ôž|generated–AVin“the“lošGop.‘5ÉThe“numb˜er“of“move“instructions“is“generated“accoš¸ãrdingly“to“the“memo˜ry“size“which“theŽ¡‘ôž|aggregate‘UUoGccupies.ŽŽŸK’áw­²99ŽŽŒ‹dÕæ ÀÙ ýÚÇ‘ÛÝq²100’Ûd ÍCHAPTER–UU11.‘ÇSOME“IMPLEMENT–ÿ*ªA“TION‘UUDET“AILSŽŽ ÐÙ¸ŽŒ‹eÜ ÀÙ ýÚÇ ÐÙ¸ ý–7‘ôž|ëWChapter‘Ç 12ŽŸ2‘ôž|ëUBug‘ T{rep‘Ç ortŽŸ4‘ôž|ÐIf–UUyš¸ãou“have“found“a“bug“please“repGo˜rt“this“bug“to“autho˜rs“at“the“follo˜wing“e-mail“address:ޤ’¶ ,Îk®9oren@vm.stuba.skŽ¡‘ôž|ÐPlease,–UUinclude“in“yš¸ãour“bug“repGo˜rt:ޤ‘ž}¸ŽŽŽ‘ ž~ÐPlatfoš¸ãrm–UUon“which“the“Clif“w˜as“running,“i.e.‘qÇmachine,“CPU,“opGerating“system.Ž¡‘ž}¸ŽŽŽ‘ ž~ÐV¸ãersion–UUof“the“Clif.Ž¡‘ž}¸ŽŽŽ‘ ž~ÐSource–Ü le“that“caused“the“p•¸ãroblem.‘!]W“e–Üwill“appš¸ãreciate“if“the“source“ le“will“bGe“as“sho˜rt“as“pGossible“and“stillŽ© ‘ ž~consists–UUthe“bug“yš¸ãou“w˜ant“to“repGo˜rt.‘qÇIf“y˜ou“don't“kno˜w“ho˜w“to“isolate“the“bug,“send“it“anyw˜a˜y‘ÿ*ª.Ž¡‘ž}¸ŽŽŽ‘ ž~ÐErroš¸ãr–UUmessage,“if“any‘ÿ*ª,“p˜roGduced“b˜y“the“Clif.Ž¡‘ž}¸ŽŽŽ‘ ž~ÐIndicate–UUif“y¸ãou“did“any“changes“to“the“source“of“the“Clif.Ž¡‘ôž|Wš¸ãe–UUwill“try“to“ x“the“bug“if“it“is“rep˜roGducible“on“platfo˜rms“that“a˜re“accessible“to“us.ŽŸ!Ž8‘ôž|ç12.1Ž‘!žxProblemsŽŸ8ä‘ôž|ÐProblems–ooGccur“sometimes“during“compilation“of“the“paš¸ãrser“(c-pa˜rser.c).‘ This“p˜roblem“is“due“to“the“la˜rge“switchަ‘ôž|statement.‘qÇSometimes–UUhelps“to“spGecify“-O2“optimization“ ag.ŽŽŸK’Þ÷­²101ŽŽŒ‹fÝ ÀÙ ýÚÇ‘ÛÝq²102’F ŒÍCHAPTER–UU12.‘ÇBUG“REPOR‘ÿ*ªTŽŽ ÐÙ¸ŽŒ‹gâ ÀÙ ýÚÇ ÐÙ¸ ý›7‘ôž|ëUBibliograph‘ÿ8õyŽŸ5Vw‘ùž}Ð[1]ŽŽ‘ ešA.–UUV.“Aho“and“S.“C.“Johnson.›nïLR“pa¸ãrsing.˜ÌComputing‘“çSurveysÐ,“6(2),“June“1974.ޤ‘ùž}[2]ŽŽ‘ ešA.–SãV.“Aho,›T-R.“Sethi,˜and“J.“D.“Ullman.‘l”ÌCompilers.–’’Principles,‘’ÖT›ÿ;¼e‘ÿ}'chniques“and“T˜o‘ÿ}'olsÐ.‘l”Addison-W¸ãesley‘ÿ*ª,‘T-1986.Ž¡‘ùž}[3]ŽŽ‘ ešA.–ß$V.“Aho“and“J.“D.“Ullman.‘®FÌThe–'+The›ÿ}'ory“of“Parsing,–<êT‘ÿ;¼r˜anslation,“and‘'+CompilingÐ,–öÇvolume›ß$1,“2.‘®FPrentice˜Hall,Ž© ‘ ešEnglew¸ão•Go“d–UUCli s,“1972,“1973.Ž¡‘ùž}[4]ŽŽ‘ ešANSI.‘°ÌA¾“meric›ÿ}'an–(nNational“Standar˜d“for“Information“Systems“-“Pr˜o˜gr˜amming“L˜anguage“CÐ.‘°ANSI,–à‚Dec.“1989.ަ‘ ešX3.159-1989.Ž¡‘ùž}[5]ŽŽ‘ ešS.›¯Bandy•¸ãopadhy“a“y‘ÿ*ª,‘ÞV.S.˜Begw“ani,‘Þand˜R.B.˜Murra“y‘ÿ*ª.‘´ÍCompiling˜fo“r˜the˜crisp˜p“roGcesso“r.‘´ÍIn˜ÌPr–ÿ}'o“c“e“e“dings–øof“theަ‘ ešIEEE–“çSpring,“COMPCONÐ,–UUpages“96{100,“1987.Ž¡‘ùž}[6]ŽŽ‘ ešA.D.–(/Berenbaum,›\åD.R.“Ditzel,˜and“H.R.“McLellan.›ãGIntroGduction“to“the“crisp“instruction“set“a¸ãrchitecture.˜Inަ‘ ešÌPr–ÿ}'o“c“e“e“dings–“çof“the“IEEE“Spring,“COMPCONÐ,–UUpages“86{90,“1986.Ž¡‘ùž}[7]ŽŽ‘ ešA.D.–aBerenbaum,›JdD.R.“Ditzel,˜and“H.R.“McLellan.›·)Architectural“innovations“in“the“crisp“microp•¸ãroGcesso“r.˜Inަ‘ ešÌPr–ÿ}'o“c“e“e“dings–“çof“the“IEEE“Spring,“COMPCONÐ,–UUpages“91{95,“1987.Ž¡‘ùž}[8]ŽŽ‘ ešJ.J.–UUDonga¸ãrra,“C.B.“Moler,“and“et“al.›nïÌLINP‘ÿ;¼A¾“CK–“çUser's“GuideÐ.˜SIAM,–UUPhiladelphia,“1979.Ž¡‘ùž}[9]ŽŽ‘ ešC.– ×W.“F¸ãraser“and“D.“R.“Hanson.‘ Š‹ÌA› R–ÿ}'etar“getable–±C˜Compiler:‘ ›)Design“and“ImplementationÐ.‘ Š‹Ben-ަ‘ ešjamin/Cummings,–UU1995.‘nïISBN“0-8053-1670-1.Ž¡‘ôž|[10]ŽŽ‘ ešD.‘UUGries.‘nïÌKompil‘úãatory‘Rz›û$ýc‘þúP‘ûé@slic–ÿ}'ovßI‘ûGych‘“çp“o•¾“˜c‘þúP‘ûé@ta“˜covÐ.‘nïAlfa,‘UU1981.Ž¡‘ôž|[11]ŽŽ‘ ešD.G.–çKafura“and“R.G.“Lavender.›ÿcConcurrent“object-o¸ãriented“language“and“the“inheritance“anomaly‘ÿ*ª.˜In“ÌPr–ÿ}'o“c“e“e“d-ަ‘ ešings‘“çISIPCALA'93Ð,–UUpages“183{215,“Prague,“1993.Ž¡‘ôž|[12]ŽŽ‘ ešB.–UUW.“Kernighan“and“D.“M.“Ritchie.›nïÌPr–ÿ}'o“gr“amovac‘þúP‘ûé@–“çjazyk“CÐ.˜Alfa,‘UU1988.Ž¡‘ôž|[13]ŽŽ‘ ešM.–&E.“Lesk“and“E.“Schmidt.›!ïLex“-“a“lexical“analyzer“generato¸ãr.˜T‘ÿ*ªechnical“repšGo¸ãrt,‘/‹Bell“Lab˜o•¸ãrato“ries,‘/‹Murra“y‘&Hill,ަ‘ ešNJ,‘UU1975.Ž¡‘ôž|[14]ŽŽ‘ ešR.‘UUSedgewick.›nïÌA¾“lgorithms–“çin“CÐ.˜Computer–UUScience.“Addison-W¸ãesley‘ÿ*ª,“1990.˜ISBN“0-201-51425-7.Ž¡‘ôž|[15]ŽŽ‘ ešB.–0ÎSerpGette,›g¬J.“V¸ãuillemin,˜and“J.C.“Herv•¸ã‘ûGe.‘üøBigNum:‘(¹A‘0•pGo“rtable–0Îand“ecient“packš¸ãage“fo˜r“a˜rbitra˜ry-p˜recisionަ‘ eša•¸ãrithmetic.‘nïResea“rch›UUrepGo“rt,˜INRIA,˜1989.‘nïp“rep“rint.Ž¡‘ôž|[16]ŽŽ‘ ešW.–<°R.“Stevens.‘FÃÌA–ÿ}'dvanc“e“d›};Pr“o“gr“amming˜in˜the˜UNIX‘}5Envir“onmentÐ.‘FÃProfessional–<°Computing“Series.“Addison-ަ‘ ešW¸ãesley‘ÿ*ª,–UU1992.‘nïISBN“0-201-56317-7.Ž¡‘ôž|[17]ŽŽ‘ šðŸý€Ž‘ ešL.–•Koš¸ãreU‘úêªn.‘,ÃSmall“interp˜reter“on“the“basis“of“C-language.‘,ÃT‘ÿ*ªechnical“repGo˜rt,‘¤õSlovak“T‘ÿ*ªechnical“Universit˜y‘ÿ*ª,‘¤õF˜acult˜yަ‘ ešof–UUMechanical“Engineering,“Bratislava,“1993.Ž¡‘ôž|[18]ŽŽ‘ ešN.‘UUWirth.›nïÌA¾“lgoritmy‘“ça‘‘ûfhstrukt ¶–úÂÚury‘´“udajovÐ.˜Alfa,‘UU1989.ŽŽŸK’Þ÷­²103ŽŽŒ‹h⇠ÀÙ ýÚÇ ÐÙ¸ ý˜~ªŸì‘ÛÝqëUIndexŽŽ gV ý¶~ª‘ÛÝqÐadd‘™˜‰ffŽ–™šconstant‘™˜‰ffŽ“to‘™˜‰ffŽ“list,‘UU90ޤ Ì‘ÛÝqadd‘™˜‰ffŽ–™šdefault‘™˜‰ffŽ“to‘™˜‰ffŽ“ xp,‘UU90Ž¡‘ÛÝqadd‘™˜‰ffŽ–™šident‘™˜‰ffŽ“to‘™˜‰ffŽ“has,‘UU95Ž¡‘ÛÝqadd‘™˜‰ffŽ–™šident‘™˜‰ffŽ“to‘™˜‰ffŽ“t¸ãypGe,‘UU95Ž¡‘ÛÝqadd‘™˜‰ffŽ–™šspGec‘™˜‰ffŽ“to‘™˜‰ffŽ“has,‘UU95Ž¡‘ÛÝqadd‘™˜‰ffŽ–™šspšGec‘™˜‰ffŽ“to‘™˜‰ffŽ“t¸ãyp˜e,‘UU95Ž¡‘ÛÝqadd‘™˜‰ffŽ–™šsubs‘™˜‰ffŽ“to‘™˜‰ffŽ“spGec‘™˜‰ffŽ“list,‘UU90Ž¡‘ÛÝqadd‘™˜‰ffŽ–™što‘™˜‰ffŽ“ident‘™˜‰ffŽ“list,‘UU90Ž¡‘ÛÝqadd‘™˜‰ffŽ–™što‘™˜‰ffŽ“spGec‘™˜‰ffŽ“list,‘UU90Ž¡‘ÛÝqaggregate‘™˜‰ffŽ–™šmemo¸ãry‘™˜‰ffŽ“size,‘UU93Ž¡‘ÛÝqalign‘™˜‰ffŽ‘™šmemo¸ãry,‘UU95Ž¡‘ÛÝqalloGcate,‘UU89Ž¡‘ÛÝqalloGcate‘™˜‰ffŽ‘™šaggregate,‘UU96Ž¡‘ÛÝqallošGcate‘™˜‰ffŽ–™šhastab‘™˜‰ffŽ“lo˜c,‘UU94Ž¡‘ÛÝqallo•Gcate‘™˜‰ffŽ›™šlo“c‘™˜‰ffŽ˜tables–UU,“94Ž¡‘ÛÝqalloGcate‘™˜‰ffŽ‘™šstruct,‘UU95Ž¡‘ÛÝqalloGcate‘™˜‰ffŽ‘™šva¸ãr,‘UU95Ž¡‘ÛÝqand‘™˜‰ffŽ‘™šjmp,‘UU92Ž¡‘ÛÝqa•¸ãrra“yŽ¡‘ïÝqdimension,–UU47,“93Ž¡‘ïÝqp¸ãri,‘UU62Ž¡‘ÛÝqÎARRA‘ÿ «Y‘°¡‰ffs4Ž‘#ÕPÐ,‘UU96Ž¡‘ÛÝqa•¸ãrra“y‘™˜‰ffŽ‘™šsubscript,‘UU90Ž¡‘ÛÝqatom‘™˜‰ffŽ–™št¸ãypGe‘™˜‰ffŽ“ ag,‘UU92Ž©T¾‘ÛÝqÎBLOCKÐ,‘UU89Ž¡‘ÛÝqÎBPÐ,–UU41,“92Ž¡‘ÛÝqb¸ãr x,‘UU89ަ‘ÛÝqc-pa¸ãrser.c,‘UU101Ž¡‘ÛÝqÎCHAR‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡‘ÛÝqcheck‘™˜‰ffŽ–™šinit‘™˜‰ffŽ“b•¸ãrack“et,‘UU96Ž¡‘ÛÝqcheck‘™˜‰ffŽ–™šspGec‘™˜‰ffŽ“constr,‘UU91Ž¡‘ÛÝqchr‘™˜‰ffŽ‘™šcons,‘UU94Ž¡‘ÛÝqclea¸ãr‘™˜‰ffŽ–™šhash‘™˜‰ffŽ“tab,‘UU94Ž¡‘ÛÝqcleaš¸ãr‘™˜‰ffŽ–™šhash‘™˜‰ffŽ“tab‘™˜‰ffŽ“decla˜ration,‘UU94Ž¡‘ÛÝqclea¸ãr‘™˜‰ffŽ–™šhash‘™˜‰ffŽ“tab‘™˜‰ffŽ“next,‘UU94Ž¡‘ÛÝqcleaš¸ãr‘™˜‰ffŽ–™šhash‘™˜‰ffŽ“tab‘™˜‰ffŽ“next‘™˜‰ffŽ“decla˜ration,‘UU94Ž¡‘ÛÝqcleaš¸ãr‘™˜‰ffŽ–™šinternal‘™˜‰ffŽ“t˜ypGe,‘UU90Ž¡‘ÛÝqClifŽ¡‘ïÝqinvoking,‘UU11Ž¡‘ÛÝqclif,‘UU89Ž¡‘ÛÝqco x,‘UU89Ž¡‘ÛÝqcompa¸ãre2trees,‘UU90Ž¡‘ÛÝqcompa•¸ãre‘™˜‰ffŽ›™šfo“rmat‘™˜‰ffŽ˜a“rgs,‘UU93Ž¡‘ÛÝqcon gure,‘UU9Ž¡‘ÛÝqÎCONST‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡‘ÛÝqcontext,‘UU66Ž¡‘ïÝqswitching,–UU65,“67Ž¡‘ÛÝqcop•¸ãy‘™˜‰ffŽ‘™št“ypGe,‘UU90ŽŽŽ ý¶~ª’ß6£curso¸ãr,–UU73,“74ޤ Y’ß6£cyclic‘™˜‰ffŽ‘™šdef,‘UU90Ž©¥"’ß6£dbg‘™˜‰ffŽ‘™šcreate,‘UU91Ž¡’ß6£dbg‘™˜‰ffŽ‘™šp¸ãrint,‘UU91Ž¡’ß6£DC4,–UU64,“66Ž¡’ß6£dealloGcate,‘UU89Ž¡’ß6£ÎDELETE‘°¡‰ffs4Ž‘#ÕSUBSCRIPTÐ,‘UU93Ž¡’ß6£div‘™˜‰ffŽ‘™šy¸ães,‘UU97Ž¡’ß6£divc‘™˜‰ffŽ‘™šy¸ães,‘UU97Ž¡’ß6£divd‘™˜‰ffŽ‘™šy¸ães,‘UU97Ž¡’ß6£divf‘™˜‰ffŽ‘™šy¸ães,‘UU97Ž¡’ß6£division,‘UU97Ž¡’ß6£doub‘™˜‰ffŽ‘™šcons,‘UU94Ž¡’ß6£ÎDOUBLE‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97ަ’ß6£enter‘™˜‰ffŽ–™š le‘™˜‰ffŽ“scopGe,‘UU96Ž¡’ß6£enter‘™˜‰ffŽ‘™šscopGe,‘UU90Ž¡’ß6£ÎENUM‘°¡‰ffs4Ž‘#ÕPÐ,‘UU96Ž¡’ß6£ÎERR‘°¡‰ffs4Ž–#ÕNO‘°¡‰ffs4Ž“INF®9OÐ,‘UU90Ž¡’ß6£erro¸ãr,–UU48,“90,“94,“95Ž¡’ß6£ÎERRš®9OR‘°¡‰ffs4Ž–#ÕFULL‘°¡‰ffs4Ž“INF˜OÐ,‘UU90Ž¡’ß6£ÎERR•®9OR‘°¡‰ffs4Ž‘#ÕINF“OÐ,‘UU90Ž¡’ß6£erro¸ãr‘™˜‰ffŽ‘™šmessage,–UU90,“96Ž¡’ß6£ERROR‘™˜‰ffŽ‘™šP,‘UU93Ž¡’ß6£exe,–UU62,“97Ž¡’ß6£exec,‘UU97Ž¡’ß6£exit‘™˜‰ffŽ–™š le‘™˜‰ffŽ“scopGe,‘UU96Ž¡’ß6£exit‘™˜‰ffŽ‘™šscopGe,‘UU90Ž¡’ß6£exp¸ãression,‘UU57ަ’ß6£ leŽ¡’ó6£alloGcx.c,‘UU89Ž¡’ó6£c-pa¸ãrser.c,‘UU101Ž¡’ó6£cast.h,‘UU62Ž¡’ó6£comp‘™˜‰ffŽ‘™šmaint.c,–UU62,“89Ž¡’ó6£control.h,–UU50,“91Ž¡’ó6£dbg-out.c,‘UU91Ž¡’ó6£de ne.h,‘UU91Ž¡’ó6£geninstr.h,–UU62,“91Ž¡’ó6£input.c,‘UU91Ž¡’ó6£instr.h,–UU62,“92Ž¡’ó6£inter‘™˜‰ffŽ–™šhandl‘™˜‰ffŽ“bsd.c,‘UU63Ž¡’ó6£inter‘™˜‰ffŽ–™šhandl‘™˜‰ffŽ“pGosix.c,‘UU63Ž¡’ó6£inter‘™˜‰ffŽ–™šhandl‘™˜‰ffŽ“svr3.c,‘UU63Ž¡’ó6£inter‘™˜‰ffŽ–™šhandl‘™˜‰ffŽ“svr4.c,‘UU63Ž¡’ó6£io.ci,‘UU60Ž¡’ó6£k•¸ãeyw“o“rd.gpGerf,–UU62,“92Ž¡’ó6£ls.l,‘UU62Ž¡’ó6£myintrinsic.c,‘UU60ŽŽŽŽŽŽŸK’Æ6¢²104ŽŽŒ‹iï ÀÙ ýÚÇ‘ôž|ÍINDEX’³¤$²105ŽŽ ÐÙ¸ ýK7‘ž|Ðpa¸ãrser.h,‘UU92ޤ 'r‘ž|pso.c,‘UU93Ž¡‘ž|s-conv.c,‘UU93Ž¡‘ž|s-conv.h,‘UU94Ž¡‘ž|tables.c,‘UU94Ž¡‘ž|t¸ãypGe.h,–UU62,“79,“96Ž¡‘ž|virtual‘™˜‰ffŽ‘™šmachine.c,–UU62,“97Ž¡‘ž|ys.h,‘UU97Ž¡‘ž|ys.y‘ÿ*ª,–UU62,“97Ž¡‘ôž| nd‘™˜‰ffŽ‘™šmembGer,‘UU95Ž¡‘ôž| x‘™˜‰ffŽ–™šand‘™˜‰ffŽ“clea¸ãr‘™˜‰ffŽ“goto‘™˜‰ffŽ“table,‘UU95Ž¡‘ôž| x‘™˜‰ffŽ–™šb¸ãreak‘™˜‰ffŽ“f,‘UU89Ž¡‘ôž| x‘™˜‰ffŽ–™šb¸ãreak‘™˜‰ffŽ“s,‘UU89Ž¡‘ôž| x‘™˜‰ffŽ–™šb¸ãreak‘™˜‰ffŽ“w,‘UU89Ž¡‘ôž| x‘™˜‰ffŽ–™šcont‘™˜‰ffŽ“f,‘UU89Ž¡‘ôž| x‘™˜‰ffŽ–™šcont‘™˜‰ffŽ“w,‘UU89Ž¡‘ôž| x‘™˜‰ffŽ‘™šret,‘UU89Ž¡‘ôž| xation,–UU50,“89Ž¡‘ôž|ÎFLO®9A‘ÿ «T‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡‘ôž| t‘™˜‰ffŽ‘™šcons,‘UU94Ž¡‘ôž|full‘™˜‰ffŽ‘™šb•¸ãrack“eting,‘UU93Ž¡‘ôž|func‘™˜‰ffŽ–™šdef‘™˜‰ffŽ“s,‘UU90Ž¡‘ôž|functionŽ¡‘ž|add‘™˜‰ffŽ–™šconstant‘™˜‰ffŽ“to‘™˜‰ffŽ“list,‘UU90Ž¡‘ž|add‘™˜‰ffŽ–™šdefault‘™˜‰ffŽ“to‘™˜‰ffŽ“ xp,‘UU90Ž¡‘ž|add‘™˜‰ffŽ–™šident‘™˜‰ffŽ“to‘™˜‰ffŽ“has,‘UU95Ž¡‘ž|add‘™˜‰ffŽ–™šident‘™˜‰ffŽ“to‘™˜‰ffŽ“t¸ãypGe,‘UU95Ž¡‘ž|add‘™˜‰ffŽ–™šspGec‘™˜‰ffŽ“to‘™˜‰ffŽ“has,‘UU95Ž¡‘ž|add‘™˜‰ffŽ–™šspšGec‘™˜‰ffŽ“to‘™˜‰ffŽ“t¸ãyp˜e,‘UU95Ž¡‘ž|add‘™˜‰ffŽ–™šsubs‘™˜‰ffŽ“to‘™˜‰ffŽ“spGec‘™˜‰ffŽ“list,‘UU90Ž¡‘ž|add‘™˜‰ffŽ–™što‘™˜‰ffŽ“ident‘™˜‰ffŽ“list,‘UU90Ž¡‘ž|add‘™˜‰ffŽ–™što‘™˜‰ffŽ“spGec‘™˜‰ffŽ“list,‘UU90Ž¡‘ž|align‘™˜‰ffŽ‘™šmemo¸ãry,‘UU95Ž¡‘ž|alloGcate,‘UU89Ž¡‘ž|alloGcate‘™˜‰ffŽ‘™šaggregate,‘UU96Ž¡‘ž|allošGcate‘™˜‰ffŽ–™šhastab‘™˜‰ffŽ“lo˜c,‘UU94Ž¡‘ž|allo•Gcate‘™˜‰ffŽ›™šlo“c‘™˜‰ffŽ˜tables,‘UU94Ž¡‘ž|alloGcate‘™˜‰ffŽ‘™šstruct,‘UU95Ž¡‘ž|alloGcate‘™˜‰ffŽ‘™šva¸ãr,‘UU95Ž¡‘ž|a•¸ãrra“y‘™˜‰ffŽ‘™šsubscript,‘UU90Ž¡‘ž|asynchronous–UUinterrupt“service,“66Ž¡‘ž|b¸ãr x,‘UU89Ž¡‘ž|chclose(),‘UU73Ž¡‘ž|check‘™˜‰ffŽ–™šinit‘™˜‰ffŽ“b•¸ãrack“et,‘UU96Ž¡‘ž|check‘™˜‰ffŽ–™šspGec‘™˜‰ffŽ“constr,‘UU91Ž¡‘ž|ch ush(),‘UU73Ž¡‘ž|chopGen(),‘UU73Ž¡‘ž|chwrite(),‘UU73Ž¡‘ž|clea¸ãr‘™˜‰ffŽ–™šhash‘™˜‰ffŽ“tab,‘UU94Ž¡‘ž|cleaš¸ãr‘™˜‰ffŽ–™šhash‘™˜‰ffŽ“tab‘™˜‰ffŽ“decla˜ration,‘UU94Ž¡‘ž|clea¸ãr‘™˜‰ffŽ–™šhash‘™˜‰ffŽ“tab‘™˜‰ffŽ“next,‘UU94Ž¡‘ž|cleaš¸ãr‘™˜‰ffŽ–™šhash‘™˜‰ffŽ“tab‘™˜‰ffŽ“next‘™˜‰ffŽ“decla˜ration,‘UU94Ž¡‘ž|cleaš¸ãr‘™˜‰ffŽ–™šinternal‘™˜‰ffŽ“t˜ypGe,‘UU90Ž¡‘ž|clif,‘UU89Ž¡‘ž|co x,‘UU89Ž¡‘ž|compa¸ãre2trees,‘UU90Ž¡‘ž|compa•¸ãre‘™˜‰ffŽ›™šfo“rmat‘™˜‰ffŽ˜a“rgs,‘UU93Ž¡‘ž|cop•¸ãy‘™˜‰ffŽ‘™št“ypGe,‘UU90ŽŽŽ ýK7’ ÷®cyclic‘™˜‰ffŽ‘™šdef,‘UU90ޤ 'r’ ÷®dbg‘™˜‰ffŽ‘™šcreate,‘UU91Ž¡’ ÷®dbg‘™˜‰ffŽ‘™šp¸ãrint,‘UU91Ž¡’ ÷®dealloGcate,‘UU89Ž¡’ ÷®div‘™˜‰ffŽ‘™šy¸ães,‘UU97Ž¡’ ÷®divc‘™˜‰ffŽ‘™šy¸ães,‘UU97Ž¡’ ÷®divd‘™˜‰ffŽ‘™šy¸ães,‘UU97Ž¡’ ÷®divf‘™˜‰ffŽ‘™šy¸ães,‘UU97Ž¡’ ÷®dra¸ãw(),‘UU73Ž¡’ ÷®dra¸ãw‘™˜‰ffŽ‘™špGoint(),‘UU73Ž¡’ ÷®enter‘™˜‰ffŽ–™š le‘™˜‰ffŽ“scopGe,‘UU96Ž¡’ ÷®enter‘™˜‰ffŽ‘™šscopGe,‘UU90Ž¡’ ÷®erro¸ãr‘™˜‰ffŽ‘™šmessage,–UU90,“96Ž¡’ ÷®exe,–UU62,“97Ž¡’ ÷®exec,‘UU97Ž¡’ ÷®exit‘™˜‰ffŽ–™š le‘™˜‰ffŽ“scopGe,‘UU96Ž¡’ ÷®exit‘™˜‰ffŽ‘™šscopGe,‘UU90Ž¡’ ÷® nd‘™˜‰ffŽ‘™šmembGer,‘UU95Ž¡’ ÷® x‘™˜‰ffŽ–™šand‘™˜‰ffŽ“clea¸ãr‘™˜‰ffŽ“goto‘™˜‰ffŽ“table,‘UU95Ž¡’ ÷® x‘™˜‰ffŽ–™šb¸ãreak‘™˜‰ffŽ“f,‘UU89Ž¡’ ÷® x‘™˜‰ffŽ–™šb¸ãreak‘™˜‰ffŽ“s,‘UU89Ž¡’ ÷® x‘™˜‰ffŽ–™šb¸ãreak‘™˜‰ffŽ“w,‘UU89Ž¡’ ÷® x‘™˜‰ffŽ–™šcont‘™˜‰ffŽ“f,‘UU89Ž¡’ ÷® x‘™˜‰ffŽ–™šcont‘™˜‰ffŽ“w,‘UU89Ž¡’ ÷® x‘™˜‰ffŽ‘™šret,‘UU89Ž¡’ ÷®func‘™˜‰ffŽ–™šdef‘™˜‰ffŽ“s,‘UU90Ž¡’ ÷®get‘™˜‰ffŽ–™šdecla¸ãration‘™˜‰ffŽ“line,‘UU96Ž¡’ ÷®get‘™˜‰ffŽ–™š eld‘™˜‰ffŽ“size,‘UU96Ž¡’ ÷®get‘™˜‰ffŽ–™šmemo¸ãry‘™˜‰ffŽ“size,‘UU96Ž¡’ ÷®get‘™˜‰ffŽ–™šnum‘™˜‰ffŽ“a¸ãrgs,‘UU91Ž¡’ ÷®get‘™˜‰ffŽ‘™špGos,‘UU91Ž¡’ ÷®has,‘UU94Ž¡’ ÷®has‘™˜‰ffŽ‘™šgoto,‘UU95Ž¡’ ÷®has‘™˜‰ffŽ‘™šlabGel,‘UU95Ž¡’ ÷®has‘™˜‰ffŽ‘™šloGc,‘UU95Ž¡’ ÷®has‘™˜‰ffŽ‘™št¸ãypGe,‘UU95Ž¡’ ÷®hash‘™˜‰ffŽ‘™šcoGde,‘UU95Ž¡’ ÷®hash‘™˜‰ffŽ–™šcoGde‘™˜‰ffŽ“goto,‘UU95Ž¡’ ÷®hash‘™˜‰ffŽ–™šcošGde‘™˜‰ffŽ“lo˜c,‘UU95Ž¡’ ÷®hashing,–UU49,“61,“62Ž¡’ ÷®hastab‘™˜‰ffŽ–™šgoto‘™˜‰ffŽ“init,‘UU94Ž¡’ ÷®hastab‘™˜‰ffŽ‘™šinit,‘UU94Ž¡’ ÷®identtab‘™˜‰ffŽ‘™šinit,‘UU94Ž¡’ ÷®implicit‘™˜‰ffŽ‘™šcast,–UU62,“90Ž¡’ ÷®info,‘UU89Ž¡’ ÷®init,–UU62,“89Ž¡’ ÷®init‘™˜‰ffŽ‘™šinput,‘UU91Ž¡’ ÷®init‘™˜‰ffŽ‘™šzero,‘UU89Ž¡’ ÷®input,‘UU67Ž¡’ ÷®input‘™˜‰ffŽ‘™šbuf,–UU67,“91Ž¡’ ÷®input‘™˜‰ffŽ‘™šk¸ãomp,–UU67,“91Ž¡’ ÷®input‘™˜‰ffŽ‘™šstd,–UU67,“91Ž¡’ ÷®interrupt‘™˜‰ffŽ‘™šservice,‘UU63Ž¡’ ÷®intrinsic,–UU48,“59,“60,“73,“90,“95,“96Ž¡’ ÷®l‘™˜‰ffŽ–™švalue‘™˜‰ffŽ“cast,–UU62,“90Ž¡’ ÷®link‘™˜‰ffŽ‘™šfunction,‘UU95Ž¡’ ÷®loGokup‘™˜‰ffŽ–™šgoto‘™˜‰ffŽ“table,‘UU95Ž¡’ ÷®lo•Gokup‘™˜‰ffŽ‘™šlo“c,‘UU95ŽŽŽŽŽŽŒ‹j ÀÙ ýÚÇ‘ÛÝq²106’³¤$ÍINDEXŽŽ ÐÙ¸ ýK7‘ïÝqÐloGokup‘™˜‰ffŽ‘™štables,‘UU93ޤ ‘ïÝqlo•Gokup‘™˜‰ffŽ‘™št¸ãyp“e,‘UU95Ž¡‘ïÝqmemo¸ãry‘™˜‰ffŽ‘™šsize,‘UU96Ž¡‘ïÝqmoGd‘™˜‰ffŽ‘™šy¸ães,‘UU97Ž¡‘ïÝqmov2lvalue,‘UU90Ž¡‘ïÝqmove(),‘UU73Ž¡‘ïÝqmove2lvalue,‘UU90Ž¡‘ïÝqmove‘™˜‰ffŽ–™šo set‘™˜‰ffŽ“aligned,‘UU95Ž¡‘ïÝqmove‘™˜‰ffŽ–™šstack‘™˜‰ffŽ“aligned,‘UU97Ž¡‘ïÝqnoninitialized‘™˜‰ffŽ‘™šloGc,‘UU96Ž¡‘ïÝqo set‘™˜‰ffŽ–™šaggregate‘™˜‰ffŽ“membGer,‘UU96Ž¡‘ïÝqpGoint,‘UU94Ž¡‘ïÝqpGoint‘™˜‰ffŽ‘™šcall,‘UU94Ž¡‘ïÝqp•Goint‘™˜‰ffŽ‘™šlo“c,‘UU95Ž¡‘ïÝqpGointer‘™˜‰ffŽ‘™šcast,‘UU90Ž¡‘ïÝqp•¸ãrint‘™˜‰ffŽ›™šerro“r‘™˜‰ffŽ˜numbGer,‘UU90Ž¡‘ïÝqp¸ãrint‘™˜‰ffŽ–™š le‘™˜‰ffŽ“name,‘UU90Ž¡‘ïÝqp¸ãrint‘™˜‰ffŽ–™šline‘™˜‰ffŽ“numbGer,‘UU90Ž¡‘ïÝqp¸ãrint‘™˜‰ffŽ–™šsource‘™˜‰ffŽ“line,‘UU90Ž¡‘ïÝqp•¸ãromote‘™˜‰ffŽ‘™št“ypGe,‘UU91Ž¡‘ïÝqput2table,‘UU90Ž¡‘ïÝqput‘™˜‰ffŽ›™ša•¸ãrra“y‘™˜‰ffŽ˜subscript,‘UU90Ž¡‘ïÝqputstruct,‘UU95Ž¡‘ïÝqputstruct‘™˜‰ffŽ‘™šb•Go“dy,‘UU95Ž¡‘ïÝqputstruct‘™˜‰ffŽ‘™šloGc,‘UU95Ž¡‘ïÝqputstruct‘™˜‰ffŽ‘™šstatic,‘UU96Ž¡‘ïÝqputstruct‘™˜‰ffŽ‘™št¸ãypGe,‘UU95Ž¡‘ïÝqputstruct‘™˜‰ffŽ–™št¸ãypšGe‘™˜‰ffŽ“b˜o˜dy,‘UU95Ž¡‘ïÝqret x,‘UU89Ž¡‘ïÝqreturn,‘UU56Ž¡‘ïÝqs‘™˜‰ffŽ‘™šconv,‘UU93Ž¡‘ïÝqscopGe‘™˜‰ffŽ–™šo set‘™˜‰ffŽ“get,‘UU95Ž¡‘ïÝqscopGe‘™˜‰ffŽ–™šo set‘™˜‰ffŽ“set,‘UU95Ž¡‘ïÝqsea¸ãrch‘™˜‰ffŽ–™šduplicate‘™˜‰ffŽ“labGels,‘UU90Ž¡‘ïÝqset‘™˜‰ffŽ–™šmemo¸ãry‘™˜‰ffŽ“size,‘UU93Ž¡‘ïÝqset‘™˜‰ffŽ‘™švalue,‘UU95Ž¡‘ïÝqsta¸ãrt‘™˜‰ffŽ‘™šmain,‘UU91Ž¡‘ïÝqsto•¸ãre‘™˜‰ffŽ›™ša“rg‘™˜‰ffŽ˜t“ypGe,‘UU93Ž¡‘ïÝqsto¸ãre‘™˜‰ffŽ‘™špGos,‘UU91Ž¡‘ïÝqsynchronous–UUinterrupt“service,“65Ž¡‘ïÝqterminate‘™˜‰ffŽ‘™šbu er,‘UU91Ž¡‘ïÝqt¸ãypGe–UUof,“92Ž¡‘ïÝqt¸ãypGe2string,‘UU90Ž¡‘ïÝqt•¸ãypGe‘™˜‰ffŽ‘™šcompa“re,‘UU90Ž¡‘ïÝqt•¸ãypGe‘™˜‰ffŽ‘™štransfo“rm,‘UU90Ž¡‘ïÝqt•¸ãypGedef‘™˜‰ffŽ‘™šcop“y,‘UU93Ž¡‘ïÝqt¸ãypGedef‘™˜‰ffŽ‘™šp,‘UU96Ž¡‘ïÝqvfalse,‘UU97Ž¡‘ïÝqvtrue,‘UU97Ž¡‘ïÝqwindo¸ãw(),‘UU73Ž¡‘ïÝqyypa¸ãrse,‘UU97Ž¡‘ÛÝqÎFUNCTION‘°¡‰ffs4Ž‘#ÕEPILOGUEÐ,‘UU93Ž¡‘ÛÝqÎFUNCTION‘°¡‰ffs4Ž‘#ÕPR®9OLOGUEÐ,‘UU93ŽŸÈq‘ÛÝqget‘™˜‰ffŽ–™šdecla¸ãration‘™˜‰ffŽ“line,‘UU96Ž¡‘ÛÝqget‘™˜‰ffŽ–™š eld‘™˜‰ffŽ“size,‘UU96Ž¡‘ÛÝqget‘™˜‰ffŽ–™šmemo¸ãry‘™˜‰ffŽ“size,‘UU96Ž¡‘ÛÝqget‘™˜‰ffŽ–™šnum‘™˜‰ffŽ“a¸ãrgs,‘UU91Ž¡‘ÛÝqget‘™˜‰ffŽ‘™špGos,‘UU91ŽŽŽ ýK7’ß6£ÎGLOBAL‘°¡‰ffs4Ž‘#ÕTYPEÐ,‘UU96ޤ >’ß6£global‘™˜‰ffŽ‘™št¸ãypGe,‘UU96Ž©'£’ß6£handle,–UU73,“74Ž¡’ß6£handler,‘UU63Ž¡’ß6£has,‘UU94Ž¡’ß6£has‘™˜‰ffŽ‘™šgoto,‘UU95Ž¡’ß6£has‘™˜‰ffŽ‘™šlabGel,‘UU95Ž¡’ß6£has‘™˜‰ffŽ‘™šloGc,‘UU95Ž¡’ß6£has‘™˜‰ffŽ‘™št¸ãypGe,‘UU95Ž¡’ß6£hashŽ¡’ó6£coGde,‘UU49Ž¡’ó6£function,–UU49,“61,“62Ž¡’ó6£table,–UU46,“48,“49,“60,“61,“90Ž¡’ß6£hash‘™˜‰ffŽ‘™šcoGde,‘UU95Ž¡’ß6£hash‘™˜‰ffŽ–™šcoGde‘™˜‰ffŽ“goto,‘UU95Ž¡’ß6£hash‘™˜‰ffŽ–™šcošGde‘™˜‰ffŽ“lo˜c,‘UU95Ž¡’ß6£hastab,‘UU94Ž¡’ß6£hastab‘™˜‰ffŽ‘™šgoto,‘UU94Ž¡’ß6£hastab‘™˜‰ffŽ–™šgoto‘™˜‰ffŽ“init,‘UU94Ž¡’ß6£hastab‘™˜‰ffŽ‘™šinit,‘UU94Ž¡’ß6£hastab‘™˜‰ffŽ‘™št¸ãypGe,‘UU94ަ’ß6£identtab,‘UU94Ž¡’ß6£identtab‘™˜‰ffŽ‘™šinit,‘UU94Ž¡’ß6£identtab‘™˜‰ffŽ‘™šloGc,‘UU94Ž¡’ß6£implicit‘™˜‰ffŽ‘™šcast,–UU62,“90Ž¡’ß6£info,‘UU89Ž¡’ß6£init,–UU62,“89Ž¡’ß6£init‘™˜‰ffŽ‘™šinput,‘UU91Ž¡’ß6£init‘™˜‰ffŽ‘™šzero,‘UU89Ž¡’ß6£initialize‘™˜‰ffŽ‘™šonly,‘UU93Ž¡’ß6£input,–UU89,“91Ž¡’ó6£instruction,‘UU45Ž¡’ó6£standa¸ãrd,‘UU67Ž¡’ó6£switching,‘UU67Ž¡’ß6£input‘™˜‰ffŽ‘™šbuf,‘UU91Ž¡’ß6£input‘™˜‰ffŽ‘™šk¸ãomp,‘UU91Ž¡’ß6£input‘™˜‰ffŽ‘™šstd,‘UU91Ž¡’ß6£instructionŽ¡’ó6£ÎADDÐ,‘UU42Ž¡’ó6£address,‘UU41Ž¡’ó6£ÎANDÐ,‘UU43Ž¡’ó6£ÎANDBÐ,‘UU43Ž¡’ó6£a¸ãrithmetic-logical,‘UU42Ž¡’ó6£ÎCALLÐ,–UU46,“57Ž¡’ó6£ÎCLR‘ÿ «TÐ,‘UU45Ž¡’ó6£control,‘UU45Ž¡’ó6£ÎCVTÐ,‘UU44Ž¡’ó6£ÎDIVÐ,‘UU43Ž¡’ó6£ÎEQÐ,‘UU43Ž¡’ó6£ÎGEÐ,‘UU43Ž¡’ó6£ÎGRÐ,‘UU43Ž¡’ó6£ÎHAL‘ÿ «TÐ,‘UU46Ž¡’ó6£ÎINÐ,‘UU45Ž¡’ó6£input–UUand“output,“45Ž¡’ó6£integer–UUand“ oating“pGoint,“44Ž¡’ó6£ÎINTERÐ,–UU45,“65Ž¡’ó6£ÎIRETÐ,‘UU45ŽŽŽŽŽŽŒ‹k@ ÀÙ ýÚÇ‘ôž|ÍINDEX’³¤$²107ŽŽ ÐÙ¸ ýK7‘ž|ÎJMPÐ,‘UU46ޤ >‘ž|ÎJNZÐ,‘UU46Ž¡‘ž|ÎJZÐ,‘UU46Ž¡‘ž|ÎLEÐ,‘UU43Ž¡‘ž|ÎLOÐ,‘UU43Ž¡‘ž|ÎMESSÐ,‘UU45Ž¡‘ž|ÎMODÐ,‘UU43Ž¡‘ž|ÎMO®9VÐ,–UU41,“56,“57,“90Ž¡‘ž|ÎMUL‘ÿ «TÐ,‘UU42Ž¡‘ž|ÎNEÐ,‘UU44Ž¡‘ž|ÎNEGÐ,‘UU44Ž¡‘ž|ÎNOTÐ,‘UU44Ž¡‘ž|on–UUa¸ãrithmetic“stack,“41Ž¡‘ž|on–UUstack,“44Ž¡‘ž|ÎORÐ,‘UU43Ž¡‘ž|ÎORBÐ,‘UU43Ž¡‘ž|ÎOUTÐ,‘UU45Ž¡‘ž|ÎPOPÐ,–UU45,“57Ž¡‘ž|ÎPOP‘ÿ «AÐ,‘UU42Ž¡‘ž|ÎPUSHÐ,–UU44,“56Ž¡‘ž|ÎPUSHAÐ,‘UU42Ž¡‘ž|ÎPUSHAIÐ,‘UU42Ž¡‘ž|ÎRETÐ,–UU46,“57Ž¡‘ž|ÎSALÐ,‘UU44Ž¡‘ž|ÎSARÐ,‘UU44Ž¡‘ž|set,‘UU41Ž¡‘ž|ÎSTOPÐ,‘UU45Ž¡‘ž|ÎSUBÐ,–UU42,“56Ž¡‘ž|tempGo•¸ãra“ry–UUstack,“45Ž¡‘ž|ÎX®9CHGÐ,‘UU42Ž¡‘ž|ÎX®9ORÐ,‘UU44Ž¡‘ôž|integerŽ¡‘ž|size–UUof,“62Ž¡‘ôž|integer‘™˜‰ffŽ‘™šcons,‘UU94Ž¡‘ôž|ÎINTEGER‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡‘ôž|interface,‘UU59Ž¡‘ôž|intern‘™˜‰ffŽ–™ša¸ãrit‘™˜‰ffŽ“class,‘UU96Ž¡‘ôž|intern‘™˜‰ffŽ–™šfunc‘™˜‰ffŽ“class,‘UU96Ž¡‘ôž|ÎINTERNAL‘°¡‰ffs4Ž‘#ÕTYPEÐ,‘UU96Ž¡‘ôž|interp¸ãreter,‘UU48Ž¡‘ž|input,‘UU67Ž¡‘ôž|interrupt,‘UU97Ž¡‘ž|accepted,‘UU66Ž¡‘ž|handler,‘UU63Ž¡‘ž|signal,‘UU64Ž¡‘ž|synchronous,‘UU67Ž¡‘ž|synchronous–UUand“asynchronous,“63Ž¡‘ôž|interrupt‘™˜‰ffŽ‘™šservice,‘UU63Ž¡‘ôž|ioGctl,‘UU64Ž¡‘ôž|is‘™˜‰ffŽ‘™šaddress,‘UU92Ž¡‘ôž|it‘™˜‰ffŽ–™šis‘™˜‰ffŽ“in‘™˜‰ffŽ“case,‘UU92ޤ'£‘ôž|jmp1,‘UU92Ž¡‘ôž|l‘™˜‰ffŽ–™švalue‘™˜‰ffŽ“cast,–UU62,“90ޤ >‘ôž|labGel,–UU56,“90,“94Ž¡‘ôž|link‘™˜‰ffŽ‘™šfunction,‘UU95Ž¡‘ôž|list,–UU49,“57Ž¡‘ôž|ÎLOCAL‘°¡‰ffs4Ž‘#ÕPÐ,‘UU96ŽŽŽ ýK7’÷÷®ÎLONG‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97ޤ ’÷÷®loGokup,‘UU95Ž¡’÷÷®loGokup‘™˜‰ffŽ–™šgoto‘™˜‰ffŽ“table,‘UU95Ž¡’÷÷®lo•Gokup‘™˜‰ffŽ‘™šlo“c,‘UU95Ž¡’÷÷®loGokup‘™˜‰ffŽ‘™štables,‘UU93Ž¡’÷÷®lo•Gokup‘™˜‰ffŽ‘™št¸ãyp“e,‘UU95Ž¡’÷÷®loGopŽ¡’ ÷®nested,‘UU50Ž¡’ ÷®statement,‘UU50ŽŸÈq’÷÷®macroŽ¡’ ÷®ÎARRA‘ÿ «Y‘°¡‰ffs4Ž‘#ÕPÐ,‘UU96Ž¡’ ÷®ÎBLOCKÐ,‘UU89Ž¡’ ÷®ÎCHAR‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡’ ÷®ÎCONST‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡’ ÷®ÎDELETE‘°¡‰ffs4Ž‘#ÕSUBSCRIPTÐ,‘UU93Ž¡’ ÷®ÎDOUBLE‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡’ ÷®ÎENUM‘°¡‰ffs4Ž‘#ÕPÐ,‘UU96Ž¡’ ÷®ÎERR‘°¡‰ffs4Ž–#ÕNO‘°¡‰ffs4Ž“INF®9OÐ,‘UU90Ž¡’ ÷®ÎERRš®9OR‘°¡‰ffs4Ž–#ÕFULL‘°¡‰ffs4Ž“INF˜OÐ,‘UU90Ž¡’ ÷®ÎERR•®9OR‘°¡‰ffs4Ž‘#ÕINF“OÐ,‘UU90Ž¡’ ÷®ÎERR®9OR‘°¡‰ffs4Ž‘#ÕPÐ,‘UU93Ž¡’ ÷®ÎFLO®9A‘ÿ «T‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡’ ÷®ÎFUNCTION‘°¡‰ffs4Ž‘#ÕEPILOGUEÐ,‘UU93Ž¡’ ÷®ÎFUNCTION‘°¡‰ffs4Ž‘#ÕPR®9OLOGUEÐ,‘UU93Ž¡’ ÷®ÎGLOBAL‘°¡‰ffs4Ž‘#ÕTYPEÐ,‘UU96Ž¡’ ÷®ÎINTEGER‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡’ ÷®ÎINTERNAL‘°¡‰ffs4Ž‘#ÕTYPEÐ,‘UU96Ž¡’ ÷®ÎLOCAL‘°¡‰ffs4Ž‘#ÕPÐ,‘UU96Ž¡’ ÷®ÎLONG‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡’ ÷®ÎMAX‘°¡‰ffs4Ž‘#ÕIDENTÐ,‘UU61Ž¡’ ÷®ÎMAX‘°¡‰ffs4Ž–#ÕIDENT‘°¡‰ffs4Ž“LOCÐ,‘UU61Ž¡’ ÷®ÎMO®9V‘°¡‰ffs4Ž‘#ÕPÐ,‘UU93Ž¡’ ÷®ÎNOT‘°¡‰ffs4Ž‘#ÕDEFINEDÐ,‘UU96Ž¡’ ÷®ÎOFFSET‘°¡‰ffs4Ž–#ÕLAST‘°¡‰ffs4Ž“ADDÐ,‘UU93Ž¡’ ÷®ÎOFFSET‘°¡‰ffs4Ž–#ÕLAST‘°¡‰ffs4Ž“ADD‘°¡‰ffs4Ž“ARRA‘ÿ «YÐ,‘UU93Ž¡’ ÷®ÎP‘ÿ «A®9GEÐ,‘UU61Ž¡’ ÷®ÎP‘ÿ «ARÐ,‘UU96Ž¡’ ÷®ÎPERMÐ,‘UU89Ž¡’ ÷®ÎPOINTER‘°¡‰ffs4Ž‘#ÕPÐ,‘UU96Ž¡’ ÷®ÎPOP‘ÿ «A‘°¡‰ffs4Ž‘#ÕPÐ,‘UU93Ž¡’ ÷®ÎPRINTF‘°¡‰ffs4Ž‘#ÕPÐ,‘UU94Ž¡’ ÷®ÎPUSHA‘°¡‰ffs4Ž‘#ÕPÐ,‘UU93Ž¡’ ÷®ÎREMOTE‘°¡‰ffs4Ž‘#ÕPÐ,‘UU96Ž¡’ ÷®ÎRESET‘°¡‰ffs4Ž–#ÕCODE‘°¡‰ffs4Ž“GENERA‘ÿ «TION‘°¡‰ffs4Ž“BEGINNINGÐ,Ž¡’÷®93Ž¡’ ÷®ÎSCANF‘°¡‰ffs4Ž‘#ÕPÐ,‘UU94Ž¡’ ÷®ÎSET‘°¡‰ffs4Ž‘#ÕADDRESSÐ,‘UU93Ž¡’ ÷®ÎSET‘°¡‰ffs4Ž–#ÕCODE‘°¡‰ffs4Ž“GENERA‘ÿ «TION‘°¡‰ffs4Ž“BEGINNINGÐ,Ž¡’÷®93Ž¡’ ÷®ÎSHOR‘ÿ «T‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡’ ÷®ÎSIGNED‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡’ ÷®ÎSIMPLE‘°¡‰ffs4Ž‘#ÕPÐ,‘UU96Ž¡’ ÷®ÎSIZE‘°¡‰ffs4Ž–#ÕADR‘°¡‰ffs4Ž“ST‘ÿ «A®9CKÐ,‘UU61Ž¡’ ÷®ÎSIZE‘°¡‰ffs4Ž–#ÕARIT‘°¡‰ffs4Ž“ST‘ÿ «A®9CKÐ,‘UU61Ž¡’ ÷®ÎSIZE‘°¡‰ffs4Ž‘#ÕHASÐ,‘UU61Ž¡’ ÷®ÎSIZE‘°¡‰ffs4Ž–#ÕHAS‘°¡‰ffs4Ž“GOTOÐ,‘UU61Ž¡’ ÷®ÎSIZE‘°¡‰ffs4Ž–#ÕHAS‘°¡‰ffs4Ž“LOCÐ,‘UU61Ž¡’ ÷®ÎSIZE‘°¡‰ffs4Ž‘#ÕREMOTEÐ,‘UU61ŽŽŽŽŽŽŒ‹l*ë ÀÙ ýÚÇ‘ÛÝq²108’³¤$ÍINDEXŽŽ ÐÙ¸ ýK7‘ïÝqÎSIZE‘°¡‰ffs4Ž‘#ÕSP‘ÿ «A®9CEÐ,‘UU61ޤ É‘ïÝqÎSIZE‘°¡‰ffs4Ž–#ÕSTR®9UCT‘°¡‰ffs4Ž“FIXÐ,‘UU61Ž¡‘ïÝqÎSIZE‘°¡‰ffs4Ž–#ÕTMP‘°¡‰ffs4Ž“ST‘ÿ «A®9CKÐ,‘UU61Ž¡‘ïÝqÎST–ÿ «A“TIC‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡‘ïÝqÎSTR®9UCT‘°¡‰ffs4Ž‘#ÕPÐ,‘UU96Ž¡‘ïÝqÎTYPE‘°¡‰ffs4Ž‘#ÕCLEARÐ,–UU92,“93Ž¡‘ïÝqÎTYPES‘°¡‰ffs4Ž–#ÕEQ‘°¡‰ffs4Ž“PÐ,‘UU97Ž¡‘ïÝqÎUNION‘°¡‰ffs4Ž‘#ÕPÐ,‘UU96Ž¡‘ïÝqÎUNSIGNED‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡‘ïÝqÎUNUSED‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡‘ïÝqÎV‘þ¸äARÐ,‘UU96Ž¡‘ïÝqÎV®9OID‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡‘ïÝqÎYESÐ,‘UU96Ž¡‘ÛÝqmain‘™˜‰ffŽ‘™šde ned,‘UU93Ž¡‘ÛÝqÎMAX‘°¡‰ffs4Ž‘#ÕIDENTÐ,‘UU61Ž¡‘ÛÝqÎMAX‘°¡‰ffs4Ž–#ÕIDENT‘°¡‰ffs4Ž“LOCÐ,‘UU61Ž¡‘ÛÝqmemo¸ãry‘ÿ*ª,–UU61,“89,“95Ž¡‘ÛÝqmemo¸ãry‘™˜‰ffŽ‘™šsize,‘UU96Ž¡‘ÛÝqmoGd‘™˜‰ffŽ‘™šy¸ães,‘UU97Ž¡‘ÛÝqmoGdulus,‘UU97Ž¡‘ÛÝqmov2lvalue,‘UU90Ž¡‘ÛÝqÎMO®9V‘°¡‰ffs4Ž‘#ÕPÐ,‘UU93Ž¡‘ÛÝqmove2lvalue,‘UU90Ž¡‘ÛÝqmove‘™˜‰ffŽ–™šo set‘™˜‰ffŽ“aligned,‘UU95Ž¡‘ÛÝqmove‘™˜‰ffŽ–™šstack‘™˜‰ffŽ“aligned,‘UU97Ž©wß‘ÛÝqnoninitialized‘™˜‰ffŽ‘™šloGc,‘UU96Ž¡‘ÛÝqÎNOT‘°¡‰ffs4Ž‘#ÕDEFINEDÐ,‘UU96Ž¡‘ÛÝqnotation,‘UU41ަ‘ÛÝqo set,–UU92,“93Ž¡‘ÛÝqo set‘™˜‰ffŽ–™šaggregate‘™˜‰ffŽ“membGer,‘UU96Ž¡‘ÛÝqÎOFFSET‘°¡‰ffs4Ž–#ÕLAST‘°¡‰ffs4Ž“ADDÐ,‘UU93Ž¡‘ÛÝqÎOFFSET‘°¡‰ffs4Ž–#ÕLAST‘°¡‰ffs4Ž“ADD‘°¡‰ffs4Ž“ARRA‘ÿ «YÐ,‘UU93Ž¡‘ÛÝqÎOPERAND‘°¡‰ffs4Ž–#Õ0‘°¡‰ffs4Ž“maÐ,–UU41,“92Ž¡‘ÛÝqÎOPERAND‘°¡‰ffs4Ž–#Õ0‘°¡‰ffs4Ž“miÐ,–UU41,“92Ž¡‘ÛÝqÎOPERAND‘°¡‰ffs4Ž–#Õ1‘°¡‰ffs4Ž“iÐ,–UU41,“92Ž¡‘ÛÝqÎOPERAND‘°¡‰ffs4Ž–#Õ1‘°¡‰ffs4Ž“icÐ,–UU41,“92Ž¡‘ÛÝqÎOPERAND‘°¡‰ffs4Ž–#Õ1‘°¡‰ffs4Ž“idÐ,–UU41,“92Ž¡‘ÛÝqÎOPERAND‘°¡‰ffs4Ž–#Õ1‘°¡‰ffs4Ž“ifÐ,–UU41,“92Ž¡‘ÛÝqÎOPERAND‘°¡‰ffs4Ž–#Õ1‘°¡‰ffs4Ž“maÐ,–UU41,“92Ž¡‘ÛÝqÎOPERAND‘°¡‰ffs4Ž–#Õ1‘°¡‰ffs4Ž“miÐ,–UU41,“92Ž¡‘ÛÝqopGerato¸ãrŽ¡‘ïÝqaddress,‘UU92Ž¡‘ÛÝqo¸ãr‘™˜‰ffŽ‘™šjmp,‘UU92Ž¡‘ÛÝqoutputŽ¡‘ïÝqinstruction,‘UU45ަ‘ÛÝqÎP‘ÿ «A®9GEÐ,‘UU61Ž¡‘ÛÝqÎP‘ÿ «ARÐ,‘UU96Ž¡‘ÛÝqpa¸ãram‘™˜‰ffŽ‘™š ag,‘UU92Ž¡‘ÛÝqpa¸ãrameterŽ¡‘ïÝqaddress,‘UU56Ž¡‘ïÝqfo¸ãrmal,–UU56,“95,“96Ž¡‘ïÝqpassing,‘UU56Ž¡‘ïÝqrun-string,‘UU61Ž¡‘ÛÝqÎPERMÐ,‘UU89Ž¡‘ÛÝqpi,‘UU94Ž¡‘ÛÝqpi‘™˜‰ffŽ‘™št¸ãypGe,‘UU94ŽŽŽ ýK7’ß6£pGoint,‘UU94ޤ E’ß6£pGoint‘™˜‰ffŽ‘™šcall,‘UU94Ž¡’ß6£p•Goint‘™˜‰ffŽ‘™šlo“c,‘UU95Ž¡’ß6£pGointer‘™˜‰ffŽ‘™šcast,‘UU90Ž¡’ß6£ÎPOINTER‘°¡‰ffs4Ž‘#ÕPÐ,‘UU96Ž¡’ß6£ÎPOP‘ÿ «A‘°¡‰ffs4Ž‘#ÕPÐ,‘UU93Ž¡’ß6£p•¸ãrint‘™˜‰ffŽ›™šerro“r‘™˜‰ffŽ˜numbGer,‘UU90Ž¡’ß6£p¸ãrint‘™˜‰ffŽ–™š le‘™˜‰ffŽ“name,‘UU90Ž¡’ß6£p¸ãrint‘™˜‰ffŽ–™šline‘™˜‰ffŽ“numbGer,‘UU90Ž¡’ß6£p¸ãrint‘™˜‰ffŽ–™šsource‘™˜‰ffŽ“line,‘UU90Ž¡’ß6£ÎPRINTF‘°¡‰ffs4Ž‘#ÕPÐ,‘UU94Ž¡’ß6£p•¸ãromote‘™˜‰ffŽ‘™št“ypGe,‘UU91Ž¡’ß6£ÎPUSHA‘°¡‰ffs4Ž‘#ÕPÐ,‘UU93Ž¡’ß6£put2table,‘UU90Ž¡’ß6£put‘™˜‰ffŽ›™ša•¸ãrra“y‘™˜‰ffŽ˜subscript,‘UU90Ž¡’ß6£putstruct,‘UU95Ž¡’ß6£putstruct‘™˜‰ffŽ‘™šb•Go“dy,‘UU95Ž¡’ß6£putstruct‘™˜‰ffŽ‘™šloGc,‘UU95Ž¡’ß6£putstruct‘™˜‰ffŽ‘™šstatic,‘UU96Ž¡’ß6£putstruct‘™˜‰ffŽ‘™št¸ãypGe,‘UU95Ž¡’ß6£putstruct‘™˜‰ffŽ–™št¸ãypšGe‘™˜‰ffŽ“b˜o˜dy,‘UU95Ž©(’ß6£ÎREMOTE‘°¡‰ffs4Ž‘#ÕFÐ,‘UU92Ž¡’ß6£ÎREMOTE‘°¡‰ffs4Ž‘#ÕPÐ,‘UU96Ž¡’ß6£ÎRESET‘°¡‰ffs4Ž–#ÕCODE‘°¡‰ffs4Ž“GENERA‘ÿ «TION‘°¡‰ffs4Ž“BEGINNINGÐ,ŽŸ ’6£93Ž¡’ß6£ret x,‘UU89ަ’ß6£s‘™˜‰ffŽ‘™šconv,‘UU93Ž¡’ß6£ÎSCANF‘°¡‰ffs4Ž‘#ÕPÐ,‘UU94Ž¡’ß6£scopGeŽ¡’ó6£level,‘UU47Ž¡’ó6£of–UUva¸ãriables,“47Ž¡’ß6£scopGe‘™˜‰ffŽ–™šo set‘™˜‰ffŽ“get,‘UU95Ž¡’ß6£scopGe‘™˜‰ffŽ–™šo set‘™˜‰ffŽ“set,‘UU95Ž¡’ß6£sea¸ãrch‘™˜‰ffŽ–™šduplicate‘™˜‰ffŽ“labGels,‘UU90Ž¡’ß6£ÎSET‘°¡‰ffs4Ž‘#ÕADDRESSÐ,‘UU93Ž¡’ß6£ÎSET‘°¡‰ffs4Ž–#ÕCODE‘°¡‰ffs4Ž“GENERA‘ÿ «TION‘°¡‰ffs4Ž“BEGINNINGÐ,‘8ã93Ž¡’ß6£set‘™˜‰ffŽ–™šmemo¸ãry‘™˜‰ffŽ“size,‘UU93Ž¡’ß6£set‘™˜‰ffŽ‘™švalue,‘UU95Ž¡’ß6£ÎSHOR‘ÿ «T‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡’ß6£ÎSIGNED‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡’ß6£sigset,‘UU64Ž¡’ß6£sigvec,‘UU64Ž¡’ß6£ÎSIMPLE‘°¡‰ffs4Ž‘#ÕPÐ,‘UU96Ž¡’ß6£ÎSIZE‘°¡‰ffs4Ž–#ÕADR‘°¡‰ffs4Ž“ST‘ÿ «A®9CKÐ,‘UU61Ž¡’ß6£ÎSIZE‘°¡‰ffs4Ž–#ÕARIT‘°¡‰ffs4Ž“ST‘ÿ «A®9CKÐ,‘UU61Ž¡’ß6£ÎSIZE‘°¡‰ffs4Ž‘#ÕHASÐ,‘UU61Ž¡’ß6£ÎSIZE‘°¡‰ffs4Ž–#ÕHAS‘°¡‰ffs4Ž“GOTOÐ,‘UU61Ž¡’ß6£ÎSIZE‘°¡‰ffs4Ž–#ÕHAS‘°¡‰ffs4Ž“LOCÐ,‘UU61Ž¡’ß6£ÎSIZE‘°¡‰ffs4Ž‘#ÕREMOTEÐ,‘UU61Ž¡’ß6£ÎSIZE‘°¡‰ffs4Ž‘#ÕSP‘ÿ «A®9CEÐ,‘UU61Ž¡’ß6£ÎSIZE‘°¡‰ffs4Ž–#ÕSTR®9UCT‘°¡‰ffs4Ž“FIXÐ,‘UU61Ž¡’ß6£ÎSIZE‘°¡‰ffs4Ž–#ÕTMP‘°¡‰ffs4Ž“ST‘ÿ «A®9CKÐ,‘UU61Ž¡’ß6£stack,–UU56,“92,“97Ž¡’ß6£sta¸ãrt‘™˜‰ffŽ‘™šmain,‘UU91Ž¡’ß6£statementŽ¡’ó6£b¸ãreak,–UU50,“52,“89Ž¡’ó6£case,‘UU92ŽŽŽŽŽŽŒ‹m< ÀÙ ýÚÇ‘ôž|ÍINDEX’³¤$²109ŽŽ ÐÙ¸ ýK7‘ž|Ðcontinue,–UU50,“52,“89ޤ >‘ž|fo¸ãr,–UU50,“89,“92Ž¡‘ž|goto,–UU52,“56,“95Ž¡‘ž|if,‘UU50Ž¡‘ž|remote,‘UU60Ž¡‘ž|resume,–UU63,“65,“66,“91Ž¡‘ž|return,–UU50,“52,“89Ž¡‘ž|switch,–UU50,“52,“90Ž¡‘ž|while,–UU50,“89Ž¡‘ôž|ÎST–ÿ «A“TIC‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡‘ôž|sto¸ãrage‘™˜‰ffŽ–™šclass‘™˜‰ffŽ“spGeci er,‘UU96Ž¡‘ôž|sto•¸ãre‘™˜‰ffŽ›™ša“rg‘™˜‰ffŽ˜t“ypGe,‘UU93Ž¡‘ôž|sto¸ãre‘™˜‰ffŽ‘™špGos,‘UU91Ž¡‘ôž|ÎSTR®9UCT‘°¡‰ffs4Ž‘#ÕPÐ,‘UU96Ž¡‘ôž|struct‘™˜‰ffŽ–™šunion‘™˜‰ffŽ“ eld,–UU92,“93Ž¡‘ôž|structure,‘UU92Ž¡‘ž|context,‘UU65Ž¡‘ž| xing,–UU47,“50Ž¡‘ž|ÎOPERAND‘°¡‰ffs4Ž–#Õ0‘°¡‰ffs4Ž“maÐ,–UU41,“92Ž¡‘ž|ÎOPERAND‘°¡‰ffs4Ž–#Õ0‘°¡‰ffs4Ž“miÐ,–UU41,“92Ž¡‘ž|ÎOPERAND‘°¡‰ffs4Ž–#Õ1‘°¡‰ffs4Ž“iÐ,–UU41,“92Ž¡‘ž|ÎOPERAND‘°¡‰ffs4Ž–#Õ1‘°¡‰ffs4Ž“icÐ,–UU41,“92Ž¡‘ž|ÎOPERAND‘°¡‰ffs4Ž–#Õ1‘°¡‰ffs4Ž“idÐ,–UU41,“92Ž¡‘ž|ÎOPERAND‘°¡‰ffs4Ž–#Õ1‘°¡‰ffs4Ž“ifÐ,–UU41,“92Ž¡‘ž|ÎOPERAND‘°¡‰ffs4Ž–#Õ1‘°¡‰ffs4Ž“maÐ,–UU41,“92Ž¡‘ž|ÎOPERAND‘°¡‰ffs4Ž–#Õ1‘°¡‰ffs4Ž“miÐ,–UU41,“92Ž¡‘ôž|subscript‘™˜‰ffŽ‘™š ag,–UU92,“93Ž©'£‘ôž|tableŽ¡‘ž|hashing,–UU46,“48,“49,“60,“61,“94,“95Ž¡‘ž|of–UUglobal“identi ers,“48,“94Ž¡‘ž|of–UUlabGels,“94,“95Ž¡‘ž|of–UUloGcal“va¸ãriables,“47,“94,“95Ž¡‘ôž|terminate‘™˜‰ffŽ‘™šbu er,‘UU91Ž¡‘ôž|tok¸ãenŽ¡‘ž|ÎINDEXÐ,‘UU96Ž¡‘ž|ÎTYPENAMEÐ,‘UU96Ž¡‘ôž|t¸ãypGe,–UU49,“93,“94Ž¡‘ž|a•¸ãrra“y‘ÿ*ª,‘UU47Ž¡‘ž|function,‘UU47Ž¡‘ž|global‘™˜‰ffŽ‘™št¸ãypGe,‘UU96Ž¡‘ž|intern‘™˜‰ffŽ–™ša¸ãrit‘™˜‰ffŽ“class,‘UU96Ž¡‘ž|intern‘™˜‰ffŽ–™šfunc‘™˜‰ffŽ“class,‘UU96Ž¡‘ž|internal,–UU78,“90,“94{97Ž¡‘ž|sto¸ãrage‘™˜‰ffŽ–™šclass‘™˜‰ffŽ“spGeci er,‘UU96Ž¡‘ž|t¸ãypGe‘™˜‰ffŽ‘™šqual,‘UU96Ž¡‘ôž|t¸ãypGe2string,‘UU90Ž¡‘ôž|ÎTYPE‘°¡‰ffs4Ž‘#ÕCLEARÐ,–UU92,“93Ž¡‘ôž|t¸ãypGe‘™˜‰ffŽ‘™šcom,‘UU93Ž¡‘ôž|t•¸ãypGe‘™˜‰ffŽ‘™šcompa“re,‘UU90Ž¡‘ôž|t¸ãypGe‘™˜‰ffŽ‘™šqual,‘UU96Ž¡‘ôž|t•¸ãypGe‘™˜‰ffŽ‘™štransfo“rm,‘UU90Ž¡‘ôž|t•¸ãypGedef‘™˜‰ffŽ‘™šcop“y,‘UU93Ž¡‘ôž|t¸ãypGedef‘™˜‰ffŽ‘™šp,‘UU96Ž¡‘ôž|ÎTYPES‘°¡‰ffs4Ž–#ÕEQ‘°¡‰ffs4Ž“PÐ,‘UU97Ž¡‘ôž|t¸ãypGetab,‘UU94ަ‘ôž|union,‘UU92Ž¡‘ôž|ÎUNION‘°¡‰ffs4Ž‘#ÕPÐ,‘UU96ŽŽŽ ýK7’÷÷®ÎUNSIGNED‘°¡‰ffs4Ž‘#ÕpÐ,‘UU97ޤ ’÷÷®ÎUNUSED‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž©’÷÷®ÎV‘þ¸äARÐ,‘UU96Ž¡’÷÷®va¸ãriableŽ¡’ ÷®aggregate‘™˜‰ffŽ–™šmemo¸ãry‘™˜‰ffŽ“size,‘UU93Ž¡’ ÷®and‘™˜‰ffŽ‘™šjmp,‘UU92Ž¡’ ÷®atom‘™˜‰ffŽ–™št¸ãypGe‘™˜‰ffŽ“ ag,‘UU92Ž¡’ ÷®chr‘™˜‰ffŽ‘™šcons,‘UU94Ž¡’ ÷®doub‘™˜‰ffŽ‘™šcons,‘UU94Ž¡’ ÷® t‘™˜‰ffŽ‘™šcons,‘UU94Ž¡’ ÷®full‘™˜‰ffŽ‘™šb•¸ãrack“eting,‘UU93Ž¡’ ÷®handler,‘UU63Ž¡’ ÷®hastab,‘UU94Ž¡’ ÷®hastab‘™˜‰ffŽ‘™šgoto,‘UU94Ž¡’ ÷®hastab‘™˜‰ffŽ‘™št¸ãypGe,‘UU94Ž¡’ ÷®identtab,‘UU94Ž¡’ ÷®identtab‘™˜‰ffŽ‘™šloGc,‘UU94Ž¡’ ÷®initialize‘™˜‰ffŽ‘™šonly,‘UU93Ž¡’ ÷®integer‘™˜‰ffŽ‘™šcons,‘UU94Ž¡’ ÷®internal‘™˜‰ffŽ‘™št¸ãypGe,–UU47,“78Ž¡’ ÷®is‘™˜‰ffŽ‘™šaddress,‘UU92Ž¡’ ÷®it‘™˜‰ffŽ–™šis‘™˜‰ffŽ“in‘™˜‰ffŽ“case,‘UU92Ž¡’ ÷®jmp1,‘UU92Ž¡’ ÷®loGcal,–UU56,“96Ž¡’ ÷®loGokup,‘UU95Ž¡’ ÷®main‘™˜‰ffŽ‘™šde ned,‘UU93Ž¡’ ÷®name,‘UU46Ž¡’ ÷®o¸ãr‘™˜‰ffŽ‘™šjmp,‘UU92Ž¡’ ÷®pa¸ãram‘™˜‰ffŽ‘™š ag,‘UU92Ž¡’ ÷®pi,‘UU94Ž¡’ ÷®pi‘™˜‰ffŽ‘™št¸ãypGe,‘UU94Ž¡’ ÷®sto¸ãrage,‘UU46Ž¡’ ÷®struct‘™˜‰ffŽ–™šunion‘™˜‰ffŽ“ eld,‘UU92Ž¡’ ÷®subscript‘™˜‰ffŽ‘™š ag,‘UU92Ž¡’ ÷®t¸ãypGe,‘UU94Ž¡’ ÷®t¸ãypGetab,‘UU94Ž¡’ ÷®va¸ãriable,–UU92,“93Ž¡’ ÷®vid‘™˜‰ffŽ‘™šcons,‘UU94Ž¡’÷÷®va¸ãriable,–UU92,“93Ž¡’÷÷®vfalse,‘UU97Ž¡’÷÷®vid‘™˜‰ffŽ‘™šcons,‘UU94Ž¡’÷÷®virtual–UUmachine,“12,“47,“56,“63,“66,“67,“93,“95Ž¡’÷÷®ÎV®9OID‘°¡‰ffs4Ž‘#ÕPÐ,‘UU97Ž¡’÷÷®vtrue,‘UU97ަ’÷÷®w•¸ãa“rning,‘UU95ަ’÷÷®ÎYESÐ,‘UU96Ž¡’÷÷®yypa¸ãrse,‘UU97ŽŽŽŽŽŽŒ‹Pµ ÀÙ ýÚÇ ÐÙ¸ ý›¤È‘ôž|ëUCon–ÿ8õten“tsŽŸ>Ús‘ôž|óeñkAH cmssbx10ëeGNU–ª¬GENERAL“PUBLIC“LICENSE’:Õ·1ŽŽ¤ ƒ‘ž}ÐPreambleqŽ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²1ŽŽ¡‘ž}ÐGNU–lvGENERAL“PUBLIC“LICENSE“TERMS“AND“CONDITIONS“F¸ãOR“COPYING,‘l|DISTRIBUTION“ANDŽŸ ‘žMODIFICA‘ÿ*ªTION º‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²1ŽŽ¡‘ž}ÐHo¸ãw–UUto“Apply“These“T›ÿ*ªerms“to“Y˜our“New“Programs‘鱑ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²5ŽŽ¤Ús‘ôž|ëeContributo±Çrs–ª¬to“the“ÐClif’tP#7ŽŽ¡‘ôž|ëe1Ž‘ž}Compiling‘ª¬options’|é 9ŽŽ¤ ƒ‘ž}Ð1.1Ž‘žOption‘UU{enable-CONTROL‘æw‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²9ŽŽ¡‘ž}Ð1.2Ž‘žOption‘UU{enable-CODEu‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²9ŽŽ¡‘ž}Ð1.3Ž‘žOption‘UU{enable-DEBUG‘Ñ0‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²9ŽŽ¡‘ž}Ð1.4Ž‘žOption‘UU{enable-CHKST‘ÿ*ªA¸ãCK‘âß‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²9ŽŽ©Ús‘ôž|ëe2Ž‘ž}Invoking‘ª¬ÐClif’’k911ŽŽ¡‘ž}2.1Ž‘žOptions‘UUsumma¸ãry‘[÷‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²11ŽŽ¡‘ž}Ð2.2Ž‘žMemo¸ãry–UUsize“options‘´Ñ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²11ŽŽ¡‘ž}Ð2.3Ž‘žOptions–UUcontrolling“Clif“bGehavio¸ãr‘)ï‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²11ŽŽ¡‘ž}Ð2.4Ž‘žDebugging‘UUoptions‘›õ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²12ŽŽ¡‘ž}Ð2.5Ž‘žW•¸ãa“rning‘UUoptions‘Å‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²12ŽŽ¦‘ôž|ëe3Ž‘ž}Erro±Çrs’®³Á13ŽŽ¡‘ž}Ð3.1Ž‘žClif–UUerro¸ãr“messages8h‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²13ŽŽ¡‘žÐ3.1.1Ž‘:ž‚Syntax–UUerro¸ãr“messages‘¿S‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²13ŽŽ¡‘žÐ3.1.2Ž‘:ž‚Clif–UUcompilation“erro¸ãr“messages‘"¼‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²15ŽŽ¡‘žÐ3.1.3Ž‘:ž‚Clif–UUcontrol“statement“erro¸ãr“messages‘·ò‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²16ŽŽ¡‘žÐ3.1.4Ž‘:ž‚Clif–UUrun-time“erro¸ãr“messages‘0þ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²16ŽŽ¡‘žÐ3.1.5Ž‘:ž‚Clif–UUfatal“erro¸ãr“messages‘©÷‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²17ŽŽ¡‘žÐ3.1.6Ž‘:ž‚Clif›UUw•¸ãa“rning˜messages‘¬‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²17ŽŽ¡‘žÐ3.1.7Ž‘:ž‚Clif–UUinitialization“erro¸ãr“messages‘_'‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²20ŽŽ¦‘ôž|ëe4Ž‘ž}Syntax–ª¬of“the“language’_«#21ŽŽ¡‘ž}Ð4.1Ž‘žSyntax–UUof“the“graphical“subsystem“language‘pÙ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²40ŽŽ¦‘ôž|ëe5Ž‘ž}Interp•±Çreter‘ª¬o“rganization’]«#41ŽŽ¡‘ž}Ð5.1Ž‘žInstruction–UUset“of“the“virtual“machine‘FR‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²41ŽŽ¡‘žÐ5.1.1Ž‘:ž‚Address–UUinstructions“and“instructions“on“the“a¸ãrithmetic“stack‘°z‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²41ŽŽ¡‘žÐ5.1.2Ž‘:ž‚Stack‘UUinstructions‘Ø‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²44ŽŽ¡‘žÐ5.1.3Ž‘:ž‚T‘ÿ*ªempGo•¸ãra“ry–UUstack“instructions‘©ß‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²45ŽŽ¡‘žÐ5.1.4Ž‘:ž‚Input–UUand“output“instructions‘©â‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²45ŽŽ¡‘žÐ5.1.5Ž‘:ž‚Control‘UUinstructions‘8B‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²45ŽŽ¡‘ž}Ð5.2Ž‘žStoš¸ãrage–UUof“va˜riables,“hash“tables‘[µ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²46ŽŽ¡‘ž}Ð5.3Ž‘žFixation–UUand“f‘±Çixative“structures‘¿J‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²50ŽŽ¡‘ž}Ð5.4Ž‘žP•¸ãa“rameter–UUpassing“mechanism‘bÜ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²56ŽŽ¡‘ž}Ð5.5Ž‘žStack‘êf‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²56ŽŽ¡‘ž}Ð5.6Ž‘žCompiled‘UUstatement‘¿‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²56ŽŽŽŸK’å iŽŽŒ‹a¨ ÀÙ ýÚÇ‘ÛÝq²ii’¥UêÍCONTENTSŽŽ ÐÙ¸ ýK7‘ÛÝqëe6Ž‘êÝrDi erent–ª¬level“of“user“interfaces“to“the“interp±Çreter“ÐClif’ÒŠI59ŽŽ¤ ‘êÝr6.1Ž‘ÝvIntrinsic‘UUfunctions‘M¿‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²59ŽŽ¡‘êÝrÐ6.2Ž‘ÝvMain–UUaš¸ãreas“of“alloGcated“memo˜ry‘ñ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²61ŽŽ¡‘êÝrÐ6.3Ž‘ÝvHash–UUtables“and“hash“function‘†j‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²61ŽŽ¡‘êÝrÐ6.4Ž‘ÝvAdding–UUnew“data“t¸ãypGe‘ÿt‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²62ŽŽ©‘ÛÝqëe7Ž‘êÝrInterrupt‘ª¬services’zn63ŽŽ¡‘êÝrÐ7.1Ž‘ÝvSynchronous–UUinterrupt“service“function‘¸‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²65ŽŽ¡‘êÝrÐ7.2Ž‘ÝvAsynchronous–UUinterrupt“service“function‘]‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²66ŽŽ¡‘êÝrÐ7.3Ž‘ÝvInterp¸ãreter–UUinput“functions"ó‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²67ŽŽ¦‘ÛÝqëe8Ž‘êÝrGraphic‘ª¬interface’{g73ŽŽ¡‘êÝrÐ8.1Ž‘ÝvGraphic‘UUp¸ãrimitives‘[÷‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²73ŽŽ¡‘ÝvÐ8.1.1Ž‘!ÝwF•¸ãunction‘UUwindo“w()‘ø@‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²73ŽŽ¡‘ÝvÐ8.1.2Ž‘!ÝwF¸ãunction‘UUmove()‘†‰‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²73ŽŽ¡‘ÝvÐ8.1.3Ž‘!ÝwF•¸ãunction‘UUdra“w()‘”Á‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²74ŽŽ¡‘ÝvÐ8.1.4Ž‘!ÝwF•¸ãunction‘UUdra“w‘™˜‰ffŽ‘™špGoint()‘³ò‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²74ŽŽ¦‘ÛÝqëe9Ž‘êÝrInternal–ª¬repš±Çresentation“of“t˜ypN9es’9¼+77ŽŽ¡‘êÝrÐ9.1Ž‘ÝvRepš¸ãresentation–UUof“a“t˜ypGe‘f‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²77ŽŽ¡‘êÝrÐ9.2Ž‘ÝvC-language–UUsubset“of“t¸ãypGe‘T»‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²79ŽŽ¡‘ÝvÐ9.2.1Ž‘!ÝwInternal–UUrepš¸ãresentation“of“t˜ypGedef‘@‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²82ŽŽ¡‘ÝvÐ9.2.2Ž‘!ÝwInternal–UUrep¸ãresentation“of“pGointer‘ \‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²82ŽŽ¡‘ÝvÐ9.2.3Ž‘!ÝwInternal–UUrep¸ãresentation“of“enumeration‘MD‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²82ŽŽ¡‘ÝvÐ9.2.4Ž‘!ÝwInternal–UUrep¸ãresentation“of“structure‘0ã‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²82ŽŽ¡‘ÝvÐ9.2.5Ž‘!ÝwInternal–UUrep¸ãresentation“of“union‘Ûž‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²82ŽŽ¡‘êÝrÐ9.3Ž‘ÝvCošGding–UUof“C-language“subset“of“t¸ãyp˜e“and“exp˜oš¸ãrt“t˜ypGe‘©•‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²82ŽŽ¡‘êÝrÐ9.4Ž‘ÝvNotes–UUto“the“implementation“of“internal“t¸ãypGes‘ðÕ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²86ŽŽ¦‘ÛÝqëe10Ž‘êÝrFiles–ª¬of“the“ÐClif’…LŸ89ŽŽ¡‘êÝr10.1Ž‘ÝvFile‘UU`alloGcx.c'c*‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²89ŽŽ¡‘êÝrÐ10.2Ž‘ÝvFile‘UU`comp‘™˜‰ffŽ‘™šmaint.c'‘Wª‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²89ŽŽ¡‘êÝrÐ10.3Ž‘ÝvFile‘UU`control.h'‘Té‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²91ŽŽ¡‘êÝrÐ10.4Ž‘ÝvFile‘UU`de ne.h'‘Ƴ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²91ŽŽ¡‘êÝrÐ10.5Ž‘ÝvFile‘UU`dbg-out.c'‘j8‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²91ŽŽ¡‘êÝrÐ10.6Ž‘ÝvFile‘UU`geninstr.h'‘ÿ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²91ŽŽ¡‘êÝrÐ10.7Ž‘ÝvFile‘UU`input.c'‘Íבü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²91ŽŽ¡‘êÝrÐ10.8Ž‘ÝvFile‘UU`instr.h'‘*H‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²92ŽŽ¡‘êÝrÐ10.9Ž‘ÝvFile‘UU`k•¸ãeyw“o“rd.gpGerf‘±Ç'‘F”‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²92ŽŽ¡‘êÝrÐ10.10Ž‘ÝvFile‘UU`pa¸ãrser.h'‘Í‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²92ŽŽ¡‘êÝrÐ10.11Ž‘ÝvFile‘UU`pso.c'‘†Â‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²93ŽŽ¡‘êÝrÐ10.12Ž‘ÝvFile‘UU`s-conv.c'‘±]‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²93ŽŽ¡‘êÝrÐ10.13Ž‘ÝvFile‘UU`s-conv.h'‘øy‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²94ŽŽ¡‘êÝrÐ10.14Ž‘ÝvFile‘UU`tables.c' בü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²94ŽŽ¡‘êÝrÐ10.15Ž‘ÝvFile‘UU`t¸ãypGe.h'‘¿‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²96ŽŽ¡‘êÝrÐ10.16Ž‘ÝvFile‘UU`virtual‘™˜‰ffŽ‘™šmachine.c'‘ž¶‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²97ŽŽ¡‘êÝrÐ10.17Ž‘ÝvFile‘UU`ys.h'‘\‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²97ŽŽ¡‘êÝrÐ10.18Ž‘ÝvFile‘UU`ys.y'#:‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²97ŽŽ¦‘ÛÝqëe11Ž‘êÝrSome–ª¬implementation“details’D¾R99ŽŽ¡‘êÝrÐ11.1Ž‘ÝvP•¸ãost x›UUopGerato“rs˜(pGost x˜increment˜and˜decrement)‘©–‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²99ŽŽ¡‘êÝrÐ11.2Ž‘ÝvAggregate‘UUassigning‘# ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²99ŽŽ¦‘ÛÝqëe12Ž‘êÝrBug‘ª¬repN9o±Çrt’’`†101ŽŽ¡‘êÝrÐ12.1Ž‘ÝvProblems‘1t‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ Њ²101ŽŽŽŽŒ‹œY ÀÙ ýÚÇ ÐÙ¸ ý›7‘ôž|ëUList– T{of“FiguresŽŸ4‘ž}Ð5.1Ž‘žFixation–UUin“while‘Æ©‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²52ŽŽ¤ ‘ž}Ð5.2Ž‘žFixation–UUin“fo¸ãr‘¯‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²53ŽŽ¡‘ž}Ð5.3Ž‘žFixation–UUin“if‘ÿœ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²53ŽŽ¡‘ž}Ð5.4Ž‘žFixation–UUof“continue‘ª&‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²54ŽŽ¡‘ž}Ð5.5Ž‘žFixation–UUof“b¸ãreak Á‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²54ŽŽ¡‘ž}Ð5.6Ž‘žFixation–UUof“return‘ º‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²54ŽŽ¡‘ž}Ð5.7Ž‘žFixation–UUof“switch‘ÿƒ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²55ŽŽŸ‘ž}Ð9.1Ž‘žRepš¸ãresentation–UUof“the“t˜ypGe“decla˜ration“int“a(int“b,“int“c(.....),“....);‘——‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²78ŽŽ¡‘ž}Ð9.2Ž‘žRepš¸ãresentation–UUof“the“t˜ypGe“decla˜ration“int“a[10][20];‘4J‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²79ŽŽ¡‘ž}Ð9.3Ž‘žRepš¸ãresentation–UUof“t˜ypical“C-lik˜e“function“decla˜ration.‘4C‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²80ŽŽ¡‘ž}Ð9.4Ž‘žT‘ÿ*ªree–UUpattern“of“the“decla¸ãration“int“a(int“b[“],int“c);‘~ø‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²80ŽŽ¡‘ž}Ð9.5Ž‘žT‘ÿ*ªree–UUpattern“of“the“decla¸ãration“int“a[“][“][“];‘To‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²81ŽŽ¡‘ž}Ð9.6Ž‘žT‘ÿ*ªree–UUpattern“of“the“decla¸ãration“int“a(int“b[“][“]µ:–ª¨:“:Ž› ª§Ð,“int“c[“][“]µ:–ª¨:“:Ž˜Ð,µ:–ª¨:“:Ž˜Ð);Eæ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²81ŽŽ¡‘ž}Ð9.7Ž‘žInternal–UUrepš¸ãresentation“of“t˜ypGedef“int“c[3][3];‘÷ø‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²83ŽŽ¡‘ž}Ð9.8Ž‘žInternal–UUrepš¸ãresentation“of“cha˜r“**a;‘¸‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²84ŽŽ¡‘ž}Ð9.9Ž‘žInternal–UUrepš¸ãresentation“of“enum“num“¸f“Ðone,“t˜w˜o,“three“¸gÐ;‘›M‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²85ŽŽ¡‘ž}Ð9.10Ž‘žInternal–UUrep¸ãresentation“of“struct“a“¸f“Ðint“a,“int“b,“int“c¸gÐ;‘ð­‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²85ŽŽ¡‘ž}Ð9.11Ž‘žInternal–UUrep¸ãresentation“of“union“a“¸f“Ðint“a,“ oat“b,“double“c¸gÐ;‘°“‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²86ŽŽ¡‘ž}Ð9.12Ž‘žInternal–UUtš¸ãypGe“rep˜resentation“of“function“in“fo˜rm“extern“int“a(int“b,“int“c[][10],“....)...‘šÜ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²87ŽŽ¡‘ž}Ð9.13Ž‘žRecursive–UUstructure“decla¸ãration‘ÂÛ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²88ŽŽŽŸK’âMiiiŽŽŒøìÃ’À;èÀÙØPà róeñkAH cmssbx10óX‚ÎR6ff cmss12óWÂÖN ½q cmbx12óVÖÆáHG®cmss17óUÂÖN áH cmbx12óHÖÆG®G®cmss17ó>DÓítG®G®cmr17ó<ÂÖN ff cmbx12ó9X«Q ff cmr12ó7‚ÎR6 cmss12ó5ÂÖN  cmbx12ó2!",š cmsy10ó0X«Q cmr12ó'Kñ`y ó3 cmr10ó%m#½R cmss10ó$ßê cmmi10óO Ú\cmmi5óKñ`y cmr10óÙ“ Rcmr7ó†›Zcmr5óäO£ line10óú±u cmex10ù mßßßßßßclif-0.93/doc/guide_programmers.tex100444 1750 1750 1132517 7130616707 16222 0ustar korenkoren\documentstyle[makeidx, psfig]{book} % \vsize 29.7cm \hsize 21.0cm %%%%%%%%%%%%%%%%%%%%%%%% \textheight 24.7cm \textwidth 17cm % % \oddsidemargin -0.40cm \topmargin -1.90cm \newcommand{\CiF}{\sf Clif} \evensidemargin -.5in \makeindex \newcommand{\mybasel}{\baselineskip 9pt} \newcommand{\myver}{0.93 } %% \title{The Interpreter \CiF \\ Programmer's Guide} \author{\v{L}. Kore\v{n} and T. Hr\'{u}z%\thanks{ %\protect \input{adr0.tex}} } \date{For version \myver\\ Last updated June 25, 2000} %% \begin{document} \maketitle \begin{titlepage} \vspace*{\fill} \noindent Copyright \copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 \v{L}. Kore\v{n} \vspace*{0.5cm} \noindent Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. \vspace*{0.5cm} \noindent Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided also that the sections entitled ``GNU General Public License'' is included exactly as in the original, and provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. \vspace*{0.5cm} \noindent Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that the section entitled ``GNU General Public License,'' and this permission notice, may be included in translations approved by the Free Software Foundation instead of in the original English. \end{titlepage} \chapter*{GNU GENERAL PUBLIC LICENSE} \addcontentsline{toc}{chapter}{GNU GENERAL PUBLIC LICENSE} \begin{center} Version 2, June 1991 \end{center} \begin{center} Copyright \copyright 1989, 1991 Free Software Foundation, Inc.\\ 675 Mass Ave, Cambridge, MA 02139, USA\\ \end{center} \begin{center} Everyone is permitted to copy and distribute verbatim copies\\ of this license document, but changing it is not allowed.\\ \end{center} \section*{Preamble} \addcontentsline{toc}{section}{Preamble} The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. \section*{ GNU GENERAL PUBLIC LICENSE\\ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\\ } \addcontentsline{toc}{section}{GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION} \begin{enumerate} \setcounter{enumi}{-1} \item This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. \item You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. \item You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: \begin{enumerate} \item You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. \item You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. \item If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) \end{enumerate} These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. \item You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: \begin{enumerate} \item Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, \item Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, \item Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) \end{enumerate} The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. \item You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. \item You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. \item Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. \item If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. \item If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. \item The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. \item If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. \begin{center} {\bf \Large NO WARRANTY } \end{center} \item BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. \item IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. \begin{center} {\bf \Large END OF TERMS AND CONDITIONS } \end{center} \newpage \section*{ How to Apply These Terms to Your New Programs} \addcontentsline{toc}{section}{How to Apply These Terms to Your New Programs} If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. \begin{verbatim} Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. \end{verbatim} Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: \begin{verbatim} Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. \end{verbatim} The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: \begin{verbatim} Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice \end{verbatim} This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. \end{enumerate} \newpage \vspace*{\fill} The document explains, comments and shows some decisions, programming techniques and solutions in \CiF. Its purpose is to highlight some important parts of the implementation and to help with possible extensions for new users. The document also helps authors to have the latest form of the implementation details in comprehensible form, as a commented manual. The document consists of the \CiF\ grammar in BNF form, description of the main interpreter organization, possibilities for including new library functions and conditions for extending the language of \CiF. Interrupt services as an option for debugging are also described. Optional graphical interface with graphic primitives is a part of the document as well. The substantial part of the document is devoted to the internal representation of types in \CiF. The chapter will be interesting for users, who want to extend the \CiF\ with new non atomary data types. %The appendix is substantial part of the parser source code of the %\CiF. It is provided with comments to help the reader in better %orientation in the environment. \chapter*{Contributors to the \CiF} \addcontentsline{toc}{chapter}{Contributors to the \CiF} In addition to \v{L}udov\'{\i}t Kore\v{n} several people contributed to the \CiF. \begin{itemize} \item Tom\'{a}\v{s} Hr\'{u}z principal planning decisions, overall design and many ideas for implementation \item Jozef Repisk\'{y} first basic (and very restricted) implementation \end{itemize} \chapter{Compiling options}\label{compiling_options} There are several additional options, that are supported during a run of {\sf configure}\index{configure@{\sf configure}} script. They are described in the following sections. \section{Option --enable-CONTROL} If a command line option {\sf --enable-CONTROL} was specified, the synchronous and asynchronous interrupts are enabled (see~\ref{int_service}). \section{Option --enable-CODE} If a command line option {\sf --enable-CODE} was specified, the output of the virtual machine code is enabled. The output file name is {\sf code}. \section{Option --enable-DEBUG} If a command line option {\sf --enable-DEBUG} was specified, the debug output is enabled on the {\sf stderr}. \section{Option --enable-CHKSTACK} If a command line option {\sf --enable-CHKSTACK} was specified, the run-time check of stack and code area is done. I.e. each instruction which grows the stack, assures that the stack does not interfere with generated code. \chapter{Invoking \CiF}\index{Clif@{\CiF}!invoking} \section{Options summary} \begin{description} \item[-bc] Size of the memory in 512-Byte pages. \item[-c] Compile only. (Not fully supported yet.) \item[-copying] Show copying. \item[Options controlling \CiF\ behavior.] -fcall-by-reference, -fno-call-by-reference, -fcall-by-value, -fno-call-by-value, -fhandle-main \item[Debugging options.] -g, -dy \item[-help] Show short help. \item[-v] Show version. \item[-version] Show version. \item[-verbose] Verbose. \item[-warranty] Show warranty. \item[Warning options.] -w, -Wcomment, -Wformat, -Wimplicit, -Wreturn-type, -Wtrigraphs, -Wuninitialized, -Wall All of the above warnings. -W, -Waggregate-return, -Wunused \end{description} \section{Memory size options} \begin{verbatim} -bc= \end{verbatim} option specifies number of 512-Byte pages for the \CiF\ environment main memory. The arithmetical and temporary stack is multiple of this option as well. \section{Options controlling \CiF\ behavior} \begin{description} \item[-fcall-by-reference] call by reference parameter passing mechanism. \item[-fno-call-by-reference] do not pass parameters by reference. \item[-fcall-by-value] call by value parameter passing mechanism. \item[-fno-call-by-value] do not pass parameters by value. From the above mentioned options, only one should be specified in positive form and one in negative form. \item[-fhandle-main] simulate compiler-like behavior. The files on the command line and included files are compiled. The `main' function must be defined. After parsing pass, the generated code is executed. The main function is the beginning of execution. \end{description} \section{Debugging options} \begin{description} \item[-g] produce debugging information. The source lines are output during virtual machine code execution.\index{virtual machine} \item[-dy] dump debugging information during parsing to standard error. \end{description} \section{Warning options} \begin{description} \item[-w] Inhibit all warning messages. \item[-Wcomment] Warn when a comment-start sequence `/*' appears in a comment. \item[-Wformat] Check calls to `printf' and `scanf', etc., to make sure that the arguments supplied have types appropriate to the specified format string. \item[-Wimplicit] Warn if a function or parameter is implicitly declared. \item[-Wreturn-type] Warn if the return statement is without return value in non-void function, or with a value in `void' function. \item[-Wtrigraphs] Warn about trigraphs usage. \item[-Wuninitialized] An automatic variable is used without first being initialized. \item[-Wall] All of the above warnings. \item[-W] Print extra warning messages. \item[-Waggregate-return] Warn if any functions that return structures or unions are defined or called. \item[-Wunused] Warn whenever a variable is unused aside from its declaration. \end{description} \chapter{Errors} \section{\CiF\ error messages} In this chapter is a list of \CiF\ error messages. \subsection{Syntax error messages} {\mybasel \begin{verbatim} case 1000: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "variable `%s' isn't declared\n", text); break; case 1001: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "variable `%s' was already declared\n", text); break; case 1002: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "remote procedure %s is not declared\n", proc_name_text[proc]); break; case 1003: ERROR_INFO; fprintfx (stderr, "local variable `%s' was already declared\n", text); break; case 1004: print_source_line (); ERROR_FULL_INFO(line_counter); fprintfx (stderr, "at the %d-th char, near the `%s'\n", char_counter, yytext); break; case 1005: print_source_line (); ERROR_FULL_INFO(line_counter); fprintfx (stderr, "invalid type of the operand, %d-th character\n", char_counter); break; case 1006: ERROR_INFO; fprintfx (stderr, "remote function `%s' already declared\n", text); break; case 1007: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "remote function isn't declared\n"); break; case 1008: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "remote functions are not in the load table\n"); break; case 1009: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "`void' type in expression\n"); break; case 1010: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "`void' type assigned to l_value\n"); break; case 1011: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "load can't open file `%s'\n", yytext); break; case 1012: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "variable or field `%s' declared void\n", text); break; case 1013: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "switch quantity not an integer\n"); break; case 1014: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "case label does not reduce to an integer constant\n"); break; case 1015: ERROR_FULL_INFO(tmp_c->line_number); fprintfx (stderr, "duplicate case value\n"); ERROR_FULL_INFO(tmp_m->line_number); fprintfx (stderr, "this is the first entry for that value\n"); break; case 1016: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "case label not within a switch statement\n"); break; case 1017: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "struct tag `%s' was already declared\n", text); break; case 1018: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "union tag `%s' was already declared\n", text); break; case 1019: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "enum tag `%s' was already declared\n", text); break; case 1020: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "conversion to non-scalar type requested\n"); break; case 1021: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "invalid type argument of `->'\n"); break; case 1022: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "invalid lvalue in unary `&'\n"); break; case 1023: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "storage size of `%s' isn't known\n", text); break; case 1024: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "parameter `%s' has incomplete type\n", text); break; \end{verbatim} } \subsection{\CiF\ compilation error messages} {\mybasel \begin{verbatim} case 2000: print_source_line (); ERROR_FULL_INFO(line_counter); fprintfx (stderr, "invalid number of subscripts\n"); break; case 2001: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "`%s' is not an array variable\n", text); break; case 2002: print_source_line (); ERROR_FULL_INFO(line_counter); fprintfx (stderr, "invalid type of array subscript\n"); break; case 2003: print_source_line (); ERROR_FULL_INFO(line_counter); fprintfx (stderr, "type of formal parameter does not match previous declaration\n"); break; case 2004: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "number of formal parameters does not match previous declaration\n"); break; case 2005: print_source_line (); ERROR_FULL_INFO(line_counter); fprintfx (stderr, "name of formal paramter does not match previous declaration\n"); break; case 2006: print_source_line (); ERROR_FULL_INFO(line_counter); fprintfx (stderr, "size of array subscript of formal parameter does not match previous declaration\n"); break; case 2007: print_source_line (); ERROR_FULL_INFO(line_counter); fprintfx (stderr, "number of array subscripts of formal parameter does not match previous declaration\n"); break; case 2008 : ERROR_FULL_INFO(line_counter); fprintfx (stderr, "structure has no member named `%s'\n", text); break; case 2009: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "request for member `%s' in something not a structure or union\n", text); break; \end{verbatim} } \subsection{\CiF\ control statement error messages} {\mybasel \begin{verbatim} case 3000: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "`break' outside loop or switch\n"); break; case 3001: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "bad used `continue'\n"); break; case 3002: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "default label not within a switch statement\n"); break; case 3003: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "multiple default labels in one switch\n"); ERROR_FULL_INFO(fixp->switch1.def_use.line_number); fprintfx (stderr, "this is the first default label\n"); break; case 3004: ERROR_FULL_INFO(line_counter); fprintfx (stderr, "duplicate label `%s'\n", text); break; case 3005: ERROR_FULL_INFO(error_line_number); fprintfx (stderr, "label `%s' used but not defined\n", text); break; case 3006: ERROR_FULL_INFO(error_line_number); fprintfx (stderr, "invalid lvalue in assignment\n"); break; \end{verbatim} } \subsection{\CiF\ run-time error messages} {\mybasel \begin{verbatim} case 4000: ERR_NO_INFO; fprintfx (stderr, "interpreter: full memory\n"); break; case 4001: ERR_NO_INFO; fprintfx (stderr, "interpreter: stack overflow\n"); break; case 4002: ERR_NO_INFO; fprintfx (stderr, "operating system out of memory\n"); break; \end{verbatim} } \subsection{\CiF\ fatal error messages} {\mybasel \begin{verbatim} case 5000: fprintfx (stderr, "Compile Fatal "); ERR_NO_INFO; fprintfx (stderr, "Interpreter Internal Error (unknown operand type) in line %d e-mail: %s\n", line_counter, EMAIL); print_source_line (); break; case 5001: fprintfx (stderr, "Run-time Fatal "); ERR_NO_INFO; fprintfx (stderr, " Internal Interpreter Error (unknown instruction) e-mail: %s\n", EMAIL); print_source_line (); break; case 5002: fprintfx (stderr, "Compile Fatal "); ERR_NO_INFO; fprintfx (stderr, " Interpreter Internal Error (error in book-keeping) in line %d e-mail: %s\n", line_counter, EMAIL); print_source_line (); break; case 5003: fprintfx (stderr, "Compile Fatal "); ERR_NO_INFO; fprintfx (stderr, " Internal Interpreter Error (error in operand type) in line %d e-mail: %s\n", line_counter, EMAIL); print_source_line (); break; \end{verbatim} } \subsection{\CiF\ warning messages} {\mybasel \begin{verbatim} case 6000: if (warning_yes) { ERROR_FULL_INFO(line_counter); fprintfx (stderr, "remote function %s already declared\n", text); } return; case 6001: if (warning_yes) { ERROR_FULL_INFO(line_counter); fprintfx (stderr, "`return' with no value, in function returning non-void\n"); } return; case 6002: if (warning_yes) { ERROR_FULL_INFO(line_counter); fprintfx (stderr, "`return' with a value, in function returning void\n"); } return; case 6003: if (warning_yes) { if (proc) { print_file_name (); fprintfx (stderr, " In function `%s':", proc_name_text[proc]); ERROR_INFO; fprintfx (stderr, "unused variable `%s'\n", text); } else { print_file_name (); fprintfx (stderr, " In block finishing at line %d:\n", line_counter); ERROR_INFO; fprintfx (stderr, "unused variable `%s'\n", text); } } return; case 6004: if (warning_yes) { ERROR_FULL_INFO(error_line_number); fprintfx (stderr, "label `%s' defined but not used\n", text); } return; case 6005: if (warning_yes) { ERROR_INFO; fprintfx (stderr, " `/*' within comment\n"); } return; case 6006: if (warning_yes) { if (proc) { print_file_name (); fprintfx (stderr, " In function `%s':", proc_name_text[proc]); ERROR_INFO; fprintfx (stderr, "`%s' might be used uninitialized in this function\n", text); } else { print_file_name (); fprintfx (stderr, " In block finishing at line %d:", line_counter); ERROR_INFO; fprintfx (stderr, "`%s' might be used uninitialized in the block\n", text); } } return; case 6007: if (warning_yes) { print_file_name (); fprintfx (stderr, " In function `%s':", proc_name_text[proc]); ERROR_INFO; fprintfx (stderr, "number of locals is greater than the ANSI allows\n"); } return; case 6008: if (warning_yes) { print_file_name (); fprintfx (stderr, " In function `%s':\n", proc_name_text[proc]); ERROR_INFO; fprintfx (stderr, "number of params is greater than the ANSI allows\n"); } return; case 6009: if (warning_yes) { char *tmp_line, *beg, *end, *com; int n; n = strlen(line_buf); tmp_line = malloc(n+1); if (NULL == tmp_line) { perror (""); abort (); } strcpy (tmp_line, line_buf); beg = strrchr (tmp_line, '('); if (NULL == beg) { perror (""); abort (); } beg++; com = strrchr (beg, ','); if (NULL != com) beg = com + 1; for (; *beg == ' ' || *beg == '\t'; beg++); end = strrchr (beg, ' '); com = strchr (beg, ' '); if (end != com) *end = '\0'; else tmp_line[n - 1] = '\0'; ERROR_INFO; fprintfx (stderr, "`%s' declared inside parameter list its scope is only this definition or declaration, which is probably not what you want.\n", beg); free (tmp_line); } return; \end{verbatim} } \subsection{\CiF\ initialization error messages} {\mybasel \begin{verbatim} case 7000: print_error_number (err_no); fprintfx (stderr, "in run-string and/or in `clif.ini' file\n"); break; case 7001: print_error_number (err_no); fprintfx (stderr, "interpreter: can't open file %s\n", argvv[argc_counter]); break; default: fprintfx (stderr, "Fatal error invalid error number (%d) e-mail: %s\n", err_no, EMAIL); break; \end{verbatim} } \chapter{Syntax of the language} \label{syntax} \newcommand{\s}{\mbox{$\longrightarrow$}} \newcommand{\cs}{\mbox{$\mid$}} \newcommand{\cl}{\mbox{$<$}} \newcommand{\r}{\mbox{$>$}} \newcommand{\h}{\hspace{.7in}} \begin{flushleft} \cl list\_stat\_0 \r ::= \cl list\_stat\_0 \r \cl stat\_0 \r \\ \h \cs\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl list\_stat \r ::= \cl list\_stat \r \cl stat\_1 \r \\ \h \cs \\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl stat\_0 \r ::= \cl declarations \r\\ \h \cs \cl statement \r\\ \h \cs RESUME ';'\\ \h \cs ';'\\ \h \cs \cl error \r ';'\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl stat\_1 \r ::= \cl statement \r\\ \h \cs GOTO IDENT ';' \\ \h \cs ';'\\ \h \cs \cl error \r '\}'\\ \h \cs \cl error \r ';'\\ ;\\ \newpage \end{flushleft} \par \par \begin{flushleft} \cl jump\_statement \r\\ ::= BREAK ';'\\ \h \cs CONTINUE ';'\\ \h \cs RETURN \cl expression \r ';'\\ \h \cs RETURN ';'\\ ;\\ \newpage \end{flushleft} \par \par \begin{flushleft} \cl declaration\_specifiers \r\\ ::= \cl storage\_class\_specifier \r\\ \h \cs \cl storage\_class\_specifier \r \cl declaration\_specifiers \r\\ \h \cs \cl type\_specifier \r\\ \h \cs \cl type\_specifier \r \cl declaration\_specifiers \r\\ \h \cs \cl type\_qualifier \r\\ \h \cs \cl type\_qualifier \r \cl declaration\_specifiers \r\\ ;\\ M ::=\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl declarations \r ::=\\ M \cl declaration\_specifiers \r \cl first\_dekl \r\\ \h \cs REMOTE '\{' INTRINSIC ',' STRINGC '\}' IDENT ';' \\ \h \cs REMOTE '\{' RPC ',' STRINGC '\}' IDENT ';'\\ \h \cs UNLOAD IDENT ';'\\ ;\\ \newpage \end{flushleft} \par \par \begin{flushleft} \cl statement \r ::= \cl labeled\_statement \r\\ \h \cs \cl compound\_statement \r\\ \h \cs \\ \cl expression \r ';'\\ \h \cs \cl selection\_statement \r\\ \h \cs \cl iteration\_statement \r\\ \h \cs \cl jump\_statement \r\\ \h \cs EXIT ';' \\ \h \cs CSUSPEND ';'\\ ;\\ \newpage \end{flushleft} \par \par \begin{flushleft} \cl selection\_statement \r\\ ::= IF '(' \cl expression \r ')'\\ \cl then \r\\ \h \cs SWITCH '(' \cl expression \r ')' \\ \cl switch\_body \r\\ ;\\ \newpage \end{flushleft} \par \par \begin{flushleft} \cl iteration\_statement \r\\ ::= WHILE\\ '(' \cl expression \r ')'\\ \cl while\_stat \r\\ \h \cs DO\\ \cl do\_while\_stat \r\\ WHILE '(' \cl expression \r ')' ';'\\ \h \cs FOR \cl for \r \cl for\_stat \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl while\_stat \r ::= \cl stat\_1 \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl do\_while\_stat \r \\ ::= \cl stat\_1 \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl for\_stat \r ::= \cl stat\_1 \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl for \r ::= '(' \cl expression \r ';'\\ \cl for\_expr1 \r\\ \h \cs '(' ';' \\ \cl for\_expr1 \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl for\_expr1 \r::= \cl expression \r ';'\\ \cl for\_expr2 \r\\ \h \cs ';'\\ \cl for\_expr2 \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl for\_expr2 \r::= \cl expression \r ')'\\ \h \cs ')'\\ ;\\ \newpage \end{flushleft} \par \par \begin{flushleft} \cl type\_specifier \r ::= INT \\ \h \cs DOUBLE \\ \h \cs FLOAT \\ \h \cs CHAR \\ \h \cs VOID \\ \h \cs LONG\\ \h \cs SHORT\\ \h \cs SIGNED\\ \h \cs UNSIGNED\\ \h \cs \cl struct\_or\_union\_specifier \r\\ \h \cs \cl enum\_specifier \r\\ \h \cs TYPENAME\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl type\_qualifier \r\\ ::= CONST\\ \h \cs VOLATILE\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl pointer \r\\ ::= '$\ast$'\\ \h \cs '$\ast$' \cl type\_qualifier\_list \r\\ \h \cs '$\ast$' \cl pointer \r\\ \h \cs '$\ast$' \cl type\_qualifier\_list \r \cl pointer \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl type\_qualifier\_list \r\\ ::= \cl type\_qualifier \r\\ \h \cs \cl type\_qualifier\_list \r \cl type\_qualifier \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl struct\_or\_union\_specifier \r\\ ::= \cl struct\_or\_union \r IDENT \\ '\{' \cl struct\_declaration\_list \r '\}' \\ \h \cs \cl struct\_or\_union \r \\ '\{' \cl struct\_declaration\_list \r '\}'\\ \h \cs \cl struct\_or\_union \r IDENT\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl struct\_or\_union \r\\ ::= STRUCT\\ \h \cs UNION\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl struct\_declaration\_list \r\\ ::= \cl struct\_declaration \r \\ \h \cs \cl struct\_declaration\_list \r \cl struct\_declaration \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl struct\_declaration \r\\ ::= M \cl specifier\_qualifier\_list \r \cl struct\_declarator\_list \r ';'\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl specifier\_qualifier\_list \r\\ ::= \cl type\_specifier \r\\ \h \cs \cl type\_specifier \r \cl specifier\_qualifier\_list \r\\ \h \cs \cl type\_qualifier \r \\ \h \cs \cl type\_qualifier \r \cl specifier\_qualifier\_list \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl struct\_declarator\_list \r\\ ::= \cl struct\_declarator \r\\ \h \cs \cl struct\_declarator\_list \r ',' \cl struct\_declarator \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl struct\_declarator \r\\ ::= \cl declarator \r\\ \h \cs ':' \cl constant\_expression \r\\ \h \cs \cl declarator \r ':' \cl constant\_expression \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl enum\_specifier \r\\ ::= ENUM '\{' \\ \cl enumerator\_list \r '\}'\\ \h \cs ENUM IDENT '\{' \\ \cl enumerator\_list \r '\}'\\ \h \cs ENUM IDENT \\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl enumerator\_list \r\\ ::= \cl enumerator \r\\ \h \cs \cl enumerator\_list \r ',' \cl enumerator \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl enumerator \r\\ ::= IDENT\\ \h \cs IDENT '=' \cl constant\_expression \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl declarator \r\\ ::= \cl pointer \r \cl direct\_declarator \r\\ \h \cs \cl direct\_declarator \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl direct\_declarator \r\\ ::= IDENT\\ \h \cs IDENT \cl list\_dim \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl initializer \r\\ ::= \cl assignment\_expression \r\\ \h \cs '\{' \\ \cl initializer\_list\_complete \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl initializer\_list\_complete \r\\ ::= \cl initializer\_list \r '\}'\\ \h \cs \cl initializer\_list \r ',' '\}'\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl initializer\_list \r\\ ::= \cl initializer \r\\ \h \cs \cl initializer\_list \r ','\\ \cl initializer \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl type\_name \r\\ ::= M \cl specifier\_qualifier\_list \r\\ \h \cs M \cl specifier\_qualifier\_list \r \cl abstract\_declarator \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl abstract\_declarator \r\\ ::= \cl pointer \r\\ \h \cs \cl direct\_abstract\_declarator \r\\ \h \cs \cl pointer \r \cl direct\_abstract\_declarator \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl direct\_abstract\_declarator \r\\ ::= '(' \cl abstract\_declarator \r ')'\\ \h \cs '$[$' '$]$'\\ \h \cs \cl direct\_abstract\_declarator \r '$[$' '$]$'\\ \h \cs '$[$' \cl constant\_expression \r '$]$'\\ \h \cs \cl direct\_abstract\_declarator \r '$[$' \cl constant\_expression \r '$]$'\\ \h \cs '(' ')'\\ \h \cs \cl direct\_abstract\_declarator \r '(' ')'\\ \h \cs '(' \cl list\_type\_spec \r ')'\\ \h \cs \cl direct\_abstract\_declarator \r '(' \cl list\_type\_spec \r ')'\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl storage\_class\_specifier \r\\ ::= TYPEDEF\\ \h \cs EXTERN\\ \h \cs EXPORT\_T\\ \h \cs STATIC\\ \h \cs AUTO\\ \h \cs REGISTER\\ ;\\ \newpage \end{flushleft} \par \par \begin{flushleft} \cl list\_type\_spec \r ::= M \cl declaration\_specifiers \r\\ \h \cs M \cl declaration\_specifiers \r ','\\ \cl list\_type\_spec \r\\ \h \cs M \cl declaration\_specifiers \r \cl list\_dim\_or\_pointer \r\\ \h \cs M \cl declaration\_specifiers \r \cl list\_dim\_or\_pointer \r ',' \\ \cl list\_type\_spec \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl list\_dim\_or\_pointer \r ::= \cl list\_dim \r\\ \h \cs \cl pointer \r\\ \h \cs '(' \cl pointer \r ')' '(' ')'\\ \h \cs '(' \cl pointer \r ')' '(' \cl list\_type\_spec \r ')'\\ \h \cs '(' \cl pointer \r ')' \cl list\_dim \r\\ ;\\ \newpage \end{flushleft} \par \par \begin{flushleft} \cl first\_dekl \r ::= IDENT \\ \cl initializer\_optional \r \\ \h \cs IDENT \cl list\_dim \r\\ \cl initializer\_optional \r\\ \h \cs \cl pointer \r IDENT\\ \cl initializer\_optional \r\\ \h \cs \cl pointer \r IDENT \cl list\_dim \r\\ \cl initializer\_optional \r\\ \h \cs IDENT '('\\ \cl func\_first \r\\ \h \cs \cl pointer \r IDENT '('\\ \cl func\_first \r\\ \h \cs ';'\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl func\_first \r ::= ')' \\ \cl initializer\_optional \r\\ \h \cs \cl list\_type\_spec \r ')'\\ \cl initializer\_optional \r\\ \h \cs \cl list\_form\_param \r ')'\\ \cl initializer\_optional \r\\ \h \cs \cl list\_form\_param \r ')'\\ \cl compound\_statement \r\\ \h \cs ')'\\ \cl compound\_statement \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl func\_rest \r ::= ')'\\ \cl initializer\_optional \r\\ \h \cs \cl list\_type\_spec \r ')'\\ \cl initializer\_optional \r\\ \h \cs \cl list\_form\_param \r ')'\\ \cl initializer\_optional \r\\ \h \cs \cl error \r '\{'\\ ;\\ \newpage \end{flushleft} \par \par \begin{flushleft} \cl list\_dekl \r ::= IDENT\\ \cl initializer\_optional \r\\ \h \cs IDENT \cl list\_dim \r\\ \cl initializer\_optional \r\\ \h \cs IDENT '('\\ \cl func\_rest \r\\ \h \cs \cl pointer \r IDENT\\ \cl initializer\_optional \r\\ \h \cs \cl pointer \r IDENT \cl list\_dim \r\\ \cl initializer\_optional \r\\ \h \cs \cl pointer \r IDENT '('\\ \cl func\_rest \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl initializer\_optional \r\\ ::= ';' R\\ \h \cs \cl initialization \r ';'\\ \h \cs ',' R \cl list\_dekl \r\\ \h \cs \cl initialization \r\\ ',' \cl list\_dekl \r\\ ;\\ R ::=\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl initialization \r\\ ::= '=' \cl initializer \r\\ ;\\ \newpage \end{flushleft} \par \par \begin{flushleft} \cl then \r ::= \cl stat\_1 \r\\ ELSE \cl stat\_1 \r\\ \h \cs \cl stat\_1 \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl switch\_body \r ::= \cl stat\_1 \r\\ ;\\ \newpage \end{flushleft} \par \par \begin{flushleft} \cl labeled\_statement \r \\ ::= IDENT ':' \\ \cl stat\_1 \r\\ \h \cs CASE \\ \cl constant\_expression \r \\ ':' \cl stat\_1 \r\\ \h \cs DEFAULT ':' \\ \cl stat\_1 \r\\ ;\\ \newpage \end{flushleft} \par \par \begin{flushleft} \cl compound\_statement \r\\ ::= '\{' N \cl list\_stat \r '\}'\\ \h \cs '\{' N \cl list\_loc\_dekl \r \\ \cl list\_stat \r '\}'\\ ;\\ N\\ ::=\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl list\_form\_param \r \\ ::= M \cl declaration\_specifiers \r IDENT\\ \h \cs M \cl declaration\_specifiers \r IDENT ','\\ \cl list\_form\_param \r\\ \h \cs M \cl declaration\_specifiers \r IDENT \cl list\_dim \r\\ \h \cs M \cl declaration\_specifiers \r IDENT \cl list\_dim \r ',' \\ \cl list\_form\_param \r\\ \h \cs M \cl declaration\_specifiers \r \cl pointer \r IDENT\\ \h \cs M \cl declaration\_specifiers \r \cl pointer \r IDENT ','\\ \cl list\_form\_param \r\\ \h \cs M \cl declaration\_specifiers \r \cl pointer \r IDENT \cl list\_dim \r\\ \h \cs M \cl declaration\_specifiers \r \cl pointer \r IDENT \cl list\_dim \r ',' \\ \cl list\_form\_param \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl list\_dim \r ::= '$[$' '$]$'\\ \h \cs '$[$' NUMBERI '$]$'\\ \h \cs \cl list\_dim \r '$[$' NUMBERI '$]$'\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl list\_loc\_dekl \r\\ ::= M \cl declaration\_specifiers \r \cl list\_loc\_dekl\_1 \r\\ \h \cs M \cl declaration\_specifiers \r ';'\\ \h \cs M \cl declaration\_specifiers \r ';' \\ \cl list\_loc\_dekl \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl list\_loc\_dekl\_1 \r\\ ::= IDENT\\ \cl initializer\_optional\_loc \r\\ \h \cs IDENT \cl list\_dim \r\\ \cl initializer\_optional\_loc \r\\ \h \cs IDENT '(' ')'\\ \cl initializer\_optional\_loc \r\\ \h \cs IDENT '(' \cl list\_type\_spec \r ')'\\ \cl initializer\_optional\_loc \r\\ \h \cs IDENT '(' \cl list\_form\_param \r ')'\\ \cl initializer\_optional\_loc \r\\ \h \cs \cl pointer \r IDENT\\ \cl initializer\_optional\_loc \r\\ \h \cs \cl pointer \r IDENT \cl list\_dim \r\\ \cl initializer\_optional\_loc \r\\ \h \cs \cl pointer \r IDENT '(' ')'\\ \cl initializer\_optional\_loc \r\\ \h \cs \cl pointer \r IDENT '(' \cl list\_type\_spec \r ')'\\ \cl initializer\_optional\_loc \r\\ \h \cs \cl pointer \r IDENT '(' \cl list\_form\_param \r ')'\\ \cl initializer\_optional\_loc \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl initializer\_optional\_loc \r\\ ::= ';' P\\ \h \cs ';' P \\ \cl list\_loc\_dekl \r\\ \h \cs \cl local\_initialization \r ';'\\ \h \cs \cl local\_initialization \r ';'\\ \cl list\_loc\_dekl \r\\ \h \cs ',' P \cl list\_loc\_dekl\_1 \r\\ \h \cs \cl local\_initialization \r ',' \cl list\_loc\_dekl\_1 \r\\ ; \\ P ::=\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl local\_initialization \r\\ ::= '=' \cl initializer \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl call \r ::= \cl list\_param \r\\ \h \cs ')' \\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl list\_param \r ::= \cl assignment\_expression \r ')' \\ \h \cs \cl assignment\_expression \r ','\\ \cl list\_param \r\\ ;\\ \newpage \end{flushleft} \par \par \begin{flushleft} \cl primary\_expression \r\\ ::= \cl ident \r\\ \h \cs NUMBERI\\ \h \cs NUMBERUI\\ \h \cs NUMBERLI\\ \h \cs NUMBERLUI\\ \h \cs NUMBERD\\ \h \cs NUMBERLD\\ \h \cs NUMBERF\\ \h \cs STRINGC\\ \h \cs WSTRINGC\\ \h \cs NUMBERC\\ \h \cs '(' \cl expression \r ')'\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl ident \r ::= IDENT\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl postfix\_expression \r\\ ::= \cl primary\_expression \r\\ \h \cs \cl postfix\_expression \r\\ '$[$' \cl expression \r '$]$'\\ \h \cs \cl postfix\_expression \r '.' IDENT\\ \h \cs \cl postfix\_expression \r PTR IDENT\\ \h \cs \cl postfix\_expression \r PP\\ \h \cs \cl postfix\_expression \r MM\\ \h \cs \cl postfix\_expression \r '('\\ \cl call \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl unary\_expression \r\\ ::= \cl postfix\_expression \r\\ \h \cs '\&' \cl unary\_expression \r\\ \h \cs '$\ast$' \cl unary\_expression \r\\ \h \cs NEG\_T \cl unary\_expression \r \\ \h \cs NEG\_B \cl unary\_expression \r\\ \h \cs '+' \cl unary\_expression \r\\ \h \cs '-'\\ \cl unary\_expression \r\\ \h \cs PP \cl unary\_expression \r \cl ae\_empty \r\\ \h \cs MM \cl unary\_expression \r \cl ae\_empty \r\\ \h \cs SIZEOF \cl unary\_expression \r\\ \h \cs SIZEOF '(' \cl type\_name \r ')'\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl cast\_expression \r\\ ::= \cl unary\_expression \r\\ \h \cs '(' \cl type\_name \r ')' \cl cast\_expression \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl multiplicative\_expression \r\\ ::= \cl cast\_expression \r\\ \h \cs \cl multiplicative\_expression \r '$\ast$' \cl cast\_expression \r\\ \h \cs \cl multiplicative\_expression \r '/' \cl cast\_expression \r\\ \h \cs \cl multiplicative\_expression \r '\' \cl cast\_expression \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl additive\_expression \r\\ ::= \cl multiplicative\_expression \r\\ \h \cs \cl additive\_expression \r '+' \cl multiplicative\_expression \r\\ \h \cs \cl additive\_expression \r '-' \cl multiplicative\_expression \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl shift\_expression \r\\ ::= \cl additive\_expression \r\\ \h \cs \cl shift\_expression \r SHIL \cl additive\_expression \r\\ \h \cs \cl shift\_expression \r SHIR \cl additive\_expression \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl relational\_expression \r\\ ::= \cl shift\_expression \r\\ \h \cs \cl relational\_expression \r '$<$' \cl shift\_expression \r\\ \h \cs \cl relational\_expression \r '$>$' \cl shift\_expression \r\\ \h \cs \cl relational\_expression \r LQ \cl shift\_expression \r\\ \h \cs \cl relational\_expression \r GQ \cl shift\_expression \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl equality\_expression \r\\ ::= \cl relational\_expression \r\\ \h \cs \cl equality\_expression \r EQ\_A \cl relational\_expression \r\\ \h \cs \cl equality\_expression \r NE\_A \cl relational\_expression \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl bit\_AND\_expression \r\\ ::= \cl equality\_expression \r\\ \h \cs \cl bit\_AND\_expression \r '\&' \cl equality\_expression \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl exclusive\_OR\_expression \r\\ ::= \cl bit\_AND\_expression \r\\ \h \cs \cl exclusive\_OR\_expression \r ' $\hat{}$ ' \cl bit\_AND\_expression \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl inclusive\_OR\_expression \r\\ ::= \cl exclusive\_OR\_expression \r\\ \h \cs \cl inclusive\_OR\_expression \r '\cs' \cl exclusive\_OR\_expression \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl logical\_AND\_expression \r\\ ::= \cl inclusive\_OR\_expression \r\\ \h \cs \cl logical\_AND\_expression \r AND\_A \\ \cl inclusive\_OR\_expression \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl logical\_OR\_expression \r\\ ::= \cl logical\_AND\_expression \r\\ \h \cs \cl logical\_OR\_expression \r OR\_A \\ \cl logical\_AND\_expression \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl conditional\_expression \r\\ ::= \cl logical\_OR\_expression \r\\ \h \cs \cl logical\_OR\_expression \r '?' \\ \cl expression \r ':' \\ \cl conditional\_expression \r\\ ;\\ \newpage \end{flushleft} \par \par \begin{flushleft} \cl assignment\_expression \r\\ ::= \cl conditional\_expression \r\\ \h \cs \cl unary\_expression \r\\ '=' \cl assignment\_expression \r \\ \h \cs \cl unary\_expression \r \cl assignment\_operator \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl ae\_empty \r::=\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl assignment\_operator \r\\ ::= MUL\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\ \h \cs DIV\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\ \h \cs MOD\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\ \h \cs ADD\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\ \h \cs SUB\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\ \h \cs LEFT\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\ \h \cs RIGHT\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\ \h \cs AND\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\ \h \cs XOR\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\ \h \cs OR\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\ ;\\ \newpage \end{flushleft} \par \par \begin{flushleft} \cl expression \r\\ ::= \cl assignment\_expression \r\\ \h \cs \cl expression \r ',' \\ \cl assignment\_expression \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl constant\_expression \r\\ ::= \cl conditional\_expression \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl operator \r ::= any character from the set: \cs \verb| + - / \% < > & && == <= >= != * | $<<$ $>>$ $\hat{}$ $\tilde{}$ $!$ \cs \cs \\ \end{flushleft} \par \par \begin{flushleft} \cl numberi \r ::= \cl number \r \\ \h \cs numberi \r \cl number \r \\ \end{flushleft} \par \par \begin{flushleft} \cl numberc \r ::= any single character \\ \end{flushleft} \par \par \begin{flushleft} \cl numberd \r ::= \cl numberi \r . \cl numberi \r \\ \h \cs . \cl numberi \r \\ \h \cs \cl numberi \r . \\ \end{flushleft} \par \par \begin{flushleft} \cl number \r ::= digit from the set: 0,1,2,3,4,5,6,7,8,9\\ \end{flushleft} \par \par \begin{flushleft} \cl stringc \r ::= Sequence one or more characters, first character is a letter followed by letters or digits\\ \end{flushleft} \par \par \begin{flushleft} \cl ident \r ::= Sequence one or more characters, first character is a letter followed by letters or digits\\ \end{flushleft} The statement LOAD\nolinebreak[4](\nolinebreak[4]file\_name\nolinebreak[4]); is only processed by lexical analyzer - yylex which opens file {\em file\_name} and redirects input to the input from that file. \section{Syntax of the graphical subsystem language} \begin{flushleft} \cl list\_stat\_0 \r ::= \cl list\_stat\_0 \r \cl stat\_0 \r\\ \h \cs\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl stat\_0 \r ::= FIELDS '=' NUMBERI\\ \h \cs TYPE '=' STRING\\ \h \cs PRINT\_FORMAT '=' STRING\\ \h \cs ON\_LEAVE\_WINDOW '=' STRING\\ \h \cs DIRECTION '=' STRING\\ \h \cs START\_TIME '=' \cl s\_time \r\\ \h \cs DURATION\_TIME '=' \cl d\_time \r\\ \h \cs W\_RESOLUTION '=' NUMBERI NUMBERI\\ \h \cs LOWER '(' NUMBERI ')' '=' NUMBERD\\ \h \cs UPPER '(' NUMBERI ')' '=' NUMBERD\\ \h \cs STYLE '(' NUMBERI ')' '=' NUMBERI\\ \h \cs \cl error \r\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl d\_time \r ::= NUMBERD \\ \h \cs AUTOMATIC\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl s\_time \r ::= NUMBERD\\ \h \cs AUTOMATIC\\ ;\\ \end{flushleft} \par \par \begin{flushleft} \cl numberi \r ::= \cl number \r \\ \h \cs \cl numberi \r \cl number \r \\ \end{flushleft} \par \par \begin{flushleft} \cl numberd \r ::= \cl numberi \r . \cl numberi \r \\ \h \cs . \cl numberi \r \\ \h \cs \cl numberi \r . \\ \end{flushleft} \par \par \begin{flushleft} \cl number \r ::= digit from the set: 0,1,2,3,4,5,6,7,8,9\\ \end{flushleft} \newcommand{\med}{\hspace{2cm}} \chapter{Interpreter organization} \section{Instruction set of the virtual machine}\label{stroj}\index{instruction!set} Notation:\index{notation}\\ $ADR$- address of the memory cell\\ %$ADR\_STACK$- the address stack register\\ $AST$- the arithmetic stack register\\ $BP$- the base pointer, it is used in relative address mode\index{BP@{\bf BP}}\\ $TMP$- the temporary stack register, it is used in addressing of temporary variables\\ $TMPH$- the temporary stack register, it is used in resetting of the temporary stack\\ $NUM$- offset in address or value\\ $STRING$- a string\\ %$INDEX$- offset in arrays\\ $STACK$- the stack register\\ $FRAME$- the stack register used in parameter passing to the intrinsic functions\\ $[x]$- a value to which x points to\\ %$[[$ $]]$- content of content of a cell\\ \cl $integer$ \r- an integer literal\\ \cl $double$ \r- a double precision floating point literal\\ \cl $float$ \r- a single precision floating point literal\\ \cl $char$ \r- a byte\\ Instructions have a variable length. The structure of the instructions is the following: major, minor, immediately. Immediately can be either address or value. In the following table is the summary of instruction types. \begin{center}\label{instructions} \index{structure!OPERAND\_0\_ma@{\bf OPERAND\_0\_ma}} \index{OPERAND\_0\_ma@{\bf OPERAND\_0\_ma}} \index{structure!OPERAND\_0\_mi@{\bf OPERAND\_0\_mi}} \index{OPERAND\_0\_mi@{\bf OPERAND\_0\_mi}} \index{structure!OPERAND\_1\_ma@{\bf OPERAND\_1\_ma}} \index{OPERAND\_1\_ma@{\bf OPERAND\_1\_ma}} \index{structure!OPERAND\_1\_mi@{\bf OPERAND\_1\_mi}} \index{OPERAND\_1\_mi@{\bf OPERAND\_1\_mi}} \index{structure!OPERAND\_1\_i@{\bf OPERAND\_1\_i}} \index{OPERAND\_1\_i@{\bf OPERAND\_1\_i}} \index{structure!OPERAND\_1\_id@{\bf OPERAND\_1\_id}} \index{OPERAND\_1\_id@{\bf OPERAND\_1\_id}} \index{structure!OPERAND\_1\_if@{\bf OPERAND\_1\_if}} \index{OPERAND\_1\_if@{\bf OPERAND\_1\_if}} \index{structure!OPERAND\_1\_ic@{\bf OPERAND\_1\_ic}} \index{OPERAND\_1\_ic@{\bf OPERAND\_1\_ic}} \begin{tabular}{|c|c|c|} \hline type & parameters & size \\ \hline \hline OP\_0\_ma & major & 1\\ \hline OP\_0\_mi & major & 2\\ & minor & \\ \hline OP\_1\_ma & major & 2\\ & address & \\ \hline OP\_1\_mi & major & 3\\ & minor & \\ & address & \\ \hline OP\_1\_i & major & 3\\ & minor & \\ & value & \\ \hline \end{tabular} \end{center} \subsection{Address instructions and instructions on the arithmetic stack}\index{instruction!address}\index{instruction!on arithmetic stack} Instruction {\bf MOV}\index{instruction!MOV@{\bf MOV}}.\\ Description: move data from the specified address to another specified address. The addresses are specified either as 2 consecutive addresses on the arithmetical stack, or one address is on the arithmetical stack and the second is created in the temporary stack. \\ Options:\\ $[ADR] \longleftarrow [[AST]]$ \med type OP\_0\_mi\\ The instruction is specific for each data type. We mean that the each instruction option represents a class of instructions. The instructions in each class differ by minor. For example the very first option is specific for type of operand double, float, integer, char, etc. \newline $BP \longleftarrow STACK$ \med type OP\_0\_mi\\ $STACK \longleftarrow BP$ \med type OP\_0\_mi\\ $TMPH \longleftarrow TMP$ \med type OP\_0\_mi\\ $FRAME \longleftarrow STACK$ \med type OP\_0\_mi\\ $STACK \longleftarrow FRAME$ \med type OP\_0\_mi\\ $[AST+1] \longleftarrow [AST]$ \med type OP\_0\_mi\\ $[AST] \longleftarrow [[AST]]$ \med type OP\_0\_mi\\ $[AST] \longleftarrow [AST]$ \med type OP\_0\_mi\\ $[AST] \longleftarrow [(AST - 1) + [AST]]$ \med type OP\_0\_mi $[(AST - 2) + [AST]] \longleftarrow [(AST - 1) + [AST]]$ \med type OP\_0\_mi \newline Instruction {\bf PUSHA}\index{instruction!PUSHA@{\bf PUSHA}}\\ Description: PUSH in to the arithmetic stack.\\ Options:\\ $[AST] \longleftarrow [ADR]$ \med type OP\_1\_mi\\ $[AST] \longleftarrow [BP+NUM]$ \med type OP\_1\_i\\ $[AST] \longleftarrow [[BP+NUM]]$ \med type OP\_1\_i\\ instructions are specific for each data type. \\ \newline Instruction {\bf PUSHAI}\index{instruction!PUSHAI@{\bf PUSHAI}}.\\ Description: push onto the arithmetic stack immediately\\ Options:\\ $[[AST]] \longleftarrow NUM$ \med type OP\_1\_i\\ The instruction is specific for each data type. \\ $[[AST]] \longleftarrow STRING$ \med type OP\_1\_mi\\ \newline Instruction {\bf POPA}\index{instruction!POPA@{\bf POPA}}.\\ Description: POP from the arithmetic stack.\\ Options:\\ The arithmetic stack is cleared. \med type OP\_1\_mi\\ The arithmetic stack is popped to the stack. \med type OP\_1\_i\\ The instruction is implemented for each basic data type. \newline Instruction {\bf XCHG}\index{instruction!XCHG@{\bf XCHG}}\\ Description: Exchange two addresses on the top of the arithmetic stack.\\ Options:\\ $[AST - 1] \longleftrightarrow [AST]$ \med type OP\_0\_ma\\ %\newline %$[STACK] \longleftarrow [AST]$ \med type OP\_0\_mi\\ \subsubsection{Arithmetic-logical instructions}\index{instruction!arithmetic-logical} Address of the result is placed on the top of the arithmetic stack. Evaluation is placed into the temporary stack. Arithmetic-logical instructions are specific for each data type, if it is not stated otherwise in description of an instruction. \newline Instruction {\bf ADD}\index{instruction!ADD@{\bf ADD}}.\\ Description: perform arithmetic addition on the top of arithmetic stack or to the stack pointer. On the stack can be only processed an instruction mentioned below (to the stack pointer can be only added an integer number).\\Options:\\ $[[AST-1]] \longleftarrow [[AST]]+[[AST-1]]$ \med type OP\_0\_mi\\ $STACK \longleftarrow (STACK+NUM)$ \med type OP\_1\_i\\ \newline Instruction {\bf SUB}\index{instruction!SUB@{\bf SUB}}.\\ Description: perform arithmetic subtraction on the top of arithmetic stack or from the stack pointer. On the stack can be only processed an instruction mentioned below (from the stack pointer can be only subtracted an integer number).\\Options:\\ $[[AST-1]] \longleftarrow [[AST-1]]-[[AST]]$ \med type OP\_0\_mi\\ $STACK \longleftarrow (STACK-NUM)$ \med type OP\_1\_i\\ \newline Instruction {\bf MULT}\index{instruction!MULT@{\bf MULT}}.\\ Description: perform arithmetic multiplication.\\Options:\\ $[[AST-1]] \longleftarrow [[AST]]*[[AST-1]]$ \med type OP\_0\_mi\\ \newline Instruction {\bf MOD}\index{instruction!MOD@{\bf MOD}}.\\ Description: perform arithmetic modulo operation on integers.\\Options:\\ $[[AST-1]] \longleftarrow [[AST-1]]\%[[AST]]$ \med type OP\_0\_ma\\ \newline Instruction {\bf DIV}\index{instruction!DIV@{\bf DIV}}.\\ Description: perform arithmetic division.\\Options:\\ $[[AST-1]] \longleftarrow [[AST-1]]/[[AST]]$ \med type OP\_0\_mi\\ \newline Instruction {\bf OR}\index{instruction!OR@{\bf OR}}.\\ Description: perform logical inclusive OR.\\Options:\\ $[[AST-1]] \longleftarrow [[AST-1]] \quad || \quad [[AST]]$ \med type OP\_0\_mi\\ \newline Instruction {\bf AND}\index{instruction!AND@{\bf AND}}.\\ Description: perform logical AND.\\Options:\\ $[[AST-1]] \longleftarrow [[AST-1]]\&\&[[AST]]$ \med type OP\_0\_mi\\ \newline Instruction {\bf ORB}\index{instruction!ORB@{\bf ORB}}.\\ Description: perform bitwise OR of integers.\\Options:\\ $[[AST-1]] \longleftarrow [[AST-1]] \quad | \quad [[AST]]$ \med type OP\_0\_ma\\ \newline Instruction {\bf ANDB}\index{instruction!ANDB@{\bf ANDB}}.\\ Description: perform bitwise AND of integers.\\Options:\\ $[[AST-1]] \longleftarrow [[AST-1]]\&[[AST]]$ \med type OP\_0\_ma\\ \newline Instruction {\bf EQ}\index{instruction!EQ@{\bf EQ}}.\\ Description: perform logical test for equality.\\Options:\\ $[[AST-1]] \longleftarrow [[AST-1]]==[[AST]]$ \med type OP\_0\_mi\\ \newline Instruction {\bf GR}\index{instruction!GR@{\bf GR}}.\\ Description: perform logical test for greater than.\\Options:\\ $[[AST-1]] \longleftarrow [[AST-1]]>[[AST]]$ \med type OP\_0\_mi\\ \newline Instruction {\bf LO}\index{instruction!LO@{\bf LO}}.\\ Description: perform logical test for lower than.\\Options:\\ $[[AST-1]] \longleftarrow [[AST-1]]<[[AST]]$ \med type OP\_0\_mi\\ \newline Instruction {\bf LE}\index{instruction!LE@{\bf LE}}.\\ Description: perform logical test for lower or equal.\\Options:\\ $[[AST-1]] \longleftarrow [[AST-1]]<=[[AST]]$ \med type OP\_0\_mi\\ \newline Instruction {\bf GE}\index{instruction!GE@{\bf GE}}.\\ Description: perform logical test for greater or equal.\\Options:\\ $[[AST-1]] \longleftarrow [[AST-1]]>=[[AST]]$ \med type OP\_0\_mi\\ \newline Instruction {\bf NE}\index{instruction!NE@{\bf NE}}.\\ Description: perform logical test for non equal.\\Options:\\ $[[AST-1]] \longleftarrow [[AST-1]]!=[[AST]]$ \med type OP\_0\_mi\\ \newline Instruction {\bf NEG}\index{instruction!NEG@{\bf NEG}}.\\ Description: perform logical negation.\\Options:\\ $[[AST]] \longleftarrow ! \quad [[AST]]$ \med type OP\_0\_mi\\ \newline Instruction {\bf NOT}\index{instruction!NOT@{\bf NOT}}.\\ Description: perform one's complement operation of integers.\\Options:\\ $[[AST]] \longleftarrow \tilde{} \quad [[AST]]$ \med OP\_0\_ma\\ \newline Instruction {\bf SAL}\index{instruction!SAL@{\bf SAL}}.\\ Description: perform arithmetic left shift of integers.\\Options:\\ $[[AST-1]] \longleftarrow [[AST-1]] << [[AST]]$ \med OP\_0\_ma\\ \newline Instruction {\bf SAR}\index{instruction!SAR@{\bf SAR}}.\\ Description: perform arithmetic right shift of integers.\\Options:\\ $[[AST-1]] \longleftarrow [[AST-1]] >> [[AST]]$ \med OP\_0\_ma\\ \newline Instruction {\bf XOR}\index{instruction!XOR@{\bf XOR}}.\\ Description: perform logical exclusive OR of two integers.\\Options:\\ $[[AST-1]] \longleftarrow [[AST-1]] \quad \hat{} \quad [[AST]]$ \med OP\_0\_ma\\ \subsubsection{Integer and floating point instructions}\index{instruction!integer and floating point} Instruction {\bf CVT}\index{instruction!CVT@{\bf CVT}}.\\ Description: Convert a signed quantity to a different signed data type.\\Options:\\ \cl $integer$ \r $\longrightarrow$ \cl $double$ \r\\ \cl $double$ \r $\longrightarrow$ \cl $integer$ \r\\ \cl $integer$ \r $\longrightarrow$ \cl $float$ \r\\ \cl $float$ \r $\longrightarrow$ \cl $integer$ \r\\ \cl $float$ \r $\longrightarrow$ \cl $double$ \r\\ \cl $double$ \r $\longrightarrow$ \cl $float$ \r\\ \cl $char$ \r $\longrightarrow$ \cl $integer$ \r\\ \cl $integer$ \r $\longrightarrow$ \cl $char$ \r\\ \cl $double$ \r $\longrightarrow$ \cl $char$ \r\\ \cl $char$ \r $\longrightarrow$ \cl $double$ \r\\ \cl $char$ \r $\longrightarrow$ \cl $float$ \r\\ \cl $float$ \r $\longrightarrow$ \cl $char$ \r\\ %\cl $void$ \r $\longrightarrow$ \cl $integer$ \r\\ %\cl $void$ \r $\longrightarrow$ \cl $double$ \r\\ %\cl $void$ \r $\longrightarrow$ \cl $float$ \r\\ %\cl $void$ \r $\longrightarrow$ \cl $char$ \r\\ The conversion to the wider type (more bits) can be executed either on the top of the arithmetical stack or one operand under the top of the arithmetical stack. Above instructions are of the type OP\_0\_mi. There are not listed all possibilities. Basically, there is an instruction from each type to every type. \subsection{Stack instructions}\index{instruction!on stack} Instruction {\bf PUSH}\index{instruction!PUSH@{\bf PUSH}}.\\ Description: Push value onto the stack.\\Options:\\ %$[STACK] \longleftarrow [AST]$ \med type OP\_0\_mi\\ %\newline $[STACK] \longleftarrow BP$ \med type OP\_0\_mi\\ \newline %$[STACK] \longleftarrow ADR$ \med type OP\_1\_mi\\ %\newline $[STACK] \longleftarrow TMPH$ \med type OP\_0\_mi\\ \newline $[STACK] \longleftarrow FRAME$ \med type OP\_0\_mi\\ \newline Instruction {\bf POP}\index{instruction!POP@{\bf POP}}.\\ Description: Pop value from the top of the stack.\\Options:\\ $BP \longleftarrow [STACK]$ \med type OP\_0\_mi\\ $TMPH \longleftarrow [STACK]$ \med type OP\_0\_mi\\ $FRAME \longleftarrow [STACK]$ \med type OP\_0\_mi\\ %\subsection{Address stack instruction} %Instruction {\bf PUSHAD}.\\Description: PUSH address into %the address stack.\\Options:\\ %$[ADR\_STACK] \longleftarrow [AST]$ \med type OP\_0\_ma\\ %\newline %$[ADR\_STACK] \longleftarrow (BP+NUM)$ \med type OP\_1\_i\\ %\newline %$[ADR\_STACK] \longleftarrow [BP+NUM]$ \med type OP\_1\_i\\ %\newline %$[ADR\_STACK] \longleftarrow STACK$ \med type OP\_0\_mi\\ %\newline %Instruction {\bf POPAD}.\\Description: POP address from the %address stack.\\Options:\\ %$[STACK] \longleftarrow [ADR\_STACK]$ \med type OP\_0\_ma\\ \subsection{Temporary stack instructions}\index{instruction!temporary stack} Instruction {\bf CLRT}\index{instruction!CLRT@{\bf CLRT}}.\\ Description: Clear temporary stack.\\Options:\\ $TMP \longleftarrow TMPH$ \med type OP\_0\_ma\\ \subsection{Input and output instructions}\index{instruction!input and output}\index{input!instruction}\index{output!instruction} Instruction {\bf IN}\index{instruction!IN@{\bf IN}}.\\ Description: input of the value into address; the address is specified absolutely or relatively.\\Options:\\ $IN [ADR]$ \med type OP\_1\_mi\\ $IN [BP+NUM]$ \med type OP\_1\_i\\ $IN [[BP+NUM]]$ \med type OP\_1\_i\\ $IN [ADR+[[AST - 1]]]$ \med type OP\_1\_mi\\ $IN [BP+NUM+[[AST - 1]]]$ \med type OP\_1\_i\\ $IN [[BP+NUM+[[AST - 1]]]]$ \med type OP\_1\_i\\ \newline Instruction {\bf OUT}\index{instruction!OUT@{\bf OUT}}.\\ Description: output of the content of the address; the address is specified absolutely or relatively.\\Options:\\ $OUT [ADR]$ \med type OP\_1\_mi\\ $OUT [BP+NUM]$ \med type OP\_1\_i\\ $OUT [[BP+NUM]]$ \med type OP\_1\_i\\ $OUT [ADR+[[AST - 1]]]$ \med type OP\_1\_mi\\ $OUT [BP+NUM+[[AST - 1]]]$ \med type OP\_1\_i\\ $OUT [[BP+NUM+[[AST - 1]]]]$ \med type OP\_1\_i\\ \newline Instruction {\bf MESS}\index{instruction!MESS@{\bf MESS}}.\\ Description: put string message to the standard output.\\Options: type OP\_1\_ma\\ \subsection{Control instructions}\index{instruction!control} Instruction {\bf STOP}\index{instruction!STOP@{\bf STOP}}.\\ Description: signalization of end of the virtual machine run.\\Options: type OP\_0\_ma\\ \newline Instruction {\bf INTER}\index{instruction!INTER@{\bf INTER}}.\\ Description: indicating of synchronous interrupt.\\Options: type OP\_0\_ma\\ \newline Instruction {\bf IRET}\index{instruction!IRET@{\bf IRET}}.\\ Description: return from synchronous or asynchronous interrupt.\\Options: type OP\_0\_ma\\ \newline Instruction {\bf JMP}\index{instruction!JMP@{\bf JMP}}.\\ Description: jump to the address.\\ Options: type OP\_1\_ma\\ \newline Instruction {\bf JZ}\index{instruction!JZ@{\bf JZ}}.\\ Description: If last operation is equal zero, jump to the address.\\Options: type OP\_1\_ma\\ \newline Instruction {\bf JNZ}\index{instruction!JNZ@{\bf JNZ}}.\\ Description: If last operation is not equal zero, jump to the address.\\Options: type OP\_1\_ma\\ \newline Instruction {\bf HALT}\index{instruction!HALT@{\bf HALT}}.\\ Description: system halt.\\Options: type OP\_0\_ma\\ \newline Instruction {\bf CALL}\index{instruction!CALL@{\bf CALL}}.\\ Description: call of a function. The function can be either user supplied one or intrinsic one. The intrinsic functions are either call by value or call by reference. \\Options: type OP\_1\_ma\\ \newline Instruction {\bf RET}\index{instruction!RET@{\bf RET}}.\\ Description: return from a function.\\Options: type OP\_0\_ma\\ \section{Storage of variables, hash tables}\label{storage_and_hash}\index{variable!storage} Local and global variable\index{variable!name} names and addresses are stored in hash\index{table!hashing}\index{hash!table} tables \cite{gries}. Structure record of the hash table for global variables is: \begin{verbatim} struct tab /* Hash table structure. */ { char *name; int def; /* Position in the hash table. */ int count; /* Is the variable used at all? */ int use_line_number; /* The first use of the variable. */ int l_value_flag; /* Is the variable initialized before the use? */ int declaration_line; /* Variable declaration line number. */ struct tab *next; }; \end{verbatim} \begin{verbatim} static struct tab *hastab; /* Pointer to the hash table. */ \end{verbatim} Another table is for global identifiers. Its structure is as follows:\\ \begin{verbatim} struct ident_tab /* Table of identifiers. */ { struct internal_type *type; int body; struct ident_list_str *list_formal_param; struct FIX *next; char *adr; }; \end{verbatim} \begin{verbatim} static struct ident_tab *identtab; /* Pointer to the table of identifiers. */ \end{verbatim} The structure {\sf internal\_type}\index{variable!internal\_type} is used for type of a variable, e.g. array\index{type!array}, function\index{type!function} etc. The field {\sf body} flags if the variable is declared or defined. The {\sf DIM} structure is for storing of dimensions of arrays\index{array!dimension} and has the following content: \begin{verbatim} struct range { int lower; int upper; }; \end{verbatim} The structure\index{structure!fixing} {\sf FIX} is used for fixing of calls of the function and looks as follows: \begin{verbatim} struct FIX /* List of addresses where to backpatch * undefined function. */ { char *address; struct FIX *next; }; \end{verbatim} It is a linked list. {\sf address} point to the virtual machine\index{virtual machine} code where the call address should be fixed. The table\index{table!of local variables} of local variables is allocated when local variables are defined for the first time. Then, for each new block new table is allocated. After return to scope\index{scope!of variables} \index{scope!level} level zero the tables are deallocated. The table looks like: \begin{verbatim} struct ident_tab_header { int scope_level; int pi_loc; int offset; char *file_scope; struct ident_tab_header *previous_level; struct ident_tab_loc *all; struct tab *hastab_loc; struct ident_tab_loc *table; }; struct ident_tab_loc /* Table of local identifiers. */ { struct internal_type *type; int body; int offset; char *adr; struct ident_list_str *list_formal_param; struct ident_tab_loc *previous; }; \end{verbatim} The {\sf struct ident\_tab\_header} is header for the list of tables for local identifiers. {\sf scope\_level} is nesting level of the block. The zero level is the prime level. The {\sf offset} is size in bytes that has to be added to the offset of the local variable in nested scope (i.e. in the {\sf scope\_level} + 1, if the current level is {\sf scope\_level}). The {\sf previous\_level} points to the block {\sf scope\_level} - 1. The {\sf all} is a pointer to the list of all local variables. This list can be traversed and additional information can be found. The {\sf hastab\_loc} and {\sf table} point to the hash table and identifier table, respectively of the current level. The {\sf struct ident\_tab\_loc} consists of: \begin{description} \item[type] - internal representation of type \item[offset] - offset of the variable in the current level \item[previous] - points to the previous declared variable \end{description} Pointer to the table is: \begin{verbatim} static struct ident_tab_header *identtab_loc; /* Pointer to the table of local identifiers. */ \end{verbatim} The interpreter is always searching for variables in the table of the local identifiers. If the names do not match with searched name, the interpreter proceeds in the table\index{table!of global identifiers} of the global identifiers. If the interpreter does not find the name of the variable in the hash table\index{table!hashing}\index{hash!table}, it\index{interpreter} announces an error\index{error}. Structures of the hash tables\index{table!hashing}\index{hash!table} of intrinsic functions\index{function!intrinsic} are the following: \begin{verbatim} struct remote_tab /* Hash table structure for intrinsic * functions. */ { char *name; void (*adr) PROTO((char **)); struct remote_tab *next; }; \end{verbatim} \begin{verbatim} struct remote_has_tab /* Hash table structure for intrinsic * functions. */ { char *name; int offset; struct remote_has_tab *next; }; \end{verbatim} Intrinsic functions are initially stored in the list\index{list} {\sf remote\_tab}. The functions are loaded from this list into the hash table\index{table!hashing}\index{hash!table} of the {\sf remote\_has\_tab} structure. Pointers to these structures are: \begin{verbatim} struct remote_has_tab *hastab_remote; \end{verbatim} \begin{verbatim} struct remote_tab *remote_ptr_C; /* Pointer to the structure of remote * function table. */ \end{verbatim} Hash function\index{function!hashing}\index{hash!function} \index{hash!code} is as follows: \begin{verbatim} /* * Hash function. */ static unsigned int hash_code (s, size) char *s; unsigned int size; { int c = 0; while (*s) { c = c << 1 ^ (*s); s++; } if (0 > c) c = (-c); return (c % size); } \end{verbatim} \noindent $MAX\_HAS$ is size of the hash table\index{table!hashing}\index{hash!table}. In addition, there is a table of defined types\index{type}: \begin{verbatim} static struct ident_tab_header *tagtab; /* Pointer to the table of tags. */ \end{verbatim} %\input{tables_c_hastab_type.tex} In this table are stored new types and structure tags, etc. For types, the lazy allocation is used, i.e. table is allocated only when first type is declared or defined. \section{F\/ixation and f\/ixative structures}\index{structure!fixing}\index{fixation} \label{fixation} \index{file!control.h} We use f\/ixation in the statements \index{statement!if@{\sf if}} \index{statement!while@{\sf while}} \index{statement!for@{\sf for}} \index{statement!continue@{\sf continue}} \index{statement!break@{\sf break}} \index{statement!return@{\sf return}} \index{statement!switch@{\sf switch}}{\sf if, while, for, continue, break}, {\sf return} and {\sf switch}. The f\/ixation are used in the loop statements\index{loop!statement} because of nested loops\index{loop!nested} or unknown length of the, loop respectively. Fixative structures are following: \begin{verbatim} /* * control.h * * Header of fixative structures. */ #ifndef _CONTROL_H #define _CONTROL_H typedef struct { int major; char *jmp; char *jz; struct cont1 *cnext; struct break1 *bnext; } WHILE1; typedef struct { int major; char *jn; /* Label of the JZ */ char *jmp2; /* Label of the JMP. The first JMP */ /* instruction. It is between expr2 */ /* and expr3. */ char *jmp3; /* Address where to jump if all */ /* statements of the loop are */ /* done. (See manual) */ struct break1 *bnext; struct cont1 *cnext; } FOR1; struct break1 { char *adr; struct break1 *next; }; struct cont1 { char *adr; struct cont1 *next; }; typedef struct { int major; char *jz; char *jmp; } IF1; struct default_usage { int line_number; /* Line number where the default label was used. */ int def_flag; /* Flag if the default label was used. It can be used only once per switch statement. (ANSI) */ char *adr; /* Address where to jump to in the virtual machine code. */ }; typedef struct { int major; char *jz; char *jmp; struct default_usage def_use; struct break1 *bnext; struct list_const1 *next; } SWITCH1; struct list_const1 /* The list of labels in switch statement is created. The list is at the end of switch statement checked if labels in this list are not duplicit. If there are duplicit error message is issued. */ { int line_number; /* Line number where the label was used in the switch statement. */ int constant; /* Label in switch statement. */ struct list_const1 *next; }; union fix { WHILE1 while1; FOR1 for1; IF1 if1; SWITCH1 switch1; }; \end{verbatim} \begin{verbatim} union fix *fixp; /* Pointer to the fixative stack. */ \end{verbatim} The fixation of {\sf for} statement is fully optimized, i.e. there are no jumps on jumps. It is tested if all parts, i.e. expr2 and expr3 are in the {\sf for} statement. The statement\index{statement!break@{\sf break}}\index{statement!continue@{\sf continue}} {\sf break, continue} are fixed to the end of the most inner loop. Another case is the statement {\sf return}\index{statement!return@{\sf return}}. The f\/ixation is made another way as it is mentioned above. The f\/ixative structure is: \begin{verbatim} struct return1 /* List of addresses where to backpatch * returns from a function. */ { char *adr; struct return1 *next; }; \end{verbatim} \begin{verbatim} struct return1 *rp; /* Pointer for backpatch address of */ /* return in a function. */ \end{verbatim} The epilogue of the procedure is fixed in this case (i.e. the epilogue is always executed, before the control flow reaches caller). The statement {\sf switch}\index{statement!switch@{\sf switch}} has complicated fixative structure. You can follow it in the comments attached to the fixative structure. It can be be clearer from the fig.~\ref{obr8} as well. See figures \ref{obr2}, \ref{obr3}, \ref{obr4}, \ref{obr5}, \ref{obr6}, \ref{obr7}, \ref{obr8} for the all cases of the f\/ixations. \begin{figure} \begin{center} \unitlength=1.00mm %\special{em:linewidth 0.4pt} \linethickness{0.4pt} \begin{picture}(65.00,48.00) \put(25.00,39.20){\makebox(0,0)[cc]{while ( expr )}} \put(25.00,31.20){\makebox(0,0)[cc]{\{}} \put(25.00,23.20){\makebox(0,0)[cc]{stat}} \put(25.00,15.20){\makebox(0,0)[cc]{\}}} \put(25.00,4.80){\makebox(0,0)[cc]{....}} \put(25.00,44.80){\vector(0,1){3.20}} \put(25.00,48.00){\vector(1,0){36.00}} \put(65.00,32.00){\makebox(0,0)[cc]{jz}} \put(61.00,48.00){\vector(0,-1){37.60}} \put(61.00,10.40){\vector(-1,0){30.00}} \put(19.00,15.00){\vector(-1,0){9.00}} \put(10.00,15.00){\vector(0,1){24.00}} \put(5.00,28.00){\makebox(0,0)[cc]{jmp}} \put(10.00,39.00){\vector(1,0){2.00}} \end{picture} \unitlength=1.00mm %\special{em:linewidth 0.4pt} \linethickness{0.4pt} \begin{picture}(47.00,44.00) \put(20.00,34.00){\framebox(20.00,5.00)[cc]{expr}} \put(30.00,29.00){\makebox(0,0)[cc]{jz JZ}} \put(20.00,19.00){\framebox(20.00,5.00)[cc]{stat}} \put(30.00,14.00){\makebox(0,0)[cc]{jmp JMP}} \put(30.00,44.00){\vector(0,-1){5.00}} \put(30.00,34.00){\vector(0,-1){2.00}} \put(30.00,26.00){\vector(0,-1){2.00}} \put(30.00,19.00){\vector(0,-1){2.00}} \put(30.00,11.00){\vector(0,-1){6.00}} \put(30.00,10.00){\vector(-1,0){15.00}} \put(15.00,10.00){\vector(0,1){32.00}} \put(15.00,42.00){\vector(1,0){15.00}} \put(35.00,29.00){\vector(1,0){12.00}} \put(47.00,29.00){\vector(0,-1){21.00}} \put(47.00,8.00){\vector(-1,0){17.00}} \end{picture} \caption[F\/ixation in {\sf while}]{F\/ixation in {\sf while}} \label{obr2} \end{center} \end{figure} \begin{figure} \begin{center} \unitlength=1.00mm %\special{em:linewidth 0.4pt} \linethickness{0.4pt} \begin{picture}(91.00,56.80) \put(45.00,37.60){\makebox(0,0)[cc]{for ( expr1; expr2; expr3 )}} \put(45.00,29.60){\makebox(0,0)[cc]{\{}} \put(45.00,21.60){\makebox(0,0)[cc]{stat}} \put(45.00,13.60){\makebox(0,0)[cc]{\}}} \put(45.00,4.80){\makebox(0,0)[cc]{....}} \put(45.00,44.80){\vector(0,1){5.60}} \put(45.00,50.40){\vector(0,1){6.40}} \put(45.00,56.80){\vector(1,0){43.00}} \put(88.00,56.80){\vector(0,-1){47.20}} \put(88.00,9.60){\vector(-1,0){37.00}} \put(91.00,33.60){\makebox(0,0)[cc]{jn}} \put(41.00,14.40){\vector(-1,0){21.00}} \put(20.00,14.40){\vector(0,1){32.00}} \put(20.00,46.40){\vector(1,0){23.00}} \put(43.00,46.40){\vector(0,-1){2.40}} \put(45.00,50.40){\vector(1,0){24.00}} \put(69.00,50.40){\vector(0,-1){20.80}} \put(69.00,29.60){\vector(-1,0){18.00}} \put(76.00,40.00){\makebox(0,0)[cc]{jmp1}} \put(14.00,20.00){\makebox(0,0)[cc]{jmp3}} \put(41.00,34.40){\vector(-1,0){21.00}} \put(29.00,30.40){\makebox(0,0)[cc]{jmp2}} \end{picture} \hspace{0.5cm} {\setlength{\unitlength}{0.00937500in}% % \begingroup\makeatletter\ifx\SetFigFont\undefined % extract first six characters in \fmtname \def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}% \expandafter\x\fmtname xxxxxx\relax \def\y{splain}% \ifx\x\y % LaTeX or SliTeX? \gdef\SetFigFont#1#2#3{% \ifnum #1<17\tiny\else \ifnum #1<20\small\else \ifnum #1<24\normalsize\else \ifnum #1<29\large\else \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else \huge\fi\fi\fi\fi\fi\fi \csname #3\endcsname}% \else \gdef\SetFigFont#1#2#3{\begingroup \count@#1\relax \ifnum 25<\count@\count@25\fi \def\x{\endgroup\@setsize\SetFigFont{#2pt}}% \expandafter\x \csname \romannumeral\the\count@ pt\expandafter\endcsname \csname @\romannumeral\the\count@ pt\endcsname \csname #3\endcsname}% \fi \fi\endgroup \begin{picture}(137,334)(31,478) \thinlines \put( 60,780){\framebox(60,30){}} \put( 60,720){\framebox(60,30){}} \put( 60,630){\framebox(60,30){}} \put( 60,540){\framebox(60,30){}} \put( 90,780){\line( 0,-1){ 30}} \put( 90,720){\line( 0,-1){ 9}} \put( 90,675){\line( 0,-1){ 15}} \put( 90,606){\line( 0,-1){ 36}} \put( 90,513){\vector( 0,-1){ 33}} \put( 72,702){\line(-1, 0){ 30}} \put( 42,702){\line( 0,-1){198}} \put( 42,504){\vector( 1, 0){ 48}} \put(117,681){\line( 1, 0){ 18}} \put(135,681){\line( 0,-1){ 93}} \put(135,588){\vector(-1, 0){ 45}} \put(108,525){\line( 1, 0){ 48}} \put(156,525){\line( 0, 1){144}} \put(156,669){\vector(-1, 0){ 66}} \put( 72,618){\line(-1, 0){ 39}} \put( 33,618){\line( 0, 1){141}} \put( 33,759){\vector( 1, 0){ 57}} \put( 90,792){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% expr1}% }} \put( 90,732){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% expr2}% }} \put( 90,696){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% jn JZ}% }} \put( 90,678){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% jmp2 JMP}% }} \put( 90,642){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% expr3}% }} \put( 90,612){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% JMP}% }} \put( 90,552){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% stat}% }} \put( 90,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% JMP}% }} \put( 60,762){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% jmp1}% }} \put(156,672){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% jmp3}% }} \end{picture}}% \caption[F\/ixation in {\sf for}]{F\/ixation in {\sf for}} \label{obr3} \end{center} \end{figure} \begin{figure} \begin{center} \unitlength=1.00mm %\special{em:linewidth 0.4pt} \linethickness{0.4pt} \begin{picture}(33.00,85.59) \put(5.00,71.19){\makebox(0,0)[cc]{if ( expr )}} \put(5.00,63.19){\makebox(0,0)[cc]{\{}} \put(5.00,55.19){\makebox(0,0)[cc]{stat1}} \put(5.00,47.19){\makebox(0,0)[cc]{\}}} \put(5.00,39.19){\makebox(0,0)[cc]{else}} \put(5.00,31.19){\makebox(0,0)[cc]{\{}} \put(5.00,23.20){\makebox(0,0)[cc]{stat2}} \put(5.00,15.20){\makebox(0,0)[cc]{\}}} \put(5.00,4.80){\makebox(0,0)[cc]{....}} \put(5.00,76.79){\vector(0,1){8.80}} \put(5.00,85.59){\vector(1,0){25.00}} \put(30.00,85.59){\vector(0,-1){46.40}} \put(30.00,39.19){\vector(-1,0){19.00}} \put(33.00,61.59){\makebox(0,0)[cc]{jz}} \put(11.00,48.00){\vector(1,0){10.00}} \put(21.00,48.00){\vector(0,-1){37.00}} \put(21.00,11.00){\vector(-1,0){10.00}} \put(26.00,26.00){\makebox(0,0)[cc]{jmp}} \end{picture} \unitlength=1.00mm %\special{em:linewidth 0.4pt} \linethickness{0.4pt} \begin{picture}(50.00,50.00) \put(25.00,40.00){\framebox(20.00,5.00)[cc]{expr}} \put(35.00,35.00){\makebox(0,0)[cc]{jz JZ}} \put(25.00,25.00){\framebox(20.00,5.00)[cc]{stat1}} \put(35.00,20.00){\makebox(0,0)[cc]{jmp JMP}} \put(25.00,10.00){\framebox(20.00,5.00)[cc]{stat2}} \put(35.00,50.00){\vector(0,-1){5.00}} \put(35.00,40.00){\vector(0,-1){2.00}} \put(35.00,32.00){\vector(0,-1){2.00}} \put(35.00,25.00){\vector(0,-1){2.00}} \put(35.00,17.00){\vector(0,-1){2.00}} \put(35.00,10.00){\vector(0,-1){5.00}} \put(42.00,35.00){\vector(1,0){8.00}} \put(50.00,35.00){\vector(0,-1){18.00}} \put(50.00,17.00){\vector(-1,0){15.00}} \put(20.00,20.00){\vector(0,-1){13.00}} \put(20.00,7.00){\vector(1,0){15.00}} \put(24.00,20.00){\vector(-1,0){4.00}} \end{picture} \caption[F\/ixation in {\sf if}]{F\/ixation in {\sf if}} \label{obr4} \end{center} \end{figure} \begin{figure} \begin{center} \unitlength=1.00mm %\special{em:linewidth 0.4pt} \linethickness{0.4pt} \begin{picture}(29.00,38.40) \put(5.00,38.40){\makebox(0,0)[cc]{\{}} \put(5.00,30.40){\makebox(0,0)[cc]{....}} \put(5.00,22.40){\makebox(0,0)[cc]{continue;}} \put(5.00,14.40){\makebox(0,0)[cc]{....}} \put(5.00,6.40){\makebox(0,0)[cc]{\}}} \put(24.00,23.20){\vector(0,-1){16.00}} \put(24.00,7.20){\vector(-1,0){13.00}} \put(29.00,16.00){\makebox(0,0)[cc]{jmp}} \put(16.00,23.20){\vector(1,0){8.00}} \end{picture} \caption[F\/ixation of {\sf continue}]{F\/ixation of {\sf continue}} \label{obr5} \end{center} \end{figure} \begin{figure} \begin{center} \unitlength=1.00mm %\special{em:linewidth 0.4pt} \linethickness{0.4pt} \begin{picture}(31.00,47.20) \put(5.00,47.20){\makebox(0,0)[cc]{\{}} \put(5.00,39.20){\makebox(0,0)[cc]{....}} \put(5.00,31.20){\makebox(0,0)[cc]{break;}} \put(5.00,23.20){\makebox(0,0)[cc]{....}} \put(5.00,15.20){\makebox(0,0)[cc]{\}}} \put(5.00,5.60){\makebox(0,0)[cc]{....}} \put(11.00,32.00){\vector(1,0){15.00}} \put(26.00,32.00){\vector(0,-1){20.80}} \put(26.00,11.20){\vector(-1,0){15.00}} \put(31.00,21.60){\makebox(0,0)[cc]{jmp}} \end{picture} \caption[F\/ixation of {\sf break}]{F\/ixation of {\sf break}} \label{obr6} \end{center} \end{figure} \begin{figure} \begin{center} \unitlength=1.00mm %\special{em:linewidth 0.4pt} \linethickness{0.4pt} \begin{picture}(34.00,47.99) \put(5.00,47.99){\makebox(0,0)[cc]{\{}} \put(5.00,39.99){\makebox(0,0)[cc]{....}} \put(5.00,31.99){\makebox(0,0)[cc]{return ( expr );}} \put(5.00,23.99){\makebox(0,0)[cc]{....}} \put(5.00,15.99){\makebox(0,0)[cc]{\}}} \put(5.00,6.39){\makebox(0,0)[cc]{....}} \put(29.00,32.79){\vector(0,-1){16.00}} \put(29.00,16.79){\vector(-1,0){19.00}} \put(34.00,24.80){\makebox(0,0)[cc]{jmp}} \put(19.00,32.80){\vector(1,0){10.00}} \end{picture} \caption[F\/ixation of {\sf return}]{F\/ixation of {\sf return}} \label{obr7} \end{center} \end{figure} \begin{figure} \begin{center} {\setlength{\unitlength}{0.01250000in}% % \begingroup\makeatletter\ifx\SetFigFont\undefined % extract first six characters in \fmtname \def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}% \expandafter\x\fmtname xxxxxx\relax \def\y{splain}% \ifx\x\y % LaTeX or SliTeX? \gdef\SetFigFont#1#2#3{% \ifnum #1<17\tiny\else \ifnum #1<20\small\else \ifnum #1<24\normalsize\else \ifnum #1<29\large\else \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else \huge\fi\fi\fi\fi\fi\fi \csname #3\endcsname}% \else \gdef\SetFigFont#1#2#3{\begingroup \count@#1\relax \ifnum 25<\count@\count@25\fi \def\x{\endgroup\@setsize\SetFigFont{#2pt}}% \expandafter\x \csname \romannumeral\the\count@ pt\expandafter\endcsname \csname @\romannumeral\the\count@ pt\endcsname \csname #3\endcsname}% \fi \fi\endgroup \begin{picture}(132,147)(60,673) \put( 60,810){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}% \smash{% switch (expr)}% }} \put( 90,795){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}% \smash{% $\{$}% }} \put( 90,780){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}% \smash{% case const\_expr\_1 : stat\_1 ;}% }} \put(192,765){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}% \smash{% break;}% }} \put( 90,750){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}% \smash{% case const\_expr\_2 : stat\_2 ;}% }} \put( 90,735){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}% \smash{% case const\_expr\_3 : stat\_3 ;}% }} \put(192,720){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}% \smash{% break ;}% }} \put( 90,705){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}% \smash{% default : stat\_4 ;}% }} \put(135,690){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}% \smash{% break;}% }} \put( 90,675){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}% \smash{% $\}$}% }} \end{picture}}% \hspace{2.5cm} {\setlength{\unitlength}{0.00750000in}% % \begingroup\makeatletter\ifx\SetFigFont\undefined % extract first six characters in \fmtname \def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}% \expandafter\x\fmtname xxxxxx\relax \def\y{splain}% \ifx\x\y % LaTeX or SliTeX? \gdef\SetFigFont#1#2#3{% \ifnum #1<17\tiny\else \ifnum #1<20\small\else \ifnum #1<24\normalsize\else \ifnum #1<29\large\else \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else \huge\fi\fi\fi\fi\fi\fi \csname #3\endcsname}% \else \gdef\SetFigFont#1#2#3{\begingroup \count@#1\relax \ifnum 25<\count@\count@25\fi \def\x{\endgroup\@setsize\SetFigFont{#2pt}}% \expandafter\x \csname \romannumeral\the\count@ pt\expandafter\endcsname \csname @\romannumeral\the\count@ pt\endcsname \csname #3\endcsname}% \fi \fi\endgroup \begin{picture}(103,637)(40,199) \thinlines \put( 90,636){\line( 0,-1){ 6}} \put( 90,630){\line(-1, 0){ 48}} \put( 42,630){\line( 0,-1){417}} \put( 42,213){\vector( 1, 0){ 48}} \put( 90,318){\line( 0,-1){ 12}} \put( 90,306){\vector(-1, 0){ 48}} \put( 90,402){\vector( 0,-1){ 12}} \put( 90,216){\vector( 0,-1){ 15}} \put( 90,258){\vector( 0,-1){ 12}} \put(120,735){\line( 1, 0){ 21}} \put(141,735){\line( 0,-1){111}} \put(141,624){\line(-1, 0){ 51}} \put( 90,624){\vector( 0,-1){ 24}} \put( 60,360){\framebox(60,30){}} \put( 60,258){\framebox(60,30){}} \put(120,417){\line( 1, 0){ 18}} \put(138,417){\line( 0,-1){117}} \put(138,300){\line(-1, 0){ 48}} \put( 90,300){\vector( 0,-1){ 12}} \put( 90,360){\vector( 0,-1){ 12}} \put( 60,570){\framebox(60,30){}} \put( 60,528){\framebox(60,30){}} \put( 60,486){\framebox(60,30){}} \put( 60,444){\framebox(60,30){}} \put( 60,402){\framebox(60,30){}} \put( 90,570){\vector( 0,-1){ 12}} \put( 90,528){\vector( 0,-1){ 12}} \put( 90,444){\vector( 0,-1){ 12}} \put( 60,804){\framebox(60,30){}} \put( 60,762){\framebox(60,30){}} \put( 60,720){\framebox(60,30){}} \put( 60,678){\framebox(60,30){}} \put( 60,636){\framebox(60,30){}} \put( 90,804){\vector( 0,-1){ 12}} \put( 90,762){\vector( 0,-1){ 12}} \put( 90,720){\vector( 0,-1){ 12}} \put( 90,678){\vector( 0,-1){ 12}} \put( 60,216){\framebox(60,30){}} \put( 60,318){\framebox(60,30){}} \put(120,543){\line( 1, 0){ 18}} \put(138,543){\line( 0,-1){ 63}} \put(138,480){\line(-1, 0){ 48}} \put( 90,480){\vector( 0,-1){ 6}} \put( 60,501){\line(-1, 0){ 9}} \put( 51,501){\line( 0,-1){105}} \put( 51,396){\vector( 1, 0){ 39}} \put(132,426){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}% \smash{% -}% }} \put(132,741){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}% \smash{% -}% }} \put(129,552){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}% \smash{% -}% }} \put( 90,813){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}% \smash{% expr}% }} \put( 90,732){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}% \smash{% ==}% }} \put( 90,648){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}% \smash{% break}% }} \put( 90,690){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}% \smash{% stat\_1}% }} \put( 90,540){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}% \smash{% ==}% }} \put( 90,498){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}% \smash{% stat\_2}% }} \put( 90,414){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}% \smash{% ==}% }} \put( 90,369){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}% \smash{% stat\_3}% }} \put( 90,267){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}% \smash{% stat\_4}% }} \put( 90,228){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}% \smash{% break}% }} \put( 90,330){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}% \smash{% break}% }} \put( 90,774){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% const\_expr\_1}% }} \put( 90,582){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% const\_expr\_2}% }} \put( 90,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% const\_expr\_3}% }} \end{picture}}% \caption[F\/ixation of {\sf switch}]{F\/ixation of {\sf switch}} \label{obr8} \end{center} \end{figure} Unconditional program branching is supported by a {\sf goto} \index{statement!goto@{\sf goto}} statement. The {\sf goto} statement has the following fixative structure: \begin{verbatim} struct goto_adr /* List of addresses with goto statements for the current label. */ { char *adr; /* Address of the goto statement. */ int line_number; /* Line number of the goto statement. */ struct goto_adr *gnext; }; struct goto_tab /* Hash table structure for goto labels. */ { char *name; /* Name of the label. */ char *label_adr; /* Address of the label in the generated code. */ int line_number; /* Line number of the label in the source file. */ struct goto_adr *gnext; /* List of goto's to the label. */ struct goto_tab *next; }; \end{verbatim} \begin{verbatim} static struct goto_tab *hastab_goto; /* Pointer to the hash table. */ \end{verbatim} If labels\index{label} or goto's \index{statement!goto@{\sf goto}} are encountered during parsing, the addresses of code are put into the fixative structure. After successful compilation, addresses of goto's are fixed to the corresponding labels. Then the code is executed. The {\sf goto} \index{statement!goto@{\sf goto}} statement can appear only in the level one (all statements that are compiled) statements. The {\sf goto} cannot jump to a label across functions. \section{Parameter passing mechanism} \index{parameter!passing} \label{parameter_passing} Parameters are passed by reference \cite{gries}. The parameters are over the pointer BP ($BP+offset$), i.e. toward greater addresses. Local variables are below the BP ($BP-offset$), i.e. toward lesser addresses. The parameters are pushed onto the stack in the reverse order as they appear in the function call. The first parameter has {\sf offset} less than the last parameter (the first parameter is closer to the BP). The last parameter is the deepest parameter on the stack. Addresses of the parameters\index{parameter!address} are stored in the stack\index{stack}. During compilation of the list of formal parameters\index{parameter!formal} it is leaving out the place for them in the stack. It causes different accesses to the parameters and the local variables\index{variable!local}, because local variables are stored by value (only one indirection, parameters need two indirections). Different virtual machine instructions\index{virtual machine} must be generated for parameters and local variables. %The addresses of the parameters are temporary stored in address %stack. It is necessary if we should use the recursive function call. %\subsection{Address stack} %Address stack is used only for temporary storage of the %addresses of the parameters of the function. The number of %the parameters is restricted by a size of the address %stack. The size of the address stack is 255 addresses. See %structure of the address stack in cooperation with the %stack in fig. \ref{obr1}. \section{Stack}\index{stack} \label{stack} The stack is used for storing of the addresses of parameters\index{parameter!address} and for the local variables\index{variable!local} as it was mentioned in section~\ref{parameter_passing}. The location of parameters and local variables is depending on the level in which the function is called. The parameters and the local variables are destroyed after a return\index{function!return} from the procedure. %\begin{figure} %\begin{center} %\input{stack.pic} %\caption[The structure of the stack. Cooperation between %the stack and the address stack in the recursive function %call]{The structure of the stack. Cooperation between the %stack and the address stack in the recursive function call} %\label{obr1} %\end{center} %\end{figure} \section{Compiled statement} The statements mentioned on the level 1 (\cl list\_stat \r (see appendix \ref{syntax})) are compiled. Procedures are also compiled. The procedures must be processed when they are called. The procedures usually consist of prologue, epilogue and body. The following instructions are in the prologue: \begin{verbatim} GEN_PUSHb; GEN_PUSHt; GEN_MOVt; GEN_MOVbs; GEN_SUBss(count); \end{verbatim} It is namely: {\bf PUSH} $[STACK] \longleftarrow BP$, {\bf PUSH} $[STACK] \longleftarrow TMPH$, {\bf MOV} $TMPH \longleftarrow TMP$, {\bf MOV} $STACK \longrightarrow BP$ and {\bf SUB} $STACK\longleftarrow(STACK - count)$ (see~\ref{stroj})\index{instruction!PUSH@{\bf PUSH}}\index{instruction!SUB@{\bf SUB}}\index{instruction!MOV@{\bf MOV}}. The epilogue of the procedure is generated: \begin{verbatim} GEN_MOVsb; GEN_POPt; GEN_POPb; GEN_RET; \end{verbatim} These instructions are: {\bf MOV} $STACK \longleftarrow BP$, {\bf POP} $TMPH \longleftarrow [STACK]$, {\bf POP} $BP \longleftarrow [STACK]$\index{instruction!MOV@{\bf MOV}}\index{instruction!POP@{\bf POP}}\index{instruction!RET@{\bf RET}} and {\bf RET} return to the caller (i.e. the instruction {\bf CALL}\index{instruction!CALL@{\bf CALL}}). The procedure call is also compiled. The reason is that the list\index{list} of the parameters can contain expressions\index{expression}. \chapter{Different level of user interfaces to the interpreter \CiF}\index{interface} \section{Intrinsic functions}\index{function!intrinsic} Intrinsic functions are linked to the compiler. The user should update two tables and write an intrinsic function in C or FORTRAN then to link the object code of the compiler with the tables and with the code of the intrinsic function. This way is enriched the compiler with a new intrinsic function. The structures of the tables are as follows: \begin{verbatim} /* * intrinsic.h * * List of intrinsic functions. */ #ifndef _INTRINSIC_H #define _INTRINSIC_H #include #include "myintrinsic.c" #ifdef CONTROL #include "example/apl.c" #endif typedef void (*INTRINSIC_FUNCTION) PROTO((char **)); struct INTR { char *name; INTRINSIC_FUNCTION adr; } intr_name[]= {{"cclose", (INTRINSIC_FUNCTION)cclose}, {"cgetc", (INTRINSIC_FUNCTION)cgetc}, {"chclose", (INTRINSIC_FUNCTION)chclose}, {"chflush", (INTRINSIC_FUNCTION)chflush}, {"chopen", (INTRINSIC_FUNCTION)chopen}, {"chwrite", (INTRINSIC_FUNCTION)chwrite}, {"copen", (INTRINSIC_FUNCTION)copen}, {"cputc", (INTRINSIC_FUNCTION)cputc}, {"exp", (INTRINSIC_FUNCTION)exp_}, {"fflush", (INTRINSIC_FUNCTION)cfflush}, {"fprintf", (INTRINSIC_FUNCTION)cfprintf}, {"fscanf", (INTRINSIC_FUNCTION)cfscanf}, {"printf", (INTRINSIC_FUNCTION)cprintf}, {"scanf", (INTRINSIC_FUNCTION)cscanf}, {"sin", (INTRINSIC_FUNCTION)sin_} #ifdef CONTROL , {"green_func", (INTRINSIC_FUNCTION)green_func}, {"csigpause", (INTRINSIC_FUNCTION)csigpause}, {"open_termo", (INTRINSIC_FUNCTION)open_termo}, {"read_termo", (INTRINSIC_FUNCTION)read_termo}, {"write_termo", (INTRINSIC_FUNCTION)write_termo}, {"close_termo", (INTRINSIC_FUNCTION)close_termo}, {"init_wait", (INTRINSIC_FUNCTION)init_wait} #endif }; /* * Number of intrinsic functions. */ #define SIZE_REM sizeof(intr_name)/sizeof(intr_name[0]) /* * Size of an array of intrinsic functions. */ void (*(f[SIZE_REM])) PROTO((char **)); \end{verbatim} The names of the intrinsic functions\index{function!intrinsic} are stored in hash table\index{table!hashing}\index{hash!table} (mentioned earlier). The compiler knows about the names of the intrinsic function\index{function!intrinsic} from its initializing part. When the {\sf remote}\index{statement!remote@{\sf remote}} keyword is parsed, remote functions are loaded into the hash table\index{table!hashing}\index{hash!table} of remote functions. Only remote functions previously declared are known to the environment. If there are any declaration after {\sf remote} statement the names are known but have no corresponding code. The example of the {\sf remote} statement usage can be found in the `io.ci'\index{file!io.ci}. The body of remote function or declaration of the header respectively must be in the file `myintrinsic.c'.\index{file!myintrinsic.c} Continuing in the above example the file `myintrinsic.c' should look like: \begin{verbatim} double plus(double *a,double *b) { printf("a=%g\n",*a); printf("b=%g\n",*b); return(*a+*b); } \end{verbatim} \begin{verbatim} double sin_(a)char **a;{return(sin(*(double *) a[0]));} \end{verbatim} For the proper function of the compiler user should keep the following steps\index{function!intrinsic}: \begin{itemize} \item Update the variable {\sf intr\_name}. The first field is a name of the intrinsic function; the second field is the name of the user supplied function. \item Write the code of a new intrinsic function in the file `myintrinsic.c'. \item Compile remote call subsystem. Link new version of the compiler. \end{itemize} \section{Main areas of allocated memory}\index{memory}\label{memory} The allocated memory of the interpreter is split to two parts. The first part is static. The user can not change the size of these memory areas at run-time, only by recompiling the interpreter. The size is as follows: \begin{verbatim} #define PAGE 512 /* Size of a page. */ #define SIZE_HAS 1999 /* Size of hash table. */ #define SIZE_HAS_LOC 401 /* Size of hash table for locals. */ #define SIZE_HAS_GOTO 257 /* Size of hash table for goto labels. */ #define MAX_IDENT 1999 /* Max number of variables */ #define MAX_IDENT_LOC 401 /* Max number of local variables. */ #define SIZE_ADR_STACK 256 /* Size of address stack (obsolete). */ #define SIZE_STRUCT_FIX 256 /* Size of the stack of fixative structures. */ #define SIZE_REMOTE 1999 /* Size of hash table for remote function names. */ \end{verbatim} \index{macro!PAGE@{\bf PAGE}} \index{PAGE@{\bf PAGE}} \index{macro!SIZE\_HAS@{\bf SIZE\_HAS}} \index{SIZE\_HAS@{\bf SIZE\_HAS}} \index{macro!SIZE\_HAS\_LOC@{\bf SIZE\_HAS\_LOC}} \index{SIZE\_HAS\_LOC@{\bf SIZE\_HAS\_LOC}} \index{macro!SIZE\_HAS\_GOTO@{\bf SIZE\_HAS\_GOTO}} \index{SIZE\_HAS\_GOTO@{\bf SIZE\_HAS\_GOTO}} \index{macro!MAX\_IDENT@{\bf MAX\_IDENT}} \index{MAX\_IDENT@{\bf MAX\_IDENT}} \index{macro!MAX\_IDENT\_LOC@{\bf MAX\_IDENT\_LOC}} \index{MAX\_IDENT\_LOC@{\bf MAX\_IDENT\_LOC}} \index{macro!SIZE\_ADR\_STACK@{\bf SIZE\_ADR\_STACK}} \index{SIZE\_ADR\_STACK@{\bf SIZE\_ADR\_STACK}} \index{macro!SIZE\_STRUCT\_FIX@{\bf SIZE\_STRUCT\_FIX}} \index{SIZE\_STRUCT\_FIX@{\bf SIZE\_STRUCT\_FIX}} \index{macro!SIZE\_REMOTE@{\bf SIZE\_REMOTE}} \index{SIZE\_REMOTE@{\bf SIZE\_REMOTE}} Macros {\bf SIZE\_HAS, SIZE\_HAS\_LOC, SIZE\_HAS\_GOTO, MAX\_IDENT, MAX\_IDENT\_LOC, SIZE\_REMOTE} are primes according to~\cite{wirth}. If you want to change these macros you should change them to primes again for better performance of hash functions\index{hash!function}. The second part is \begin{verbatim} #define SIZE_SPACE 210 /* Memory size in pages. */ #define SIZE_ARIT_STACK 7 /* Size of the arithmetical stack in pages. */ #define SIZE_TMP_STACK 52 /* Size of stack of temporaries in pages. */ \end{verbatim} \index{macro!SIZE\_SPACE@{\bf SIZE\_SPACE}} \index{SIZE\_SPACE@{\bf SIZE\_SPACE}} \index{macro!SIZE\_ARIT\_STACK@{\bf SIZE\_ARIT\_STACK}} \index{SIZE\_ARIT\_STACK@{\bf SIZE\_ARIT\_STACK}} \index{macro!SIZE\_TMP\_STACK@{\bf SIZE\_TMP\_STACK}} \index{SIZE\_TMP\_STACK@{\bf SIZE\_TMP\_STACK}} Each size is specified by number of pages (PAGE 512 B). The user can change these sizes. The easiest way is to run the interpreter with the parameter\index{parameter!run-string} {\sf /bc=$<$number$>$}. E.g. \begin{verbatim} clif /bc=5 \end{verbatim} Starting the interpreter with argument 5 caused that the size of the memory, size of the arithmetical stack and size of the temporary stack are lowered to half compared to the default set (default is constant equal 10). The user can extend the size of the three memory parts if the interpreter is ran with the argument greater than 10. \section{Hash tables and hash function}\index{table!hashing}\index{hash!table} The most important is that the size of the hash table must be a prime. We chose the primes 1999 for the size of the global hash table and 401 for the size of the local hash table. We chose the following hash function:\index{function!hashing}\index{hash!table} \begin{verbatim} /* * Hash function. */ static unsigned int hash_code (s, size) char *s; unsigned int size; { int c = 0; while (*s) { c = c << 1 ^ (*s); s++; } if (0 > c) c = (-c); return (c % size); } \end{verbatim} The core of the hash function\index{hash!function}\index{function!hashing} is one bit shifting and then the result is XOR-ed with the ASCII value of the character. The problems may arise when the variable's identifier is longer than the size of the integer\index{integer!size of} on the computer. \section{Adding new data type} The user has to follow these steps:\\ \begin{itemize} \item Update the file `cast.h'\index{file!cast.h} with cast operators for the new data type. \item Update the file `geninstr.h'\index{file!geninstr.h} with appropriate instructions for the virtual machine. User can be inspired by previous types. \item Update the file `type.h'\index{file!type.h}. To define the constant of new data type. \item Enrich the file `instr.h'\index{file!instr.h} with a new structure for a new instruction of the virtual processor if it is needed. \item Update the scanner in file `ls.l'\index{file!ls.l} with the pattern matching of the new data type constant. \item Enrich the list in file `keyword.gperf'\index{file!keyword.gperf} with needed tokens name. \item Update the grammar of the language in file `ys.y'\index{file!ys.y}. An user should be searching for previously defined data type (i.e. INT) and he/she has to take inspiration from the surrounding structures. Namely the following functions should be rearranged:\\ \begin{itemize} \item The function `exe'\index{function!exe@{\sf exe}} \index{exe@{\sf exe}} (`virtual\_machine.c'\index{file!virtual\_machine.c}). Instructions of the virtual machine are executed in the function. \item The function `init'\index{function!init@{\sf init}} \index{init@{\sf init}} (`comp\_maint.c'\index{file!comp\_maint.c}). Update the array `pri'\index{array!pri@{\sf pri}} with the new data type. \item The function `implicit\_cast' \index{function!implicit\_cast@{\sf implicit\_cast}} \index{implicit\_cast@{\sf implicit\_cast}} (comp\_maint.c\index{file!comp\_maint.c}) contents all possible options of implicit cast instructions. \item The function `l\_value\_cast' \index{function!l\_value\_cast@{\sf l\_value\_cast}} \index{l\_value\_cast@{\sf l\_value\_cast}} (comp\_maint.c\index{file!comp\_maint.c}) is casting to the \cl l\_value \r \end{itemize} \end{itemize} \chapter{Interrupt services}\label{int_service} As it was mentioned earlier two types of interrupts\index{interrupt!synchronous and asynchronous} are implemented synchronous and asynchronous (see~\ref{compiling_options}). Each of them call a specific service function. The interpreter is interrupted only if the virtual machine is running. Interrupt handling functions are system dependent. Therefore these functions should be specific for each platform. Current ports are on CD 4680 (file `inter\_handl\_svr3.c'\index{file!inter\_handl\_svr3.c}), DEC 5000/240 (file `inter\_handl\_bsd.c'\index{file!inter\_handl\_bsd.c}). There is a port for Linux (using BSD-like signals), SVR4 port (file `inter\_handl\_svr4.c'\index{file!inter\_handl\_svr4.c}) and generic POSIX port (file `inter\_handl\_posix.c'\index{file!inter\_handl\_posix.c})\cite{steve}. The configuration of ours CD 4680 is rather confusing, that is why we need specific interrupt handler for it. To further complicate things, the new terminal setting is added to these files as well. Because each platform to which we ported \CiF\ has a specific terminal handling, this part is specially designed for them as well. Most of currently ported platforms can use the generic POSIX implementation as well. However, it arises two problems: \begin{itemize} \item For the file `inter\_handl\_svr3.c', it cannot be compiled afterwards, because it knows the functions but only in SVR4 mode and the default is SVR3 (CD4680). If we switch to the default SVR4 some other functions are not known. \item Some of platforms need to push newline into the input stream and some do not. We use interrupt ({\sf DC4}) to break the run of the virtual machine\index{virtual machine} as well as to resume the run if it is pressed again. After pressing {\sf DC 4} for the second time, the {\sf resume} statement\index{statement!resume@{\sf resume}} is internally generated. In interrupt handler, on some platforms, there must not be a newline character (or is generated automatically by the terminal line discipline), on others, it must be pushed by interrupt handler function. See sections~\ref{sync_interrupt},~\ref{async_interrupt}. \end{itemize} Generally, user may use `inter\_handl\_posix.c' whenever appropriate. If the interrupt does not function, the user should consider to add the following line to the {\sf interrupt\_service}\index{function!interrupt\_service@{\sf interrupt\_service}} \index{interrupt\_service@{\sf interrupt\_service}} just after assignment to {\sf handler}\index{handler@{\sf handler}} \index{variable!handler@{\sf handler}} variable \begin{verbatim} ioctl (handle_fd, TIOCSTI, "\n"); \end{verbatim} The following function registers interrupt handler\index{interrupt!handler}: \begin{verbatim} #include #include #include #include #define OFF(x, y) (x) & (~(y)) #define ON(x, y) (x) | (y) #define SPACE 0x20 #define NL '\n' int handler = 0; int handle_fd; struct termio term,term_initial; RETSIGTYPE (*interrupt_handler) (void); RETSIGTYPE interrupt_service PROTO((void)); void interrupt_register PROTO((void)); void term_restore PROTO((void)); RETSIGTYPE fatal_handler PROTO((void)); void fatal_handler_register PROTO((void)); extern jmp_buf jmpbuf; extern int error_count; /* * Registers interrupt handler. */ void interrupt_register () { interrupt_handler = interrupt_service; handle_fd = fileno (stdin); ioctl (handle_fd, TCGETA, &term); term_initial = term; term.c_cc[0] = 0x14; /* DC4 */ term.c_cc[5] = 0x12; /* DC2 */ term.c_lflag = OFF(term.c_lflag, LNEW_CTLECH); /* dalsi flag ktory ma pre nas vyznam je : term.c_lflag=ON(term.c_lflag,NOFLSH);*/ ioctl (handle_fd, TCSETA, &term); sigset (SIGINT, interrupt_handler); } \end{verbatim} on the CD 4680. Via {\sf ioctl}\index{ioctl@{\sf ioctl}} system call is reset interrupt signal\index{interrupt!signal} to {\sf DC4}\index{DC4@{\sf DC4}}. Via {\sf sigset}\index{sigset@{\sf sigset}} system call is set the interrupt handler. On the DEC 5000/240 looks the function as follows: \begin{verbatim} /* * Registers interrupt handler. */ void interrupt_register () { interrupt_handler = interrupt_service; handle_fd = fileno (stdin); ioctl (handle_fd, TCGETA, &term); term_initial = term; term.c_cc[0] = 0x14; /* DC4 */ term.c_cc[5] = 0x12; /* DC2 */ ioctl (handle_fd, TCSETA, &term); vec.sv_handler = interrupt_handler; sigvec (SIGINT, &vec, &ovec); } \end{verbatim} The interrupt handler is set here through the system call {\sf sigvec}\index{sigvec@{\sf sigvec}}. When the interpreter session terminates, the terminal is reset to the initial values: \begin{verbatim} /* * Restores setting of the terminal at the termination of Clif session. */ void term_restore () { ioctl (handle_fd, TCSETA, &term_initial); } \end{verbatim} \section{Synchronous interrupt service function}\index{function!synchronous interrupt service}\label{sync_interrupt} The function is as follows: \begin{verbatim} /* * Synchronous interrupt service. */ void interrupt_service_sync () { handler = 1; } \end{verbatim} The virtual machine instruction\index{instruction!INTER@{\bf INTER}} {\bf INTER} is calling the function {\sf interrupt\_service\_sync} in which the handler is set to 1. Before the next instruction is executed, the handler is checked. If it is set the virtual machine switches its context\index{context!switching}. The context of the virtual machine is stored in the following structure:\index{structure!context} \begin{verbatim} struct CONTEXT { char *bp; char *frame; char *kodp; char *kodp1; char *kodp2; char *kodp3; char *kodp4; char *pc; char *stack; char *tmp; char *tmph; #ifdef FLEX_SCANNER void *state; #else int (*input) PROTO((void)); #endif struct CONTEXT *previous; }; \end{verbatim} There are no restriction on the use of the statements. The statement {\sf resume}\index{statement!resume@{\sf resume}} resumes after an interrupt. \section{Asynchronous interrupt service function}\index{function!asynchronous interrupt service}\label{async_interrupt} Not only synchronous interrupt is provided by the interpreter, but also asynchronous interrupt. Only the virtual machine\index{virtual machine} can be interrupted. The user interrupts the virtual machine\index{virtual machine} by pressing the {\sf DC4}\index{DC4@{\sf DC4}} key. As it is mentioned above there are no restrictions on the use of the statements. The user can interrupt more than once. The interpreter interrupt level can rise. To return to resume initially interrupted program, the user should specify equal number of the {\sf resume} statements\index{statement!resume@{\sf resume}} to the interrupts. If the interrupt level is again zero initially interrupted program continues. The context\index{context} of the virtual machine\index{virtual machine} is stored in the same structure as for the synchronous interrupt. The asynchronous interrupt service function is the following:\index{interrupt!accepted} \begin{verbatim} /* * Asynchronous interrupt handler. */ void interrupt_service () { #ifdef DEBUG_INTER printfx ("interrupt\n"); #endif if ((clif_interrupt_level > 0) || (!virtual_machine_suspended)) /* * Test of the virtual machine running and the level of interrupt. * Interrupt is only accepted if the virtual machine is running. */ { #ifdef DEBUG_INTER printfx ("virtual machine is running, interrupt accepted\n"); #endif handler = 1; } return; } \end{verbatim} The function is valid for CDC. The asynchronous interrupt service function for DEC is as follows: \begin{verbatim} /* * Asynchronous interrupt service. */ RETSIGTYPE interrupt_service () { #ifdef DEBUG_INTER printfx ("interrupt\n"); #endif if ((clif_interrupt_level > 0) || (!virtual_machine_suspended)) /* * Test of the virtual machine running and the level of interrupt. * An interrupt is only accepted if the virtual machine is running. */ { #ifdef DEBUG_INTER printfx ("virtual machine is running, interrupt accepted\n"); #endif handler = 1; #ifdef HAVE_TIOCSTI ioctl (handle_fd, TIOCSTI, "\n"); #endif } return; } \end{verbatim} Switching of the virtual machine\index{virtual machine} to a new context\index{context!switching} is connected with switching of the interpreter input\index{interpreter!input}. The different function for each platform exists because of features of the stream on those platforms. The CDC stream contents interrupt character as well as newline character. The DEC stream only contents interrupt character. Therefore we must put into the DEC stream any character before the interpreter input is switched. The interpreter input is switched to the standard input. Returning from the interrupt the interpreter input is switched to the initially set input. \section{Interpreter input functions}\index{function!input} There are three interpreter input functions. The first function is initialized at the beginning of the interpreter session. Depending on the number of parameters of the run-string the interpreter input is either in run-string specified program or the standard input (function used in this case is {\sf input\_komp}\index{function!input\_komp@{\sf input\_komp}}). When the virtual machine process the instruction of synchronous interrupt\index{interrupt!synchronous} or if the asynchronous interrupt happened the input is switched to the standard input (function {\sf input\_std}\index{function!input\_std@{\sf input\_std}}). If the virtual machine\index{virtual machine} is interrupted by the user the input is switched to the input from the buffer (function {\sf input\_buf}\index{function!input\_buf@{\sf input\_buf}}). The input from the buffer is the same as it is by synchronous interrupt. After processing it the input is switched\index{input!switching} to the standard input\index{input!standard}. The mentioned input functions\index{function!input} follow: \begin{verbatim} /* * input.c * * Initialization of the main compiler * and redefinition of its input functions. * Different input function are used during * synchronous and asynchronous interrupt * handling. */ #include #include #include "global.h" #include "lex_t.h" #include "input.h" extern FILEATTR pf, spf[]; #ifndef FLEX_SCANNER extern int yylineno; extern int yytchar; extern char *yysptr, yysbuf[]; extern int getcx PROTO((FILE *)); static int buf_pointer = 0; #else extern FILE *yyin; #endif #define U(x) x int (*input) PROTO((void)); char string_resume[]="resume;"; /* Buffer for input by return * from asynchronous interrupt. */ extern int no_compile_only; /* Flag in the case of errors or */ /* compile only. */ extern int handle_main; /* If set, compiler like behavior. */ extern int source_line_number; /* Source line number. Detecting if */ /* the current line was already */ /* printed. Using in error messages. */ extern void exit_file_scope PROTO((void)); #ifndef FLEX_SCANNER /* * Redefinition of the input for the main compiler. */ int input_komp () { #ifdef DEBUG_INTER printfx("in front of getc in input\n"); #endif yytchar=yysptr>yysbuf?U(*--yysptr):getcx(pf.fp); #ifdef DEBUG_INTER printfx("behind of getc in input, read character %c - %x\n", yytchar, yytchar); #endif if(yytchar == '\n') /* LF */ { yylineno++; spf[s].line_counter++; char_counter = 0; line_buf[0] = 0; } if(yytchar == EOF) /* Is current char EOF? */ { if (s > 0) { spf[s].line_counter = 1; /* Counting lines from beginning. */ source_line_number = 0; /* Resetting line number in the */ /* presence of errors. */ fclose (spf[s].fp); exit_file_scope (); s = s - 1; if (! s && ! no_compile_only) return 0; /* If we want compiler-like behavior, don't switch to stdin. */ if (! s && handle_main) return 0; pf = spf[s]; /* Move to the next opened file. */ } #ifdef DEBUG_INTER printfx ("in front of the second getc in input\n"); #endif yytchar = yysptr>yysbuf?U(*--yysptr):getcx(pf.fp); /* The first char */ #ifdef DEBUG_INTER printfx ("behind of the second getc in input, read character %c - %x\n", yytchar, yytchar); #endif } return (yytchar); } /* * Redefinition of the input for the main compiler. * It is used during an interrupt. */ int input_std () { #ifdef DEBUG_INTER printfx ("in front of the third getc in input\n"); #endif yytchar = yysptr>yysbuf?U(*--yysptr):getcx(stdin); #ifdef DEBUG_INTER printfx ("behind of the third getc in input, read character %c - %x\n", yytchar, yytchar); #endif if (yytchar == '\n') /* LF */ { yylineno++; spf[s].line_counter++; char_counter = 0; line_buf[0] = 0; } #ifndef NOT_MSWIN_AND_YES_DOS if (HANDLER_TEST) { HANDLER_SET; input = input_buf; buf_pointer = 0; return (input_buf()); } #endif return (yytchar); } /* * Redefinition of the input for the main compiler. * It is used by return from an interrupt. */ int input_buf () { yytchar = yysptr>yysbuf?U(*--yysptr):string_resume[buf_pointer++]; if (yytchar == '\n') /* LF */ { yylineno++; spf[s].line_counter++; char_counter = 0; line_buf[0] = 0; } return (yytchar); } #else int terminate_buffer () { fclose (spf[s].fp); spf[s].fp = NULL; spf[s].name = NULL; spf[s--].line_counter = 1; source_line_number = 0; exit_file_scope (); /* Do not switch to stdin, if the user wants compiler-like behavior. */ if (! s && handle_main) return 1; return (! s && ! no_compile_only); } #endif /* FLEX_SCANNER */ /* * Initialization of the main compiler input. */ int init_input (argc1, argv1) int argc1; char *argv1[]; { int b; #ifndef FLEX_SCANNER input = input_komp; #endif s = argc1 - 1; spf[0].fp = stdin; spf[0].name = "stdin"; spf[0].line_counter = 1; for (b = 1; b < argc1; b++) /* File opening and storing their pointer. */ { spf[argc1 - b].fp = fopen(argv1[b],"r"); spf[argc1 - b].name = argv1[b]; spf[argc1 - b].line_counter = 1; if (spf[argc1-b].fp == NULL) { s = argc1 - b; error_message (7001); return (-1); } } /* * Takes the first file pointer from the stack. */ #ifdef FLEX_SCANNER yyin = spf[s].fp; #else pf.fp = spf[s].fp; #endif return 0; } \end{verbatim} %Unfortunately, the input functions can be overridden only in ancient %versions of Lex generator (see~\cite{lesk}). The \CiF\ is not %compilable using {\sf flex}\index{flex@{\sf flex}}. \chapter{Graphic interface} As was mentioned earlier there are the four intrinsic functions\index{function!intrinsic} for programming graphics output channels. There are the following: {\sf chopen()}\index{function!chopen@{\sf chopen()}}, {\sf chwrite()}\index{function!chwrite@{\sf chwrite()}}, {\sf chflush()}\index{function!chflush@{\sf chflush()}} and {\sf chclose()}\index{function!chclose@{\sf chclose()}}. In addition, these functions are used as a graphical interface from user point of view. These functions are calling graphic primitives functions. The graphics primitives functions are the following: {\sf window()}\index{function!window@{\sf window()}}, {\sf move()}\index{function!move@{\sf move()}}, {\sf draw()}\index{function!draw@{\sf draw()}} and {\sf draw\_point()}\index{function!draw\_point@{\sf draw\_point()}}. \section{Graphic primitives} \subsection{Function {\sf window()}} The function is used in creating the window that matches the scope of displayed variable as well as the size of the window in pixels. The function follows: \begin{verbatim} /* * Creates a window from user's coordinates. * Counts world coordinates. * handle - is handle of the window * n - specifies line in the window (user can have more lines in the window) * rest are coordinates */ static void window (handle, n, x_left, y_down, x_right, y_up) int handle, n; double x_left, y_down, x_right, y_up; { channel[handle].member[n].ax = (channel[handle].w_resolution[0] - 1) / (fabs(x_left - x_right)); channel[handle].member[n].ay = (channel[handle].w_resolution[1] - 1) / (fabs(y_down - y_up)); } \end{verbatim} The {\sf handle} is the handle\index{handle} of the channel, the {\sf n} specifies the displayed variable, the {\sf x\_left}, {\sf y\_down}, {\sf x\_right} and {\sf y\_up} specify scope of the n-th displayed variable. \subsection{Function {\sf move()}} The function is used for moving cursor\index{cursor} to the specified position. It looks like follow: \begin{verbatim} /* * Moves cursor to the specified position. * handle - is handle of the window * n - specifies line in the window (user can have more lines in the window) * x, y - coordinates */ static void move (handle, n, x, y) int handle, n; double x, y; { d_move((int)floor ((x - channel[handle].start_time) * channel[handle].member[n].ax), channel[handle].w_resolution[1] - 1 - (int)floor ((y - channel[handle].member[n].lower) * channel[handle].member[n].ay)); } \end{verbatim} where {\sf handle} is the handle\index{handle} of the channel, {\sf n} specifies the displayed variable, {\sf x} and {\sf y} specify the position in the window to which cursor\index{cursor} is moved. \subsection{Function {\sf draw()}} The function {\sf draw()} is the following: \begin{verbatim} /* * Draws a line from the cursor position to the point of coordinates. * handle - is handle of the window * n - specifies line in the window (user can have more lines in the window) * x, y - coordinates */ static void draw (handle, n, x, y) int handle, n; double x, y; { d_draw (handle, n, (int)floor ((x - channel[handle].start_time) * channel[handle].member[n].ax), channel[handle].w_resolution[1] - 1 - (int)floor ((y - channel[handle].member[n].lower) * channel[handle].member[n].ay)); } \end{verbatim} \subsection{Function {\sf draw\_point()}} \begin{verbatim} /* * Draws a point from the coordinates. * handle - is handle of the window * n - specifies line in the window (user can have more lines in the window) * x, y - coordinates */ static void draw_point (handle, n, x, y) int handle, n; double x, y; { d_point (handle, n, (int)floor ((x - channel[handle].start_time) * channel[handle].member[n].ax), channel[handle].w_resolution[1] - 1 - (int)floor ((y - channel[handle].member[n].lower) * channel[handle].member[n].ay)); } \end{verbatim} \chapter{Internal representation of types} \section{Representation of a type} The proper internal representation structure has to uniquely answer the following questions: \begin{itemize} \item array, simple variable, function with or without exporting parameter types \item function type (distance): \begin{itemize} \item global \item local \item intrinsic \item remote \item $\vdots$ \end{itemize} \item arithmetic class: \begin{itemize} \item integer \item double \item $\vdots$ \end{itemize} \item if it is an array - list of dimensions \item if it is a function: \begin{itemize} \item list of parameter type specifiers (optional) \item list of formal parameters (optional) \end{itemize} \item if it is a function - it is a definition or declaration (body flag) \item address \item if it is a function definition, it was already formally called (formal call backpatching) \end{itemize} We would like to have an internal structure that is much wider then the actual type possibilities in C. But the semantic actions are only defined for the subset of C-like type definitions and declarations. Therefore we chose the following structure:\label{internal_type} \begin{verbatim} /* Internal type structure. */ struct internal_type { struct internal_type *input; struct internal_type *arity; char *field_name; int offset; struct attr attribute; struct internal_type *output; }; \end{verbatim} \index{type!internal} \index{variable!internal\_type} Representation of the type declaration: \begin{verbatim} int a(int b, int c(.....), ....); \end{verbatim} is in the figure~\ref{internal11}. The structure member {\sf attribute} is a substructure. The structure member {\sf output} is pointer to the structure {\sf internal\_type}. \begin{figure} \begin{center} {\setlength{\unitlength}{0.01250000in}% % \begingroup\makeatletter\ifx\SetFigFont\undefined % extract first six characters in \fmtname \def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}% \expandafter\x\fmtname xxxxxx\relax \def\y{splain}% \ifx\x\y % LaTeX or SliTeX? \gdef\SetFigFont#1#2#3{% \ifnum #1<17\tiny\else \ifnum #1<20\small\else \ifnum #1<24\normalsize\else \ifnum #1<29\large\else \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else \huge\fi\fi\fi\fi\fi\fi \csname #3\endcsname}% \else \gdef\SetFigFont#1#2#3{\begingroup \count@#1\relax \ifnum 25<\count@\count@25\fi \def\x{\endgroup\@setsize\SetFigFont{#2pt}}% \expandafter\x \csname \romannumeral\the\count@ pt\expandafter\endcsname \csname @\romannumeral\the\count@ pt\endcsname \csname #3\endcsname}% \fi \fi\endgroup \begin{picture}(514,449)(28,388) \thinlines \put(464,580){\vector( 3, 4){ 24.360}} \put( 56,619){\vector( 0,-1){ 25}} \put( 81,810){\vector( 3, 1){ 26.400}} \put(107,797){\line( 1, 0){ 51}} \put(107,772){\line( 1, 0){ 51}} \put(107,645){\line( 1, 0){ 51}} \put(120,772){\line( 0,-1){127}} \put(120,746){\line( 1, 0){ 38}} \put(120,721){\line( 1, 0){ 38}} \put(120,696){\line( 1, 0){ 38}} \put(120,670){\line( 1, 0){ 38}} \put(158,784){\vector( 3, 4){ 23.400}} \put(234,784){\vector( 3, 4){ 23.760}} \put(311,784){\vector( 3, 4){ 23.400}} \put(209,823){\line( 0, 1){ 12}} \put(209,835){\line( 1, 0){229}} \put(438,835){\vector( 0,-1){216}} \put(107,619){\framebox(51,204){}} \put(183,797){\line( 1, 0){ 51}} \put(183,772){\line( 1, 0){ 51}} \put(183,645){\line( 1, 0){ 51}} \put(183,619){\framebox(51,204){}} \put(196,772){\line( 0,-1){127}} \put(196,746){\line( 1, 0){ 38}} \put(196,721){\line( 1, 0){ 38}} \put(196,696){\line( 1, 0){ 38}} \put(196,670){\line( 1, 0){ 38}} \put(209,619){\vector( 0,-1){ 25}} \put(260,797){\line( 1, 0){ 51}} \put(260,772){\line( 1, 0){ 51}} \put(260,645){\line( 1, 0){ 51}} \put(260,619){\framebox(51,204){}} \put(273,772){\line( 0,-1){127}} \put(273,746){\line( 1, 0){ 38}} \put(273,721){\line( 1, 0){ 38}} \put(273,696){\line( 1, 0){ 38}} \put(273,670){\line( 1, 0){ 38}} \put(336,797){\line( 1, 0){ 51}} \put(336,772){\line( 1, 0){ 51}} \put(336,645){\line( 1, 0){ 51}} \put(336,619){\framebox(51,204){}} \put(349,772){\line( 0,-1){127}} \put(349,746){\line( 1, 0){ 38}} \put(349,721){\line( 1, 0){ 38}} \put(349,696){\line( 1, 0){ 38}} \put(349,670){\line( 1, 0){ 38}} \put(413,594){\line( 1, 0){ 51}} \put(413,568){\line( 1, 0){ 51}} \put(413,441){\line( 1, 0){ 51}} \put(413,415){\framebox(51,204){}} \put(426,568){\line( 0,-1){127}} \put(426,543){\line( 1, 0){ 38}} \put(426,517){\line( 1, 0){ 38}} \put(426,492){\line( 1, 0){ 38}} \put(426,466){\line( 1, 0){ 38}} \put(489,594){\line( 1, 0){ 51}} \put(489,568){\line( 1, 0){ 51}} \put(489,441){\line( 1, 0){ 51}} \put(489,415){\framebox(51,204){}} \put(502,568){\line( 0,-1){127}} \put(502,543){\line( 1, 0){ 38}} \put(502,517){\line( 1, 0){ 38}} \put(502,492){\line( 1, 0){ 38}} \put(502,466){\line( 1, 0){ 38}} \put( 30,797){\line( 1, 0){ 51}} \put( 30,772){\line( 1, 0){ 51}} \put( 30,645){\line( 1, 0){ 51}} \put( 30,619){\framebox(51,204){}} \put( 43,772){\line( 0,-1){127}} \put( 43,746){\line( 1, 0){ 38}} \put( 43,721){\line( 1, 0){ 38}} \put( 43,696){\line( 1, 0){ 38}} \put( 43,670){\line( 1, 0){ 38}} \put( 30,568){\line( 1, 0){ 51}} \put( 30,543){\line( 1, 0){ 51}} \put( 30,415){\line( 1, 0){ 51}} \put( 30,390){\framebox(51,204){}} \put( 43,543){\line( 0,-1){128}} \put( 43,517){\line( 1, 0){ 38}} \put( 43,492){\line( 1, 0){ 38}} \put( 43,466){\line( 1, 0){ 38}} \put( 43,441){\line( 1, 0){ 38}} \put(183,568){\line( 1, 0){ 51}} \put(183,543){\line( 1, 0){ 51}} \put(183,415){\line( 1, 0){ 51}} \put(183,390){\framebox(51,204){}} \put(196,543){\line( 0,-1){128}} \put(196,517){\line( 1, 0){ 38}} \put(196,492){\line( 1, 0){ 38}} \put(196,466){\line( 1, 0){ 38}} \put(196,441){\line( 1, 0){ 38}} \put(114,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put(114,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(114,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(114,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put(114,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put(114,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put(114,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put(114,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(114,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put(132,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put(132,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put(140,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(140,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(140,726){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put(140,700){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% INT}% }} \put(132,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put(209,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put(191,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put(191,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(191,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(191,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put(191,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put(191,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put(191,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put(191,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(191,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put(209,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put(209,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put(216,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(216,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(216,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% DOMAIN}% }} \put(216,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(216,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put(216,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put(216,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put(285,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put(267,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put(267,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(267,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(267,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put(267,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put(267,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put(267,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put(267,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(267,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put(285,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put(285,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put(293,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(293,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(293,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% DOMAIN}% }} \put(293,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(293,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put(293,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put(293,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put(362,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put(344,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put(344,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(344,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(344,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put(344,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put(344,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put(344,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put(344,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(344,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put(362,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put(362,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put(369,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(369,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(369,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% DOMAIN}% }} \put(369,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(369,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put(369,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put(369,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put(438,420){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put(420,555){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put(420,540){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(420,525){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(420,510){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put(420,495){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put(420,479){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put(420,464){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put(420,451){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(420,441){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put(438,598){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put(438,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put(446,481){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(446,471){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(446,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% DOMAIN}% }} \put(446,497){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(446,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put(446,532){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put(446,522){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put(515,420){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put(497,555){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put(497,540){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(497,525){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(497,510){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put(497,495){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put(497,479){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put(497,464){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put(497,451){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(497,441){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put(515,598){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put(515,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put(522,481){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(522,471){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(522,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% DOMAIN}% }} \put(522,497){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(522,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put(522,532){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put(522,522){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put( 56,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put( 38,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put( 38,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put( 38,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put( 38,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put( 38,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put( 38,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put( 56,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put( 56,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put( 63,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 63,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 63,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% DOMAIN}% }} \put( 63,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 63,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put( 63,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put( 63,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put( 63,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(216,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(293,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(369,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(446,547){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(522,547){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 63,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put(141,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put(216,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put(294,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put(369,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put(447,558){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put(522,558){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put(140,649){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% NULL}% }} \put( 56,395){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put( 38,426){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,530){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put( 38,514){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,499){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,484){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put( 38,469){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put( 38,453){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put( 38,438){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put( 38,415){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put( 56,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put( 56,547){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put( 63,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 63,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 63,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put( 63,497){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put( 63,471){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% INT}% }} \put(209,395){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put(191,426){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(191,530){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put(191,514){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(191,499){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(191,484){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put(191,469){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put(191,453){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put(191,438){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put(191,415){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put(209,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put(209,547){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put(216,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(216,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(216,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put(216,497){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put(216,471){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% INT}% }} \put( 63,420){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% NULL}% }} \put(216,420){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% NULL}% }} \put(140,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \end{picture}}% \caption{Representation of the type declaration {\sf int a(int b, int c(.....), ....);}}\label{internal11} \end{center} \end{figure} Structure {\sf attr} has the following form: \begin{verbatim} /* Type attribute. */ struct attr { enum intern_func_class function_class; int export_type; enum type_qual type_qualifier; enum storage_class_specifier storage_class_specifier; enum intern_arit_class arit_class; int memory_size; char *domain; }; \end{verbatim} The {\sf function\_class} can be simple variable, matrix, intrinsic function, function, remote function, $\ldots$ (full listing of possibilities can be found in `type.h' file\index{file!type.h}). The {\sf domain} pointer has the type specific form. For example for the type declaration \verb|int a[10][20];|, the internal structure is in the figure~\ref{internal12}. \begin{figure} \begin{center} {\setlength{\unitlength}{0.01250000in}% % \begingroup\makeatletter\ifx\SetFigFont\undefined % extract first six characters in \fmtname \def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}% \expandafter\x\fmtname xxxxxx\relax \def\y{splain}% \ifx\x\y % LaTeX or SliTeX? \gdef\SetFigFont#1#2#3{% \ifnum #1<17\tiny\else \ifnum #1<20\small\else \ifnum #1<24\normalsize\else \ifnum #1<29\large\else \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else \huge\fi\fi\fi\fi\fi\fi \csname #3\endcsname}% \else \gdef\SetFigFont#1#2#3{\begingroup \count@#1\relax \ifnum 25<\count@\count@25\fi \def\x{\endgroup\@setsize\SetFigFont{#2pt}}% \expandafter\x \csname \romannumeral\the\count@ pt\expandafter\endcsname \csname @\romannumeral\the\count@ pt\endcsname \csname #3\endcsname}% \fi \fi\endgroup \begin{picture}(217,437)(28,388) \thinlines \put(108,543){\framebox(51,51){}} \put(108,570){\line( 1, 0){ 51}} \put(132,549){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 10}% }} \put(132,576){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(159,657){\line( 1, 0){ 9}} \put(168,657){\line( 0,-1){ 51}} \put(168,606){\line(-1, 0){ 36}} \put(132,606){\vector( 0,-1){ 12}} \put( 56,619){\vector( 0,-1){ 25}} \put( 81,810){\vector( 3, 1){ 26.400}} \put(107,797){\line( 1, 0){ 51}} \put(107,772){\line( 1, 0){ 51}} \put(107,645){\line( 1, 0){ 51}} \put(120,772){\line( 0,-1){127}} \put(120,746){\line( 1, 0){ 38}} \put(120,721){\line( 1, 0){ 38}} \put(120,696){\line( 1, 0){ 38}} \put(120,670){\line( 1, 0){ 38}} \put(158,784){\vector( 3, 4){ 23.400}} \put(107,619){\framebox(51,204){}} \put(183,797){\line( 1, 0){ 51}} \put(183,772){\line( 1, 0){ 51}} \put(183,645){\line( 1, 0){ 51}} \put(196,772){\line( 0,-1){127}} \put(196,746){\line( 1, 0){ 38}} \put(196,721){\line( 1, 0){ 38}} \put(196,696){\line( 1, 0){ 38}} \put(196,670){\line( 1, 0){ 38}} \put( 30,797){\line( 1, 0){ 51}} \put( 30,772){\line( 1, 0){ 51}} \put( 30,645){\line( 1, 0){ 51}} \put( 30,619){\framebox(51,204){}} \put( 43,772){\line( 0,-1){127}} \put( 43,746){\line( 1, 0){ 38}} \put( 43,721){\line( 1, 0){ 38}} \put( 43,696){\line( 1, 0){ 38}} \put( 43,670){\line( 1, 0){ 38}} \put( 30,568){\line( 1, 0){ 51}} \put( 30,543){\line( 1, 0){ 51}} \put( 30,415){\line( 1, 0){ 51}} \put( 30,390){\framebox(51,204){}} \put( 43,543){\line( 0,-1){128}} \put( 43,517){\line( 1, 0){ 38}} \put( 43,492){\line( 1, 0){ 38}} \put( 43,466){\line( 1, 0){ 38}} \put( 43,441){\line( 1, 0){ 38}} \put(183,619){\framebox(51,204){}} \put(234,657){\line( 1, 0){ 9}} \put(243,657){\line( 0,-1){ 51}} \put(243,606){\line(-1, 0){ 36}} \put(207,606){\vector( 0,-1){ 12}} \put(183,543){\framebox(51,51){}} \put(183,570){\line( 1, 0){ 51}} \put(114,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put(114,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(114,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(114,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put(114,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put(114,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put(114,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put(114,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(114,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put(132,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put(132,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put(140,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(140,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(140,726){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put(140,700){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% INT}% }} \put(132,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put(209,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put(191,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put(191,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(191,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(191,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put(191,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put(191,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put(191,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put(191,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(191,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put(209,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put(209,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put(216,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(216,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(216,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% DOMAIN}% }} \put(216,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(216,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put(216,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put(216,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put( 56,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put( 38,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put( 38,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put( 38,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put( 38,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put( 38,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put( 38,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put( 56,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put( 56,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put( 63,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 63,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 63,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% DOMAIN}% }} \put( 63,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 63,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put( 63,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put( 63,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put( 63,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(216,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 63,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put(141,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put(216,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put( 56,395){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put( 38,426){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,530){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put( 38,514){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,499){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,484){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put( 38,469){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put( 38,453){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put( 38,438){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put( 38,415){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put( 56,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put( 56,547){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put( 63,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 63,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 63,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put( 63,497){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put( 63,471){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% INT}% }} \put( 63,420){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% NULL}% }} \put(207,576){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(207,549){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 20}% }} \put(140,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% DOMAIN}% }} \put(140,751){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Class}% }} \end{picture}}% \caption{Representation of the type declaration {\sf int a[10][20];}}\label{internal12} \end{center} \end{figure} In the figure~\ref{internal11}, there is a general form of representation of a type declaration. Typically, the C-like declarations and definitions have other forms, i.e. there are not declarations of functions in a function declaration. Therefore, the n-ary tree pointed out in the figure~\ref{internal11} is simplified to the list of identifiers or binary tree~\ref{internal13}, respectively. \begin{figure} \begin{center} {\setlength{\unitlength}{0.01250000in}% % \begingroup\makeatletter\ifx\SetFigFont\undefined % extract first six characters in \fmtname \def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}% \expandafter\x\fmtname xxxxxx\relax \def\y{splain}% \ifx\x\y % LaTeX or SliTeX? \gdef\SetFigFont#1#2#3{% \ifnum #1<17\tiny\else \ifnum #1<20\small\else \ifnum #1<24\normalsize\else \ifnum #1<29\large\else \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else \huge\fi\fi\fi\fi\fi\fi \csname #3\endcsname}% \else \gdef\SetFigFont#1#2#3{\begingroup \count@#1\relax \ifnum 25<\count@\count@25\fi \def\x{\endgroup\@setsize\SetFigFont{#2pt}}% \expandafter\x \csname \romannumeral\the\count@ pt\expandafter\endcsname \csname @\romannumeral\the\count@ pt\endcsname \csname #3\endcsname}% \fi \fi\endgroup \begin{picture}(247,463)(28,358) \thinlines \put( 57,603){\vector( 0,-1){ 27}} \put( 84,805){\vector( 3, 1){ 27.600}} \put( 30,792){\line( 1, 0){ 54}} \put( 30,765){\line( 1, 0){ 54}} \put( 30,630){\line( 1, 0){ 54}} \put( 30,603){\framebox(54,216){}} \put( 44,765){\line( 0,-1){135}} \put( 44,738){\line( 1, 0){ 40}} \put( 44,711){\line( 1, 0){ 40}} \put( 44,684){\line( 1, 0){ 40}} \put( 44,657){\line( 1, 0){ 40}} \put( 30,549){\line( 1, 0){ 54}} \put( 30,522){\line( 1, 0){ 54}} \put( 30,387){\line( 1, 0){ 54}} \put( 30,360){\framebox(54,216){}} \put( 44,522){\line( 0,-1){135}} \put( 44,495){\line( 1, 0){ 40}} \put( 44,468){\line( 1, 0){ 40}} \put( 44,441){\line( 1, 0){ 40}} \put( 44,414){\line( 1, 0){ 40}} \put(111,792){\line( 1, 0){ 54}} \put(111,765){\line( 1, 0){ 54}} \put(111,630){\line( 1, 0){ 54}} \put(125,765){\line( 0,-1){135}} \put(165,778){\vector( 3, 4){ 25.080}} \put(111,603){\framebox(54,216){}} \put(125,738){\line( 1, 0){ 40}} \put(125,711){\line( 1, 0){ 40}} \put(125,684){\line( 1, 0){ 40}} \put(125,657){\line( 1, 0){ 40}} \put(192,792){\line( 1, 0){ 54}} \put(192,765){\line( 1, 0){ 54}} \put(192,630){\line( 1, 0){ 54}} \put(206,765){\line( 0,-1){135}} \put(246,778){\vector( 3, 4){ 25.080}} \put(192,603){\framebox(54,216){}} \put(206,738){\line( 1, 0){ 40}} \put(206,711){\line( 1, 0){ 40}} \put(206,684){\line( 1, 0){ 40}} \put(206,657){\line( 1, 0){ 40}} \put( 57,608){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put( 38,751){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put( 38,735){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,719){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,703){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put( 38,686){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put( 38,670){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put( 38,654){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put( 38,641){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,630){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put( 57,797){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put( 57,770){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put( 65,673){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 65,662){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 65,635){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% DOMAIN}% }} \put( 65,689){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 65,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put( 65,727){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put( 65,716){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put( 65,743){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 66,756){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Functional}% }} \put( 57,365){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put( 38,398){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,508){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put( 38,492){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,476){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,460){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put( 38,444){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put( 38,427){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put( 38,411){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put( 38,387){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put( 57,554){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put( 57,527){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put( 65,430){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 65,419){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 65,500){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put( 65,473){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put( 65,446){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% INT}% }} \put( 65,392){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% NULL}% }} \put(119,686){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put(119,641){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(138,608){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put(119,751){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put(119,735){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(119,719){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(119,703){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put(119,670){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put(119,654){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put(119,630){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(138,797){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put(138,770){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put(146,673){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(146,662){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(146,743){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(146,716){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(146,689){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INT}% }} \put(200,686){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put(200,641){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(219,608){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put(200,751){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put(200,735){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(200,719){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(200,703){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put(200,670){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put(200,654){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put(200,630){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(219,797){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put(219,770){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put(227,673){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(227,662){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(227,743){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(227,716){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(227,689){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INT}% }} \put(146,635){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% NULL}% }} \put(227,635){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% NULL}% }} \end{picture}}% \caption{Representation of typical C-like function declaration.}\label{internal13} \end{center} \end{figure} \section{C-language subset of type} %\subsection{Internal code representation} Some typical patterns are in figures~\ref{kod01}, \ref{kod02}, \ref{kod03}. \begin{figure} \begin{center} {\setlength{\unitlength}{0.01250000in}% % \begingroup\makeatletter\ifx\SetFigFont\undefined % extract first six characters in \fmtname \def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}% \expandafter\x\fmtname xxxxxx\relax \def\y{splain}% \ifx\x\y % LaTeX or SliTeX? \gdef\SetFigFont#1#2#3{% \ifnum #1<17\tiny\else \ifnum #1<20\small\else \ifnum #1<24\normalsize\else \ifnum #1<29\large\else \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else \huge\fi\fi\fi\fi\fi\fi \csname #3\endcsname}% \else \gdef\SetFigFont#1#2#3{\begingroup \count@#1\relax \ifnum 25<\count@\count@25\fi \def\x{\endgroup\@setsize\SetFigFont{#2pt}}% \expandafter\x \csname \romannumeral\the\count@ pt\expandafter\endcsname \csname @\romannumeral\the\count@ pt\endcsname \csname #3\endcsname}% \fi \fi\endgroup \begin{picture}(99,75)(263,749) \thinlines \put(300,810){\line(-2,-1){ 30}} \put(300,810){\line( 2,-1){ 30}} \put(330,780){\line(-2,-1){ 30}} \put(330,780){\line( 0,-1){ 18}} \put(330,780){\line( 2,-1){ 30}} \put(330,786){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}% \smash{% b}% }} \put(300,750){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% int}% }} \put(360,750){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% c}% }} \put(270,786){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% int}% }} \put(300,819){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% a}% }} \put(330,753){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% [ ]}% }} \end{picture}}% \caption{Tree pattern of the declaration {\sf int a(int b[ ],int c);}}\label{kod01} \end{center} \end{figure} \begin{figure} \begin{center} {\setlength{\unitlength}{0.01250000in}% % \begingroup\makeatletter\ifx\SetFigFont\undefined % extract first six characters in \fmtname \def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}% \expandafter\x\fmtname xxxxxx\relax \def\y{splain}% \ifx\x\y % LaTeX or SliTeX? \gdef\SetFigFont#1#2#3{% \ifnum #1<17\tiny\else \ifnum #1<20\small\else \ifnum #1<24\normalsize\else \ifnum #1<29\large\else \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else \huge\fi\fi\fi\fi\fi\fi \csname #3\endcsname}% \else \gdef\SetFigFont#1#2#3{\begingroup \count@#1\relax \ifnum 25<\count@\count@25\fi \def\x{\endgroup\@setsize\SetFigFont{#2pt}}% \expandafter\x \csname \romannumeral\the\count@ pt\expandafter\endcsname \csname @\romannumeral\the\count@ pt\endcsname \csname #3\endcsname}% \fi \fi\endgroup \begin{picture}(129,112)(263,712) \thinlines \put(285,747){\framebox(30,15){}} \put(285,756){\line( 1, 0){ 30}} \put(315,714){\framebox(30,15){}} \put(315,723){\line( 1, 0){ 30}} \put(300,810){\line(-2,-1){ 30}} \put(300,810){\line( 2,-1){ 30}} \put(330,780){\line(-2,-1){ 30}} \put(330,780){\line( 2,-1){ 30}} \put(360,744){\line(-5,-2){ 30}} \put(360,744){\line( 5,-2){ 30}} \put(270,786){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% int}% }} \put(300,819){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% a}% }} \put(330,786){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}% \smash{% [ ]}% }} \put(360,750){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% [ ]}% }} \end{picture}}% \caption{Tree pattern of the declaration {\sf int a[ ][ ][ ];}}\label{kod02} \end{center} \end{figure} \begin{figure} \begin{center} {\setlength{\unitlength}{0.01250000in}% % \begingroup\makeatletter\ifx\SetFigFont\undefined % extract first six characters in \fmtname \def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}% \expandafter\x\fmtname xxxxxx\relax \def\y{splain}% \ifx\x\y % LaTeX or SliTeX? \gdef\SetFigFont#1#2#3{% \ifnum #1<17\tiny\else \ifnum #1<20\small\else \ifnum #1<24\normalsize\else \ifnum #1<29\large\else \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else \huge\fi\fi\fi\fi\fi\fi \csname #3\endcsname}% \else \gdef\SetFigFont#1#2#3{\begingroup \count@#1\relax \ifnum 25<\count@\count@25\fi \def\x{\endgroup\@setsize\SetFigFont{#2pt}}% \expandafter\x \csname \romannumeral\the\count@ pt\expandafter\endcsname \csname @\romannumeral\the\count@ pt\endcsname \csname #3\endcsname}% \fi \fi\endgroup \begin{picture}(429,190)(263,634) \thinlines \put(351,684){\framebox(30,15){}} \put(351,693){\line( 1, 0){ 30}} \put(315,720){\framebox(30,15){}} \put(315,729){\line( 1, 0){ 30}} \put(531,636){\framebox(30,15){}} \put(531,645){\line( 1, 0){ 30}} \put(495,672){\framebox(30,15){}} \put(495,681){\line( 1, 0){ 30}} \put(300,810){\line(-2,-1){ 30}} \put(300,810){\line( 2,-1){ 30}} \put(330,780){\line(-2,-1){ 30}} \put(330,780){\line( 2,-1){ 30}} \put(330,780){\line( 6,-1){180}} \put(396,714){\line(-2,-1){ 30}} \put(396,714){\line( 2,-1){ 30}} \put(360,750){\line(-2,-1){ 30}} \put(360,750){\line( 2,-1){ 30}} \put(510,732){\line(-2,-1){ 30}} \put(510,732){\line( 2,-1){ 30}} \put(510,732){\line( 6,-1){180}} \put(576,666){\line(-2,-1){ 30}} \put(576,666){\line( 2,-1){ 30}} \put(540,702){\line(-2,-1){ 30}} \put(540,702){\line( 2,-1){ 30}} \put(270,786){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% int}% }} \put(300,819){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% a}% }} \put(330,786){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}% \smash{% b}% }} \put(510,735){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% c}% }} \put(300,753){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% int}% }} \put(480,705){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% int}% }} \put(360,756){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% [ ]}% }} \put(396,720){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% [ ]}% }} \put(540,708){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% []}% }} \put(576,672){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% [ ]}% }} \end{picture}}% \caption{Tree pattern of the declaration {\sf int a(int b[ ][ ]$\ldots$, int c[ ][ ]$\ldots$,$\ldots$);}}\label{kod03} \end{center} \end{figure} In the following figures, there are some internal representations of C-language types (fig.~\ref{internal14}, \ref{internal15}, \ref{internal16}, \ref{internal17}, \ref{internal18}). The rest of this chapter describes considerations about different language constructions that are using {\sf internal\_type} structures, but are no necessary fully implemented. \subsection{Internal representation of {\sf typedef}} \label{sec:typedef} The {\sf typedef} type has the {\sf function\_class} {\em typedef}. Where the {\sf typedef} is used typically only the part where the first output points is taken and this is the internal type definition of the {\sf typedef} (see fig.~\ref{internal14}). \begin{figure} \begin{center} {\setlength{\unitlength}{0.01250000in}% % \begingroup\makeatletter\ifx\SetFigFont\undefined % extract first six characters in \fmtname \def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}% \expandafter\x\fmtname xxxxxx\relax \def\y{splain}% \ifx\x\y % LaTeX or SliTeX? \gdef\SetFigFont#1#2#3{% \ifnum #1<17\tiny\else \ifnum #1<20\small\else \ifnum #1<24\normalsize\else \ifnum #1<29\large\else \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else \huge\fi\fi\fi\fi\fi\fi \csname #3\endcsname}% \else \gdef\SetFigFont#1#2#3{\begingroup \count@#1\relax \ifnum 25<\count@\count@25\fi \def\x{\endgroup\@setsize\SetFigFont{#2pt}}% \expandafter\x \csname \romannumeral\the\count@ pt\expandafter\endcsname \csname @\romannumeral\the\count@ pt\endcsname \csname #3\endcsname}% \fi \fi\endgroup \begin{picture}(232,703)(28,109) \thinlines \put( 30,300){\line( 1, 0){ 54}} \put( 30,273){\line( 1, 0){ 54}} \put( 30,138){\line( 1, 0){ 54}} \put( 30,111){\framebox(54,216){}} \put( 44,273){\line( 0,-1){135}} \put( 44,246){\line( 1, 0){ 40}} \put( 44,219){\line( 1, 0){ 40}} \put( 44,192){\line( 1, 0){ 40}} \put( 44,165){\line( 1, 0){ 40}} \put( 57,116){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put( 38,149){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,259){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put( 38,243){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,227){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,211){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put( 38,195){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put( 38,178){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put( 38,162){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put( 57,305){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put( 57,278){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put( 65,181){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 65,170){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 65,251){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put( 65,224){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put( 65,197){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% INT}% }} \put( 65,143){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% NULL}% }} \put(111,273){\framebox(54,54){}} \put(111,300){\line( 1, 0){ 54}} \put(165,396){\line( 1, 0){ 12}} \put(177,396){\line( 0,-1){ 51}} \put(177,345){\line(-1, 0){ 39}} \put(138,345){\vector( 0,-1){ 18}} \put(138,306){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% 0}% }} \put(138,279){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% 3}% }} \put(192,273){\framebox(54,54){}} \put(192,300){\line( 1, 0){ 54}} \put(246,396){\line( 1, 0){ 12}} \put(258,396){\line( 0,-1){ 51}} \put(258,345){\line(-1, 0){ 39}} \put(219,345){\vector( 0,-1){ 18}} \put(219,306){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% 0}% }} \put(219,279){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% 3}% }} \put(192,516){\line( 1, 0){ 54}} \put(192,381){\line( 1, 0){ 54}} \put(206,489){\line( 1, 0){ 40}} \put(206,462){\line( 1, 0){ 40}} \put(206,435){\line( 1, 0){ 40}} \put(165,529){\vector( 3, 4){ 25.080}} \put( 57,354){\vector( 0,-1){ 27}} \put( 84,556){\vector( 3, 1){ 27.600}} \put( 30,543){\line( 1, 0){ 54}} \put( 30,354){\framebox(54,216){}} \put(111,543){\line( 1, 0){ 54}} \put(111,516){\line( 1, 0){ 54}} \put(111,381){\line( 1, 0){ 54}} \put(125,489){\line( 1, 0){ 40}} \put(125,462){\line( 1, 0){ 40}} \put(125,435){\line( 1, 0){ 40}} \put(125,408){\line( 1, 0){ 40}} \put(192,543){\line( 1, 0){ 54}} \put(206,516){\line( 0,-1){135}} \put(192,354){\framebox(54,216){}} \put(206,408){\line( 1, 0){ 40}} \put( 30,516){\line( 1, 0){ 54}} \put( 30,381){\line( 1, 0){ 54}} \put( 44,516){\line( 0,-1){135}} \put( 44,489){\line( 1, 0){ 40}} \put( 44,462){\line( 1, 0){ 40}} \put( 44,435){\line( 1, 0){ 40}} \put( 44,408){\line( 1, 0){ 40}} \put(125,516){\line( 0,-1){135}} \put(111,354){\framebox(54,216){}} \put( 57,594){\vector( 0,-1){ 24}} \put( 30,783){\line( 1, 0){ 54}} \put( 30,756){\line( 1, 0){ 54}} \put( 30,621){\line( 1, 0){ 54}} \put( 30,594){\framebox(54,216){}} \put( 44,756){\line( 0,-1){135}} \put( 44,729){\line( 1, 0){ 40}} \put( 44,702){\line( 1, 0){ 40}} \put( 44,675){\line( 1, 0){ 40}} \put( 44,648){\line( 1, 0){ 40}} \put(200,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put(200,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put(200,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(200,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(200,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put(200,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put( 57,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put( 57,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put( 57,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put( 65,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 65,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 65,440){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 65,451){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put( 65,478){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put( 65,467){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put( 65,494){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 66,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Functional}% }} \put(119,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put(119,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(146,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(200,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(219,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put(200,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put(200,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(219,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put(219,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put(227,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(227,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(227,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(227,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(227,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INT}% }} \put( 38,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put( 38,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put( 38,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put( 38,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put( 38,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put( 38,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put( 38,138){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(119,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put(119,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(138,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put(119,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put(119,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(119,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(119,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put(119,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put(138,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put(138,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put(146,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(146,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(146,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(146,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INT}% }} \put( 57,599){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put( 38,632){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,742){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put( 38,726){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,710){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,694){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put( 38,678){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put( 38,661){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put( 38,645){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put( 57,788){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put( 57,761){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put( 65,664){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 65,653){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 65,626){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% NULL}% }} \put( 65,680){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}% \smash{% Class}% }} \put( 66,690){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}% \smash{% Arit}% }} \put( 65,707){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}% \smash{% Type}% }} \put( 66,717){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}% \smash{% Export}% }} \put( 65,734){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}% \smash{% Class}% }} \put( 66,744){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}% \smash{% Functional}% }} \put(146,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Domain}% }} \put( 65,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Domain}% }} \put(227,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Domain}% }} \end{picture}}% \caption{Internal representation of {\sf typedef int c[3][3];}}\label{internal14} \end{center} \end{figure} \subsection{Internal representation of pointer} \label{sec:pointer} The pointer type has the {\sf function\_class} {\em pointer}. The level of indirection is equal to the number of the {\sf internal\_type} structures (see fig.~\ref{internal15}). \begin{figure} \begin{center} {\setlength{\unitlength}{0.01250000in}% % \begingroup\makeatletter\ifx\SetFigFont\undefined % extract first six characters in \fmtname \def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}% \expandafter\x\fmtname xxxxxx\relax \def\y{splain}% \ifx\x\y % LaTeX or SliTeX? \gdef\SetFigFont#1#2#3{% \ifnum #1<17\tiny\else \ifnum #1<20\small\else \ifnum #1<24\normalsize\else \ifnum #1<29\large\else \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else \huge\fi\fi\fi\fi\fi\fi \csname #3\endcsname}% \else \gdef\SetFigFont#1#2#3{\begingroup \count@#1\relax \ifnum 25<\count@\count@25\fi \def\x{\endgroup\@setsize\SetFigFont{#2pt}}% \expandafter\x \csname \romannumeral\the\count@ pt\expandafter\endcsname \csname @\romannumeral\the\count@ pt\endcsname \csname #3\endcsname}% \fi \fi\endgroup \begin{picture}(58,703)(28,109) \thinlines \put( 57,354){\vector( 0,-1){ 27}} \put( 30,543){\line( 1, 0){ 54}} \put( 30,354){\framebox(54,216){}} \put( 30,516){\line( 1, 0){ 54}} \put( 30,381){\line( 1, 0){ 54}} \put( 44,516){\line( 0,-1){135}} \put( 44,489){\line( 1, 0){ 40}} \put( 44,462){\line( 1, 0){ 40}} \put( 44,435){\line( 1, 0){ 40}} \put( 44,408){\line( 1, 0){ 40}} \put( 57,594){\vector( 0,-1){ 24}} \put( 30,783){\line( 1, 0){ 54}} \put( 30,756){\line( 1, 0){ 54}} \put( 30,621){\line( 1, 0){ 54}} \put( 30,594){\framebox(54,216){}} \put( 44,756){\line( 0,-1){135}} \put( 44,729){\line( 1, 0){ 40}} \put( 44,702){\line( 1, 0){ 40}} \put( 44,675){\line( 1, 0){ 40}} \put( 44,648){\line( 1, 0){ 40}} \put( 30,300){\line( 1, 0){ 54}} \put( 30,273){\line( 1, 0){ 54}} \put( 30,138){\line( 1, 0){ 54}} \put( 30,111){\framebox(54,216){}} \put( 44,273){\line( 0,-1){135}} \put( 44,246){\line( 1, 0){ 40}} \put( 44,219){\line( 1, 0){ 40}} \put( 44,192){\line( 1, 0){ 40}} \put( 44,165){\line( 1, 0){ 40}} \put( 57,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put( 57,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put( 57,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put( 65,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 65,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 65,440){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 65,451){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put( 65,478){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put( 65,467){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put( 65,494){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 66,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Functional}% }} \put( 38,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put( 38,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put( 38,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put( 38,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put( 38,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put( 38,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put( 38,138){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put( 57,599){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put( 38,632){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,742){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put( 38,726){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,710){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,694){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put( 38,678){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put( 38,661){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put( 38,645){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put( 57,788){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put( 57,761){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put( 65,664){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 65,653){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 65,626){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% NULL}% }} \put( 65,680){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}% \smash{% Class}% }} \put( 66,690){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}% \smash{% Arit}% }} \put( 65,707){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}% \smash{% Type}% }} \put( 66,717){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}% \smash{% Export}% }} \put( 65,734){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}% \smash{% Class}% }} \put( 66,744){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}% \smash{% Functional}% }} \put( 65,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Domain}% }} \put( 57,116){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put( 38,149){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,259){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put( 38,243){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,227){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,211){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put( 38,195){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put( 38,178){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put( 38,162){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put( 57,305){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put( 57,278){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put( 65,181){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 65,170){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 65,251){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put( 65,224){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put( 65,143){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% NULL}% }} \put( 65,197){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% CHAR}% }} \end{picture}}% \caption{Internal representation of {\sf char **a;}}\label{internal15} \end{center} \end{figure} \subsection{Internal representation of enumeration} \label{sec:enumeration} The enumeration type has the {\sf function\_class} {\em enumeration}. The type of enumeration members are integer (see fig.~\ref{internal16}). \begin{figure} \begin{center} {\setlength{\unitlength}{0.01250000in}% % \begingroup\makeatletter\ifx\SetFigFont\undefined % extract first six characters in \fmtname \def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}% \expandafter\x\fmtname xxxxxx\relax \def\y{splain}% \ifx\x\y % LaTeX or SliTeX? \gdef\SetFigFont#1#2#3{% \ifnum #1<17\tiny\else \ifnum #1<20\small\else \ifnum #1<24\normalsize\else \ifnum #1<29\large\else \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else \huge\fi\fi\fi\fi\fi\fi \csname #3\endcsname}% \else \gdef\SetFigFont#1#2#3{\begingroup \count@#1\relax \ifnum 25<\count@\count@25\fi \def\x{\endgroup\@setsize\SetFigFont{#2pt}}% \expandafter\x \csname \romannumeral\the\count@ pt\expandafter\endcsname \csname @\romannumeral\the\count@ pt\endcsname \csname #3\endcsname}% \fi \fi\endgroup \begin{picture}(313,274)(28,298) \thinlines \put(165,396){\line( 1, 0){ 12}} \put(177,396){\line( 0,-1){ 51}} \put(177,345){\line(-1, 0){ 39}} \put(138,345){\vector( 0,-1){ 18}} \put(111,300){\framebox(54,27){}} \put(138,306){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% 0}% }} \put( 84,556){\vector( 3, 1){ 27.600}} \put( 30,543){\line( 1, 0){ 54}} \put( 30,354){\framebox(54,216){}} \put(111,543){\line( 1, 0){ 54}} \put(111,516){\line( 1, 0){ 54}} \put(111,381){\line( 1, 0){ 54}} \put(125,489){\line( 1, 0){ 40}} \put(125,462){\line( 1, 0){ 40}} \put(125,435){\line( 1, 0){ 40}} \put(125,408){\line( 1, 0){ 40}} \put( 30,516){\line( 1, 0){ 54}} \put( 30,381){\line( 1, 0){ 54}} \put( 44,516){\line( 0,-1){135}} \put( 44,489){\line( 1, 0){ 40}} \put( 44,462){\line( 1, 0){ 40}} \put( 44,435){\line( 1, 0){ 40}} \put( 44,408){\line( 1, 0){ 40}} \put(125,516){\line( 0,-1){135}} \put(111,354){\framebox(54,216){}} \put(273,516){\line( 1, 0){ 54}} \put(273,381){\line( 1, 0){ 54}} \put(287,489){\line( 1, 0){ 40}} \put(287,462){\line( 1, 0){ 40}} \put(287,435){\line( 1, 0){ 40}} \put(246,529){\vector( 3, 4){ 25.080}} \put(273,543){\line( 1, 0){ 54}} \put(287,516){\line( 0,-1){135}} \put(273,354){\framebox(54,216){}} \put(287,408){\line( 1, 0){ 40}} \put(192,516){\line( 1, 0){ 54}} \put(192,381){\line( 1, 0){ 54}} \put(206,489){\line( 1, 0){ 40}} \put(206,462){\line( 1, 0){ 40}} \put(206,435){\line( 1, 0){ 40}} \put(165,529){\vector( 3, 4){ 25.080}} \put(192,543){\line( 1, 0){ 54}} \put(206,516){\line( 0,-1){135}} \put(192,354){\framebox(54,216){}} \put(206,408){\line( 1, 0){ 40}} \put(246,396){\line( 1, 0){ 12}} \put(258,396){\line( 0,-1){ 51}} \put(258,345){\line(-1, 0){ 39}} \put(219,345){\vector( 0,-1){ 18}} \put(192,300){\framebox(54,27){}} \put(327,396){\line( 1, 0){ 12}} \put(339,396){\line( 0,-1){ 51}} \put(339,345){\line(-1, 0){ 39}} \put(300,345){\vector( 0,-1){ 18}} \put(273,300){\framebox(54,27){}} \put( 57,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put( 57,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put( 57,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put( 65,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 65,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 65,440){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 65,451){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put( 65,478){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put( 65,467){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put( 65,494){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 66,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Functional}% }} \put(119,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put(119,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(146,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put( 38,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put( 38,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put( 38,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put( 38,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put( 38,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put( 38,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(119,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put(119,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(138,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put(119,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put(119,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(119,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(119,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put(119,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put(138,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put(138,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put(146,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(146,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(146,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(146,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INT}% }} \put(146,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Domain}% }} \put( 65,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Domain}% }} \put(281,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(281,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put(281,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put(281,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(281,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(281,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put(281,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put(281,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(300,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put(281,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put(300,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put(300,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put(308,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(308,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(308,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(308,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(308,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INT}% }} \put(308,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Domain}% }} \put(200,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(200,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put(200,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put(200,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(200,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(200,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put(200,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put(200,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(219,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put(200,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put(219,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put(219,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put(227,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(227,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(227,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(227,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(227,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INT}% }} \put(227,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Domain}% }} \put(219,306){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% 1}% }} \put(300,306){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% 2}% }} \end{picture}}% \caption{Internal representation of {\sf enum num \{ one, two, three \};}}\label{internal16} \end{center} \end{figure} \subsection{Internal representation of structure} \label{sec:structure} The structure type has the {\sf function\_class} {\em structure}. The type of structure fields is the same as for simple variables or arrays (see fig.~\ref{internal17}). \begin{figure} \begin{center} {\setlength{\unitlength}{0.01250000in}% % \begingroup\makeatletter\ifx\SetFigFont\undefined % extract first six characters in \fmtname \def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}% \expandafter\x\fmtname xxxxxx\relax \def\y{splain}% \ifx\x\y % LaTeX or SliTeX? \gdef\SetFigFont#1#2#3{% \ifnum #1<17\tiny\else \ifnum #1<20\small\else \ifnum #1<24\normalsize\else \ifnum #1<29\large\else \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else \huge\fi\fi\fi\fi\fi\fi \csname #3\endcsname}% \else \gdef\SetFigFont#1#2#3{\begingroup \count@#1\relax \ifnum 25<\count@\count@25\fi \def\x{\endgroup\@setsize\SetFigFont{#2pt}}% \expandafter\x \csname \romannumeral\the\count@ pt\expandafter\endcsname \csname @\romannumeral\the\count@ pt\endcsname \csname #3\endcsname}% \fi \fi\endgroup \begin{picture}(301,220)(28,352) \thinlines \put( 84,556){\vector( 3, 1){ 27.600}} \put( 30,543){\line( 1, 0){ 54}} \put( 30,354){\framebox(54,216){}} \put(111,543){\line( 1, 0){ 54}} \put(111,516){\line( 1, 0){ 54}} \put(111,381){\line( 1, 0){ 54}} \put(125,489){\line( 1, 0){ 40}} \put(125,462){\line( 1, 0){ 40}} \put(125,435){\line( 1, 0){ 40}} \put(125,408){\line( 1, 0){ 40}} \put( 30,516){\line( 1, 0){ 54}} \put( 30,381){\line( 1, 0){ 54}} \put( 44,516){\line( 0,-1){135}} \put( 44,489){\line( 1, 0){ 40}} \put( 44,462){\line( 1, 0){ 40}} \put( 44,435){\line( 1, 0){ 40}} \put( 44,408){\line( 1, 0){ 40}} \put(125,516){\line( 0,-1){135}} \put(111,354){\framebox(54,216){}} \put(273,516){\line( 1, 0){ 54}} \put(273,381){\line( 1, 0){ 54}} \put(287,489){\line( 1, 0){ 40}} \put(287,462){\line( 1, 0){ 40}} \put(287,435){\line( 1, 0){ 40}} \put(246,529){\vector( 3, 4){ 25.080}} \put(273,543){\line( 1, 0){ 54}} \put(287,516){\line( 0,-1){135}} \put(273,354){\framebox(54,216){}} \put(287,408){\line( 1, 0){ 40}} \put(192,516){\line( 1, 0){ 54}} \put(192,381){\line( 1, 0){ 54}} \put(206,489){\line( 1, 0){ 40}} \put(206,462){\line( 1, 0){ 40}} \put(206,435){\line( 1, 0){ 40}} \put(165,529){\vector( 3, 4){ 25.080}} \put(192,543){\line( 1, 0){ 54}} \put(206,516){\line( 0,-1){135}} \put(192,354){\framebox(54,216){}} \put(206,408){\line( 1, 0){ 40}} \put( 57,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put( 57,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put( 57,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put( 65,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 65,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 65,440){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 65,451){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put( 65,478){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put( 65,467){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put( 65,494){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 66,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Functional}% }} \put(119,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put(119,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(146,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put( 38,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put( 38,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put( 38,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put( 38,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put( 38,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put( 38,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(119,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put(119,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(138,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put(119,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put(119,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(119,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(119,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put(119,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put(138,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put(138,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put(146,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(146,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(146,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(146,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INT}% }} \put(146,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Domain}% }} \put( 65,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Domain}% }} \put(281,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(281,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put(281,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put(281,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(281,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(281,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put(281,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put(281,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(300,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put(281,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put(300,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put(300,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put(308,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(308,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(308,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(308,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(308,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INT}% }} \put(308,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Domain}% }} \put(200,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(200,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put(200,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put(200,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(200,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(200,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put(200,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put(200,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(219,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put(200,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put(219,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put(219,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put(227,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(227,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(227,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(227,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(227,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INT}% }} \put(227,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Domain}% }} \end{picture}}% \caption{Internal representation of {\sf struct a \{ int a, int b, int c\};}}\label{internal17} \end{center} \end{figure} \subsection{Internal representation of {\sf union}} \label{sec:union} The union type has the {\sf function\_class} {\em union}. Each field of the has its own subtype (see fig.~\ref{internal18}). \begin{figure} \begin{center} {\setlength{\unitlength}{0.01250000in}% % \begingroup\makeatletter\ifx\SetFigFont\undefined % extract first six characters in \fmtname \def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}% \expandafter\x\fmtname xxxxxx\relax \def\y{splain}% \ifx\x\y % LaTeX or SliTeX? \gdef\SetFigFont#1#2#3{% \ifnum #1<17\tiny\else \ifnum #1<20\small\else \ifnum #1<24\normalsize\else \ifnum #1<29\large\else \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else \huge\fi\fi\fi\fi\fi\fi \csname #3\endcsname}% \else \gdef\SetFigFont#1#2#3{\begingroup \count@#1\relax \ifnum 25<\count@\count@25\fi \def\x{\endgroup\@setsize\SetFigFont{#2pt}}% \expandafter\x \csname \romannumeral\the\count@ pt\expandafter\endcsname \csname @\romannumeral\the\count@ pt\endcsname \csname #3\endcsname}% \fi \fi\endgroup \begin{picture}(301,220)(28,352) \thinlines \put( 84,556){\vector( 3, 1){ 27.600}} \put( 30,543){\line( 1, 0){ 54}} \put( 30,354){\framebox(54,216){}} \put(111,543){\line( 1, 0){ 54}} \put(111,516){\line( 1, 0){ 54}} \put(111,381){\line( 1, 0){ 54}} \put(125,489){\line( 1, 0){ 40}} \put(125,462){\line( 1, 0){ 40}} \put(125,435){\line( 1, 0){ 40}} \put(125,408){\line( 1, 0){ 40}} \put( 30,516){\line( 1, 0){ 54}} \put( 30,381){\line( 1, 0){ 54}} \put( 44,516){\line( 0,-1){135}} \put( 44,489){\line( 1, 0){ 40}} \put( 44,462){\line( 1, 0){ 40}} \put( 44,435){\line( 1, 0){ 40}} \put( 44,408){\line( 1, 0){ 40}} \put(125,516){\line( 0,-1){135}} \put(111,354){\framebox(54,216){}} \put(273,516){\line( 1, 0){ 54}} \put(273,381){\line( 1, 0){ 54}} \put(287,489){\line( 1, 0){ 40}} \put(287,462){\line( 1, 0){ 40}} \put(287,435){\line( 1, 0){ 40}} \put(246,529){\vector( 3, 4){ 25.080}} \put(273,543){\line( 1, 0){ 54}} \put(287,516){\line( 0,-1){135}} \put(273,354){\framebox(54,216){}} \put(287,408){\line( 1, 0){ 40}} \put(192,516){\line( 1, 0){ 54}} \put(192,381){\line( 1, 0){ 54}} \put(206,489){\line( 1, 0){ 40}} \put(206,462){\line( 1, 0){ 40}} \put(206,435){\line( 1, 0){ 40}} \put(165,529){\vector( 3, 4){ 25.080}} \put(192,543){\line( 1, 0){ 54}} \put(206,516){\line( 0,-1){135}} \put(192,354){\framebox(54,216){}} \put(206,408){\line( 1, 0){ 40}} \put( 57,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put( 57,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put( 57,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put( 65,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 65,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 65,440){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 65,451){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put( 65,478){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put( 65,467){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put( 65,494){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 66,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Functional}% }} \put(119,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put(119,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(146,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put( 38,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put( 38,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put( 38,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put( 38,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put( 38,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put( 38,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put( 38,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(119,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put(119,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(138,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put(119,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put(119,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(119,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(119,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put(119,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put(138,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put(138,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put(146,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(146,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(146,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(146,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INT}% }} \put(146,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Domain}% }} \put( 65,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Domain}% }} \put(281,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(281,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put(281,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put(281,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(281,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(281,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put(281,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put(281,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(300,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put(281,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put(300,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put(300,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put(308,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(308,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(308,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(308,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(308,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Domain}% }} \put(200,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% E}% }} \put(200,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% I}% }} \put(200,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% A}% }} \put(200,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(200,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(200,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% R}% }} \put(200,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% B}% }} \put(200,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% T}% }} \put(219,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% OUTPUT}% }} \put(200,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% U}% }} \put(219,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% INPUT}% }} \put(219,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}% \smash{% ARITY}% }} \put(227,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(227,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(227,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(227,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% 0}% }} \put(227,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% Domain}% }} \put(227,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% FLOAT}% }} \put(308,440){\makebox(0,0)[b]{\SetFigFont{8}{9.6}{rm}% \smash{% DOUBLE}% }} \end{picture}}% \caption{Internal representation of {\sf union a \{ int a, float b, double c\};}}\label{internal18} \end{center} \end{figure} \section{Coding of C-language subset of type and export type} \noindent {\bf Note:} not implemented yet. \noindent There is a bit for input and a bit for output. The both bits indicate present of input and output structure, respectively. The first 32 bits after current 32 bits is an output member. The structure member domain indicate how many 32-bit words are reserved for the domain information. Currently, domain information are 2 32-bit words for arrays and a 32-bit word for enumeration type. The structure member arit\_class defines an atomary type. The structure member export\_type indicates if the type should be exported. The structure member function\_class has only two options local and remote, now. The structure member arity indicates the distance in number of 32-bit words to the continuing of the structure. We propose this arrangements of bits: \vspace{1cm} \begin{center} \begin{tabular}{|c|c|l|}\hline bit & \# of bits & name \\ \hline \hline 0 & (1) & input \\ \hline 1 & (1) & output \\ \hline 2-4 & (3) & domain \\ \hline 5-7 & (3) & memory\_size \\ \hline 8-13 & (6) & arit\_class \\ \hline 14 & (1) & export\_type \\ \hline 15-19 & (5) & function\_class \\ \hline 20-29 & (10) & arity \\ \hline \hline 0-29 & (30) & $\sum$ \\ \hline \end{tabular} \end{center} We use 30 bits of each 32 bit word. 2 bits are left unused. Example of \verb|extern int a(int b, int c[][10], ....)...| is in the figure~\ref{cod_tree} and bit representation in the following table (note that \verb|[]| is internally represented as -2, i.e. 0xfffffffe): \begin{figure} {\setlength{\unitlength}{0.01250000in}% % \begingroup\makeatletter\ifx\SetFigFont\undefined % extract first six characters in \fmtname \def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}% \expandafter\x\fmtname xxxxxx\relax \def\y{splain}% \ifx\x\y % LaTeX or SliTeX? \gdef\SetFigFont#1#2#3{% \ifnum #1<17\tiny\else \ifnum #1<20\small\else \ifnum #1<24\normalsize\else \ifnum #1<29\large\else \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else \huge\fi\fi\fi\fi\fi\fi \csname #3\endcsname}% \else \gdef\SetFigFont#1#2#3{\begingroup \count@#1\relax \ifnum 25<\count@\count@25\fi \def\x{\endgroup\@setsize\SetFigFont{#2pt}}% \expandafter\x \csname \romannumeral\the\count@ pt\expandafter\endcsname \csname @\romannumeral\the\count@ pt\endcsname \csname #3\endcsname}% \fi \fi\endgroup \begin{picture}(520,524)(28,313) \thinlines \put(465,450){\line( 1, 0){ 6}} \put(471,450){\line( 0,-1){ 57}} \put(471,393){\line(-1, 0){ 33}} \put(438,393){\vector( 0,-1){ 18}} \put(414,315){\framebox(51,60){}} \put(414,345){\line( 1, 0){ 51}} \put(438,354){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}% \smash{% 0}% }} \put(438,324){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% -2}% }} \put(464,580){\vector( 3, 4){ 24.360}} \put( 56,619){\vector( 0,-1){ 25}} \put( 81,810){\vector( 3, 1){ 26.400}} \put(107,797){\line( 1, 0){ 51}} \put(107,772){\line( 1, 0){ 51}} \put(107,645){\line( 1, 0){ 51}} \put(120,772){\line( 0,-1){127}} \put(120,746){\line( 1, 0){ 38}} \put(120,721){\line( 1, 0){ 38}} \put(120,696){\line( 1, 0){ 38}} \put(120,670){\line( 1, 0){ 38}} \put(158,784){\vector( 3, 4){ 23.400}} \put(234,784){\vector( 3, 4){ 23.760}} \put(311,784){\vector( 3, 4){ 23.400}} \put(209,823){\line( 0, 1){ 12}} \put(209,835){\line( 1, 0){229}} \put(438,835){\vector( 0,-1){216}} \put(107,619){\framebox(51,204){}} \put(183,797){\line( 1, 0){ 51}} \put(183,772){\line( 1, 0){ 51}} \put(183,645){\line( 1, 0){ 51}} \put(183,619){\framebox(51,204){}} \put(196,772){\line( 0,-1){127}} \put(196,746){\line( 1, 0){ 38}} \put(196,721){\line( 1, 0){ 38}} \put(196,696){\line( 1, 0){ 38}} \put(196,670){\line( 1, 0){ 38}} \put(209,619){\vector( 0,-1){ 25}} \put(260,797){\line( 1, 0){ 51}} \put(260,772){\line( 1, 0){ 51}} \put(260,645){\line( 1, 0){ 51}} \put(260,619){\framebox(51,204){}} \put(273,772){\line( 0,-1){127}} \put(273,746){\line( 1, 0){ 38}} \put(273,721){\line( 1, 0){ 38}} \put(273,696){\line( 1, 0){ 38}} \put(273,670){\line( 1, 0){ 38}} \put(336,797){\line( 1, 0){ 51}} \put(336,772){\line( 1, 0){ 51}} \put(336,645){\line( 1, 0){ 51}} \put(336,619){\framebox(51,204){}} \put(349,772){\line( 0,-1){127}} \put(349,746){\line( 1, 0){ 38}} \put(349,721){\line( 1, 0){ 38}} \put(349,696){\line( 1, 0){ 38}} \put(349,670){\line( 1, 0){ 38}} \put(413,594){\line( 1, 0){ 51}} \put(413,568){\line( 1, 0){ 51}} \put(413,441){\line( 1, 0){ 51}} \put(413,415){\framebox(51,204){}} \put(426,568){\line( 0,-1){127}} \put(426,543){\line( 1, 0){ 38}} \put(426,517){\line( 1, 0){ 38}} \put(426,492){\line( 1, 0){ 38}} \put(426,466){\line( 1, 0){ 38}} \put(489,594){\line( 1, 0){ 51}} \put(489,568){\line( 1, 0){ 51}} \put(489,441){\line( 1, 0){ 51}} \put(489,415){\framebox(51,204){}} \put(502,568){\line( 0,-1){127}} \put(502,543){\line( 1, 0){ 38}} \put(502,517){\line( 1, 0){ 38}} \put(502,492){\line( 1, 0){ 38}} \put(502,466){\line( 1, 0){ 38}} \put( 30,797){\line( 1, 0){ 51}} \put( 30,772){\line( 1, 0){ 51}} \put( 30,645){\line( 1, 0){ 51}} \put( 30,619){\framebox(51,204){}} \put( 43,772){\line( 0,-1){127}} \put( 43,746){\line( 1, 0){ 38}} \put( 43,721){\line( 1, 0){ 38}} \put( 43,696){\line( 1, 0){ 38}} \put( 43,670){\line( 1, 0){ 38}} \put( 30,568){\line( 1, 0){ 51}} \put( 30,543){\line( 1, 0){ 51}} \put( 30,415){\line( 1, 0){ 51}} \put( 30,390){\framebox(51,204){}} \put( 43,543){\line( 0,-1){128}} \put( 43,517){\line( 1, 0){ 38}} \put( 43,492){\line( 1, 0){ 38}} \put( 43,466){\line( 1, 0){ 38}} \put( 43,441){\line( 1, 0){ 38}} \put(183,568){\line( 1, 0){ 51}} \put(183,543){\line( 1, 0){ 51}} \put(183,415){\line( 1, 0){ 51}} \put(183,390){\framebox(51,204){}} \put(196,543){\line( 0,-1){128}} \put(196,517){\line( 1, 0){ 38}} \put(196,492){\line( 1, 0){ 38}} \put(196,466){\line( 1, 0){ 38}} \put(196,441){\line( 1, 0){ 38}} \put(540,450){\line( 1, 0){ 6}} \put(546,450){\line( 0,-1){ 57}} \put(546,393){\line(-1, 0){ 33}} \put(513,393){\vector( 0,-1){ 18}} \put(489,315){\framebox(51,60){}} \put(489,345){\line( 1, 0){ 51}} \put(114,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put(114,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(114,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(114,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put(114,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put(114,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put(114,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put(114,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(114,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put(132,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put(132,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put(140,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(140,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(140,726){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put(140,700){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% INT}% }} \put(132,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put(209,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put(191,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put(191,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(191,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(191,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put(191,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put(191,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put(191,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put(191,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(191,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put(209,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put(209,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put(216,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(216,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(216,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% DOMAIN}% }} \put(216,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(216,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put(216,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put(216,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put(285,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put(267,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put(267,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(267,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(267,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put(267,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put(267,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put(267,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put(267,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(267,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put(285,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put(285,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put(293,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(293,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(293,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% DOMAIN}% }} \put(293,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(293,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put(293,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put(293,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put(362,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put(344,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put(344,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(344,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(344,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put(344,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put(344,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put(344,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put(344,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(344,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put(362,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put(362,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put(369,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(369,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(369,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% DOMAIN}% }} \put(369,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(369,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put(369,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put(369,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put(438,420){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put(420,555){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put(420,540){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(420,525){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(420,510){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put(420,495){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put(420,479){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put(420,464){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put(420,451){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(420,441){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put(438,598){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put(438,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put(446,481){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(446,471){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(446,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% DOMAIN}% }} \put(446,497){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(446,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put(446,532){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put(446,522){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put(515,420){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put(497,555){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put(497,540){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(497,525){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(497,510){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put(497,495){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put(497,479){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put(497,464){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put(497,451){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(497,441){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put(515,598){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put(515,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put(522,481){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(522,471){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(522,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% DOMAIN}% }} \put(522,497){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(522,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put(522,532){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put(522,522){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put( 56,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put( 38,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put( 38,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put( 38,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put( 38,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put( 38,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put( 38,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put( 56,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put( 56,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put( 63,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 63,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 63,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% DOMAIN}% }} \put( 63,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 63,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Arit}% }} \put( 63,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Export}% }} \put( 63,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Type}% }} \put( 63,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(216,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(293,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(369,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(446,547){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put(522,547){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 63,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put(141,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put(216,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put(294,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put(369,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put(447,558){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put(522,558){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Function}% }} \put(140,649){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% NULL}% }} \put( 56,395){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put( 38,426){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,530){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put( 38,514){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,499){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put( 38,484){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put( 38,469){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put( 38,453){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put( 38,438){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put( 38,415){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put( 56,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put( 56,547){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put( 63,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put( 63,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put( 63,471){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% INT}% }} \put(209,395){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% OUTPUT}% }} \put(191,426){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(191,530){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% A}% }} \put(191,514){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(191,499){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% T}% }} \put(191,484){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% R}% }} \put(191,469){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% I}% }} \put(191,453){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% B}% }} \put(191,438){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% U}% }} \put(191,415){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% E}% }} \put(209,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% INPUT}% }} \put(209,547){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}% \smash{% ARITY}% }} \put(216,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Memory}% }} \put(216,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Size}% }} \put(216,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put(216,497){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 0}% }} \put(216,471){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% INT}% }} \put( 63,420){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% NULL}% }} \put(216,420){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% NULL}% }} \put(140,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}% \smash{% Class}% }} \put( 63,497){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 1}% }} \put( 63,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}% \smash{% 1}% }} \put(513,354){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}% \smash{% 0}% }} \put(513,324){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}% \smash{% 10}% }} \end{picture}}% \caption{Internal type representation of function in form {\sf extern int a(int b, int c[][10], ....)...}}\label{cod_tree} \end{figure} \vspace{1cm} \begin{center} {\tiny \begin{tabular}{|c|c|c|c|c|c|c|c||c|c|c|c|c|c|c|c|||c|c|c|c|c|c|c|c||c|c|c|c|c|c|c|c|} 31 & & & & & & & 24 & & & & & & & & & 15 & & & & & & & & 7 & & & & & & & 0 \\ \hline 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 \\ \hline 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ \hline 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ \hline 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 \\ \hline 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ \hline 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ \hline 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ \hline 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 0 \\ \hline 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ \hline 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ \hline 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 \\ \hline \multicolumn{32}{|c|}{$\ldots$} \\ \hline \end{tabular}} \end{center} % 10 deca = 1010 bin % 8 deca = 1000 bin % 1000 bin is used in the 4-th row as an arity (it means number of 32 % bit words to jump) % 1010 bin is used in the last row as an arity \section{Notes to the implementation of internal types} Each type is copied when it is defined in structure, union, or enumeration. It is copied only in one level (not recursive). The reason is that the {\sf field\_name} is assigned to the types in aggregate. Each field has to have its own representation of the type. For deallocation of types, cyclic definition must be checked to avoid endless loops. Pointers to aggregates should be the same. There is only one instance of each type. If the similar aggregate is declared more than once it is considered to be not compatible. (In the figure~\ref{internal19}, it is a real example of the following structure definition: \begin{verbatim} struct d { struct c *a; struct d *b; }; \end{verbatim} where the {\sf c} structure is: \begin{verbatim} struct c { int a; int b; }; \end{verbatim} \begin{figure} \begin{center} \psfig{figure=reccycla.ps,width=15.4cm,angle=-90} \caption{Recursive structure declaration}\label{internal19} \end{center} \end{figure} \chapter{Files of the \CiF} The following sections describe the goal of some important files. \section{File `allocx.c'}\index{file!allocx.c} Basic allocation functions. \begin{description} \item[allocate (size, pool)]\index{function!allocate@{\sf allocate}}\index{allocate@{\sf allocate}} memory of size {\sf size}, from the pool {\sf pool}. Return pointer to the allocated memory. \item[deallocate (pool)]\index{function!deallocate@{\sf deallocate}}\index{deallocate@{\sf deallocate}} memory of {\sf pool}. It is stored to list and if the memory is needed again it is simply taken from this list. \item[init\_zero (pointer, size)]\index{function!init\_zero@{\sf init\_zero}}\index{init\_zero@{\sf init\_zero}} memory pointed to by pointer is initialized to zeroes. \item[callocx] \item[mallocx] \item[reallocx] just wrappers for allocation. \end{description} There are only two different {\sf pool} now: {\bf PERM}\index{macro!PERM@{\bf PERM}}\index{PERM@{\bf PERM}} and {\bf BLOCK}\index{macro!BLOCK@{\bf BLOCK}}\index{BLOCK@{\bf BLOCK}}. \section{File `comp\_maint.c'}\index{file!comp\_maint.c} Catch all file. \begin{description} \item[info]\index{function!info@{\sf info}} \index{info@{\sf info}} is printed if verbose is specified on the command line. \item[clif]\index{function!clif@{\sf clif}} \index{clif@{\sf clif}} main function. It parses command line options, initializes memory, sets proper input\index{input} function for scanner and starts parser. \item[brfix]\index{function!brfix@{\sf brfix}} \index{brfix@{\sf brfix}} {\sf break}\index{statement!break@{\sf break}} fixation\index{fixation}. \item[cofix]\index{function!cofix@{\sf cofix}} \index{cofix@{\sf cofix}} {\sf continue}\index{statement!continue@{\sf continue}} fixation\index{fixation}. \item[retfix]\index{function!retfix@{\sf retfix}} \index{retfix@{\sf retfix}} {\sf return}\index{statement!return@{\sf return}} fixation\index{fixation}. \item[fix\_cont\_w]\index{function!fix\_cont\_w@{\sf fix\_cont\_w}} \index{fix\_cont\_w@{\sf fix\_cont\_w}} fixation\index{fixation} of {\sf continue}\index{statement!continue@{\sf continue}} in {\sf while}\index{statement!while@{\sf while}}. \item[fix\_cont\_f]\index{function!fix\_cont\_f@{\sf fix\_cont\_f}} \index{fix\_cont\_f@{\sf fix\_cont\_f}} fixation\index{fixation} of {\sf continue}\index{statement!continue@{\sf continue}} in {\sf for}\index{statement!for@{\sf for}}. \item[fix\_break\_w]\index{function!fix\_break\_w@{\sf fix\_break\_w}} \index{fix\_break\_w@{\sf fix\_break\_w}} fixation\index{fixation} of {\sf break}\index{statement!break@{\sf break}} in {\sf while}\index{statement!while@{\sf while}}. \item[fix\_break\_f]\index{function!fix\_break\_f@{\sf fix\_break\_f}} \index{fix\_break\_f@{\sf fix\_break\_f}} fixation\index{fixation} of {\sf break}\index{statement!break@{\sf break}} in {\sf for}\index{statement!for@{\sf for}}. \item[fix\_ret]\index{function!fix\_ret@{\sf fix\_ret}} \index{fix\_ret@{\sf fix\_ret}} Backpatching of the return address for {\sf return}\index{statement!return@{\sf return}} in function. \item[fix\_break\_s]\index{function!fix\_break\_s@{\sf fix\_break\_s}} \index{fix\_break\_s@{\sf fix\_break\_s}} Backpatching of the address for {\sf break}\index{statement!break@{\sf break}} in {\sf for} loop. \item[init]\index{function!init@{\sf init}} \index{init@{\sf init}} initialization of \CiF\index{memory}. \item[implicit\_cast]\index{function!implicit\_cast@{\sf implicit\_cast}} \index{implicit\_cast@{\sf implicit\_cast}} check if an implicit cast in an expression is needed. \item[l\_value\_cast]\index{function!l\_value\_cast@{\sf l\_value\_cast}} \index{l\_value\_cast@{\sf l\_value\_cast}} check if a cast to \cl l\_value \r\ is needed. \item[pointer\_cast]\index{function!pointer\_cast@{\sf pointer\_cast}} \index{pointer\_cast@{\sf pointer\_cast}} check for pointer casts in \cl l\_value \r\ is needed. Issues appropriate error message. \item[array\_subscript]\index{function!array\_subscript@{\sf array\_subscript}} \index{array\_subscript@{\sf array\_subscript}} initialization of the {\sf dim} variable with subscripts according to the array definition. \item[put\_array\_subscript]\index{function!put\_array\_subscript@{\sf put\_array\_subscript}} \index{put\_array\_subscript@{\sf put\_array\_subscript}} store subscripts in {\sf internal\_type} structure.\index{type!internal} \item[ERR\_NO\_INFO]\index{macro!ERR\_NO\_INFO@{\bf ERR\_NO\_INFO}} \index{ERR\_NO\_INFO@{\bf ERR\_NO\_INFO}} \item[ERROR\_INFO]\index{macro!ERROR\_INFO@{\bf ERROR\_INFO}} \index{ERROR\_INFO@{\bf ERROR\_INFO}} \item[ERROR\_FULL\_INFO]\index{macro!ERROR\_FULL\_INFO@{\bf ERROR\_FULL\_INFO}} \index{ERROR\_FULL\_INFO@{\bf ERROR\_FULL\_INFO}} formatting macros for error message. \item[error\_message]\index{function!error\_message@{\sf error\_message}} \index{error\_message@{\sf error\_message}} according to the number send, print the error message.\index{error} \item[print\_file\_name]\index{function!print\_file\_name@{\sf print\_file\_name}} \index{print\_file\_name@{\sf print\_file\_name}} \item[print\_source\_line]\index{function!print\_source\_line@{\sf print\_source\_line}} \index{print\_source\_line@{\sf print\_source\_line}} \item[print\_error\_number]\index{function!print\_error\_number@{\sf print\_error\_number}} \index{print\_error\_number@{\sf print\_error\_number}} \item[print\_line\_number]\index{function!print\_line\_number@{\sf print\_line\_number}} \index{print\_line\_number@{\sf print\_line\_number}} functions formatting error messages. \item[type2string]\index{function!type2string@{\sf type2string}} \index{type2string@{\sf type2string}} converts internal type to string representation for error messages. \item[type\_transform]\index{function!type\_transform@{\sf type\_transform}} \index{type\_transform@{\sf type\_transform}} transformation of type. It is used when the intrinsic (remote) functions\index{function!intrinsic} are called. \item[add\_to\_spec\_list]\index{function!add\_to\_spec\_list@{\sf add\_to\_spec\_list}} \index{add\_to\_spec\_list@{\sf add\_to\_spec\_list}} create list of specifiers of function declaration and/or definition to the {\sf internal\_type}\index{type!internal} structure. This function is used during structure definition as well. \item[add\_to\_ident\_list]\index{function!add\_to\_ident\_list@{\sf add\_to\_ident\_list}} \index{add\_to\_ident\_list@{\sf add\_to\_ident\_list}} create list of identifiers during the function declaration and/or definition. \item[compare2trees]\index{function!compare2trees@{\sf compare2trees}} \index{compare2trees@{\sf compare2trees}} compare two trees for equality. Check if the definition of the function corresponds with its prototype. \item[copy\_type]\index{function!copy\_type@{\sf copy\_type}} \index{copy\_type@{\sf copy\_type}} copy {\sf internal\_type}\index{type!internal} structure. It is used during function declaration and/or definition and structure definition. We need a copy because the type can be slowly added, i.e. on one line can be more identifiers such as simple variables, arrays, function prototypes and all of them have slightly different representation. \item[add\_subs\_to\_spec\_list]\index{function!add\_subs\_to\_spec\_list@{\sf add\_subs\_to\_spec\_list}} \index{add\_subs\_to\_spec\_list@{\sf add\_subs\_to\_spec\_list}} create {\sf internal\_type}\index{type!internal} for function declaration if only type specifier and range of array were in the function prototype. \item[clear\_internal\_type]\index{function!clear\_internal\_type@{\sf clear\_internal\_type}} \index{clear\_internal\_type@{\sf clear\_internal\_type}} clear internal type\index{type!internal}. \item[search\_duplicate\_labels]\index{function!search\_duplicate\_labels@{\sf search\_duplicate\_labels}} \index{search\_duplicate\_labels@{\sf search\_duplicate\_labels}} after each new label\index{label} declaration we need to check for duplication. \item[add\_constant\_to\_list]\index{function!add\_constant\_to\_list@{\sf add\_constant\_to\_list}} \index{add\_constant\_to\_list@{\sf add\_constant\_to\_list}} create list of constants of {\sf switch}\index{statement!switch@{\sf switch}}. \item[add\_default\_to\_fixp]\index{function!add\_default\_to\_fixp@{\sf add\_default\_to\_fixp}} \index{add\_default\_to\_fixp@{\sf add\_default\_to\_fixp}}the same as above but for default label; check for only one default. \item[func\_def\_s]\index{function!func\_def\_s@{\sf func\_def\_s}} \index{func\_def\_s@{\sf func\_def\_s}} Functions for setting and resetting of the flag of function definition or declaration context. \item[enter\_scope]\index{function!enter\_scope@{\sf enter\_scope}} \index{enter\_scope@{\sf enter\_scope}} \item[exit\_scope]\index{function!exit\_scope@{\sf exit\_scope}} \index{exit\_scope@{\sf exit\_scope}} functions changing scope (hash tables of locals)\index{hash!table} upon nesting level. \item[mov2lvalue]\index{function!mov2lvalue@{\sf mov2lvalue}} \index{mov2lvalue@{\sf mov2lvalue}} \item[move2lvalue]\index{function!move2lvalue@{\sf move2lvalue}} \index{move2lvalue@{\sf move2lvalue}} generate proper {\bf MOV}\index{instruction!MOV@{\bf MOV}} instruction. \item[type\_compare]\index{function!type\_compare@{\sf type\_compare}} \index{type\_compare@{\sf type\_compare}} compare if pointers are compatible. \item[cyclic\_def]\index{function!cyclic\_def@{\sf cyclic\_def}} \index{cyclic\_def@{\sf cyclic\_def}} find cycles in pointer definitions and declarations. \item[put2table]\index{function!put2table@{\sf put2table}} \index{put2table@{\sf put2table}} Combination of all hashing tables. Choose the appropriate one and put the variable there. \item[get\_num\_args] \index{function!get\_num\_args@{\sf get\_num\_args}} \index{get\_num\_args@{\sf get\_num\_args}} Number of args for a function is returned. This value is checked against number of actual parameters, if they are equal. \item[promote\_type] \index{function!promote\_type@{\sf promote\_type}} \index{promote\_type@{\sf promote\_type}} C-like type promotion. \item[start\_main] \index{function!start\_main@{\sf start\_main}} \index{start\_main@{\sf start\_main}} Arrange all things to start main function. Simulate a compiler like behavior. \item[check\_spec\_constr] \index{function!check\_spec\_constr@{\sf check\_spec\_constr}} \index{check\_spec\_constr@{\sf check\_spec\_constr}} Checks if specified type specifiers are valid. If not issues an error message. \end{description} \section{File `control.h'}\index{file!control.h} See section~\ref{fixation} for full detail. \section{File `define.h'}\index{file!define.h} See section~\ref{memory} for full detail. \section{File `dbg-out.c'}\index{file!dbg-out.c} Debugging information generation and printing. The following functions are a simple interface for symbolic debugging. \begin{description} \item[store\_pos]\index{store\_pos@{\sf store\_pos}} \index{function!store\_pos@{\sf store\_pos}} Store line number and code pointer in the list. These data are only ones necessary during symbolic information output. \item[dbg\_create]\index{dbg\_create@{\sf dbg\_create}} \index{function!dbg\_create@{\sf dbg\_create}} Create a list of file names with pointers to the list of line number and code pointer (see above). \item[get\_pos]\index{get\_pos@{\sf get\_pos}} \index{function!get\_pos@{\sf get\_pos}} Restore line number from the list of code pointer and line number. The line number is chosen appropriately comparing to the current value of the program counter. \item[dbg\_print]\index{dbg\_print@{\sf dbg\_print}} \index{function!dbg\_print@{\sf dbg\_print}} Print the currently executed line. \end{description} \section{File `geninstr.h'}\index{file!geninstr.h} The implementation of generation of virtual machine instructions. The instructions are described in section~\ref{stroj}. \section{File `input.c'}\index{file!input.c} \begin{description} \item[input\_komp]\index{function!input\_komp@{\sf input\_komp}} \index{input\_komp@{\sf input\_komp}} the general input\index{input} for compiling. \item[input\_std]\index{function!input\_std@{\sf input\_std}} \index{input\_std@{\sf input\_std}} this input function is used during the processing of an asynchronous or synchronous interrupt (see~\ref{int_service}). \item[input\_buf]\index{function!input\_buf@{\sf input\_buf}} \index{input\_buf@{\sf input\_buf}} during the processing of the compiler interrupt after the interrupt key is pressed again this input function sends to the compiler a keyword {\sf resume;}\index{statement!resume@{\sf resume}} the compilation resumes and the compiler input is reset to the {\sf input\_komp} function. \item[init\_input]\index{function!init\_input@{\sf init\_input}} \index{init\_input@{\sf init\_input}} this function opens files and stores the pointers to the globally known array. The files could be specified on the command line and/or in the `clif.ini' file. \item[terminate\_buffer] \index{function!terminate\_buffer@{\sf terminate\_buffer}} \index{terminate\_buffer@{\sf terminate\_buffer}} in flex, close file, reset line counter, reinitialize file attribute structure and exit file scope. \end{description} \noindent {\bf Note:} The option to switch among several input functions and enable synchronous and asynchronous interrupts must be specified during the compilation of the \CiF\ (see~\ref{compiling_options}). \section{File `instr.h'}\index{file!instr.h} This file is declaration of different structures that are used in the virtual machine. Detailed description can be found in section~\ref{stroj} (see table~\ref{instructions}). Each field of structures is integer if it is not stated otherwise. \begin{description} \item[struct OPERAND\_0\_ma] \index{structure!OPERAND\_0\_ma@{\bf OPERAND\_0\_ma}} \index{OPERAND\_0\_ma@{\bf OPERAND\_0\_ma}} only major. \item[struct OPERAND\_0\_mi] \index{structure!OPERAND\_0\_mi@{\bf OPERAND\_0\_mi}} \index{OPERAND\_0\_mi@{\bf OPERAND\_0\_mi}} major and minor. \item[struct OPERAND\_1\_ma] \index{structure!OPERAND\_1\_ma@{\bf OPERAND\_1\_ma}} \index{OPERAND\_1\_ma@{\bf OPERAND\_1\_ma}} major and address as a char pointer. \item[struct OPERAND\_1\_mi] \index{structure!OPERAND\_1\_mi@{\bf OPERAND\_1\_mi}} \index{OPERAND\_1\_mi@{\bf OPERAND\_1\_mi}} major, minor and address as a char pointer. \item[struct OPERAND\_1\_i] \index{structure!OPERAND\_1\_i@{\bf OPERAND\_1\_i}} \index{OPERAND\_1\_i@{\bf OPERAND\_1\_i}} major, minor and number (immediately) integer. \item[struct OPERAND\_1\_id] \index{structure!OPERAND\_1\_id@{\bf OPERAND\_1\_id}} \index{OPERAND\_1\_id@{\bf OPERAND\_1\_id}} major, minor and number of type double (immediately double). \item[struct OPERAND\_1\_if] \index{structure!OPERAND\_1\_if@{\bf OPERAND\_1\_if}} \index{OPERAND\_1\_if@{\bf OPERAND\_1\_if}} major, minor and number of type float (immediately float). \item[struct OPERAND\_1\_ic] \index{structure!OPERAND\_1\_ic@{\bf OPERAND\_1\_ic}} \index{OPERAND\_1\_ic@{\bf OPERAND\_1\_ic}} major, minor and number of type char (immediately char). \end{description} There are definitions of instructions major constants in the file as well. \section{File `keyword.gperf'}\index{file!keyword.gperf} The file is a template that has a list of keywords. The C source file is produced by \verb|gperf -t -p -k 2,3 ./keyword.gperf| command. \section{File `parser.h'}\index{file!parser.h} \begin{description} \item[param\_flag]\index{param\_flag@{\sf param\_flag}} \index{variable!param\_flag@{\sf param\_flag}} the variable is set during the parsing of parameters to function. Parameters have no such strong constraints as if they are used in expressions. For example, as a parameter can be used array name (pointer). \item[atom\_type\_flag]\index{atom\_type\_flag@{\sf atom\_type\_flag}} \index{variable!atom\_type\_flag@{\sf atom\_type\_flag}} variable that specialized if it is a pointer which is pushed as a parameter to a remote function (pointer to the array) or only a dereferenced variable of the type. It is used only for {\bf REMOTE\_F}\index{REMOTE\_F@{\bf REMOTE\_F}} type of function\index{function!type of}. \item[variable]\index{variable@{\sf variable}} \index{variable!variable@{\sf variable}} array of structures. The structure members are {\sf address, offset} and {\sf name}. The address (is a pointer to char) of the global variable currently on the stack\index{stack}. The offset\index{offset@{\sf offset}} (integer) is an address of local variable currently on the stack\index{stack}. It is offset to the current value of the {\bf BP}\index{BP@{\bf BP}}. The {\sf name} field is the name of the variable. It is an array because we have to know addresses of all variables currently in the expression. Depending on the context, either address or offset are non NULL, nonzero respectively. If the variable is global, the address is non NULL. If the variable is local, the offset is nonzero. If the local variable has storage class specifier {\sf static} the address is non NULL and the offset is zero. \item[it\_is\_in\_case]\index{it\_is\_in\_case@{\sf it\_is\_in\_case}} \index{variable!it\_is\_in\_case@{\sf it\_is\_in\_case}} It is always set when the case\index{statement!case@{\sf case}} statement is compiled. \item[jmp1]\index{jmp1@{\sf jmp1}}\index{variable!jmp1@{\sf jmp1}} Variable for fixing the beginning of code in {\sf for}\index{statement!for@{\sf for}} loop. The description can be found in section~\ref{fixation} and fig.~\ref{obr3}. \item[subscript\_flag]\index{subscript\_flag@{\sf subscript\_flag}} \index{variable!subscript\_flag@{\sf subscript\_flag}} The flag is set after the first subscript of an array was parsed. The first subscript needs special treatment. The variable is an array, i.e. {\sf subscript\_flag} has each variable currently on the stack. It is cleared by macro \index{macro!TYPE\_CLEAR@{\bf TYPE\_CLEAR}} {\bf TYPE\_CLEAR}\index{TYPE\_CLEAR@{\bf TYPE\_CLEAR}}. \item[is\_address]\index{is\_address@{\sf is\_address}} \index{variable!is\_address@{\sf is\_address}} It is set when the address operator\index{operator!address} was used in the current expression. \item[struct\_union\_field] \index{struct\_union\_field@{\sf struct\_union\_field}} \index{variable!struct\_union\_field@{\sf struct\_union\_field}} The variable is set when structure\index{structure} or union\index{union} identifier is parsed. If there are more dots or pointer operators in the variable additional code must be generated. Each variable on the stack which currently parsed in expression has a {\sf struct\_union\_field}. This variable is reset by {\bf TYPE\_CLEAR}.\index{TYPE\_CLEAR@{\bf TYPE\_CLEAR}} \index{macro!TYPE\_CLEAR@{\bf TYPE\_CLEAR}} \item[or\_jmp]\index{or\_jmp@{\sf or\_jmp}} \index{variable!or\_jmp@{\sf or\_jmp}} \item[and\_jmp]\index{and\_jmp@{\sf and\_jmp}} \index{variable!and\_jmp@{\sf and\_jmp}} both are used for generation of jumps in expressions with \verb2||2 and \&\& operands. \verb2||2 expression is evaluated until a subexpression is true. \&\& is evaluated until a subexpression is false. \item[main\_defined]\index{main\_defined@{\sf main\_defined}} \index{variable!main\_defined@{\sf main\_defined}} set when the main function is defined. \item[initialize\_only]\index{initialize\_only@{\sf initialize\_only}} \index{variable!initialize\_only@{\sf initialize\_only}} set when there is a need for execution of initialization code of variables. \item[full\_bracketing]\index{full\_bracketing@{\sf full\_bracketing}} \index{variable!full\_bracketing@{\sf full\_bracketing}} Flag for proper code generation for fully bracketed initialization. \item[aggregate\_memory\_size] \index{aggregate\_memory\_size@{\sf aggregate\_memory\_size}} \index{variable!aggregate\_memory\_size@{\sf aggregate\_memory\_size}} During initialization, the size of subtypes are remembered. The right number of initializers is checked. If the initialization was incomplete, zeros are added. \item[TYPE\_CLEAR]\index{TYPE\_CLEAR@{\bf TYPE\_CLEAR}} \index{macro!TYPE\_CLEAR@{\bf TYPE\_CLEAR}} macro that resets the following variables: {\sf subscript\_flag, struct\_union\_field, type, type\_com}\index{subscript\_flag@{\sf subscript\_flag}} \index{struct\_union\_field@{\sf struct\_union\_field}} \index{type} \index{type\_com@{\sf type\_com}} \item[SET\_ADDRESS]\index{SET\_ADDRESS@{\bf SET\_ADDRESS}} \index{macro!SET\_ADDRESS@{\bf SET\_ADDRESS}} macro that resets {\sf variable}\index{variable@{\sf variable}} \index{variable!variable@{\sf variable}} and {\sf offset}\index{offset@{\sf offset}} variables. \item[FUNCTION\_PROLOGUE] \index{macro!FUNCTION\_PROLOGUE@{\bf FUNCTION\_PROLOGUE}} \index{FUNCTION\_PROLOGUE@{\bf FUNCTION\_PROLOGUE}} it generates code for function prologue. \item[FUNCTION\_EPILOGUE] \index{macro!FUNCTION\_EPILOGUE@{\bf FUNCTION\_EPILOGUE}} \index{FUNCTION\_EPILOGUE@{\bf FUNCTION\_EPILOGUE}} it generates code for function epilogue. \item[DELETE\_SUBSCRIPT] \index{macro!DELETE\_SUBSCRIPT@{\bf DELETE\_SUBSCRIPT}} \index{DELETE\_SUBSCRIPT@{\bf DELETE\_SUBSCRIPT}} runs code for deleting dimensions. The variable is used for generating proper offset of array\index{array!dimension} variable in parsing expression. The dimensions stored in this variable are needed for computing of map function and map instructions of virtual machine \index{virtual machine} for variable of the type array. \item[OFFSET\_LAST\_ADD] \index{macro!OFFSET\_LAST\_ADD@{\bf OFFSET\_LAST\_ADD}} \index{OFFSET\_LAST\_ADD@{\bf OFFSET\_LAST\_ADD}} generates last instructions after variable dereferencing structure and/or union was parsed. The special code is needed when the variable has more than one dereferencing operator. \item[OFFSET\_LAST\_ADD\_ARRAY] \index{macro!OFFSET\_LAST\_ADD\_ARRAY@{\bf OFFSET\_LAST\_ADD\_ARRAY}} \index{OFFSET\_LAST\_ADD\_ARRAY@{\bf OFFSET\_LAST\_ADD\_ARRAY}} generates instructions after variable dereferencing structure and/or union was parsed and the last dereference was an array. The special code is needed when the variable has more than one dereferencing operator. \item[ERROR\_P]\index{macro!ERROR\_P@{\bf ERROR\_P}} \index{ERROR\_P@{\sf ERROR\_P}} if there were errors don't do semantic, just check syntax. \item[MOV\_P]\index{macro!MOV\_P@{\bf MOV\_P}} \index{MOV\_P@{\bf MOV\_P}} test if the last generated instruction was {\bf MOV}. \item[POPA\_P]\index{macro!POPA\_P@{\bf POPA\_P}} \index{POPA\_P@{\bf POPA\_P}} test if the last generated instruction was {\bf POPA}. \item[PUSHA\_P]\index{macro!PUSHA\_P@{\bf PUSHA\_P}} \index{PUSHA\_P@{\bf PUSHA\_P}} test if the last generated instruction was {\bf PUSHA\_P}. \item[RESET\_CODE\_GENERATION\_BEGINNING] \index{macro!RESET\_CODE\_GENERATION\_BEGINNING@{\bf RESET\_CODE\_GENERATION\_BEGINNING}} \index{RESET\_CODE\_GENERATION\_BEGINNING@{\bf RESET\_CODE\_GENERATION\_BEGINNING}} do not fill up the memory continuously. Reset to beginning of the memory, if possible. \item[SET\_CODE\_GENERATION\_BEGINNING] \index{macro!SET\_CODE\_GENERATION\_BEGINNING@{\bf SET\_CODE\_GENERATION\_BEGINNING}} \index{SET\_CODE\_GENERATION\_BEGINNING@{\bf SET\_CODE\_GENERATION\_BEGINNING}} if variables are defined, set new memory beginning. \end{description} \section{File `pso.c'}\index{file!pso.c} Parser support functions. \begin{description} \item[lookup\_tables] \index{function!lookup\_tables@{\sf lookup\_tables}} \index{lookup\_tables@{\sf lookup\_tables}} lookup in tables of local variables, if the variable is not found in the table of global variables. Setting of addresses for code generation. \item[typedef\_copy] \index{function!typedef\_copy@{\sf typedef\_copy}} \index{typedef\_copy@{\sf typedef\_copy}} internal type for {\sf typedef} must be copied, if there is no type specifier directly following the typedef (considering internal type tree (see fig.~\ref{internal14})), i.e. pointer, array, function, array, struct, etc. \item[set\_memory\_size] \index{function!set\_memory\_size@{\sf set\_memory\_size}} \index{set\_memory\_size@{\sf set\_memory\_size}} for cast operator the memory size must be set. \end{description} \section{File `s-conv.c'}\index{file!s-conv.c} Functions in the file manipulate format strings and check arguments to printf and scanf class of functions. \begin{description} \item[s\_conv]\index{function!s\_conv@{\sf s\_conv}} \index{s\_conv@{\sf s\_conv}} checks format string and emits error messages. \item[store\_arg\_type] \index{function!store\_arg\_type@{\sf store\_arg\_type}} \index{store\_arg\_type@{\sf store\_arg\_type}} Types of arguments are stored in the array for later checking. \item[compare\_format\_args] \index{function!compare\_format\_args@{\sf compare\_format\_args}} \index{compare\_format\_args@{\sf compare\_format\_args}} Checks if the argument is compatible with the specified format. \end{description} \section{File `s-conv.h'}\index{file!s-conv.h} \begin{description} \item[PRINTF\_P] \index{macro!PRINTF\_P@{\bf PRINTF\_P}} \index{PRINTF\_P@{\bf PRINTF\_P}} \item[SCANF\_P] \index{macro!SCANF\_P@{\bf SCANF\_P}} \index{SCANF\_P@{\bf SCANF\_P}} checks for printf and scanf class of function call parsing. \end{description} \section{File `tables.c'}\index{file!tables.c} Functions in this file set, process, change and clear information in hash tables. \begin{description} \item[hastab]\index{hastab@{\sf hastab}} \index{variable!hastab@{\sf hastab}} see~\ref{storage_and_hash} \item[hastab\_goto]\index{hastab\_goto@{\sf hastab\_goto}} \index{variable!hastab\_goto@{\sf hastab\_goto}} see~\ref{fixation}. \item[hastab\_type]\index{hastab\_type@{\sf hastab\_type}} \index{variable!hastab\_type@{\sf hastab\_type}} see~\ref{storage_and_hash}. \item[typetab]\index{typetab@{\sf typetab}} \index{variable!typetab@{\sf typetab}} see~\ref{storage_and_hash}. \item[identtab]\index{identtab@{\sf identtab}} \index{variable!identtab@{\sf identtab}} see~\ref{storage_and_hash}. \item[identtab\_loc]\index{identtab\_loc@{\sf identtab\_loc}} \index{variable!identtab\_loc@{\sf identtab\_loc}} see~\ref{storage_and_hash}. \item[pi]\index{pi@{\sf pi}} \index{variable!pi@{\sf pi}} counter of globally declared variables, used as a subscript to the {\sf identtab} array. \item[pi\_type]\index{pi\_type@{\sf pi\_type}} \index{variable!pi\_type@{\sf pi\_type}} counter of globally declared types, used as a subscript to the {\sf typetab} array. \item[integer\_cons]\index{integer\_cons@{\sf integer\_cons}} \index{variable!integer\_cons@{\sf integer\_cons}} default integer for {\sf arit\_class} (see~\ref{internal_type}). \item[doub\_cons]\index{doub\_cons@{\sf doub\_cons}} \index{variable!doub\_cons@{\sf doub\_cons}} default double for {\sf arit\_class} (see~\ref{internal_type}). \item[flt\_cons]\index{flt\_cons@{\sf flt\_cons}} \index{variable!flt\_cons@{\sf flt\_cons}} default float for {\sf arit\_class} (see~\ref{internal_type}). \item[chr\_cons]\index{chr\_cons@{\sf chr\_cons}} \index{variable!chr\_cons@{\sf chr\_cons}} default char for {\sf arit\_class} (see~\ref{internal_type}). \item[vid\_cons]\index{vid\_cons@{\sf vid\_cons}} \index{variable!vid\_cons@{\sf vid\_cons}} default void for {\sf arit\_class} (see~\ref{internal_type}). \item[type]\index{type} \index{variable!type@{\sf type}} the type used in expressions to control the generation of proper instructions. The variable has the same type as a {\sf arit\_class} in the internal type structure\index{type!internal}. \item[hastab\_init]\index{hastab\_init@{\sf hastab\_init}} \index{function!hastab\_init@{\sf hastab\_init}} initialization of the hash table\index{table!hashing} for global variables. \item[hastab\_goto\_init] \index{function!hastab\_goto\_init@{\sf hastab\_goto\_init}} \index{hastab\_goto\_init@{\sf hastab\_goto\_init}} initialization of goto label\index{label} table\index{table!of labels}. \item[identtab\_init] \index{function!identtab\_init@{\sf identtab\_init}} \index{identtab\_init@{\sf identtab\_init}} initialization of the table of global identifiers\index{table!of global identifiers}. \item[allocate\_hastab\_loc] \index{function!allocate\_hastab\_loc@{\sf allocate\_hastab\_loc}} \index{allocate\_hastab\_loc@{\sf allocate\_hastab\_loc}}allocation of the hash table\index{table!hashing} of local variables. \item[allocate\_loc\_tables] \index{function!allocate\_loc\_tables@{\sf allocate\_loc\_tables}} \index{allocate\_loc\_tables@{\sf allocate\_loc\_tables} }allocation of table\index{table!of local variables} of identifiers of local variables. It is used each time a new block is entered. \item[clear\_hash\_tab\_declaration] \index{function!clear\_hash\_tab\_declaration@{\sf clear\_hash\_tab\_declaration}} \index{clear\_hash\_tab\_declaration@{\sf clear\_hash\_tab\_declaration}} \item[clear\_hash\_tab] \index{function!clear\_hash\_tab@{\sf clear\_hash\_tab}} \index{clear\_hash\_tab@{\sf clear\_hash\_tab}} \item[clear\_hash\_tab\_next\_declaration] \index{function!clear\_hash\_tab\_next\_declaration@{\sf clear\_hash\_tab\_next\_declaration}} \index{clear\_hash\_tab\_next\_declaration@{\sf clear\_hash\_tab\_next\_declaration}} \item[clear\_hash\_tab\_next] \index{function!clear\_hash\_tab\_next@{\sf clear\_hash\_tab\_next}} \index{clear\_hash\_tab\_next@{\sf clear\_hash\_tab\_next}} functions for initialization of different parts of hash table\index{table!hashing}. These functions are used after block is exited. \item[point]\index{point@{\sf point}} \index{function!point@{\sf point}} returns the address of global variable or null if it is not declared. It prints an error\index{error} message as well. \item[point\_call]\index{point\_call@{\sf point\_call}} \index{function!point\_call@{\sf point\_call}} It is used \begin{itemize} \item to find if the identifier has a function type \item to fix the address (if the (formal) call was done prior to the definition of the function) \item to add the address to the list of addresses where to fix later. \end{itemize} \item[has]\index{has@{\sf has}} \index{function!has@{\sf has}} \item[putstruct]\index{putstruct@{\sf putstruct}} \index{function!putstruct@{\sf putstruct}} the functions are used for storing global variables into the hash table\index{table!hashing}. The allocation of the memory\index{memory} is also done in the functions. \item[putstruct\_body]\index{putstruct\_body@{\sf putstruct\_body}} \index{function!putstruct\_body@{\sf putstruct\_body}} sets appropriate variables that the function was defined (not only declared). \item[lookup]\index{lookup@{\sf lookup}} \index{variable!lookup@{\sf lookup}} returns pointer to the hash table\index{table!hashing} where the variable is stored. \item[hash\_code]\index{hash\_code@{\sf hash\_code}} \index{function!hash\_code@{\sf hash\_code}} see~\ref{storage_and_hash}. \item[hash\_code\_loc]\index{hash\_code\_loc@{\sf hash\_code\_loc}} \index{function!hash\_code\_loc@{\sf hash\_code\_loc}} the same as above but for local variables. \item[point\_loc]\index{point\_loc@{\sf point\_loc}} \index{function!point\_loc@{\sf point\_loc}} returns pointer to the hash table of local variables\index{table!of local variables}. \item[has\_loc]\index{has\_loc@{\sf has\_loc}} \index{function!has\_loc@{\sf has\_loc}} \item[putstruct\_loc]\index{putstruct\_loc@{\sf putstruct\_loc}} \index{function!putstruct\_loc@{\sf putstruct\_loc}} functions are used for storing local variables into the hash table. \item[lookup\_loc]\index{lookup\_loc@{\sf lookup\_loc}} \index{function!lookup\_loc@{\sf lookup\_loc}} returns pointer to the hash table where the local variable is stored. \item[add\_spec\_to\_has] \index{add\_spec\_to\_has@{\sf add\_spec\_to\_has}} \index{function!add\_spec\_to\_has@{\sf add\_spec\_to\_has}} to the function, the specifiers (type information)\index{type!internal} of parameters are added. If the function was already declared it finds out if declaration and definition (or two declarations) match. \item[add\_ident\_to\_has] \index{add\_ident\_to\_has@{\sf add\_ident\_to\_has}} \index{function!add\_ident\_to\_has@{\sf add\_ident\_to\_has}} the information in hash table about function identifiers of formal parameters\index{parameter!formal} is added. If the function was already declared it finds out if declaration and definition (or two declarations) match. \item[link\_function]\index{link\_function@{\sf link\_function}} \index{function!link\_function@{\sf link\_function}} sets addresses of remote functions\index{function!intrinsic}. \item[set\_value]\index{set\_value@{\sf set\_value}} \index{function!set\_value@{\sf set\_value}} gathers information for checking sets of local variables (used for issuing warnings\index{warning}). The information is checked after compilation of a function and/or block. \item[fix\_and\_clear\_goto\_table] \index{fix\_and\_clear\_goto\_table@{\sf fix\_and\_clear\_goto\_table}} \index{function!fix\_and\_clear\_goto\_table@{\sf fix\_and\_clear\_goto\_table}} scans the goto label table;\index{table!of labels} fix addresses of gotos.\index{statement!goto@{\sf goto}} This is processed after the return to the level zero of parsing (just before the virtual machine\index{virtual machine} runs). \item[has\_goto]\index{has\_goto@{\sf has\_goto}} \index{function!has\_goto@{\sf has\_goto}} adds a label into the hash table if it was not already in. It adds address of the goto\index{statement!goto@{\sf goto}} to the list of gotos. \item[has\_label]\index{has\_label@{\sf has\_label}} \index{function!has\_label@{\sf has\_label}} adds a label into the hash table. If it was in, issues an error\index{error} message. It adds address of the label to the internal representation. \item[lookup\_goto\_table] \index{lookup\_goto\_table@{\sf lookup\_goto\_table}} \index{function!lookup\_goto\_table@{\sf lookup\_goto\_table}} returns address of the hash table where the label is stored. \item[hash\_code\_goto] \index{hash\_code\_goto@{\sf hash\_code\_goto}} \index{function!hash\_code\_goto@{\sf hash\_code\_goto}} hash function for goto labels. \item[align\_memory] \index{align\_memory@{\sf align\_memory}} \index{function!align\_memory@{\sf align\_memory}} used for allocation of variables. Each type has to be properly aligned. \item[scope\_offset\_get] \index{scope\_offset\_get@{\sf scope\_offset\_get}} \index{function!scope\_offset\_get@{\sf scope\_offset\_get}} \item[scope\_offset\_set] \index{scope\_offset\_set@{\sf scope\_offset\_set}} \index{function!scope\_offset\_set@{\sf scope\_offset\_set}} Functions set and get global offset (valid for whole table). The functions are used if nesting scope is greater than zero, i.e. at least two different blocks exist. \item[move\_offset\_aligned] \index{move\_offset\_aligned@{\sf move\_offset\_aligned}} \index{function!move\_offset\_aligned@{\sf move\_offset\_aligned}} adjusting offsets according to size of type. \item[lookup\_type]\index{lookup\_type@{\sf lookup\_type}} \index{function!lookup\_type@{\sf lookup\_type}} returns address of the hash table where the type is stored. \item[has\_type]\index{has\_type@{\sf has\_type}} \index{function!has\_type@{\sf has\_type}} \item[putstruct\_type]\index{putstruct\_type@{\sf putstruct\_type}} \index{function!putstruct\_type@{\sf putstruct\_type}} process tags and type names. Information is put into the hash table. \item[putstruct\_type\_body] \index{putstruct\_type\_body@{\sf putstruct\_type\_body}}\ \index{function!putstruct\_type\_body@{\sf putstruct\_type\_body}} allocates space for the type if it is necessary. \item[add\_spec\_to\_type] \index{add\_spec\_to\_type@{\sf add\_spec\_to\_type}} \index{function!add\_spec\_to\_type@{\sf add\_spec\_to\_type}} adds information about type specifiers of struct, union or enum fields to the hash table. \item[add\_ident\_to\_type] \index{add\_ident\_to\_type@{\sf add\_ident\_to\_type}} \index{function!add\_ident\_to\_type@{\sf add\_ident\_to\_type}} adds identifiers of struct, union or enum fields to the hash table. \item[allocate\_var]\index{allocate\_var@{\sf allocate\_var}} \index{function!allocate\_var@{\sf allocate\_var}} allocates memory\index{memory} for global variable. \item[allocate\_struct]\index{allocate\_struct@{\sf allocate\_struct}} \index{function!allocate\_struct@{\sf allocate\_struct}} counts memory size of structures. \item[find\_member]\index{find\_member@{\sf find\_member}} \index{function!find\_member@{\sf find\_member}} returns offset in the currently parsed structure (dereference of it is parsed) or -1 if name is not a member. \item[offset\_aggregate\_member] \index{offset\_aggregate\_member@{\sf offset\_aggregate\_member}} \index{function!offset\_aggregate\_member@{\sf offset\_aggregate\_member}} just a wrapper above the former function. \item[allocate\_aggregate] \index{allocate\_aggregate@{\sf allocate\_aggregate}} \index{function!allocate\_aggregate@{\sf allocate\_aggregate}} counts memory size of structures (calls {\sf allocate\_struct}) and aligns offsets of aggregate fields. \item[putstruct\_static] \index{putstruct\_static@{\sf putstruct\_static}} \index{function!putstruct\_static@{\sf putstruct\_static}} Static variables are put into tables. \item[enter\_file\_scope] \index{enter\_file\_scope@{\sf enter\_file\_scope}} \index{function!enter\_file\_scope@{\sf enter\_file\_scope}} \item[exit\_file\_scope] \index{exit\_file\_scope@{\sf exit\_file\_scope}} \index{function!exit\_file\_scope@{\sf exit\_file\_scope}} have special meaning. They are used in file scope static variables. \item[typedef\_p]\index{typedef\_p@{\sf typedef\_p}} \index{function!typedef\_p@{\sf typedef\_p}} If the name is declared as typedef return it as TYPENAME token \index{token!TYPENAME@{\bf TYPENAME}} - true (1); IDENT\index{token!INDEX@{\bf INDEX}} - false (0), otherwise. \item[get\_declaration\_line] \index{get\_declaration\_line@{\sf get\_declaration\_line}} \index{function!get\_declaration\_line@{\sf get\_declaration\_line}} Returns the declaration line of a variable. Called from error\_message function.\index{function!error\_message@{\sf error\_message}} \index{error\_message@{\sf error\_message}} \item[memory\_size]\index{memory\_size@{\sf memory\_size}} \index{function!memory\_size@{\sf memory\_size}} During initialization of variables, walk recursively down the type and set the size of the subtype of an aggregate. \item[check\_init\_bracket] \index{check\_init\_bracket@{\sf check\_init\_bracket}} \index{function!check\_init\_bracket@{\sf check\_init\_bracket}} The right initialization bracketing has the same number of brackets as is the number of subtypes. The function checks the number of subtypes. The return value is in {\sf level} variable. \item[get\_memory\_size] \index{get\_memory\_size@{\sf get\_memory\_size}} \index{function!get\_memory\_size@{\sf get\_memory\_size}} For the first initializer of the variable, the number of subtypes is evaluated and returned from the {\sf check\_init\_bracket} function. If the number of bracket is less than number of subtypes a warning is printed. The return value is the memory size of the aggregate. \item[get\_field\_size] \index{get\_field\_size@{\sf get\_field\_size}} \index{function!get\_field\_size@{\sf get\_field\_size}} It is called during the variable initialization. The size of a sub-type of the aggregate is returned. \item[noninitialized\_loc] \index{noninitialized\_loc@{\sf noninitialized\_loc}} \index{function!noninitialized\_loc@{\sf noninitialized\_loc}} If the local variable was not initialized during declaration, the usage counter must be reset. \end{description} \section{File `type.h'}\index{file!type.h} \begin{description} \item[INTERNAL\_TYPE]\index{macro!INTERNAL\_TYPE@{\bf INTERNAL\_TYPE}} \index{INTERNAL\_TYPE@{\bf INTERNAL\_TYPE}} macro for unfolding enum constants. \item[intern\_arit\_class] \index{intern\_arit\_class@{\sf intern\_arit\_class}} \index{type!intern\_arit\_class@{\sf intern\_arit\_class}} enumeration type for internal arithmetical class (see~\ref{internal_type}). \item[PAR]\index{macro!PAR@{\bf PAR}}\index{PAR@{\bf PAR}} flag for formal parameter\index{parameter!formal}. \item[VAR]\index{macro!VAR@{\bf VAR}}\index{VAR@{\bf VAR}} flag for local variable\index{variable!local}. \item[intern\_func\_class] \index{intern\_func\_class@{\sf intern\_func\_class}} \index{type!intern\_func\_class@{\sf intern\_func\_class}} enumeration type for internal function class (see~\ref{internal_type}). \item[YES]\index{macro!YES@{\bf YES}}\index{YES@{\bf YES}} flag for remote function\index{function!intrinsic} with exported type of parameters. \item[NOT\_DEFINED]\index{macro!NOT\_DEFINED@{\bf NOT\_DEFINED}} \index{NOT\_DEFINED@{\bf NOT\_DEFINED}} not defined range for arrays. It is used mainly for formal parameters.\index{parameter!formal} For example, \verb|int z(int b[][3][3])|, the first subscript of the formal parameter \verb|b| has undefined size. \item[GLOBAL\_TYPE]\index{macro!GLOBAL\_TYPE@{\bf GLOBAL\_TYPE}} \index{GLOBAL\_TYPE@{\bf GLOBAL\_TYPE}} macro for unfolding enum constants. \item[global\_type]\index{global\_type@{\sf global\_type}} \index{type!global\_type@{\sf global\_type}} enumeration type for type flag used in remote functions\index{function!intrinsic} with export types. \item[type\_qual]\index{type\_qual@{\sf type\_qual}} \index{type!type\_qual@{\sf type\_qual}} enumeration type for type qualifiers. \item[storage\_class\_specifier] \index{storage\_class\_specifier@{\sf storage\_class\_specifier}} \index{type!storage\_class\_specifier@{\sf storage\_class\_specifier}} enumeration type for storage class specifiers. \item[POINTER\_P]\index{macro!POINTER\_P@{\bf POINTER\_P}} \index{POINTER\_P@{\bf POINTER\_P}} \item[STRUCT\_P]\index{macro!STRUCT\_P@{\bf STRUCT\_P}} \index{STRUCT\_P@{\bf STRUCT\_P}} \item[UNION\_P]\index{macro!UNION\_P@{\bf UNION\_P}} \index{UNION\_P@{\bf UNION\_P}} \item[ENUM\_P]\index{macro!ENUM\_P@{\bf ENUM\_P}} \index{ENUM\_P@{\bf ENUM\_P}} \item[ARRAY\_P]\index{macro!ARRAY\_P@{\bf ARRAY\_P}} \index{ARRAY\_P@{\bf ARRAY\_P}} \item[SIMPLE\_P]\index{macro!SIMPLE\_P@{\bf SIMPLE\_P}} \index{SIMPLE\_P@{\bf SIMPLE\_P}} \item[LOCAL\_P]\index{macro!LOCAL\_P@{\bf LOCAL\_P}} \index{LOCAL\_P@{\bf LOCAL\_P}} \item[REMOTE\_P]\index{macro!REMOTE\_P@{\bf REMOTE\_P}} \index{REMOTE\_P@{\bf REMOTE\_P}} predicates for the field function class in the internal type\index{type!internal} (see~\ref{internal_type}). \item[STATIC\_P]\index{macro!STATIC\_P@{\bf STATIC\_P}} \index{STATIC\_P@{\bf STATIC\_P}} predicate for the field storage class specifier in the internal type\index{type!internal} (see~\ref{internal_type}). \item[VOID\_P]\index{macro!VOID\_P@{\bf VOID\_P}} \index{VOID\_P@{\bf VOID\_P}} \item[CHAR\_P]\index{macro!CHAR\_P@{\bf CHAR\_P}} \index{CHAR\_P@{\bf CHAR\_P}} \item[SHORT\_P]\index{macro!SHORT\_P@{\bf SHORT\_P}} \index{SHORT\_P@{\bf SHORT\_P}} \item[INTEGER\_P]\index{macro!INTEGER\_P@{\bf INTEGER\_P}} \index{INTEGER\_P@{\bf INTEGER\_P}} \item[LONG\_P]\index{macro!LONG\_P@{\bf LONG\_P}} \index{LONG\_P@{\bf LONG\_P}} \item[FLOAT\_P]\index{macro!FLOAT\_P@{\bf FLOAT\_P}} \index{FLOAT\_P@{\bf FLOAT\_P}} \item[DOUBLE\_P]\index{macro!DOUBLE\_P@{\bf DOUBLE\_P}} \index{DOUBLE\_P@{\bf DOUBLE\_P}} \item[SIGNED\_P]\index{macro!SIGNED\_P@{\bf SIGNED\_P}} \index{SIGNED\_P@{\bf SIGNED\_P}} \item[UNSIGNED\_P]\index{macro!UNSIGNED\_P@{\bf UNSIGNED\_P}} \index{UNSIGNED\_P@{\bf UNSIGNED\_p}} \item[UNUSED\_P]\index{macro!UNUSED\_P@{\bf UNUSED\_P}} \index{UNUSED\_P@{\bf UNUSED\_P}} predicates for the field attribute arit class in the internal type\index{type!internal} (see~\ref{internal_type}). \item[TYPES\_EQ\_P]\index{macro!TYPES\_EQ\_P@{\bf TYPES\_EQ\_P}} \index{TYPES\_EQ\_P@{\bf TYPES\_EQ\_P}} compares if subtype of the field attribute arit class is compatible. \item[CONST\_P]\index{macro!CONST\_P@{\bf CONST\_P}} \index{CONST\_P@{\bf CONST\_P}} predicate for const type qualifier. \end{description} \section{File `virtual\_machine.c'}\index{file!virtual\_machine.c} \begin{description} \item[exec]\index{function!exec@{\sf exec}} \index{exec@{\sf exec}} wrapper to run the virtual machine. It checks if a virtual machine instruction was not interrupted\index{interrupt}. \item[exe]\index{function!exe@{\sf exe}} \index{exe@{\sf exe}} all instructions of the virtual machine are coded in this function. \item[vtrue]\index{function!vtrue@{\sf vtrue}} \index{vtrue@{\sf vtrue}} logical true. The value is stored on the temporary stack.\index{stack} \item[vfalse]\index{function!vfalse@{\sf vfalse}} \index{vfalse@{\sf vfalse}} logical false. The value is stored on the temporary stack.\index{stack} \item[div\_yes]\index{function!div\_yes@{\sf div\_yes}} \index{div\_yes@{\sf div\_yes}} integer division.\index{division} \item[divd\_yes]\index{function!divd\_yes@{\sf divd\_yes}} \index{divd\_yes@{\sf divd\_yes}} double division.\index{division} \item[divf\_yes] \index{function!divf\_yes@{\sf divf\_yes}} \index{divf\_yes@{\sf divf\_yes}} float division.\index{division} \item[divc\_yes]\index{function!divc\_yes@{\sf divc\_yes}} \index{divc\_yes@{\sf divc\_yes}} char division.\index{division} \item[mod\_yes]\index{function!mod\_yes@{\sf mod\_yes}} \index{mod\_yes@{\sf mod\_yes}} modulus.\index{modulus} \item[move\_stack\_aligned] \index{function!move\_stack\_aligned@{\sf move\_stack\_aligned}} \index{move\_stack\_aligned@{\sf move\_stack\_aligned}} the temporary stack\index{stack} has to be always aligned. \end{description} \section{File `ys.h'}\index{file!ys.h} \begin{description} \item[yyparse]\index{function!yyparse@{\sf yyparse}} \index{yyparse@{\sf yyparse}} function prototype. \end{description} \section{File `ys.y'}\index{file!ys.y} %The commented parser is in Appendix~\ref{commented_parser}. Some rules in the grammar are not designed as stated in~\cite{ansic}. It is partially because of one pass compiler design and fully interpretative approach. Compilation of this file may cause problems (see section~\ref{problems}). The biggest discrepancies between Standard ANSI C and \CiF\ implementation is in parameter passing mechanism (see section~\ref{parameter_passing}). The bit-fields and preprocessing directives are not yet supported. The \CiF\ has no preprocessing option. This stuff will be included as soon as possible. The goal is convergence of the framework to the Standard ANSI C specification. \chapter{Some implementation details} \section{Postfix operators (postfix increment and decrement)} Compilation of postfix increment and decrement is based on the following observation: \begin{itemize} \item On the top of the arithmetic stack is the address of the operand: \begin{itemize} \item If the operand is an array, finish evaluation of the offset. \item If the operand is a structure or union, finish evaluation of the offset. \item If the operand is a pointer, add the size of the object it points to. \end{itemize} \item Create a copy of the value, which is stored on the top of the arithmetic stack. \item Exchange two addresses of the top most operands on the arithmetic stack. \item Create address copy of the top most operand on the arithmetic stack. \item Push second operand on the arithmetic stack. \item Add two top most operands. \item Move the value on the top of the arithmetic stack to the top most but last address on the arithmetic stack. \item Pop the arithmetic stack. \end{itemize} \section{Aggregate assigning} If the right side operand and the left side operand are aggregates of the same type, move a byte instructions are generated in the loop. The number of move instructions is generated accordingly to the memory size which the aggregate occupies. \chapter{Bug report} If you have found a bug please report this bug to authors at the following e-mail address: \begin{center} {\bf koren@vm.stuba.sk } \end{center} \noindent Please, include in your bug report: \begin{itemize} \item Platform on which the \CiF\ was running, i.e. machine, CPU, operating system. \item Version of the \CiF. \item Source file that caused the problem. We will appreciate if the source file will be as short as possible and still consists the bug you want to report. If you don't know how to isolate the bug, send it anyway. \item Error message, if any, produced by the \CiF. \item Indicate if you did any changes to the source of the \CiF. \end{itemize} \noindent We will try to fix the bug if it is reproducible on platforms that are accessible to us. \section{Problems}\label{problems} Problems occur sometimes during compilation of the parser (c-parser.c).\index{file!c-parser.c@{\sf c-parser.c}} \index{c-parser.c@{\sf c-parser.c}} This problem is due to the large {\sf switch} statement. Sometimes helps to specify -O2 optimization flag. %\begin{appendix} %\input{apma.tex} %\end{appendix} %\input{acknowledgment.tex} %\input{knia.tex} \bibliographystyle{plain} \bibliography{knia} \printindex \pagenumbering{roman} \tableofcontents \listoffigures \end{document} clif-0.93/doc/guide_users.dvi100644 1750 1750 271570 6347260734 14777 0ustar korenkoren÷ƒ’À;è TeX output 1997.06.10:1617‹ÿÿÿÿ ÀÙ ýÚÇ ÐÙ¸ þ=LÛ’¢ÅæóDÓítG®G®cmr17¹The–7tInŒqterpreter“óÖÆG®G®cmss17ºClifŽŸ’¼User's‘j¨GuideŽŸ,’ÏŸdŸü÷xóX«Q cmr12»Ž’Îã¨L.‘8àKoreSŽ‘ùÌvnŽŽŸ’»ì˜F‘ÿVor–ê¨v¬rersion“0.8.2ŽŽŽŽŽŸ*ˆ‹’¡»˜Last–ê¨upSŽdated“30“July“1996ŽŽŽŒ‹* ÀÙ ýÚÇ ÐÙ¸ ý–7‘ôž|ó/ÂÖN ½q cmbx12ÚChapter‘Ç 1ŽŸ2‘ôž|ó1ÂÖN áH cmbx12ÜPrefaceŽŸ4‘ôž|óKñ`y cmr10²The–@¦synš¸ãtax“of“the“ó2m#½R cmss10ÝClif“is“based“on“the“C‘@ilanguage.‘3ºThe“handb•Go“ok–@¦is“sequenced“very“close“to“the“[10Ž‘ ]“o˜r“otherޤ ‘ôž|computer–UUp¸ãrogramming“language“b•Go“oks.Ž¡‘ž|The–Âsyntax“structures“aš¸ãre“describGed“in“the“follo˜wing“chapters.‘WAThese“structures“a˜re“describGed“using“examples.‘WAAllŽ¡‘ôž|examples–Søaš¸ãre“simply“stated“p˜rograms“and“therefo˜re“they“should“bGe“understandable“fo˜r“users“kno˜wing“a“C-language.ŽŽŸK’å ²iŽŽŒ‹r ÀÙ ýÚÇ ÐÙ¸ ýœk‘ôž|ÜCon–ÿ8õten“tsŽŸ@g ‘ôž|ó3ò"V cmbx10Þ1Ž‘ž}Preface’¬%ÿiŽŽ©g ‘ôž|2Ž‘ž}Inš®9troQÇduction–ÕTto“the“in˜terpreter“ÝClif’!ÄZ1ŽŽ¤ q‘ž}2.1Ž‘žStaš¸ãrt–UUof“the“interp˜reter‘¿l‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²1ŽŽ¡‘ž}Ý2.2Ž‘žV•¸ãa“riables–UUand“a¸ãrithmetic“opGerations‘®‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²1ŽŽ¦‘ôž|Þ3Ž‘ž}Data–ÕTt®9ypšQÇes,“op˜erators“and“expressions’Y2ŽŽ¡‘ž}Ý3.1Ž‘žNames–UUof“the“va¸ãriables‘ˆ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²2ŽŽ¡‘ž}Ý3.2Ž‘žData‘UUt¸ãypGes‘‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²2ŽŽ¡‘ž}Ý3.3Ž‘žConstants‘#4‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²2ŽŽ¡‘ž}Ý3.4Ž‘žDecla¸ãration#1‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²2ŽŽ¡‘ž}Ý3.5Ž‘žArithmetic‘UUopGerato¸ãrsTБü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²3ŽŽ¡‘ž}Ý3.6Ž‘žRelational–UUand“logical“opGerato¸ãrs‘ff‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²3ŽŽ¡‘ž}Ý3.7Ž‘žT‘ÿ*ªypGe‘UUconversion‘›þ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²3ŽŽ¡‘ž}Ý3.8Ž‘žIncrement–UUand“decrement“opGerato¸ãrsT‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²3ŽŽ¡‘ž}Ý3.9Ž‘žBitš¸ãwise–UUlogical“opGerato˜rsTÁ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²3ŽŽ¡‘ž}Ý3.10Ž‘žConditional‘UUexp¸ãression‘c‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²4ŽŽ¡‘ž}Ý3.11Ž‘žAssignment‘UUopGerato¸ãrs‘#‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²4ŽŽ¡‘ž}Ý3.12Ž‘žThe–UUpš¸ãrecedence“and“the“o˜rder“of“the“evaluation‘Ûy‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²4ŽŽ¦‘ôž|Þ4Ž‘ž}Con•®9trol‘ÕT o“w’¶6ŽŽ¡‘ž}Ý4.1Ž‘žConditional‘UUstatement‘ñ=‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²6ŽŽ¡‘ž}Ý4.2Ž‘žStatement‘UUswitch-case‘°‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²6ŽŽ¡‘ž}Ý4.3Ž‘žwhile,–UUdo“while“and“fo¸ãr“loGops‘Fq‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²7ŽŽ¡‘ž}Ý4.4Ž‘žStatement‘UUb¸ãreak‘ê6‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²8ŽŽ¡‘ž}Ý4.5Ž‘žStatement‘UUcontinue‘†›‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²8ŽŽ¡‘ž}Ý4.6Ž‘žStatement‘UUgoto‘¿Œ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘ÐŒ²9ŽŽ¦‘ôž|Þ5Ž‘ž}F‘ÿ «unctions–ÕTand“program“structure’",—10ŽŽ¡‘ž}Ý5.1Ž‘žF¸ãundamentals‘1\‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²10ŽŽ¡‘ž}Ý5.2Ž‘žScopGe‘UUrulesû‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²10ŽŽ¡‘ž}Ý5.3Ž‘žRecursion‘<‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²10ŽŽ¡‘ž}Ý5.4Ž‘žIncluding–UU les“foš¸ãr“interp˜retation“during“the“session‘›r‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²12ŽŽ¦‘ôž|Þ6Ž‘ž}Derivš®9ed–ÕTv‘ÿ\rariable“t˜ypQÇes’W÷‰13ŽŽ¡‘ž}Ý6.1Ž‘žArra¸ãys‘†Ï‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²13ŽŽ¡‘žÝ6.1.1Ž‘:ž‚Internal–UUrepš¸ãresentation“of“a˜rra˜ys‘0é‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²13ŽŽ¡‘ž}Ý6.2Ž‘žMultidimensional‘UUa•¸ãrra“ys‘TÀ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²13ŽŽ¡‘ž}Ý6.3Ž‘žArraš¸ãy–UUnames“in“exp˜ressions‘M–‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²13ŽŽ¦‘ôž|Þ7Ž‘ž}T‘ÿ «ermination–ÕTof“the“ÝClif‘UUsession’:"‚16ŽŽ¦‘ôž|Þ8Ž‘ž}Run-string‘ÕThandling’cÃø17ŽŽŽŸK’ã°‘²iiŽŽŒ‹ ÀÙ ýÚÇ‘ôž|óAp®0J cmsl10ëACONTENTS’¢ŽÍ²iiiŽŽ ÐÙ¸ ýK7‘ôž|Þ9Ž‘ž}The–ÕTstandard“I/O“routines’Buq18ŽŽ¤ ‘ž}Ý9.1Ž‘žOpGening–UUa“ le‘x{‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²18ŽŽ¡‘ž}Ý9.2Ž‘žClosing–UUa“ le‘Ÿ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²19ŽŽ¡‘ž}Ý9.3Ž‘žReading–UUfrom“a“ le‘˜_‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²19ŽŽ¡‘ž}Ý9.4Ž‘žW¸ãriting–UUto“a“ le‘#‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²19ŽŽ¡‘ž}Ý9.5Ž‘žFš¸ãunctions–UUcscanf()“and“cp˜rintf()‘Fa‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²19ŽŽ©‘ôž|Þ10Ž‘ž}Graphics‘ÕTin®9terface’m%¼21ŽŽ¡‘ž}Ý10.1Ž‘žOpGening–UUa“channel‘£‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²21ŽŽ¡‘ž}Ý10.2Ž‘žClosing–UUa“channel‘qN‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²22ŽŽ¡‘ž}Ý10.3Ž‘žW¸ãriting–UUto“a“channelM¶‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²22ŽŽ¡‘ž}Ý10.4Ž‘žFlushing–UUa“channel‘Í¿‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²22ŽŽ¦‘ôž|Þ11Ž‘ž}In®9terrupt‘ÕThandling’k.ù24ŽŽ¡‘ž}Ý11.1Ž‘žSynchronous‘UUinterrupt‘øV‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²24ŽŽ¡‘ž}Ý11.2Ž‘žAsynchronous‘UUinterrupt‘ͤ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²25ŽŽ¦‘ôž|Þ12Ž‘ž}Errors’©%¤26ŽŽ¡‘ž}Ý12.1Ž‘žClif–UUerro¸ãr“messages8h‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²26ŽŽ¡‘žÝ12.1.1Ž‘:ž‚Syntax–UUerro¸ãr“messages‘¿S‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²26ŽŽ¡‘žÝ12.1.2Ž‘:ž‚Clif–UUcompilation“erro¸ãr“messages‘"¼‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²28ŽŽ¡‘žÝ12.1.3Ž‘:ž‚Clif‘ ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²29ŽŽ¡‘žÝ12.1.4Ž‘:ž‚Clif–UUrun-time“erro¸ãr“messages‘0þ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²29ŽŽ¡‘žÝ12.1.5Ž‘:ž‚Clif–UUfatal“erro¸ãr“messages‘©÷‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²30ŽŽ¡‘žÝ12.1.6Ž‘:ž‚Clif›UUw•¸ãa“rning˜messages‘¬‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²30ŽŽ¡‘žÝ12.1.7Ž‘:ž‚Clif–UUinitialization“erro¸ãr“messages‘_'‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²33ŽŽŽŽŒ‹;E ÀÙ ýÚÇ ÐÙ¸ ý›7‘ôž|ÜList– T{of“FiguresŽŸ4‘ž}Ý6.1Ž‘žInternal–UUrepš¸ãresentation“of“a˜rra˜ysM‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘Ћ²14ŽŽŽŸK’âp‘ivŽŽŒ‹_ô ÀÙ ýÚÇ ÐÙ¸ ý–7‘ôž|ÚChapter‘Ç 2ŽŸ2‘ôž|ÜIn›ÿ8õtro‘Ç duction– T{to“the“in˜terpreter“óGÖÆáHG®cmss17ëGClifŽŸ4‘ôž|ÝOur–™®goal“is“to“shoš¸ãw“main“structures“of“the“language“via“examples.‘>ÓW˜e“w˜ant“to“explain“all“structures“in“the“w˜a˜y“ofޤ ‘ôž|writing–UUsimply“stated“p¸ãrograms.Ž©!‘ôž|óIÂÖN ff cmbx12ëI2.1Ž‘„ßStart–ffof“the“inŒÌterpreterŽŸ8ä‘ôž|ÝThe–P#interpš¸ãreter“session“can“bGegin“b˜y“writing“just“Clif“on“the“command“interp˜reter“line.‘p The“interp˜reter“framew˜o˜rk“isŽ¡‘ôž|staš¸ãrted–UU(another“w˜a˜y“of“sta˜rting“the“interp˜reter“session“is“explained“later).‘qÇOn“the“standa˜rd“output“is“written:ޤªú‘ôž|ó8ßê cmmi10µ=ó !",š cmsy10¸“Ýand“¸µ=Ý.‘qÇThey“a¸ãre“unimp˜o¸ãrtant“during“the“run-time.ޤ ‘ž|V•¸ãa“riables–„!have“to“bšGe“decla¸ãred“b˜efoš¸ãre“they“a˜re“used“ rst“time.‘, If“y˜ou“fo˜rget“the“decla˜ration“statement“the“interp˜reterŽ¡‘ôž|announces–UUthe“mistakš¸ãe.‘qÇThe“decla˜ration“contents“of“a“name“of“the“t˜ypGe“and“list“of“va˜riables“sepa˜rated“b˜y“commas:Ž¡¦‘ôž|ãint‘?ýa,b,c;ަ‘ž|ÝThe–œ?aš¸ãrgument“0“in“cscanf“statement“means“æstdinÝ.‘F†The“rest“of“the“statements“is“describGed“in“the“follo˜wingŽ¡‘ôž|sections.ŽŽŸK’ã÷®²1ŽŽŒ‹b' ÀÙ ýÚÇ ÐÙ¸ ý—Ôã‘ôž|ÚChapter‘Ç 3ŽŸ3T‘ôž|ÜData– T{t‘ÿ8õyp›Ç es,“op˜erators“and“expressionsŽŸ;T‘ôž|ëI3.1Ž‘„ßNames–ffof“the“v‘ÿ™ariablesŽ©E‘ôž|ÝNames–vtof“the“vaš¸ãriables“a˜re“sequences“of“cha˜racters.‘Õ$The“ rst“cha˜racter“must“bGe“a“letter.‘Õ$The“cha˜racter“"‘™˜‰ffŽ‘™š"“isޤ ‘ôž|assumed–Í%likš¸ãe“a“letter“as“w˜ell.‘Ù8The“names“of“the“va˜riables“a˜re“restricted.‘Ù8The“names“can“not“bGe“k˜eyw˜o˜rds“(e.g.‘Ù8if,Ž¡‘ôž|else,–UUint).‘qÇThe“k•¸ãeyw“o“rds›UUa“re˜dedicated.ŽŸ*X‘ôž|ëI3.2Ž‘„ßData‘fftŒÌyps3esަ‘ôž|ÝThe–UUinterpš¸ãreter“Clif“as“w˜ell“as“the“C-language,“has“only“few“fundamental“data“t˜ypGes:ŽŸŸíæd‘ ž}cha¸ãrŽ‘0óÕone–UUbš¸ãyte,“it“is“pGossible“to“sto˜re“one“cha˜racter“from“the“setŽŽ¡‘ ž}intŽ‘0óÕinteger,–UUit“is“depGending“on“a“size“of“the“integer“of“the“hostŽŽ¡‘ ž} oatŽ‘0óÕsingle–UUp¸ãrecision“real“numbGerŽŽ¡‘ ž}doubleŽ‘0óÕdouble–UUp¸ãrecision“real“numbGerŽŽŽŽŽŸ8¹Ö‘ôž|ëI3.3Ž‘„ßConstanŒÌtsަ‘ôž|ÝThere–…1aš¸ãre“di erent“t˜ypGes“of“constants.‘\The“integer“constant“has“usual“notation“fo˜r“example“134“e.g.‘\it“is“anyŽ¡‘ôž|sequence–UUof“digits.›qÇThe“ oat“and“double“constants“have“the“follo¸ãwing“notations:˜134.435“oš¸ãr“12.56e-3“o˜r“0.2345E3Ž© T‘ž|The–^chaš¸ãracter“constant“is“a“cha˜racter“cited“in“single“quotas,‘ fo˜r“example“'a'.‘[ÊThe“value“of“the“cha˜racter“constantŽ¡‘ôž|is–UUinteger“value“from“the“set“of“chaš¸ãracters“of“the“host“computer“(fo˜r“example“ASCIGI).ަ‘ž|There–Ê(aš¸ãre“spGecial“cha˜racter“constant“comp˜rised“of“sequence“of“cha˜racters,‘ç\fo˜r“example:‘[l¸nÝn“(newline),‘ç\¸nÝt“(tab),Ž¡‘ôž|¸nn–UUÝ(backslash),“etc.ަ‘ž|The–Œ·string“constant“is“embGedded“b¸ãy“double“quotas,‘še.g.›í"I‘Œ©am“a“string".˜The“quotas“a¸ãre“not“included“in“stringŽ¡‘ôž|constants.›NThe–êOstring“is“an“a•¸ãrra“y–êOof“cha•¸ãracters.˜A“t–êOthe“end“of“the“string“constant“an“emptš¸ãy“cha˜racter“¸nÝ0“is“appGended.Ž¡‘ôž|Therefoš¸ãre–UUit“is“necessa˜ry“to“bGea˜r“into“mind“that“'x'“is“di erent“from“"x".ŽŸ*X‘ôž|ëI3.4Ž‘„ßDeclarationŽŸE‘ôž|ÝAll–\Óvaš¸ãriables“must“have“bGeen“decla˜red“bGefo˜re“they“a˜re“used.‘ˆ@The“decla˜ration“contents“of“t˜ypšGe“sp˜eci er“follo•¸ãw“ed›\Ób“y˜aŽ¡‘ôž|list–UUof“one“oš¸ãr“mo˜re“va˜riables“of“the“t˜ypGe.‘qÇF˜o˜r“example:Ž¡Ÿ¤‘ôž|ãint‘?ýa,b,c;ޤ ‘ôž|double‘?ýd,e,f;Ž¡‘ôž|int‘?ýg;Ž¡‘ôž|double‘?ýh;ŽŸuP‘ž|ÝThe–UUdeclaš¸ãration“is“a“little“bit“la˜rger“but“it“can“bGe“completed“b˜y“a“comment.ŽŽŸK’ã÷®²2ŽŽŒ‹jØ ÀÙ ýÚÇ‘ôž|ëA3.5.‘ÇARITHMETIC‘UUOPERA‘ÿ*ªTORS’Ayo²3ŽŽ ÐÙ¸ ýK7‘ôž|ëI3.5Ž‘„ßArithmetic‘ffops3eratorsŽ©“à‘ôž|ÝThe–omaš¸ãrithmetic“opGerato˜rs“a˜re“²+µ;–ª¨¸µ;“¸µ;“=–omÝand“the“mošGdulus“op˜erato¸ãr“%.‘ÀThere“is“a“op˜eratoš¸ãr“of“una˜ry“¸“Ýbut“not“una˜ryޤ ‘ôž|²+Ý.›ñ’The–îrest“is“truncated“in“the“integer“division.˜The“expš¸ãression“µxÝ%µy‘ÛÇÝis“the“opGeration“µx“Ýdivided“b˜y“µy[ÙÝ.‘ñ’The“result“isŽ¡‘ôž|zero,–UUif“µy‘±.Ýis“the“diviso¸ãr“of“the“µxÝ.ŽŸ 0+‘ž|The–{ÂopGeratoš¸ãrs“²+“Ýand“¸“Ýhave“the“same“p˜recedence.‘åThe“p˜recedence“is“lo˜w˜er“then“the“(equal)“p˜recedence“of“theŽ¡‘ôž|opGeratoš¸ãrs–UU¸µ;‘ª¨=“Ýand“%.‘qÇThe“a˜rithmetic“opGerato˜rs“a˜re“left“assoGciative.ŽŸ"”x‘ôž|ëI3.6Ž‘„ßRelational–ffand“logical“ops3eratorsަ‘ôž|ÝThe–UUrelational“opGeratoš¸ãrs“a˜reŽ¡‘ôž|µ>–9ó>›ª¨²=“µ<“<˜²=Ž¡‘ôž|ÝEach–UUof“them“has“the“same“pš¸ãrecedence.‘qÇThe“opGerato˜rs“of“equalit˜y“a˜re“bGehind“them“in“the“p˜recedenceŽ¡‘ôž|²==‘9ó!‘Ç=Ž¡‘ôž|Ý(bšGoth–UUhave“the“same“p¸ãrecedence).‘qÇThe“relational“op˜eratoš¸ãrs“have“the“lo˜w˜er“p˜recedence“than“the“a˜rithmetic“ones.ޤ 0+‘ž|The–UUlogical“opGeratoš¸ãrs“&&“and“¸jj“Ýa˜re“left“assoGciative.‘qÇThe“logical“exp˜ressions“a˜re“evaluated“from“left“to“right.Ž¡‘ž|The–'úpš¸ãrecedence“of“the“opGerato˜r“&&“is“higher“than“the“opGerato˜r“¸jjÝ.‘b©Both“of“them“have“the“lo˜w˜er“p˜recedence“thanޤ ‘ôž|the–UUrelational“and“equalitš¸ãy“opGerato˜rs.ŽŸ"”x‘ôž|ëI3.7Ž‘„ßT•ŒÌyps3e‘ffcon“v“ersionަ‘ôž|ÝIn–›¡an“expš¸ãression,‘­4the“opGerands“can“di er“in“t˜ypšGes.‘D¬The“co˜ercions“takš¸ãe“place“in“the“exp˜ressions“which“have“a“sense.Ž¡‘ôž|F•¸ão“r–)…example,‘2Iusing“a“vaš¸ãriable“which“has“t˜ypGe“double“as“an“a˜rra˜y“subscript“has“no“sense;‘8 therefo˜re“the“coGercion“is“notŽ¡‘ôž|pš¸ãroGcessed.‘qÇIn–UUthis“case“the“interp˜reter“announces“an“erro˜r.Ž© 0+‘ž|If–Æone“of“the“opšGerands“is“a“double,‘âHall“op˜erands“b˜ecome“double.‘ÄAlw•¸ãa“ys,‘âHt“yp˜es–Æof“b˜oth“p¸ãro˜cessed“op˜erands“a¸ãreŽ¡‘ôž|compaš¸ãred.‘yšThen–Wñthe“coGercion“is“made“to“the“t˜ypšGe“of“op˜erand“which“is“"wider".‘yšThe“o¸ãrder“of“the“implementedŽ¡‘ôž|tš¸ãypGes–Hêfrom“the“"na˜rro˜w˜est"“to“the“"widest"“is“as“follo˜ws:‘k‘æchar,–ŠÃint,“ o‘ÿ}'at,“doubleÝ.‘m£Another–Hêt˜ypšGe“of“co˜ercion“is“in“anŽ¡‘ôž|assignment.‘d¦The–-òright“side“value“of“the“expš¸ãression“is“converted“to“the“t˜ypGe“of“the“va˜riable“on“the“left“side.‘d¦The“t˜ypGeŽ¡‘ôž|of–UUresult“is“the“same“as“tš¸ãypGe“of“the“va˜riable“on“the“left“side“of“the“exp˜ression.ަ‘ž|The–UUt¸ãypšGe“of“the“result“can“b˜e“foš¸ãrced“b˜y“cast“opGerato˜r“which“causes“an“explicit“conversion.‘qÇIn“a“statementŽ¡‘ôž|æ(name‘‰ffŽ–®of‘‰ffŽ“typ–ÿ}'e)‘“çexpr“essionŽ¡‘ôž|Ýthe–UUæexpr›ÿ}'ession“Ýis“converted“to“the“æname‘‰ffŽ–®of‘‰ffŽ“typ˜eÝ.Ž©"”x‘ôž|ëI3.8Ž‘„ßIncremenšŒÌt–ffand“decremen˜t“ops3eratorsŽŸ“à‘ôž|ÝThe–YOlanguage“of“the“interpš¸ãreter“has“opGerato˜rs“fo˜r“the“increment“and“decrement“of“the“va˜riables.‘}µThe“incrementŽ¡‘ôž|opšGerato¸ãr–yŸ(²++Ý)“adds“one“to“the“op˜erand.‘Þ¤The“decrement“op˜erato¸ãr“(¸Ý)“subtracts“one“from“the“op˜erand.‘Þ¤TheŽ¡‘ôž|opšGerato¸ãrs–UUcan“b˜e“used“only“in“the“pš¸ãre x“notation.–qÇE.g.“let–UUn“is“5,“the“exp˜ressionŽ¡Ÿðב^sãx–?ý=“++n;ŽŸÀ¬‘ž|Ýassigns–UUto“the“vaš¸ãriable“n“the“value“6.‘qÇThen“the“value“6“is“assigned“to“the“va˜riable“x.ަ‘ôž|ëI3.9Ž‘„ßBitŒÌwise–fflogical“ops3eratorsŽŸ“à‘ôž|ÝThe–UUClif“has“opGeratoš¸ãrs“fo˜r“bit“manipulatingŽ¡Ÿðבôž|&‘X± the–UUbitš¸ãwise“AND“opGerato˜rŽŽ¡‘ôž|¸j‘]FÝthe–UUbitš¸ãwise“inclusive“OR“opGerato˜rŽŽ¡‘ò|²^ŽŽ‘TäßÝthe–UUbitš¸ãwise“exclusive“OR“opGerato˜rŽŽ¡‘ôž|µ<<‘P¸'Ýthe–UUleft“shift“opGerato¸ãrŽŽ¡‘ôž|µ>>‘P¸'Ýthe–UUright“shift“opGerato¸ãrŽŽ¡‘ò|²~ŽŽ‘TäßÝthe–UUunaš¸ãry“one's“complement“opGerato˜rŽŽ¡ŽŽŒ‹tæ ÀÙ ýÚÇ‘ôž|ëA3.10.‘ÇCONDITIONAL‘UUEXPRESSION’4$²4ŽŽ ÐÙ¸ ýK7‘ž|ÝThe–9Žbitš¸ãwise“AND‘9‡opGerato˜r“(&)“is“often“used“as“a“mask“of“the“bits.‘h…The“bit˜wise“inclusive“OR‘9‡opGerato˜r“(¸jÝ)“is“usedޤ ‘ôž|in–UUa“setting“of“bits.Ž¡‘ž|An–Âuser“should“bšGea¸ãr“in“mind“the“big“di erence“b˜et•¸ãw“een–Âthe“bit¸ãwise“logical“op˜erato¸ãrs“&,‘ÝA¸j“Ýand“logical“op˜erato¸ãrsŽ¡‘ôž|&&,‘v¸jjÝ.‘Á`F•¸ão“r–oÝexample“if“µx“Ýis“1“and“µy›˶Ýis“2“then“exp¸ãression“µxÝ&µy˜Ýis“equal“zero,‘vwhile“µxÝ&&µy˜Ýis“equal“one.‘Á`The“result“ofŽ¡‘ôž|bitš¸ãwise–UUlogical“AND“and“bit˜wise“logical“OR“is“alw˜a˜ys“æintÝ.Ž¡‘ž|The–œÆshift“opšGerato¸ãrs“µ<<“Ýand“µ>>“Ýcause“the“shift“of“the“left“op˜erand“to“the“left“o¸ãr“right.‘HThe“numb˜er“of“shiftedŽ¡‘ôž|bits–Ëûis“in“the“right“opšGerand.‘Õ¹The“result“of“these“op˜erations“is“unde ned“if“the“right“op˜erand“is“negative“o¸ãr“greaterŽ¡‘ôž|than–UUo¸ãr“equal“to“the“length“of“object“in“this“bits.Ž¡‘ž|The–]8unaš¸ãry“one's“complement“opGerato˜r‘Ý8²~ŽŽ‘ºpÝchanges“each“bit,‘_1ones“to“zeros“and“vice“versa.‘‰pThe“t˜ypšGe“of“the“op˜erandŽ¡‘ôž|must–UUbGe“integer.ޤ!6ï‘ôž|ëI3.10Ž‘!žxConditional‘ffexpressionŽ©8ä‘ôž|ÝThere–UUis“a“shoš¸ãrt“fo˜rm“fo˜r“the“conditional“statement“using“only“exp˜ressions“instead“of“statements,“i.e.:ŽŸm.‘ôž|exp•¸ãr1›UU?‘qÇexp“r2˜:‘qÇexp“r3;ŽŽŸ‘ž|The–UUexpš¸ãr1“is“evaluated.‘qÇIf“it“is“true,“the“exp˜r2“is“executed.‘qÇIf“the“exp˜r1“is“false,“exp˜r3“is“executed.Ž¡‘ôž|ëI3.11Ž‘!žxAssignmenŒÌt‘ffops3eratorsަ‘ôž|ÝThere–UUaš¸ãre“the“follo˜wing“compšGound“assign“op˜erato¸ãrs:ޤ ¡ŸIÈ4’ÔÍŸ¿³5‰ff#UZ¤fdÌͤ™œ„ ff– °_Ÿüfd¸‘Dz=“¡„ ffŽŽ©‰ff#UZ¡Ìͤ™œ„ ff– °_Ÿüfdµ=‘Dz=“¡„ ffŽŽ¦‰ff#UZ¡Ìͤ™œ„ ff–´Ÿüfd%‘Ç=“¡„ ffŽŽ¦‰ff#UZ¡Ìͤ™œ„ ff–LПüfd+‘Ç=“¡„ ffŽŽ¦‰ff#UZ¡Ìͤ™œ„ ff–LПüfd¸‘Dz=“¡„ ffŽŽ¦‰ff#UZ¡Ìͤ™œ„ ff–ÌÍŸüfdµ<<²=“¡„ ffŽŽ¦‰ff#UZ¡Ìͤ™œ„ ff–ÌÍŸüfdµ>>²=“¡„ ffŽŽ¦‰ff#UZ¡Ìͤ™œ„ ff–LПüfd&‘Ç=“¡„ ffŽŽ¦‰ff#UZ¡Ìͤ™œ„ ffŸüfd‘ °_^ŽŽ‘÷wŸüfd=‘ 0_¡„ ffŽŽ¦‰ff#UZ¡Ìͤ™œ„ ff– ÌÑŸüfd¸j‘Dz=“¡„ ffŽŽ¦‰ff#UZŽŽŽŸUê‘ôž|ëI3.12Ž‘!žxThe–ffprecedence“and“the“order“of“the“ev‘ÿ™aluationަ‘ôž|ÝThe–éDfolloš¸ãwing“table“o ers“the“survey“of“the“opGerato˜rs.‘-•The“opGerato˜rs“in“the“same“line“have“the“same“p˜recedence.Ž¡‘ôž|The–UUpš¸ãrecedence“increases“line“b˜y“line.Ž¡¡ŸiÈ3‘M±*ŸŸ³6‰ff1¤fdÌͤ™œ„ ff‘ÌΟüfdÞOpQÇerator’°d¡„ ffŽ’êª¥AssoQÇciativit®9y‘ÌÍŸ™œ„ ffŽŽ©‰ff1Ÿ‰ff1¡Ìͤ™œ„ ff‘ÌΟüfd²=–UU+›Ç=“¸˜²=“¸˜²=“µ=˜²=“%˜=“&˜=‘ÕU^ŽŽ‘m=“¸j˜²=“µ<<²=“µ>>²=‘ÌÍ¡„ ffŽ’òíœÝright–UUto“left‘ÄŸ™œ„ ffŽŽ¦‰ff1¡Ìͤ™œ„ ff‘ÌΟüfd²?‘Ç:’Ô0X¡„ ffŽ’òíœÝright–UUto“left‘ÄŸ™œ„ ffŽŽ¦‰ff1¡Ìͤ™œ„ ff‘ÌΟüfd¸jj’Øé7¡„ ffŽ’òíœÝleft–UUto“right‘ÄŸ™œ„ ffŽŽ¦‰ff1¡Ìͤ™œ„ ff‘ÌΟüfd²&&’Îé5¡„ ffŽ’òíœÝleft–UUto“right‘ÄŸ™œ„ ffŽŽ¦‰ff1¡Ìͤ™œ„ ff‘ÌΟüfd¸j’Û°T¡„ ffŽ’òíœÝleft–UUto“right‘ÄŸ™œ„ ffŽŽ¦‰ff1¡ÌÍŸ™œ„ ffŸüfd‘Lβ^ŽŽ’äD?„ ffŽ’òíœÝleft–UUto“right‘ÄŸ™œ„ ffŽŽ¦‰ff1¡Ìͤ™œ„ ff‘ÌΟüfd²&’Ö°S¡„ ffŽ’òíœÝleft–UUto“right‘ÄŸ™œ„ ffŽŽ¦‰ff1¡Ìͤ™œ„ ff‘ÌΟüfd²==‘UU!‘Ç=’¾>¡„ ffŽ’òíœÝleft–UUto“right‘ÄŸ™œ„ ffŽŽ¦‰ff1¡Ìͤ™œ„ ff‘ÌΟüfdµ<–UU<²=“µ>“>²=’¥Ì¾¡„ ffŽ’òíœÝleft–UUto“right‘ÄŸ™œ„ ffŽŽ¦‰ff1¡Ìͤ™œ„ ff‘ÌΟüfdµ<<‘UU>>’¼¤¡„ ffŽ’òíœÝleft–UUto“right‘ÄŸ™œ„ ffŽŽ¦‰ff1¡Ìͤ™œ„ ff‘ÌΟüfd²+‘UU¸’˓ࡄ ffŽ’òíœÝleft–UUto“right‘ÄŸ™œ„ ffŽŽ¦‰ff1¡Ìͤ™œ„ ff‘ÌΟüfd¸–UUµ=“²%’Åwn¡„ ffŽ’òíœÝleft–UUto“right‘ÄŸ™œ„ ffŽŽ¦‰ff1¡Ìͤ™œ„ ffŸüfd‘Lβ~ŽŽ‘ "#Ÿüfd!–UU++“¸““Ý(æname‘‰ffŽ–®of‘‰ffŽ“typ‘ÿ}'eÝ)‘cíÖ¡„ ffŽ’òíœright–UUto“left‘ÄŸ™œ„ ffŽŽ¦‰ff1¡Ìͤ™œ„ ff‘ÌΟüfd²(–UU)“[“]’Ç"¡„ ffŽ’òíœÝleft–UUto“right‘ÄŸ™œ„ ffŽŽ¦‰ff1ŽŽŽŽŽŒ‹„s ÀÙ ýÚÇ‘ôž|ëA3.12.‘ÇTHE–UUPRECEDENCE“AND“THE“ORDER“OF“THE“EV‘þãALUA‘ÿ*ªTION’–\ë²5ŽŽ ÐÙ¸ ýK7‘ž|ÝThe–UUtable“must“bšGe“b˜oš¸ãrn“in“mind“to“write“co˜rrect“p˜rogram“without“complications.ŽŽŽŒ‹•# ÀÙ ýÚÇ ÐÙ¸ ý–D[‘ôž|ÚChapter‘Ç 4ŽŸ2 Ì‘ôž|ÜCon–ÿ8õtrol‘ T{ o“wŽŸ: Ì‘ôž|ëI4.1Ž‘„ßConditional‘ffstatemenŒÌtŽ©Q‘ôž|ÝThe–UUconditional“statement“if-else“has“the“follo¸ãwing“syntax:ŽŸ˜(‘ôž|if–UU(“exp¸ãr“)ŽŽ¤ ‘ ‰*¸f–UUÝstat1“¸gŽŽ¡‘ôž|ÝelseŽŽ¡‘ ‰*¸f–UUÝstat2“¸gŽŽ¡Ÿ31‘ž|ÝThe–HØelse“paš¸ãrt“is“not“compulso˜ry‘ÿ*ª.‘mThe“exp˜r“is“evaluated“and“if“it“is“nonzero,‘KXthe“ rst“substatement“is“executed.‘mIfŽ¡‘ôž|the–UUexpš¸ãr“is“equal“zero“and“if“the“else“pa˜rt“exists,“the“second“substatement“is“executed“(stat2).ŽŸ!Óå‘ôž|ëI4.2Ž‘„ßStatemenŒÌt‘ffóJ‚ÎR6ff cmss12ëJswitch-caseަ‘ôž|ÝIf–þmo¸ãre“conditional“statements“have“to“bšGe“used“in“a“sequence,‘Üa“switch“can“b˜e“used.‘UªThen“the“di erent“b¸ãranches“canŽ¡‘ôž|bGe›UUfollo•¸ãw“ed˜using˜case˜statement.‘qÇI.e.,ŽŸ˜(‘ôž|switch–UU(“exp¸ãr“)ŽŽ¡‘5^€¸fŽŽ¡‘5^€Ýcase–UUexp¸ãr1“:‘qÇstat1ŽŽ¡‘5^€case–UUexp¸ãr2“:‘qÇstat2ŽŽ¡‘5^€default‘UU:‘qÇstat3ŽŽ¡‘5^€¸gŽŽ¡Ÿ31‘ž|ÝThe–(3expš¸ãr“is“evaluated.‘b¼Then“it“is“compa˜red“to“exp˜r1.‘b¼If“they“a˜re“equal“then“the“stat1“is“executed.‘b¼If“they“a˜re“notŽ¡‘ôž|equal–®jthe“execution“continues“at“the“next“labGel“(expš¸ãr2“in“this“case).‘}The“exp˜ressions“in“labšGels“have“to“b˜e“constantŽ¡‘ôž|expš¸ãressions.‘fdefault–3¨is“executed“only“if“no“exp˜ression“in“labGel“statements“is“equal“to“the“exp˜r.‘fThe“default“statementŽ¡‘ôž|can–UUbGe“omitted.‘qÇA“usage“is“in“the“follo¸ãwing“example:ŽŸ?ý‘ôž|ãexport_type–?ýextern“int“cprintf();Ž© *«‘ôž|extern–?ýint“cscanf();ޤ ‘ôž|int‘?ýa;Ž¡‘ôž|cprintf(1,"%s\n","input‘?ýa");ަ‘ôž|cscanf(0,"%d",a);Ž¡‘ôž|switch‘?ý(a)Ž¡‘ôž|{Ž¡‘ôž|default:Ž¡‘ždcprintf(1,"%s\n","default");Ž¡‘ôž|case‘?ý1:Ž¡‘ždcprintf(1,"%s\n","1");Ž¡‘ždbreak;Ž¡‘ôž|case‘?ý2|5:Ž¡‘ždcprintf(1,"%s\n","2|5");Ž¡‘ždbreak;Ž¡‘ôž|case‘?ý3:Ž¡‘ždcprintf(1,"%s\n","3");ŽŽŸK’ã÷®²6ŽŽŒ‹– ÀÙ ýÚÇ‘ôž|ëA4.3.‘ÇÝWHILEëA,–UUÝDO“WHILE“ëAAND“ÝF¸ãOR“ëALOOPS’瘲7ŽŽ ÐÙ¸ ýK7‘ždãcprintf(1,"%s\n","no‘?ýbreak");ޤ ‘ôž|case‘?ý4:Ž¡‘ždcprintf(1,"%s\n","4");Ž¡‘ždbreak;Ž¡‘ôž|}Ž¡‘ôž|exit;ŽŸ'ÚB‘ôž|ëI4.3Ž‘„ßëJwhileëI,–ffëJdo‘³/while“ëIand“ëJfo›¼r“ëIlos3opsŽŸ&½‘ôž|ÝInŽŸ [‘ôž|while–UU(“exp¸ãr“)ŽŽ¤ ‘,úò¸f–UUÝstat“¸gŽŽ¡©xD‘ž|Ýthe–'Áexpš¸ãr“is“evaluated.‘é If“its“value“is“nonzero,‘\\the“stat“is“executed“and“the“exp˜r“is“evaluated“again.‘é The“loGopŽ¡‘ôž|continues–UUuntil“the“exp¸ãr“bšGecomes“0.‘qÇAfter“lo˜op“ nishing,“it“is“p¸ãro˜ceeded“b˜elo¸ãw“the“stat.ŽŸ (‘ž|The–UUsequence“of“statementsŽŸø†‘ôž|doŽŽ¡‘}¸f–UUÝstat“¸gŽŽ¡‘}Ýwhile–UU(“exp¸ãr“)ŽŽ¡¦‘ž|is–Òexecuted“at“least“once.›çþThe“while“exp¸ãr“is“evaluated“at“the“end“of“the“loGop“sequence.˜If“the“exp¸ãr“is“true“theŽ¡‘ôž|sequence–UUof“statements“in“the“lošGop“is“rep˜eated.ŽŸ (‘ž|The–UUstatement“fo¸ãrŽ¡ŸÈr‘ôž|foš¸ãr–UU(“exp˜r1;“exp˜r2;“exp˜r3)ŽŽ¡‘`妸f–UUÝstat“¸gŽŽ¡Ÿ+¾‘ž|Ýis–UUequal“with“the“sequence“of“the“follo¸ãwing“commandsŽŸ Ÿ [‘ôž|exp¸ãr1;ŽŽ¡‘ôž|while–UU(“exp¸ãr2“)ŽŽ¡‘5PH¸f‘UUÝstatŽŽ¡‘5PHexp¸ãr3;‘UU¸gŽŽ¡¦‘ž|ÝAll–ê±three“paš¸ãrts“of“the“statement“fo˜r“a˜re“exp˜ressions.‘1ÜThe“exp˜ressions“exp˜r1“and“exp˜r3“a˜re“usually“assignments.Ž¡‘ôž|The–Ïexpš¸ãr2“is“a“relational“exp˜ression.‘V›Thus“the“ rst“exp˜ression“spGeci es“initialization“fo˜r“the“lošGop;‘üthe“second“sp˜eci esŽ¡‘ôž|a–íütest,›&made“bGefo¸ãre“each“iteration,˜such“that“the“lošGop“is“exited“when“exp¸ãression“b˜ecomes“0.‘;½The“third“exp¸ãressionŽ¡‘ôž|often–UUspšGeci es“an“incrementing“that“is“p˜erfo¸ãrmed“after“each“iteration.Ž© (‘ž|If–UUall“three“paš¸ãrts“a˜re“droppGed,“the“exp˜r2“is“considered“true“andŽ¡ŸÈr‘ôž|fo¸ãr–UU(“;“;“)“¸fŽŽ¡‘&%µ:–ª¨:“:ŽŽŽ¡‘&%¸gŽŽ¡Ÿ [‘ž|Ýis–Þan“in nite“lošGop.‘W It“is“assumed“another“termination“of“the“lo˜op.‘W F•¸ão“r–Þexample“bš¸ãy“the“statements“b˜reak“o˜r“return.ަ‘ž|Everyš¸ãone–Eshould“consider“which“loGop“statement“to“use.‘@ÉIf“w˜e“need“not“to“initialize“o˜r“to“reinitialize“the“loGopŽ¡‘ôž|va•¸ãriable,›UUw“e˜can˜tak“e˜an˜advantage˜of˜the˜statement˜while.ަ‘ž|The–9àloGop“statement“foš¸ãr“is“useful“if“w˜e“need“to“initialize“and“reinitialize“the“loGop“va˜riable.‘h The“control“statementsŽ¡‘ôž|a¸ãre–UUconcentrated“at“the“bšGeginning“of“the“lo˜op.ŽŽŽŒ‹² ÀÙ ýÚÇ‘ôž|ëA4.4.‘ÇST–ÿ*ªA“TEMENT‘UUÝBREAK’cüþ²8ŽŽ ÐÙ¸ ýK7‘ôž|ëI4.4Ž‘„ßStatemenŒÌt‘ffëJb›¼reakŽŸ8ä‘ôž|ÝIt–›is“useful“to“bš¸ãreak“p˜rošGcessing“of“the“lo˜op“at“a•¸ãrbitra“ry–›place.‘CThe“statement“b¸ãreak“causes“termination“of“the“mostŽŸ ‘ôž|inner–UUwhile“oš¸ãr“fo˜r.‘qÇThe“follo˜wing“p˜rogram“sho˜ws“function“of“the“b˜reak:ŽŸ/€‘ùÞyãexport_type–?ýextern“int“cprintf();ޤ ¡‘ùÞyint‘?ýx;Ž¡‘ùÞyx=1;Ž¡‘ùÞywhile‘?ý(x<=10)Ž¡‘#Þa{Ž¡‘#Þacprintf(1,"%s\n","now–?ýin“while");Ž© *«‘MÞIif(x–?ý==“5)Ž¡‘wÞ1{Ž¡‘wÞ1cprintf(1,"%s\n","now–?ýin“IF");ަ‘wÞ1cprintf(1,"%s\n","*********************************");Ž¡‘wÞ1x++;Ž¡‘wÞ1break;Ž¡‘wÞ1}Ž¡‘MÞIcprintf(1,"x=%d\n",x);Ž¡‘MÞIx++;Ž¡‘#Þa}Ž¡‘ùÞyexit;Ž¡Ÿ/€‘ž|ÝControl–UUpasses“to“the“statement“follo¸ãwing“the“terminated“compGound“statement.ŽŸ!i'‘ôž|ëI4.5Ž‘„ßStatemenŒÌt‘ffëJcontinueŽŸ8ä‘ôž|ÝStatement–SOcontinue“is“related“to“the“statement“bš¸ãreak.‘qIt“causes“control“to“pass“to“the“loGop-continuation“pa˜rt“of“theޤ ‘ôž|most–Á²inner“lošGop“(fo¸ãr,–ÜÊwhile),“i.e.‘¶ßto–Á²the“end“of“the“lo˜op.‘¶ßThe“while“lo˜op“p¸ãro˜ceeds“at“the“expš¸ãression.‘¶ßThe“fo˜r“loGopŽ¡‘ôž|pš¸ãroGceeds–UUat“the“reinitialization.‘qÇThe“p˜rogram“with“the“statement“continue“follo˜ws:ŽŸ/€‘ùÞyãexport_type–?ýextern“int“cprintf();ޤ ¡‘ùÞyint‘?ýx;Ž¡‘ùÞyfor‘?ý(x=1;x<=10;x++)Ž¡‘#Þa{Ž¡‘#Þacprintf(1,"%s\n","now–?ýin“for");ަ‘MÞIif(x–?ý==“5)Ž¡‘wÞ1{Ž¡‘wÞ1cprintf(1,"%s\n","now–?ýin“IF");ަ‘wÞ1print(1,"%s\n","*********************************");Ž¡‘wÞ1continue;Ž¡‘wÞ1}Ž¡‘MÞIcprintf(1,"x=%d\n",x);ަ‘#Þa}Ž¡‘ùÞyexit;Ž¡Ÿ/€‘ž|Ýand–UUmo¸ãre“complex“example:ŽŸ/€‘ùÞyã/*–?ýtest“program“for“nested“loop“*/ަ‘ùÞyexport_type–?ýextern“int“cprintf();Ž¡¡‘ùÞyint‘?ýx,y;Ž¡‘ùÞyy=1;ަ‘ùÞyfor(x=1;x<15;x++)Ž¡‘#Þa{Ž¡‘)^cprintf(1,"%s\n","now–?ýin“for");ަ‘)^cprintf(1,"x=%d\n",x);ަ‘)^while(x>5–?ý&&“x<10)Ž¡‘MÞI{Ž¡‘SFcprintf(1,"%s\n","now–?ýin“while");ަ‘SFcprintf(1,"x=%d\n",x);ަ‘SFif(x==9)Ž¡‘wÞ1{Ž¡‘}.cprintf(1,"%s\n","now–?ýin“the“body“of“the“first“condition");ަ‘}.cprintf(1,"x=%d\n",x);Ž¡‘}.continue;Ž¡‘wÞ1}Ž¡‘SFif(x==8)ŽŽŽŒ‹ §N ÀÙ ýÚÇ‘ôž|ëA4.6.‘ÇST–ÿ*ªA“TEMENT‘UUÝGOTO’h€²9ŽŽ ÐÙ¸ ýK7‘wÞ1ã{ޤ ‘}.cprintf(1,"%s\n","now–?ýin“the“body“of“the“second“condition");Ž¡‘}.break;Ž¡‘wÞ1}Ž¡‘SFx=x+y;ޤ *«‘SFcprintf(1,"x=%d\n",x);Ž¡‘MÞI}ޤ ‘#Þaif(x==14)Ž¡‘MÞI{Ž¡‘SFcprintf(1,"%s\n","now–?ýin“the“body“of“the“third“condition");Ž© *«‘SFcprintf(1,"x=%d\n",x);Ž¡‘SFbreak;Ž¡‘MÞI}Ž¡‘#Þa}Ž¡‘ùÞyexit;Ž¡Ÿ!Ž8‘ôž|ëI4.6Ž‘„ßStatemenŒÌt‘ffëJgotoŽŸ8ä‘ôž|ÝAlthough–~‚the“goto“statement“is“a“paš¸ãrt“of“unstructured“p˜rogramming“the“Clifenvironment“suppGo˜rts“this“syntacticޤ ‘ôž|construction–‰as“wš¸ãell.‘ÊbThe“goto“statement“is“used“fo˜r“unconditional“b˜ranching“of“p˜rograms.‘ÊbThe“jump“is“pGossibleŽ¡‘ôž|only––Öin“the“level“one.›6IThere“is“no“pGossibilit¸ãy“to“jump“with“goto“statement“across“functions.˜T‘ÿ*ªypical“usage“is“in“theŽ¡‘ôž|follo¸ãwing‘UUexample:ŽŸ‘ùÞyãexport_type–?ýextern“int“cprintf();ޤ ¡‘ôž|int‘?ýi;Ž¡¡‘ôž|cprintf(1,"%s\n","in‘?ýfront");ަ‘ÿv{Ž¡‘^sa:–?ýcprintf(1,"%s“","a");Ž¡¡‘^sif–?ý(10“==“i)Ž¡‘Þm{Ž¡‘jcprintf(1,"%s–?ý","in“if");“++i;Ž¡‘jgoto‘?ýb;ަ‘Þm}Ž¡‘^selseŽ¡‘Þm{Ž¡‘j++i;Ž¡‘Þm}Ž¡‘^sgoto‘?ýa;Ž¡‘ôž|b:Ž¡‘ÿvcprintf(1,"%s‘?ý","b");ަ‘ÿv}Ž¡‘ôž|cprintf(1,"%s\n","after");Ž¡‘ôž|exit;Ž¡ŽŽŒ‹ ¯ï ÀÙ ýÚÇ ÐÙ¸ ý–P ‘ôž|ÚChapter‘Ç 5ŽŸ2‘‘ôž|ÜF‘ýªáunctions– T{and“program“structureŽŸ4‘‘ôž|ÝBigger–·tasks“can“bGe“split“bš¸ãy“functions“to“the“pa˜rts.‘víProgrammer“can“use“the“pa˜rts“which“w˜ere“designed“b˜y“otherޤ ‘ôž|autho¸ãrs.Ž©"ø‘ôž|ëI5.1Ž‘„ßF‘þ¦fundamenŒÌtalsŽŸgK‘ôž|ÝEach–UUfunction“loGoks“lik¸ãeŽŸzÕ‘ôž|tš¸ãypGe–UUname“(t˜ypGe“a˜rgument,“.–ªª.“.“)ŽŽ¡‘{%£¸fŽŽ¡‘{%£Ýdecla¸ãrations–UUa“statementsŽŽ¡‘{%£¸gŽŽ¡ŸbD‘ž|Ý(The–pëtš¸ãypGes“a˜re“mentioned“on“the“page“2.‘ĈIn“addition,‘wÐthe“t˜ypšGe“void“can“b˜e“in“a“function“decla¸ãration).‘ĈThe“voidŽ¡‘ôž|tš¸ãypGe–UUdenotes“an“nonexistent“return“value.‘qÇSome“pa˜rts“of“functions“can“bšGe“dropp˜ed“out;“minimal“function“isŽ¡‘ôž|t¸ãypGe–UUdummy()“¸f“gŽ¡‘ôž|Ý.‘qÇ(The–UUfunction“can“bGe“useful“in“ lling“place“in“p¸ãrogram“design).ŽŸ ‘‘ž|return–´Ìstatement“returns“value“of“the“called“function“to“the“calling“function.‘,Syntax“of“the“statement“return“isŽ¡‘ôž|as‘UUfollo¸ãws:Ž¡‘ôž|return–UU(“exp¸ãr“);Ž¡¡‘ôž|The–UUcalling“function“can“igno¸ãre“the“return“value.ަ‘ôž|ëI5.2Ž‘„ßScops3e‘ffrulesŽŸgK‘ôž|ÝGlobal–ÛYvaš¸ãriables“must“have“bGeen“decla˜red“bGefo˜re“they“a˜re“used.‘ÒF˜unctions“must“bGe“decla˜red“bGefo˜re“the“fo˜rmal“callŽ¡‘ôž|as–Ô€w¸ãell.‘ïGThe“functions“must“bšGe“de ned“b˜efoš¸ãre“the“real“call.‘ïGThe“pa˜rt“of“p˜rogram“where“the“name“is“decla˜red“is“aŽ¡‘ôž|scopGe–>Rof“the“name.‘jThe“global“vaš¸ãriables“a˜re“valid“during“whole“interp˜reter“session.‘jThe“loGcal“va˜riables“a˜re“only“validŽ¡‘ôž|during–ú±the“pš¸ãroGcessing“of“the“function.‘S‘The“interp˜reter“sea˜rches“the“table“of“loGcal“va˜riables“fo˜r“the“va˜riable.‘S‘If“it“is“notŽ¡‘ôž|successful,‘í3it–Ó*pš¸ãroGceeds“sea˜rching“the“table“of“global“va˜riables“fo˜r“the“va˜riable.‘FdIf“it“is“not“successful“again“it“announcesŽ¡‘ôž|an‘UUerro¸ãr.ަ‘ôž|ëI5.3Ž‘„ßRecursionŽŸgK‘ôž|ÝFš¸ãunctions–†%can“bGe“written“in“recursive“fo˜rm“(e.g.›6a“function“can“call“æitselfÝ).˜The“recursion“can“bGe“direct“o¸ãr“indirect.Ž¡‘ôž|An–UUexample“of“the“recursion“is“n!‘qÇ(facto¸ãrial):ŽŸ윑ôž|ãexport_type–?ýextern“int“cprintf();ŽŸ *«‘ôž|extern–?ýint“cscanf();ޤ ¡‘ôž|int‘?ýn;Ž¡‘ôž|int–?ýfak(int“n)Ž¡‘ôž|{Ž¡‘ôž|if(n==1)ŽŽŸK’áw­²10ŽŽŒ‹ µ ÀÙ ýÚÇ‘ôž|ëA5.3.‘ÇRECURSION’…«<²11ŽŽ ÐÙ¸ ýK7‘ždã{return(1);}ޤ ‘ôž|return(fak(n-1)*n);Ž¡‘ôž|}Ž¡‘ôž|cprintf(1,"%s\n","input‘?ýn");Ž© *«‘ôž|cscanf(0,"%d",n);Ž¡‘ôž|n=fak(n);Ž¡‘ôž|cprintf(1,"factorial‘?ý=%d\n",n);Ž¡‘ôž|exit;ŽŸ?«‘ž|ÝOther–UUexamples“follo¸ãw:ŽŸ ‘ôž|Recursive–UUfunction“fo¸ãr“FibGonacci“sequenceŽŸO•‘ôž|ãexport_type–?ýextern“int“cprintf();ަ‘ôž|extern–?ýint“cscanf();Ž¡¡‘ôž|int‘?ýn;Ž¡‘ôž|int–?ýfib(int“n)Ž¡‘ôž|{Ž¡‘ôž|if(n<=1)Ž¡‘žd{Ž¡‘ždreturn(1);Ž¡‘žd}Ž¡‘ôž|elseŽ¡‘žd{Ž¡‘ždreturn(fib(n-1)+fib(n-2));Ž¡‘žd}Ž¡‘ôž|}Ž¡‘ôž|cprintf(1,"%s\n","input‘?ýn");ަ‘ôž|cscanf(0,"%d",n);Ž¡‘ôž|n=fib(n);Ž¡‘ôž|cprintf(1,"n=%d\n",n);Ž¡‘ôž|exit;ŽŸ?«‘ž|Ýo•¸ãr›UUfo“r˜Ÿ÷æbóú±u cmex10«ŽŸû ‘ê¬ó 0e—rcmmi7´nŽŸ⾑-£kŽŽ‘ Ü*Ÿ÷æb«ŽŽŽŸÁ`‘ôž|ãexport_type–?ýextern“int“cprintf();ަ‘ôž|extern–?ýint“cscanf();Ž¡¡‘ôž|int‘?ýn,k;Ž¡‘ôž|int–?ýkomb(int“n,int“k)Ž¡‘ôž|{Ž¡‘ôž|if((n==k)–?ý||“(k==0))Ž¡‘žd{Ž¡‘ždreturn(1);Ž¡‘žd}Ž¡‘ôž|elseŽ¡‘žd{Ž¡‘ždreturn(komb(n-1,k)+komb(n-1,k-1));Ž¡‘žd}Ž¡‘ôž|}Ž¡‘ôž|cprintf(1,"%s\n","input‘?ýn");ަ‘ôž|cscanf(0,"%d",n);Ž¡‘ôž|cprintf(1,"%s\n","input‘?ýk");ަ‘ôž|cscanf(0,"%d",k);Ž¡‘ôž|n=komb(n,k);Ž¡‘ôž|cprintf(1,"n=%d\n",n);Ž¡‘ôž|exit;ŽŸÿ¬‘ž|Ýand–UUfo¸ãr“Ÿ÷æb«ŽŸû ‘ꬴnŽŸ⾑-£kŽŽ‘ Ü*Ÿ÷æb«ŽŽŽ‘ªa¸Ÿöý‘j$´lŽŸ €‘kêŸøü«PŽŽŸÌt‘8à´ióÙ“ Rcmr7±=1ŽŽ‘××µiŽŸ Бôž|ãexport_type–?ýextern“int“cprintf();ަ‘ôž|extern–?ýint“cscanf();Ž¡¡‘ôž|int‘?ýn,k,l;Ž¡‘ôž|int–?ýf(int“n,int“k)Ž¡‘ôž|{Ž¡‘ôž|if((k==0)–?ý||“(n==k))Ž¡‘žd{Ž¡‘ždreturn(1);Ž¡‘žd}Ž¡‘ôž|return(f(n-1,k)+f(n-1,k-1));Ž¡‘ôž|}Ž¡‘ôž|int–?ýkomb(int“n,int“k,int“l)ŽŽŽŒ‹ ¾= ÀÙ ýÚÇ‘ôž|ëA5.4.‘ÇINCLUDING–UUFILES“F¸ãOR“INTERPRET–ÿ*ªA“TION–UUDURING“THE“SESSION‘{ޝ²12ŽŽ ÐÙ¸ ýK7‘ôž|ã{ޤ ‘ôž|if((k==0)–?ý||“(n==k))Ž¡‘žd{Ž¡‘ždreturn(1);Ž¡‘žd}Ž¡‘ôž|if(l==1)Ž¡‘žd{Ž¡‘ždreturn(f(n,k));Ž¡‘žd}Ž¡‘ôž|return(komb(n-1,k,l-1)+f(n-1,k)*l+komb(n-1,k-1,l-1)+f(n-1,k-1)*l);Ž¡‘ôž|}Ž¡‘ôž|cprintf(1,"%s\n","input‘?ýn");Ž© *«‘ôž|cscanf(0,"%d",n);Ž¡‘ôž|cprintf(1,"%s\n","input‘?ýk");ަ‘ôž|cscanf(0,"%d",k);Ž¡‘ôž|cprintf(1,"%s\n","input‘?ýl");ަ‘ôž|cscanf(0,"%d",l);Ž¡‘ôž|n=komb(n,k,l);Ž¡‘ôž|cprintf(1,"n=%d\n",n);Ž¡‘ôž|exit;ŽŸ!Ž8‘ôž|ëI5.4Ž‘„ßIncluding–ff les“for“inŒÌterpretation“during“the“sessionŽŸ8ä‘ôž|ÝUsers–UUcan“include“a“ le“into“the“interpš¸ãreter“b˜y“statementޤ ‘ôž|load–UU(“name‘™˜‰ffŽ–™šof‘™˜‰ffŽ“ le);Ž¡‘ôž|The–UU le“will“bGe“interp¸ãreted“automatically‘ÿ*ª.ŽŽŽŒ‹ Å ÀÙ ýÚÇ ÐÙ¸ ý–7‘ôž|ÚChapter‘Ç 6ŽŸ2‘ôž|ÜDeriv›ÿ8õed– T{v‘þqëariable“t˜yp‘Ç esŽŸ:‘ôž|ëI6.1Ž‘„ßArraŒÌysŽŸ8ä‘ôž|ÝOne–TŸand“multidimensional“tš¸ãypGe“of“a˜rra˜ys“a˜re“available“in“the“interp˜reter.‘qŠThey“a˜re“used“to“group“the“sets“of“the“lik˜eŽ© ‘ôž|vaš¸ãriables.‘qÇExample–UUof“one-dimensional“a˜rra˜y“follo˜ws:ޤ‘¾‘ôž|ãtype‘?ýname_of_array[number_of_elements];Ž¡‘ž|ÝThe–!÷size“of“an“a•¸ãrra“y–!÷must“bšGe“an“integer“constant.‘`¨An“element“of“the“a•¸ãrra“y–!÷can“b˜e“accessed“through“subscripting.ަ‘ôž|F•¸ão“r‘UUexample:ަ¡‘ôž|ãa[7]=56;Ž¡‘ž|ÝIn–‚the“interpš¸ãreter,‘ÍDsubscripting“bGegins“with“zero.‘øAn“integer“exp˜ression“can“bšGe“b˜et•¸ãw“een–‚the“b•¸ãrack“ets;‘ti.e.‘øaަ‘ôž|subscripting–UUvaš¸ãriable,“an“exp˜ression,“o˜r“return“value“from“a“function“call.ŽŸ^,‘ôž|óÂÖN  cmbx12Ä6.1.1Ž‘Þ|In• ternal›€represen“tation˜of˜arra“ysŽŸªª‘ôž|ÝArra•¸ãys›UUa“re˜containing˜certain˜data˜t“ypGe.‘qÇThey˜a“re˜sto“red˜in˜a˜contiguous˜set˜of˜these˜data˜t“ypGes.‘qÇSee˜ gure˜6.1ŽŸ!zž‘ôž|ëI6.2Ž‘„ßMultidimensional‘ffarraŒÌysŽŸ8ä‘ôž|ÝIn–§ºthe“interp•¸ãreter,‘Êsa“rra“ys–§ºof“a•¸ãrbitra“ry–§ºdimensions“can“also“bGe“declaš¸ãred.‘7éThe“t˜w˜o-dimensional“a˜rra˜y“with“µm–Ý­¸“µn‘§ºÝelementsަ‘ôž|is–UUdeclaš¸ãred“as“follo˜ws:Ž¡‘ôž|ãtype‘?ýname_of_array[m][n];Ž¡‘ž|ÝAn–UUelement“of“the“a•¸ãrra“y–UUcan“again“bGe“accessed“through“subscripting,“e.g.Ž¡‘ôž|ãa[7][9]Ž¡‘ž|ÝThis–UUwill“access“the“element“in“the“8-th“roš¸ãw“(ro˜w“numbšGer“7)“and“in“the“10-th“column“(column“numb˜er“9).ŽŸ!zž‘ôž|ëI6.3Ž‘„ßArraŒÌy–ffnames“in“expressionsŽŸ8ä‘ôž|ÝThe–Xelement“of“the“a•¸ãrra“y–Xin“an“exp¸ãression“can“only“bGe“accessed“through“subscripting,‘˜Æbut“there“is“an“exception;ަ‘ôž|the›†Ça•¸ãrra“y˜can˜bGe˜passed˜as˜a˜pa“rameter˜to˜a˜function˜(without˜subscripting).‘An˜example˜of˜the˜pa“rameter˜passingަ‘ôž|mechanism–UUusing“an“a•¸ãrra“y–UUas“a“paš¸ãrameter“follo˜ws:ŽŸ‘¾‘ôž|ãexport_type–?ýextern“int“cprintf();ޤ ¡‘ôž|int‘?ýa[5][5][5][5][5];Ž¡‘ôž|a[0][0][0][0][0]=1;Ž¡‘ôž|a[1][1][1][1][1]=1;Ž¡‘ôž|a[2][2][2][2][2]=1;Ž¡‘ôž|a[3][3][3][3][3]=1;ŽŽŸK’áw­²13ŽŽŒ‹È¢ ÀÙ ýÚÇ‘ôž|ëA6.3.‘ÇARRA‘ÿ*ªY–UUNAMES“IN“EXPRESSIONS’€…²14ŽŽ ÐÙ¸ ÿm%šŸÞ9’ ÏÖ þ–¦ã‰ffB=± æwS„æwSffŸŒÄWŽ‘Ap儿wSffŽžff‰ffB=±ŽŽŽ’ 6< þ£,„ffAp厒 6< þ¨ÜÇ„ffAp厠þ®Å’)îÝ.ŽŽŽ þº&’)î.ŽŽŽ þË8â’)î.ŽŽŽ’ 6< þæ„ê„ffAp厠þÍ$õ’ýT¯0ŽŽŽ ÿ^œ’ýT¯1ŽŽŽŸ™ü¾’)î.ŽŽŽŸŽ›2’)î.ŽŽŽŸƒ9¦’)î.ŽŽŽ’ ÏÖŸ½—v‰ffB=±Ÿ5ú„5úffŸåpƒŽ‘Apå„5úffŽžff‰ffB=±ŽŽŽ þàñÐ’&üÈnŽŽŽ’ÅÉbŸò¶o„\ŒffŽŽ’ 6< ÿ,¶7„ffAp厠ÿaòÝ’ý?ZnŽŽŽ‘~ÚꟋ‹X„ff•Ü Ž ÿ[ë’¨ð»0ŽŽŽŸÅžù’§ù1ŽŽŽ’äQ0 þ–Ú„ff&å ‘öžÌÍóäO£ line10¬-ŽŽ þ–W’ò,ÝAŽŽŽŸÍ3´’ý€Â.ŽŽŽŸÁÒ(’ý€Â.ŽŽŽŸ¶pœ’ý€Â.ŽŽŽŸái’©‡.ŽŽŽŸÕ¼Ý’©‡.ŽŽŽŸÊ[Q’©‡.ŽŽŽŽŽŽŽŸ’†M²Figure–UU6.1:‘qÇInš¸ãternal“represen˜tation“of“arra˜ysŽŽŽŽŽŒ‹ÑP ÀÙ ýÚÇ‘ôž|ëA6.3.‘ÇARRA‘ÿ*ªY–UUNAMES“IN“EXPRESSIONS’€…²15ŽŽ ÐÙ¸ ýK7‘ôž|ãa[4][4][4][4][4]=a[3][3][3][3][3];ޤ ‘ôž|int–?ýz(int“b[][5][5][5][5])Ž¡‘ôž|{Ž¡‘ôž|cprintf(1,"%d\n",b[0][0][0][0][0]);ޤ *«‘ôž|cprintf(1,"%d\n",b[1][1][1][1][1]);Ž¡‘ôž|cprintf(1,"%d\n",b[2][2][2][2][2]);Ž¡‘ôž|cprintf(1,"%d\n",b[3][3][3][3][3]);Ž¡‘ôž|cprintf(1,"%d\n",b[4][4][4][4][4]);Ž¡‘ôž|}ޤ ‘ôž|z(a);Ž¡‘ôž|exit;ŽŽŽŒ‹Ô¡ ÀÙ ýÚÇ ÐÙ¸ ý–7‘ôž|ÚChapter‘Ç 7ŽŸ2‘ôž|ÜT‘ýªáermination– T{of“the“ëGClif‘̇sessionŽŸ4‘ôž|ÝStatement–ßuexit;‘¤…terminates“the“interpš¸ãreter“session.‘ 'This“statement“terminates“co˜rrectly“w˜o˜rk“of“the“interp˜reterŽŸ ‘ôž|environment.ŽŽŸK’áw­²16ŽŽŒ‹Ör ÀÙ ýÚÇ ÐÙ¸ ý–7‘ôž|ÚChapter‘Ç 8ŽŸ2‘ôž|ÜRun-string‘ T{handlingŽŸ4‘ôž|ÝSo–:faš¸ãr,‘s1the“input“w˜as“alw˜a˜ys“standa˜rd“input.‘ØBut“the“interp˜reter“can“have“spGeci ed“pa˜rameters“in“the“run-stringޤ ‘ôž|(command–— line)“which“aš¸ãre“names“of“p˜rograms.‘6íThe“input“is“redirected“and“a“ le“is“opGened“instead“of“the“standa˜rdŽ¡‘ôž|input.Ž¡‘ž|Other–ˆ}paš¸ãrameters“can“appGea˜r“in“the“command“line.‘ >One“of“the“pa˜rameters“is“µ=Ýhelp“evoking“b˜rief“help.‘ >AnotherŽ¡‘ôž|paš¸ãrameter–žis“fo˜r“resetting“of“the“size“of“main“memo˜ry“a˜reas“of“the“interp˜reter.›KÐThe“size“is“spGeci ed“relatively‘ÿ*ª.˜ThisŽ¡‘ôž|pa¸ãrameter–UUcan“bšGe“sp˜eci ed“in“the“run-string“as“follo¸ãws:ޤ‘ôž|ã/bc=Ž¡‘ž|ÝAs–UUthe“µ<ÝnumbšGerµ>“Ýcan“b˜e“sp˜eci ed“a“p˜ositive“integer.‘qÇThe“default“value“is“10.ŽŽŸK’áw­²17ŽŽŒ‹ׯ ÀÙ ýÚÇ ÐÙ¸ ý–e-‘ôž|ÚChapter‘Ç 9ŽŸ2-ž‘ôž|ÜThe– T{standard“I/O“routinesŽŸ6åð‘ôž|ÝSo–ì faš¸ãr,‘*all“our“sample“p˜rograms“have“written“data“to“the“standa˜rd“output“and“read“data“from“standa˜rd“input“(in“bGothޤ ‘ôž|cases–†`the“terminal).‘èAs“long“as“wš¸ãe“a˜re“accessing“not“la˜rge“pGo˜rtions“of“data,‘’£thus“data“in“the“simple“fo˜rm,‘’£this“t˜ypGeŽ¡‘ôž|of–m„I/O‘m~routines“is“sucient.‘ºTHo•¸ãw“ever,‘sla“rge–m„amounts“of“data“aš¸ãre“generally“sto˜red“in“ les.‘ºTT‘ÿ*ªo“pGerfo˜rm“I/O‘m~from“andŽ¡‘ôž|to–UU les“I/O“functions“aš¸ãre“included“in“the“interp˜reter.ŽŸ -ž‘ž|Access–UUto“ les“generally“requires“four“basic“functions:ŽŸˆÙ‘ôž|ÞopQÇenŽŽ‘¼­ÝThis–UUenables“access“to“a“ le“and“establishes“the“ le“handle.Ž©¶v‘ôž|ÞcloseŽŽ‘{@ÝThis–M¤terminates“access“to“the“ le.›o7When“the“access“to“a“ le“is“complete,‘O.it“should“bGe“closed.˜The“numbGer“ofŽ¡‘ ž| les–UUthat“the“interpš¸ãreter“can“simultaneously“manage“is“limited.‘qÇTherefo˜re“the“ les“should“bGe“p˜ropGerly“closed.ަ‘ôž|ÞreadŽŽ‘šæÝThis–UUfunction“gets“data“from“the“ le.ަ‘ôž|ÞwriteŽŽ‘™ÝThis–UUfunction“adds“infoš¸ãrmation“to“the“ le“o˜r“replaces“info˜rmation“already“in“the“ le.ŽŸ"†“‘ôž|ëI9.1Ž‘„ßOps3ening–ffa“ leŽŸ‘ôž|ÝThe–€Ystanda¸ãrd“I/O‘€Nfunction“used“to“opšGen“a“ le“is“named“cop˜en().‘òÒThe“function“returns“a“handle“to“the“op˜ened“ le.Ž¡‘ôž|The–UUfunction“has“to“bGe“declaš¸ãred“as“follo˜ws:ŽŸä‘ôž|ãextern–?ýint“copen();ŽŸ¶w‘ž|ÝThe–UUfunction“has“t•¸ãw“o‘UUa“rguments:ŽŸ¶v‘ž{¸ŽŽŽ‘ ž|Ý le‘™˜‰ffŽ‘™šname–/is“the“staš¸ãrting“address“of“a“cha˜racter“string“describing“the“name“of“the“ le.‘·VThis“can“bGe“a“stringŽ¡‘ ž|constant–UUoš¸ãr“an“a˜rra˜y“name.ަ‘ž{¸ŽŽŽ‘ ž|ÝmošGde–UUwhich“describ˜es“the“action“that“should“b˜e“p˜erfo¸ãrming“on“the“ le.‘qÇThe“mo˜des“a¸ãre:ŽŸä‘Þ~Þ{ŽŽŽ‘#ž|Ýr–UUThe“ le“is“opGened“foš¸ãr“reading“sta˜rted“at“the“bGeginning“of“the“ le.Ž©[<‘Þ~Þ{ŽŽŽ‘#ž|Ýw–("The“ le“is“opšGened“fo¸ãr“writing;‘73it“is“assumed“that“the“ le“is“to“b˜e“created.‘b¶If“the“ le“do˜es“not“exist,‘1,it“isŽ¡‘#ž|created;‘TŸif–TCit“exists,‘Tzit“is“truncated“(size“of“the“ le“is“reduced“to“zero)“and“pšGositioned“at“the“b˜eginning“ofŽ¡‘#ž|the‘UU le.ަ‘Þ~Þ{ŽŽŽ‘#ž|Ýa–ŒcThe“ le“is“opšGened“fo¸ãr“writing.‘òThe“mo˜de“is“the“same“as“mo˜de“fo¸ãr“w“except“that“the“initial“p˜osition“isŽ¡‘#ž|at–UUthe“end“of“the“ le,“i.e.‘qÇthe“ le“is“not“truncated.ަ‘Þ~Þ{ŽŽŽ‘#ž|Ýr+–sThe“ le“is“opšGened“fo¸ãr“up˜date,‘*:i.e.‘_Ñthe“ le“is“op˜ened“fo¸ãr“reading“and“writing“and“is“not“truncated.‘_ÑTheŽ¡‘#ž|initial–UUpšGosition“is“at“the“b˜eginning“of“the“ le.ަ‘Þ~Þ{ŽŽŽ‘#ž|Ýw+–’ The“ le“is“opšGened“fo¸ãr“up˜date,‘¡6i.e.‘'äthe“ le“is“op˜ened“fo¸ãr“reading“and“writing“and“is“truncated,‘¡6if“theŽ¡‘#ž| le–UUalready“exists.›qÇIf“it“doGes“not“exist,“it“is“created.˜The“initial“pšGosition“is“at“the“b˜eginning“of“the“ le.ަ‘Þ~Þ{ŽŽŽ‘#ž|Ýa+–SßThe“ le“is“opšGened“fo¸ãr“up˜date,‘T*i.e.‘qJthe“ le“is“op˜ened“fo¸ãr“reading“and“writing“and“is“not“truncated“andŽ¡‘#ž|the–UUinitial“pGosition“is“at“the“end“of“the“ le.ŽŸä‘ž|The–UUfunction“returns“an“handle“(integer“numbšGer)“if“op˜ening“is“successful.‘qÇOtherwise“the“function“returns“æEOFÝ.ŽŽŸK’áw­²18ŽŽŒ‹Û6 ÀÙ ýÚÇ‘ôž|ëA9.2.‘ÇCLOSING–UUA“FILE’o=²19ŽŽ ÐÙ¸ ýK7‘ôž|ëI9.2Ž‘„ßClosing–ffa“ leŽ©8ä‘ôž|ÝIf–UUthe“access“to“a“ le“wš¸ãas“completed,“the“ le“should“bGe“closed.‘qÇThe“decla˜ration“of“the“function“is“as“follo˜ws:ޤ¾€‘ôž|ãextern–?ýint“cclose();Ž¡‘ž|ÝThe–@pa¸ãrgument“of“the“cclose()“function“is“the“return“value“from“the“copGen()“function“(the“handle).‘jÐThe“handle“isޤ ‘ôž|released.‘qÇIf–UUthe“p¸ãrogram“exits“without“closing“a“ le,“the“system“closes“automatically“the“opGened“ le.Ž¡‘ž|The–:Wreturn“values“aš¸ãre“0“that“means“a“successful“ le“closing“o˜r“æEOF‘:PÝthat“means“an“erro˜r“w˜as“encountered“duringŽ¡‘ôž|the–UUclosing“of“the“ le.ŽŸ!‚“‘ôž|ëI9.3Ž‘„ßReading–fffrom“a“ leަ‘ôž|ÝAs›ˆ“fa•¸ãr,‘±‡w“e˜have˜only˜used˜the˜cscanf()˜function.–-‡Another˜function˜that˜can˜bGe˜used˜is˜cgetc()˜function.“The˜pa¸ãrameterŽ¡‘ôž|of–þ3the“function“is“an“integer“numbGer“(handle),‘ which“wš¸ãas“returned“b˜y“a“copGen()“function.‘T¼The“cgetc()“function“readsŽ¡‘ôž|a–UUchaš¸ãracter“from“the“ le“which“is“pGointed“b˜y“the“handle.‘qÇThe“function“cgetc()“is“decla˜red“as“follo˜ws:ޤ¾€‘ôž|ãextern–?ýint“cgetc();Ž¡‘ž|ÝThis–UUfunction“returns“an“æEOF“Ýchaš¸ãracter“when“an“erro˜r“oGccurred“o˜r“at“the“end-of- le.ŽŸ!‚“‘ôž|ëI9.4Ž‘„ßW‘þ¦friting–ffto“a“ leަ‘ôž|ÝIn–|Æthe“pš¸ãrevious“sections“w˜e“only“write“to“the“æstdout“Ývia“the“cp˜rintf()“function.‘èAnalogous“function“to“the“cgetc()“isŽŸ ‘ôž|a–UUfunction“cputc().‘qÇThe“function“is“decla¸ãred:Ž¡‘ôž|ãextern–?ýint“cputc();Ž¡‘ž|ÝThe–UUfunction“writes“a“cha¸ãracter“into“the“ le.‘qÇOn“failure,“the“function“returns“an“æEOFÝ.ŽŸ!‚“‘ôž|ëI9.5Ž‘„ßF‘þ¦functions–ffëJcscanf()“ëIand“ëJcp›¼rintf()ަ‘ôž|ÝThe–DÄfunctions“used“in“pš¸ãrevious“section“read“from“standa˜rd“input“and“wrote“to“standa˜rd“output.‘@Default“handlesޤ ‘ôž|foš¸ãr–AæstdinÝ,‘F{æstdout“Ýand“æstderr“Ýa˜re“0,1,2“respGectively‘ÿ*ª.‘´ŠThese“functions“can“read“from“o˜r“write“to“a“ le.‘´ŠAs“the“ rstŽ¡‘ôž|paš¸ãrameter–UUof“the“functions“is“used“a“handle“of“the“ le,“fo˜r“example:ŽŸ¾€¤ ‘ôž|ãfloat‘?ýf;Ž¡‘ôž|int‘?ýa,b;Ž¡¡‘ôž|extern–?ýint“cscanf“();Ž¡‘ôž|export_type–?ýextern“int“cprintf“();Ž¡¡‘ôž|extern–?ýint“cclose“();Ž¡‘ôž|extern–?ýint“copen“();Ž¡¡‘ôž|cscanf(0,"%f",f);Ž¡‘ôž|b=copen("test_file","w");ޤ *«‘ôž|cprintf(1,"handle–?ý=“%d\n",b);Ž¡‘ôž|cprintf(b,"‘?ýf=%f\n",f);Ž¡‘ôž|cscanf(0,"%d",a);Ž© ‘ôž|cprintf(b,"integer–?ývalue“=“%d\n",a);Ž¡‘ôž|cclose(b);ަ‘ôž|cprintf(1,"%s\n","I–?ýam“a“string");ަ‘ôž|exit;ŽŸ¾€‘ž|ÝThe–x*second“paš¸ãrameter“in“the“cscanf()“function“is“a“fo˜rmat“string“and“the“third“pa˜rameter“is“a“va˜riable“name“fo˜rޤ ‘ôž|sto¸ãring–UUthe“input.Ž¡‘ž|The–!second“paš¸ãrameter“of“the“cp˜rintf()“function“is“a“fo˜rmat“string“and/o˜r“string“constant“and“the“third“pa˜rameterŽ¡‘ôž|is–UUa“vaš¸ãriable“name“fo˜r“output.Ž¡‘ž|The–UUfolloš¸ãwing“list“describGes“valid“fo˜rmat“strings:ŽŸ¾‘ôž|ÞdŽŽÝthe–UUinput/output“ eld“is“a“decimal“integer;“the“coš¸ãrrespGonding“va˜riable“name“must“pGoint“to“the“integerŽŽŽŒ‹èS ÀÙ ýÚÇ‘ôž|ëA9.5.‘ÇFUNCTIONS–UUÝCSCANF()“ëAAND“ÝCPRINTF()’`x²20ŽŽ ÐÙ¸ ýK7‘ôž|ÞuŽŽÝthe–×Vinput/output“ eld“is“a“decimal“integer;‘Wthe“coš¸ãrrespGonding“va˜riable“name“must“pGoint“to“the“integer;‘Wvalue“isŽ© ‘ ž|unsignedޤ‘ôž|ÞoŽŽ‘ÿ^zÝthe–UUinput/output“ eld“is“a“ošGctal“integer;“the“co¸ãrresp˜onding“va¸ãriable“name“must“p˜oint“to“the“integerŽ¡‘ôž|ÞxŽŽ°AÝthe–UUinput/output“ eld“is“a“hexadecimal“integer;“the“coš¸ãrrespGonding“va˜riable“name“must“pGoint“to“the“integerŽ¡‘ôž|Þe,f,gŽŽ‘ŠçÝthe–têinput/output“ eld“is“an“optionally“signed“string“of“digits.‘ІThe“ eld“maš¸ãy“contain“a“radix“cha˜racter“and“anަ‘ ž|expšGonent–I eld“b˜egins“with“a“letter“E‘;oš¸ãr“e,‘›Ffollo˜w˜ed“b˜y“an“optional“sign“o˜r“space“and“an“integer.‘¤The“va˜riableަ‘ ž|must–SšpšGoint“to“the“ oating“p˜oint“vaš¸ãriable.‘l•If“y˜ou“spGecify“l,‘“+the“va˜riable“must“pGoint“to“the“double“p˜recisionަ‘ ž|va¸ãriable.Ž¡‘ôž|ÞsŽŽ‘þ'¸Ýthe–input/output“ eld“is“a“chaš¸ãracter“string.‘«!The“va˜riable“must“pGoint“to“an“a˜rra˜y“of“cha˜racters“la˜rge“enough“toަ‘ ž|contain–?$the“string“and“a“termination“chaš¸ãracter“(¸n²0Ý).‘/3The“cscanf()“function“adds“the“termination“cha˜racterަ‘ ž|automatically‘ÿ*ª.‘qnA‘TIwhite-space–TJcha¸ãracter“terminates“the“input“string,‘Tso“the“input“string“cannot“contain“spaces.Ž¡‘ôž|ÞcŽŽ‘þºìÝthe–Yúinput/output“ eld“is“a“chaš¸ãracter“o˜r“cha˜racter“string.‘·The“va˜riable“must“pGoint“to“either“a“cha˜racter“va˜riable“o˜rަ‘ ž|a–UUchaš¸ãracter“a˜rra˜y‘ÿ*ª.ŽŽŽŒ‹ô ÀÙ ýÚÇ ÐÙ¸ ý–F‘ôž|ÚChapter‘Ç 10ŽŸ2‘ôž|ÜGraphics‘ T{in‘ÿ8õterfaceŽŸ4‘ôž|ÝSo–³xfaš¸ãr,‘Ëthe“sample“p˜rograms“have“written“data“to“the“standa˜rd“output“in“the“numerical“fo˜rm.‘Œ/The“interp˜reter“alsoޤ ‘ôž|pš¸ãrovides–Ñúgraphics“outputs.‘çµCertain“t˜ypGe“of“graphics“functions“is“included“in“the“interp˜reter.‘çµA‘ÑÚcall“to“the“graphicsŽ¡‘ôž|functions–UUresults“in“establishment“of“a“channel.‘qÇAccess“to“channels“generally“requires“four“basic“opGerations:Ž¡Ÿ<‘ôž|ÞopQÇenŽŽ‘¼­ÝFirst–UUchannel“should“bšGe“op˜ened“which“allo¸ãws“access“to“the“other“graphics“functions.Ž©<‘ôž|ÞcloseŽŽ‘{@ÝThis–>äterminates“access“to“the“channel.›jLWhen“the“access“to“the“channel“is“complete,‘Cait“should“bGe“closed.˜TheŽ¡‘ ž|numbšGer–UUof“channels“that“can“simultaneously“b˜e“op˜ened“is“limited.ަ‘ôž|ÞwriteŽŽ‘™ÝThis–UUadds“data“to“the“channel.ަ‘ôž|Þ ushŽŽ‘R\ÝThis–UU ushes“all“data“from“the“channel“to“the“output“device.ŽŸ!ßé‘ôž|ëI10.1Ž‘!žxOps3ening–ffa“cŒÌhannelŽŸU;‘ôž|ÝThe–oËgraphics“interface“function“used“to“opšGen“a“channel“is“named“chop˜en().‘Á(It“returns“a“integer“numb˜er“-“handle,‘vhifŽ¡‘ôž|opšGening–0%succeeds;‘<Šotherwise“it“returns“-1.‘ebThe“handle“must“b˜e“saved;‘<Šall“other“graphics“functions“require“the“handleŽ¡‘ôž|as–UUan“a¸ãrgument.‘qÇThe“chopšGen()“function“should“b˜e“declaš¸ãred“as“follo˜ws:ŽŸK‘ôž|ãextern–?ýint“chopen("arguments");ŽŸ<‘ž|ÝThis–„function“creates“a“windoš¸ãw“fo˜r“a“graphics“output.‘þ This“must“bšGe“done“b˜efoš¸ãre“attempts“a˜re“made“to“write“inŽ¡‘ôž|to–UUthe“channel.ŽŸ ‘ž|The–UUchopGen()“has“the“folloš¸ãwing“a˜rguments“(a˜rguments“a˜re“in“the“fo˜rm“of“sublanguage):ŽŸ<‘ôž|Þ eldsŽŽ‘eêÝThis–±¥reco¸ãrd“is“compulsive.‘;7This“is“an“integer“numbšGer“which“sp˜eci es“numb˜er“of“reco¸ãrds“written“to“the“channel.Ž¡‘ ž|The–UUother“a¸ãrguments“have“their“default“values.ަ‘ôž|Þst®9yleŽŽ‘ײÝThis–UUspšGeci es“the“t¸ãyp˜e“and“path“(attributes)“of“the“draš¸ãwn“object.‘qÇThe“st˜yle“is“a“pšGositive“integer“numb˜er.ަ‘ôž|Þlo•®9w“erŽŽ‘<­ÝThis–UUdenotes“lo•¸ãw“er›UUbGounda“ry˜of˜the˜dra“wn˜object.ަ‘ôž|ÞuppQÇerŽŽ‘¬ÝThis–UUdenotes“uppšGer“b˜oundaš¸ãry“of“the“dra˜wn“object.ަ‘ôž|Þprin®9t‘°¡‰ffs4Ž‘#ÕformatŽŽ‘8DÝThe–UUavailable“values“a¸ãre“pGoint“and“line.‘qÇDefault“is“line.ަ‘ôž|Þstart‘°¡‰ffs4Ž‘#ÕtimeŽŽ‘,)ÝInitial–ësetup“of“the“time.‘ 4JThe“available“values“aš¸ãre“automatic“and“an“a˜rbitra˜ry“real“numbGer.‘ 4JTheŽ¡‘ ž|automatic–\means“that“the“windoš¸ãw“is“clea˜red“when“the“output“reaches“the“right“end“of“the“windo˜w.‘\tNew“initialŽ¡‘ ž|time–UUcontinues“at“the“end“value“of“the“time“in“pš¸ãrevious“windo˜w.‘qÇDefault“value“is“0.0.ަ‘ôž|Þduration‘°¡‰ffs4Ž‘#ÕtimeŽŽ‘?0sÝThis–)ûmeans“a“length“of“the“windoš¸ãw,‘2¦i.e.‘cTthe“numbGer“of“the“reco˜rds“contained“in“the“windo˜w“in“theŽ¡‘ ž|vertical–¬direction.‘wwThe“available“values“aš¸ãre“automatic“and“an“a˜rbitra˜ry“real“numbGer.‘wwThe“automatic“means“ifŽ¡‘ ž|the–ïŠoutput“reaches“the“right“end“of“the“windoš¸ãw“then“output“is“redra˜wn,‘æi.–OÙe.“the–ïŠduration‘™˜‰ffŽ‘™štime“size“is“changed.Ž¡‘ ž|Default–UUvalue“is“1000.0.ަ‘ôž|Þw‘°¡‰ffs4Ž‘#ÕresolutionŽŽ‘7¿ ÝThis–UUspGeci es“the“size“of“the“windoš¸ãw.‘qÇThe“default“value“is“256“b˜y“256“pixels.ŽŽŸK’áw­²21ŽŽŒ‹úРÀÙ ýÚÇ‘ôž|ëA10.2.‘ÇCLOSING–UUA“CHANNEL’O'§²22ŽŽ ÐÙ¸ ýK7‘ôž|Þt®9ypQÇeŽŽ‘ÒÝThis–ƒhspšGeci es“if“the“alphanumeric“windo¸ãw“should“b˜e“created“as“wš¸ãell.‘+ÎThe“available“values“a˜re“alpha“and“graphic.ޤ ‘ ž|Default–UUvalue“is“the“graphic.ŽŸÿh‘ôž|ÞOnLea•®9v“eWŽŽ‘1½ÝThe–—Êpaš¸ãrameter“spGeci es“if“the“interp˜reter“should“bšGe“stopp˜ed“temp˜o•¸ãra“rily–—Êwhen“enriches“the“right“endŽ¡‘ ž|of–UUthe“windoš¸ãw.‘qÇThe“available“values“a˜re“nošGevent“and“susp˜end.‘qÇThe“default“value“is“the“no˜event.Ž©þ†‘ž|The–åÅrecoš¸ãrds“a˜re“sepa˜rated“b˜y“a“backslash“immediately“follo˜w˜ed“b˜y“a“newline.‘L—The“ rst“reco˜rd“should“bGe“the“ elds.Ž¡‘ôž|The–UUother“recoš¸ãrds“can“bGe“a˜rbitra˜rily“o˜rdered.ŽŸ!õ‘ôž|ëI10.2Ž‘!žxClosing–ffa“cŒÌhannelŽŸ8ä‘ôž|ÝWhen–{¢the“p¸ãrogram“has“completed“its“use“of“a“channel,‘…6the“channel“should“bGe“closed“using“chclose()“function.‘ä¯ThisŽ¡‘ôž|function–UUis“declaš¸ãred“as“follo˜ws:ަ‘ôž|ãextern–?ývoid“chclose();ަ‘ž|ÝThis–¨Ž¦‘ž|ÝWhere–trthe“µ<ÝnumbšGerµ>“Ýis“a“p˜ositive“numb˜er.‘ÏA‘tjuser,›|9at“any“interrupt“level,˜can“do“anything“what“is“available“inŽŸ ‘ôž|the–UUinterpš¸ãreter.‘qÇT‘ÿ*ªo“resume“the“run“of“the“interp˜reter“a“user“should“write“the“follo˜wing“statement:Ž¡‘ôž|ãresume;ަ‘ž|Ýo•¸ãr›UUp“ress˜the˜k“ey˜DC4˜(Ctrl-t).‘qÇThe˜interp“reter˜is˜then˜echoGed:Ž¡‘ôž|ãclif–?ýinterrupt“level“-1ަ‘ž|Ýwhich–¨means“that“the“interrupt“level“is“decreased.›iöThe“lo•¸ãw“est–¨interrupt“level“is“zero.˜An“example“of“use“of“theŽŸ ‘ôž|synchronous–UUinterrupt“follo¸ãws:ŽŸ¼‘ôž|ãint‘?ýa,n;ޤ ‘ôž|extern–?ýint“cscanf();Ž¡‘ôž|export_type–?ýextern“int“cprintf();Ž© *«‘ôž|int–?ýfakt(int“n)Ž¡‘ôž|{Ž¡‘ôž|csuspend;ަ‘ôž|if(n==1)Ž¡‘žd{Ž¡‘ždreturn(1);Ž¡‘žd}Ž¡‘ôž|elseŽ¡‘žd{Ž¡‘ždreturn(fakt(n-1)*n);Ž¡‘žd}Ž¡‘ôž|}Ž¡‘ôž|cprintf(1,"input–?ýn“%d\n",n);ަ‘ôž|cscanf(0,"%d",n);Ž¡‘ôž|csuspend;ަ‘ôž|a=fakt(n);Ž¡‘ôž|cprintf(1,"factorial–?ý=“%d\n",a);Ž¡‘ôž|exit;ŽŽŸK’áw­²24ŽŽŒ‹› ÀÙ ýÚÇ‘ôž|ëA11.2.‘ÇASYNCHR•¸ãONOUS‘UUINTERR“UPT’&òN²25ŽŽ ÐÙ¸ ýK7‘ôž|ëI11.2Ž‘!žxAsync•ŒÌhronous‘ffin“terruptŽŸ8ä‘ôž|ÝAn–asynchronous“interrupt“can“bGe“invokš¸ãed“b˜y“the“user“with“p˜ressing“the“k˜ey“Ctrl-t“while“the“virtual“machine“of“theŽ© ‘ôž|interpš¸ãreter–UUis“running.‘qÇA“dummy“p˜rogram“in“which“a“user“can“follo˜w“the“use“of“asynchronous“interrupt“is:ŽŸ‘ôž|ãextern–?ýint“cscanf();ޤ ‘ôž|export_type–?ýextern“int“cprintf();Ž¡¡‘ôž|int‘?ýi;Ž¡‘ôž|for(i=0;i<100000;++i)Ž¡‘žd{Ž¡‘ždcprintf(1,"%d",i);ŽŸ *«‘žd}Ž¡‘ôž|cprintf(1,"%s\n","loop–?ýis“over");Ž¡‘ôž|exit;Ž¡Ÿ‘ž|ÝAfter–:«making“statements“requested“bš¸ãy“the“user,‘tthe“further“p˜rošGcessing“can“b˜e“invokš¸ãed“as“b˜y“the“synchronousަ‘ôž|interrupt–UUwith“pš¸ãressing“Ctrl-t“o˜r“t˜yping“resume.ŽŽŽŒ‹8 ÀÙ ýÚÇ ÐÙ¸ ý–Ç‘ôž|ÚChapter‘Ç 12ŽŸ2V8‘ôž|ÜErrorsŽŸ:V8‘ôž|ëI12.1Ž‘!žxëJClif–³/erro›¼r“messagesŽŸÛ¿‘ôž|ÝIn–UUthis“chapter“is“a“list“of“Clif“erro¸ãr“messages.ŽŸG.‘ôž|Ä12.1.1Ž‘$ž|Syn tax–€error“messagesŽŸM…¤ ¡‘ žpãcase‘?ý1000:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,Ž© *«‘ôž|"variable–?ý`%s'“isn't“declared\n",Ž¡‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1001:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"variable–?ý`%s'“was“already“declared\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1002:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"remote–?ýprocedure“%s“is“not“declared\n",ަ‘ôž|proc_name_text[proc]);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1003:Ž¡‘jERROR_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"local–?ývariable“`%s'“was“already“declared\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1004:Ž¡‘jprint_source_line‘?ý();ަ‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"at–?ýthe“%d-th“char,“near“the“`%s'\n",Ž¡‘ôž|char_counter,‘?ýyytext);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1005:Ž¡‘jprint_source_line‘?ý();ަ‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"invalid–?ýtype“of“the“operand,“%d-th“character\n",ަ‘ôž|char_counter);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1006:Ž¡‘jERROR_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"remote–?ýfunction“`%s'“already“declared\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1007:Ž¡‘jERROR_FULL_INFO(line_counter);ŽŽŸK’áw­²26ŽŽŒ‹ ’ ÀÙ ýÚÇ‘ôž|ëA12.1.‘ÇÝCLIF–UUERROR“MESSA¸ãGES’OK.²27ŽŽ ÐÙ¸ ýK7‘jãfprintfx‘?ý(stderr,Ž© *«‘ôž|"remote–?ýfunction“isn't“declared\n");ޤ ‘jbreak;Ž¡‘ žpcase‘?ý1008:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"remote–?ýfunctions“are“not“in“the“load“table\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1009:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"`void'–?ýtype“in“expression\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1010:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"`void'–?ýtype“assigned“to“l_value\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1011:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"load–?ýcan't“open“file“`%s'\n",ަ‘ôž|yytext);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1012:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"variable–?ýor“field“`%s'“declared“void\n",Ž¡‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1013:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"switch–?ýquantity“not“an“integer\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1014:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"case–?ýlabel“does“not“reduce“to“an“integer“constant\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1015:Ž¡‘jERROR_FULL_INFO(tmp_c->line_number);ަ‘jfprintfx‘?ý(stderr,ަ‘ôž|"duplicate–?ýcase“value\n");ަ‘jERROR_FULL_INFO(tmp_m->line_number);ަ‘jfprintfx‘?ý(stderr,ަ‘ôž|"this–?ýis“the“first“entry“for“that“value\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1016:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"case–?ýlabel“not“within“a“switch“statement\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1017:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"struct–?ýtag“`%s'“was“already“declared\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1018:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"union–?ýtag“`%s'“was“already“declared\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1019:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"enum–?ýtag“`%s'“was“already“declared\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1020:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"conversion–?ýto“non-scalar“type“requested\n");ŽŽŽŒ‹& ÀÙ ýÚÇ‘ôž|ëA12.1.‘ÇÝCLIF–UUERROR“MESSA¸ãGES’OK.²28ŽŽ ÐÙ¸ ýK7‘jãbreak;ޤ ‘ žpcase‘?ý1021:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,Ž© *«‘ôž|"invalid–?ýtype“argument“of“`->'\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1022:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"invalid–?ýlvalue“in“unary“`&'\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1023:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"storage–?ýsize“of“`%s'“isn't“known\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý1024:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"parameter–?ý`%s'“has“incomplete“type\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡¡ŸªY‘ôž|Ä12.1.2Ž‘$ž|ó‚ÎR6 cmss12ÇClif–ê¨compilation“erro¬rr“messagesŽŸȽ¡‘ žpãcase‘?ý2000:Ž¡‘jprint_source_line‘?ý();ަ‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"invalid–?ýnumber“of“subscripts\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý2001:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"`%s'–?ýis“not“an“array“variable\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý2002:Ž¡‘jprint_source_line‘?ý();ަ‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"invalid–?ýtype“of“array“subscript\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý2003:Ž¡‘jprint_source_line‘?ý();ަ‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"type–?ýof“formal“parameter“does“not“match“previous“declaration\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý2004:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"number–?ýof“formal“parameters“does“not“match“previous“declaration\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý2005:Ž¡‘jprint_source_line‘?ý();ަ‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"name–?ýof“formal“paramter“does“not“match“previous“declaration\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý2006:Ž¡‘jprint_source_line‘?ý();ަ‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"size–?ýof“array“subscript“of“formal“parameter“does“not“match“previous“declaration\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý2007:Ž¡‘jprint_source_line‘?ý();ަ‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ŽŽŽŒ‹/ž ÀÙ ýÚÇ‘ôž|ëA12.1.‘ÇÝCLIF–UUERROR“MESSA¸ãGES’OK.²29ŽŽ ÐÙ¸ ýK7‘ôž|ã"number–?ýof“array“subscripts“of“formal“parameter“does“not“match“previous“declaration\n");ޤ ‘jbreak;Ž¡‘ žpcase–?ý2008“:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,Ž© *«‘ôž|"structure–?ýhas“no“member“named“`%s'\n",Ž¡‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý2009:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"request–?ýfor“member“`%s'“in“something“not“a“structure“or“union\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡¡Ÿ5›‘ôž|Ä12.1.3Ž‘$ž|ÇClifŽŸ‘ žpãcase‘?ý3000:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"`break'–?ýoutside“loop“or“switch\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý3001:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"bad–?ýused“`continue'\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý3002:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"default–?ýlabel“not“within“a“switch“statement\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý3003:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"multiple–?ýdefault“labels“in“one“switch\n");ަ‘jERROR_FULL_INFO(fixp->switch1.def_use.line_number);ަ‘jfprintfx‘?ý(stderr,ަ‘ôž|"this–?ýis“the“first“default“label\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý3004:Ž¡‘jERROR_FULL_INFO(line_counter);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"duplicate–?ýlabel“`%s'\n",ަ‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý3005:Ž¡‘jERROR_FULL_INFO(error_line_number);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"label–?ý`%s'“used“but“not“defined\n",Ž¡‘ôž|text);Ž¡‘jbreak;Ž¡‘ žpcase‘?ý3006:Ž¡‘jERROR_FULL_INFO(error_line_number);Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"invalid–?ýlvalue“in“assignment\n");Ž¡‘jbreak;Ž¡¡Ÿ5›‘ôž|Ä12.1.4Ž‘$ž|ÇClif–ê¨run-time“erro¬rr“messagesŽŸ¡‘ žpãcase‘?ý4000:Ž¡‘jERR_NO_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"interpreter:–?ýfull“memory\n");Ž¡‘jbreak;Ž¡‘ žpcase‘?ý4001:Ž¡‘jERR_NO_INFO;ŽŽŽŒ‹8j ÀÙ ýÚÇ‘ôž|ëA12.1.‘ÇÝCLIF–UUERROR“MESSA¸ãGES’OK.²30ŽŽ ÐÙ¸ ýK7‘jãfprintfx‘?ý(stderr,Ž© *«‘ôž|"interpreter:–?ýstack“overflow\n");ޤ ‘jbreak;Ž¡‘ žpcase‘?ý4002:Ž¡‘jERR_NO_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"operating–?ýsystem“out“of“memory\n");Ž¡‘jbreak;Ž¡Ÿb‰‘ôž|Ä12.1.5Ž‘$ž|ÇClif–ê¨fatal“erro¬rr“messagesŽŸW¡¡‘ žpãcase‘?ý5000:Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"Compile–?ýFatal“");Ž¡‘jERR_NO_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"Interpreter–?ýInternal“Error“(unknown“operand“type)“in“line“%d“e-mail:“%s\n",ަ‘ôž|line_counter,‘?ýEMAIL);Ž¡‘jprint_source_line‘?ý();Ž¡‘jbreak;Ž¡‘ žpcase‘?ý5001:Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"Run-time–?ýFatal“");Ž¡‘jERR_NO_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"–?ýInternal“Interpreter“Error“(unknown“instruction)“e-mail:“%s\n",ަ‘ôž|EMAIL);Ž¡‘jprint_source_line‘?ý();Ž¡‘jbreak;Ž¡‘ žpcase‘?ý5002:Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"Compile–?ýFatal“");Ž¡‘jERR_NO_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"–?ýInterpreter“Internal“Error“(error“in“book-keeping)“in“line“%d“e-mail:“%s\n",ަ‘ôž|line_counter,‘?ýEMAIL);Ž¡‘jprint_source_line‘?ý();Ž¡‘jbreak;Ž¡‘ žpcase‘?ý5003:Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"Compile–?ýFatal“");Ž¡‘jERR_NO_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"–?ýInternal“Interpreter“Error“(error“in“operand“type)“in“line“%d“e-mail:“%s\n",ަ‘ôž|line_counter,‘?ýEMAIL);Ž¡‘jprint_source_line‘?ý();Ž¡‘jbreak;Ž¡¡Ÿb‰‘ôž|Ä12.1.6Ž‘$ž|ÇClif›ê¨w•¬ra“rning˜messagesŽŸW¡¡‘ žpãcase‘?ý6000:Ž¡‘jif‘?ý(warning_yes)ަ‘ôž|{Ž¡‘ÿvERROR_FULL_INFO(line_counter);Ž¡‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"remote–?ýfunction“%s“already“declared\n",ަ‘ žptext);Ž¡‘ôž|}Ž¡‘jreturn;Ž¡‘ žpcase‘?ý6001:Ž¡‘jif‘?ý(warning_yes)ަ‘ôž|{Ž¡‘ÿvERROR_FULL_INFO(line_counter);Ž¡‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"`return'–?ýwith“no“value,“in“function“returning“non-void\n");ަ‘ôž|}ŽŽŽŒ‹@D ÀÙ ýÚÇ‘ôž|ëA12.1.‘ÇÝCLIF–UUERROR“MESSA¸ãGES’OK.²31ŽŽ ÐÙ¸ ýK7‘jãreturn;ޤ ‘ žpcase‘?ý6002:Ž¡‘jif‘?ý(warning_yes)Ž© *«‘ôž|{Ž¡‘ÿvERROR_FULL_INFO(line_counter);Ž¡‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"`return'–?ýwith“a“value,“in“function“returning“void\n");ަ‘ôž|}Ž¡‘jreturn;Ž¡‘ žpcase‘?ý6003:Ž¡‘jif‘?ý(warning_yes)ަ‘ôž|{Ž¡‘ÿvif‘?ý(proc)ަ‘ žp{Ž¡‘jprint_file_name‘?ý();ަ‘jfprintfx‘?ý(stderr,ަ‘ôž|"–?ýIn“function“`%s':",Ž¡‘ôž|proc_name_text[proc]);Ž¡‘jERROR_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"unused–?ývariable“`%s'\n",Ž¡‘ôž|text);Ž¡‘ žp}Ž¡‘ÿvelseŽ¡‘ žp{Ž¡‘jprint_file_name‘?ý();ަ‘jfprintfx‘?ý(stderr,ަ‘ôž|"–?ýIn“block“finishing“at“line“%d:\n",ަ‘ôž|line_counter);Ž¡‘jERROR_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"unused–?ývariable“`%s'\n",Ž¡‘ôž|text);Ž¡‘ žp}Ž¡‘ôž|}Ž¡‘jreturn;Ž¡‘ žpcase‘?ý6004:Ž¡‘jif‘?ý(warning_yes)ަ‘ôž|{Ž¡‘ÿvERROR_FULL_INFO(error_line_number);Ž¡‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"label–?ý`%s'“defined“but“not“used\n",Ž¡‘ žptext);Ž¡‘ôž|}Ž¡‘jreturn;Ž¡‘ žpcase‘?ý6005:Ž¡‘jif‘?ý(warning_yes)ަ‘ôž|{Ž¡‘ÿvERROR_INFO;Ž¡‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"–?ý`/*'“within“comment\n");Ž¡‘ôž|}Ž¡‘jreturn;Ž¡‘ žpcase‘?ý6006:Ž¡‘jif‘?ý(warning_yes)ަ‘ôž|{Ž¡‘ÿvif‘?ý(proc)ަ‘ žp{Ž¡‘jprint_file_name‘?ý();ަ‘jfprintfx‘?ý(stderr,ަ‘ôž|"–?ýIn“function“`%s':",Ž¡‘ôž|proc_name_text[proc]);Ž¡‘jERROR_INFO;Ž¡‘jfprintfx‘?ý(stderr,ަ‘ôž|"`%s'–?ýmight“be“used“uninitialized“in“this“function\n",ަ‘ôž|text);Ž¡‘ žp}Ž¡‘ÿvelseŽ¡‘ žp{Ž¡‘jprint_file_name‘?ý();ަ‘jfprintfx‘?ý(stderr,ަ‘ôž|"–?ýIn“block“finishing“at“line“%d:",ަ‘ôž|line_counter);Ž¡‘jERROR_INFO;ŽŽŽŒ‹ Gï ÀÙ ýÚÇ‘ôž|ëA12.1.‘ÇÝCLIF–UUERROR“MESSA¸ãGES’OK.²32ŽŽ ÐÙ¸ ýK7‘jãfprintfx‘?ý(stderr,ޤ *«‘ôž|"`%s'–?ýmight“be“used“uninitialized“in“the“block\n",Ž¡‘ôž|text);ޤ ‘ žp}Ž¡‘ôž|}Ž¡‘jreturn;Ž¡‘ žpcase‘?ý6007:Ž¡‘jif‘?ý(warning_yes)Ž© *«‘ôž|{Ž¡‘ÿvprint_file_name‘?ý();ަ‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"–?ýIn“function“`%s':",Ž¡‘ žpproc_name_text[proc]);Ž¡‘ÿvERROR_INFO;Ž¡‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"number–?ýof“locals“is“greater“than“the“ANSI“allows\n");ަ‘ôž|}Ž¡‘jreturn;Ž¡‘ žpcase‘?ý6008:Ž¡‘jif‘?ý(warning_yes)ަ‘ôž|{Ž¡‘ÿvprint_file_name‘?ý();ަ‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"–?ýIn“function“`%s':\n",Ž¡‘ žpproc_name_text[proc]);Ž¡‘ÿvERROR_INFO;Ž¡‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"number–?ýof“params“is“greater“than“the“ANSI“allows\n");ަ‘ôž|}Ž¡‘jreturn;Ž¡‘ žpcase‘?ý6009:Ž¡‘jif‘?ý(warning_yes)ަ‘ôž|{Ž¡‘ÿvchar–?ý*tmp_line,“*beg,“*end,“*com;Ž¡‘ÿvint‘?ýn;Ž¡‘ÿvn–?ý=“strlen(line_buf);Ž¡‘ÿvtmp_line–?ý=“malloc(n+1);ަ‘ÿvif–?ý(NULL“==“tmp_line)ަ‘ žp{Ž¡‘jperror‘?ý("");ަ‘jabort‘?ý();Ž¡‘ žp}Ž¡¡‘ÿvstrcpy–?ý(tmp_line,“line_buf);ަ‘ÿvbeg–?ý=“strrchr“(tmp_line,“'(');ަ‘ÿvif–?ý(NULL“==“beg)ަ‘ žp{Ž¡‘jperror‘?ý("");ަ‘jabort‘?ý();Ž¡‘ žp}Ž¡¡‘ÿvbeg++;ަ‘ÿvcom–?ý=“strrchr“(beg,“',');ަ‘ÿvif–?ý(NULL“!=“com)Ž¡‘ žpbeg–?ý=“com“+“1;ަ‘ÿvfor–?ý(;“*beg“==“'“'“||“*beg“==“'\t';“beg++);Ž¡¡‘ÿvend–?ý=“strrchr“(beg,“'“');ަ‘ÿvcom–?ý=“strchr“(beg,“'“');ަ‘ÿvif–?ý(end“!=“com)Ž¡‘ žp*end–?ý=“'\0';Ž¡‘ÿvelseŽ¡‘ žptmp_line[n–?ý-“1]“=“'\0';Ž¡¡‘ÿvERROR_INFO;Ž¡‘ÿvfprintfx‘?ý(stderr,ަ‘ žp"`%s'–?ýdeclared“inside“parameter“list“its“scope“is“only“this“definition“or“declaration,“which“is“probably“not“what“you“want.\n",ަ‘ žpbeg);ަ‘ÿvfree‘?ý(tmp_line);ަ‘ôž|}Ž¡‘jreturn;Ž¡¡ŽŽŒ‹!NÌ ÀÙ ýÚÇ‘ôž|ëA12.1.‘ÇÝCLIF–UUERROR“MESSA¸ãGES’OK.²33ŽŽ ÐÙ¸ ýK7‘ôž|Ä12.1.7Ž‘$ž|ÇClif–ê¨initialization“erro¬rr“messagesŽŸªª¤ ¡‘ žpãcase‘?ý7000:Ž¡‘jprint_error_number‘?ý(err_no);ޤ *«‘jfprintfx‘?ý(stderr,Ž¡‘ôž|"in–?ýrun-string“and/or“in“`clif.ini'“file\n");ޤ ‘jbreak;Ž¡‘ žpcase‘?ý7001:Ž¡‘jprint_error_number‘?ý(err_no);ޤ *«‘jfprintfx‘?ý(stderr,Ž¡‘ôž|"interpreter:–?ýcan't“open“file“%s\n",Ž¡‘ôž|argvv[argc_counter]);ޤ ‘jbreak;Ž¡‘ žpdefault:Ž¡‘jfprintfx–?ý(stderr,“"Fatal“error“invalid“error“number“(%d)“e-mail:“%s\n",“err_no,“EMAIL);Ž¡‘jbreak;Ž¡¡ŽŽŒ‹"V ÀÙ ýÚÇ ÐÙ¸ ý›7‘ôž|ÜBibliograph‘ÿ8õyŽŸ5Vw‘ùž}Ý[1]ŽŽ‘ ešA.–UUV.“Aho“and“S.“C.“Johnson.›nïLR“pa¸ãrsing.˜æComputing‘“çSurveysÝ,“6(2),“June“1974.ޤ‘ùž}[2]ŽŽ‘ ešA.–SãV.“Aho,›T-R.“Sethi,˜and“J.“D.“Ullman.‘l”æCompilers.–’’Principles,‘’ÖT›ÿ;¼e‘ÿ}'chniques“and“T˜o‘ÿ}'olsÝ.‘l”Addison-W¸ãesley‘ÿ*ª,‘T-1986.Ž¡‘ùž}[3]ŽŽ‘ ešA.–ß$V.“Aho“and“J.“D.“Ullman.‘®FæThe–'+The›ÿ}'ory“of“Parsing,–<êT‘ÿ;¼r˜anslation,“and‘'+CompilingÝ,–öÇvolume›ß$1,“2.‘®FPrentice˜Hall,Ž© ‘ ešEnglew¸ão•Go“d–UUCli s,“1972,“1973.Ž¡‘ùž}[4]ŽŽ‘ ešS.›¯Bandy•¸ãopadhy“a“y‘ÿ*ª,‘ÞV.S.˜Begw“ani,‘Þand˜R.B.˜Murra“y‘ÿ*ª.‘´ÍCompiling˜fo“r˜the˜crisp˜p“roGcesso“r.‘´ÍIn˜æPr–ÿ}'o“c“e“e“dings–øof“theަ‘ ešIEEE–“çSpring,“COMPCONÝ,–UUpages“96{100,“1987.Ž¡‘ùž}[5]ŽŽ‘ ešA.D.–(/Berenbaum,›\åD.R.“Ditzel,˜and“H.R.“McLellan.›ãGIntroGduction“to“the“crisp“instruction“set“a¸ãrchitecture.˜Inަ‘ ešæPr–ÿ}'o“c“e“e“dings–“çof“the“IEEE“Spring,“COMPCONÝ,–UUpages“86{90,“1986.Ž¡‘ùž}[6]ŽŽ‘ ešA.D.–aBerenbaum,›JdD.R.“Ditzel,˜and“H.R.“McLellan.›·)Architectural“innovations“in“the“crisp“microp•¸ãroGcesso“r.˜Inަ‘ ešæPr–ÿ}'o“c“e“e“dings–“çof“the“IEEE“Spring,“COMPCONÝ,–UUpages“91{95,“1987.Ž¡‘ùž}[7]ŽŽ‘ ešJ.J.–UUDonga¸ãrra,“C.B.“Moler,“and“et“al.›nïæLINP‘ÿ;¼A¾“CK–“çUser's“GuideÝ.˜SIAM,–UUPhiladelphia,“1979.Ž¡‘ùž}[8]ŽŽ‘ ešD.‘UUGries.‘nïæKompil‘úãatory‘Rz›û$ýc‘þúP‘ûé@slic–ÿ}'ovßI‘ûGych‘“çp“o•¾“˜c‘þúP‘ûé@ta“˜covÝ.‘nïAlfa,‘UU1981.Ž¡‘ùž}[9]ŽŽ‘ ešD.G.–çKafura“and“R.G.“Lavender.›ÿcConcurrent“object-o¸ãriented“language“and“the“inheritance“anomaly‘ÿ*ª.˜In“æPr–ÿ}'o“c“e“e“d-ަ‘ ešings‘“çISIPCALA'93Ý,–UUpages“183{215,“Prague,“1993.Ž¡‘ôž|[10]ŽŽ‘ ešB.–UUW.“Kernighan“and“D.“M.“Ritchie.›nïæPr–ÿ}'o“gr“amovac‘þúP‘ûé@–“çjazyk“CÝ.˜Alfa,‘UU1988.Ž¡‘ôž|[11]ŽŽ‘ ešB.–0ÎSerpGette,›g¬J.“V¸ãuillemin,˜and“J.C.“Herv•¸ã‘ûGe.‘üøBigNum:‘(¹A‘0•pGo“rtable–0Îand“ecient“packš¸ãage“fo˜r“a˜rbitra˜ry-p˜recisionަ‘ eša•¸ãrithmetic.‘nïResea“rch›UUrepGo“rt,˜INRIA,˜1989.‘nïp“rep“rint.Ž¡‘ôž|[12]ŽŽ‘ šðŸý€Ž‘ ešL.–•Koš¸ãreU‘úêªn.‘,ÃSmall“interp˜reter“on“the“basis“of“C-language.‘,ÃT‘ÿ*ªechnical“repGo˜rt,‘¤õSlovak“T‘ÿ*ªechnical“Universit˜y‘ÿ*ª,‘¤õF˜acult˜yަ‘ ešof–UUMechanical“Engineering,“Bratislava,“1993.Ž¡‘ôž|[13]ŽŽ‘ ešN.‘UUWirth.›nïæA¾“lgoritmy‘“ça‘‘ûfhstrukt ¶–úÂÚury‘´“udajovÝ.˜Alfa,‘UU1989.ŽŽŸK’áw­²34ŽŽŒ‹#X— ÀÙ ýÚÇ ÐÙ¸ ý˜~ªŸì‘ôž|ÜIndexŽŽ gV ý¶~ª‘ôž|Ýalpha,‘UU22ޤ Ÿ‘ôž|a•¸ãrra“y‘ÿ*ª,–UU2,“13Ž¡‘ž|as–UUpa¸ãrameter,“13,“18Ž¡‘ž|element–UUof,“13Ž¡‘ž|internal–UUrep¸ãresentation“of,“13Ž¡‘ž|multidimensional,‘UU13Ž¡‘ž|onedimensional,‘UU13Ž¡‘ž|size–UUof,“13Ž¡‘ž|subscript,‘UU13Ž¡‘ž|subscripting,‘UU13Ž¡‘ôž|automatic,‘UU21Ž©Þø‘ôž|channel,‘UU21Ž¡‘ž|close,–UU21,“22Ž¡‘ž| ush,–UU21,“22Ž¡‘ž|opGen,‘UU21Ž¡‘ž|reco¸ãrd,–UU21,“22Ž¡‘ž|write,–UU21,“22Ž¡‘ôž|coGercion,‘UU3Ž¡‘ôž|command–UUline,“17Ž¡‘ôž|comment,‘UU1Ž¡‘ôž|constant,‘UU2Ž¡‘ž|cha¸ãr,‘UU2Ž¡‘ž|double,‘UU2Ž¡‘ž| oat,‘UU2Ž¡‘ž|int,–UU2,“13Ž¡‘ž|spGecialŽ¡‘ž|cha¸ãr,‘UU2Ž¡‘ž|string,‘UU2Ž¡‘ôž|Ctrl-t,–UU24,“25ަ‘ôž|dataŽ¡‘ž|access,‘UU18Ž¡‘ž|collected–UUin“channel,“22Ž¡‘ôž|default,–UU21,“22Ž¡‘ôž|dra¸ãwn–UUobject,“21Ž¡‘ôž|duration‘™˜‰ffŽ‘™štime,‘UU21ަ‘ôž|æEOFÝ,–UU18,“19Ž¡‘ôž|exp¸ãression,–UU7,“13ަ‘ôž| elds,–UU21,“22Ž¡‘ôž| le,–UU18,“19Ž¡‘ž|close,‘UU19Ž¡‘ž|opGen,‘UU18Ž¡‘ž|read,‘UU19Ž¡‘ž|write,‘UU19Ž¡‘ôž|opGen,‘UU17Ž¡‘ôž|functionŽ¡‘ž|a¸ãrgument,–UU18,“19ŽŽŽ ý¶~ª’ ÷®cclose(),‘UU19ޤ ’ ÷®cgetc(),‘UU19Ž¡’ ÷®chclose(),‘UU22Ž¡’ ÷®ch ush(),‘UU22Ž¡’ ÷®chopGen(),‘UU21Ž¡’ ÷®chwrite(),‘UU22Ž¡’ ÷®copGen(),–UU18,“19Ž¡’ ÷®cp¸ãrintf(),‘UU6Ž¡’ ÷®cp¸ãrintf(),–UU1,“8{11,“13,“19,“24,“25Ž¡’ ÷®cputc(),‘UU19Ž¡’ ÷®cscanf(),–UU1,“6,“10,“11,“19,“24Ž¡’ ÷®decla¸ãration,–UU10,“19Ž¡’ ÷®de nition,‘UU10Ž¡’ ÷®graphics,‘UU21Ž¡’ ÷®pa¸ãrameter,‘UU19Ž¡’ ÷®recursive,‘UU10Ž¡’ ÷®return,–UU18,“19Ž¡’ ÷®sin(),‘UU22ޤíè’÷÷®graphic,‘UU22Ž¡’÷÷®handle,–UU18,“19,“21,“22Ž¡’÷÷®inputޤ ’ ÷®standa¸ãrd,–UU17,“18Ž¡’÷÷®interp¸ãreterŽ¡’ ÷®memo•¸ãry›UUa“rea˜of,˜17Ž¡’ ÷®session,–UU1,“10,“12,“16Ž¡’÷÷®interruptŽ¡’ ÷®asynchronous,–UU24,“25Ž¡’ ÷®handling,‘UU24Ž¡’ ÷®level,‘UU24Ž¡’ ÷®synchronous,–UU24,“25Ž©íè’÷÷®line,‘UU21Ž¡’÷÷®loGop,‘UU7Ž¡’ ÷®in nite,‘UU7Ž¡’ ÷®initialization,‘UU7Ž¡’ ÷®initialize,‘UU7Ž¡’ ÷®statement,‘UU7Ž¡’÷÷®lo•¸ãw“er,‘UU21ަ’÷÷®memo¸ãry‘ÿ*ª,‘UU17ަ’÷÷®noGevent,‘UU22Ž¡’÷÷®notationŽ¡’ ÷®p¸ãre x,‘UU3ަ’÷÷®OnLeaveW,‘UU22Ž¡’÷÷®opGerationŽ¡’ ÷®increment,‘UU7ŽŽŽŽŽŽŸK’áw­²35ŽŽŒ‹$b' ÀÙ ýÚÇ‘ôž|ëAINDEX’¸¤%²36ŽŽ ÐÙ¸ ýK7‘ôž|ÝopGerato¸ãrޤ ‘ž|AND,‘UU4Ž¡‘ž|a¸ãrithmetic,‘UU3Ž¡‘ž|assoGciativit¸ãy‘ÿ*ª,‘UU3Ž¡‘ž|bit¸ãwise–UUlogical,“3Ž¡‘ž|decrement,‘UU3Ž¡‘ž|increment,‘UU3Ž¡‘ž|logical,‘UU3Ž¡‘ž|one's–UUcomplement,“3Ž¡‘ž|OR,‘UU4Ž¡‘ž|p¸ãrecedence,–UU3,“4Ž¡‘ž|relational,‘UU3Ž¡‘ž|shift,‘UU4Ž¡‘ž|una¸ãry‘ÿ*ª,–UU3,“4Ž¡‘ôž|outputŽ¡‘ž|graphics,‘UU21Ž¡‘ž|standa¸ãrd,–UU18,“21Ž©v½‘ôž|pa¸ãrameterŽ¡‘ž|passing,‘UU13Ž¡‘ž|run-string,‘UU17Ž¡‘ôž|pGoint,‘UU21Ž¡‘ôž|p•¸ãrint‘™˜‰ffŽ‘™šfo“rmat,‘UU21ަ‘ôž|quotasŽ¡‘ž|double,‘UU2Ž¡‘ž|single,‘UU2ަ‘ôž|sta¸ãrt‘™˜‰ffŽ‘™štime,‘UU21Ž¡‘ôž|statementŽ¡‘ž|b¸ãreak,–UU7,“8Ž¡‘ž|case,‘UU6Ž¡‘ž|continue,‘UU8Ž¡‘ž|csuspGend,‘UU24Ž¡‘ž|do,‘UU7Ž¡‘ž|exit,‘UU16Ž¡‘ž|fo¸ãr,–UU7,“8Ž¡‘ž|goto,‘UU9Ž¡‘ž|if,‘UU6Ž¡‘ž|load,‘UU12Ž¡‘ž|resume,–UU24,“25Ž¡‘ž|return,–UU7,“10Ž¡‘ž|switch,‘UU6Ž¡‘ž|while,–UU7,“8Ž¡‘ôž|æstderrÝ,‘UU19Ž¡‘ôž|æstdinÝ,–UU1,“18,“19Ž¡‘ôž|æstdoutÝ,–UU1,“18,“19Ž¡‘ôž|stringŽ¡‘ž|fo¸ãrmat,‘UU19Ž¡‘ôž|st¸ãyle,‘UU21Ž¡‘ôž|suspGend,‘UU22ަ‘ôž|t¸ãypGe,‘UU22Ž¡‘ž|void,‘UU10ަ‘ôž|uppGer,‘UU21ަ‘ôž|va¸ãriableŽ¡‘ž|decla¸ãration,–UU1,“2Ž¡‘ž|decrement,‘UU3ŽŽŽ ýK7’ ÷®global,‘UU10ޤ ’ ÷®increment,‘UU3Ž¡’ ÷®loGcal,‘UU10Ž¡’ ÷®name,‘UU2Ž¡’ ÷®scopGe,‘UU10Ž¡’ ÷®subscripting,‘UU13Ž¡’ ÷®t¸ãypGe,‘UU13Ž¡’÷÷®virtual–UUmachine,“25ŽŸ’÷÷®w‘™˜‰ffŽ‘™šresolution,‘UU21ŽŽŽŽŽŽŒøkLƒ’À;èÀÙØPà )óJ‚ÎR6ff cmss12óIÂÖN ff cmbx12óGÖÆáHG®cmss17óAp®0J cmsl10ó;ý': cmti10ó8ßê cmmi10ó 0e—rcmmi7óKñ`y cmr10óÙ“ Rcmr7óäO£ line10óú±u cmex10ùqrßßßßßclif-0.93/doc/guide_users.tex100644 1750 1750 167615 6331407320 15004 0ustar korenkoren\documentstyle[makeidx]{mybook} %\input{slovak.tex} % %\vsize 29.7cm %\hsize 21.0cm %\textheight 22cm %\textwidth 15.5cm %\topmargin -0.5cm %\oddsidemargin 0.5cm %\evensidemargin 0.5cm %\renewcommand{\chaptername}{Kapitola} %\renewcommand{\appendixname}{Dodatok} %\renewcommand{\bibname}{Preh"lad literat`ury} %\renewcommand{\contentsname}{Obsah} %\renewcommand{\figurename}{Obr} %\renewcommand{\listfigurename}{Zoznam obr`azkov} %% doktorat %\addtolength{\topmargin}{-68pt} %\addtolength{\textheight}{102pt} %\renewcommand{\baselinestretch}{1.3} %\textheight 20.0cm %\textwidth 12.cm %\topmargin -1.5cm %\oddsidemargin 0.45cm %\evensidemargin 0cm %%%%%%%%%%%%%%%%%%%%%%%% \textheight 24.7cm \textwidth 17cm % % \oddsidemargin -0.40cm \topmargin -1.90cm \newcommand{\CiF}{\sf Clif} \newcommand{\mybasel}{\baselineskip 9pt} \newcommand{\myver}{0.8.1.beta } \makeindex %% \title{The Interpreter \CiF \\ User's Guide} \author{\v{L}. Kore\v{n}%\thanks{ %\protect \input{adr0.tex}} \\ For version \myver } \date{Last updated 30 July 1996} %% \begin{document} \maketitle \pagenumbering{roman} \chapter{Preface} The syntax of the \CiF\ is based on the C language. The handbook is sequenced very close to the \cite{ritchie} or other computer programming language books. The syntax structures are described in the following chapters. These structures are described using examples. All examples are simply stated programs and therefore they should be understandable for users knowing a C-language. \tableofcontents \listoffigures \chapter{Introduction to the interpreter \CiF} Our goal is to show main structures of the language via examples. We want to explain all structures in the way of writing simply stated programs. %This kind of explanation has disadvantages. The most %important are the explanation of a feature is not placed at %one part and simplicity could be strange. \section{Start of the interpreter} The interpreter\index{interpreter!session} session can begin by writing just \CiF\ on the command interpreter line. The interpreter framework is started (another way of starting the interpreter session is explained later). On the standard output is written: \begin{verbatim} This is interpreter Clif \end{verbatim} The simplest command is:\index{function!cprintf@{\sf cprintf()}} {\mybasel \begin{verbatim} export_type extern int cprintf(); cprintf(1,"%s\n","hello"); \end{verbatim}} On the standard output is written: \begin{verbatim} hello \end{verbatim} If you make a mistake in the statement, the interpreter announces it. The argument 1 means {\it stdout}\index{stdout@{\it stdout}}. \section{Variables and arithmetic operations} The following program adds two numbers:\index{function!cprintf@{\sf cprintf()}}\index{function!cscanf@{\sf cscanf()}} {\mybasel \begin{verbatim} /* program for input and output of the text */ export_type extern int cprintf(); extern int cscanf(); int a,b,c; cprintf(1,"%s\n","input value a"); cscanf(0,"%d",a); cprintf(1,"%s\n","input value b"); cscanf(0,"%d",b); c=a+b; cprintf(1,"the sum is %d\n",c); exit; \end{verbatim}} The comment\index{comment} lines are embedded between the $\slash \ast$ and $\ast \slash$. They are unimportant during the run-time. Variables\index{variable!declaration} have to be declared before they are used first time. If you forget the declaration statement the interpreter announces the mistake. The declaration contents of a name of the type and list of variables separated by commas:\\ \begin{verbatim} int a,b,c; \end{verbatim} The argument 0 in {\sf cscanf} statement means {\it stdin}\index{stdin@{\it stdin}}. The rest of the statements is described in the following sections. \pagenumbering{arabic} \chapter{Data types, operators and expressions} \section{Names of the variables} Names of the variables\index{variable!name} are sequences of characters. The first character must be a letter. The character "\_" is assumed like a letter as well. The names of the variables are restricted. The names can not be keywords (e.g. {\sf if, else, int}). The keywords are dedicated. \section{Data types} The interpreter \CiF\ as well as the C-language, has only few fundamental data types: \label{`types'} \begin{tabular}{ll} {\sf char} & one byte, it is possible to store one character from the set \\ {\sf int} & integer, it is depending on a size of the integer of the host \\ {\sf float} & single precision real number \\ {\sf double} & double precision real number \\ \end{tabular} \section{Constants}\index{constant} There are different types of constants. The integer\index{constant!int@{\sf int}} constant has usual notation for example 134 e.g. it is any sequence of digits. The {\sf float}\index{constant!float@{\sf float}} and {\sf double}\index{constant!double@{\sf double}} constants have the following notations: 134.435 or 12.56e-3 or 0.2345E3 The character\index{constant!char@{\sf char}} constant is a character cited in single quotas\index{quotas!single}, for example 'a'. The value of the character constant is integer value from the set of characters of the host computer (for example ASCII). There are special character constant\index{constant!special!char@{\sf char}} comprised of sequence of characters, for example: $\backslash$n (newline), $\backslash$t (tab), $\backslash \backslash$ (backslash), etc. The string constant\index{constant!string} is embedded by double quotas\index{quotas!double}, e.g. "I am a string". The quotas are not included in string constants. The string is an array\index{array} of characters. At the end of the string constant an empty character $\backslash$0 is appended. Therefore it is necessary to bear into mind that 'x' is different from "x". \section{Declaration}\index{variable!declaration} All variables must have been declared before they are used. The declaration contents of type specifier followed by a list of one or more variables of the type. For example:\\ {\mybasel \begin{verbatim} int a,b,c; double d,e,f; int g; double h; \end{verbatim}} The declaration is a little bit larger but it can be completed by a comment. \section{Arithmetic operators} The arithmetic operators\index{operator!arithmetic} are $+,-,\ast,\slash$ and the modulus operator \%. There is a operator\index{operator!unary} of unary $-$ but not unary $+$. The rest is truncated in the integer division. The expression $x$\%$y$ is the operation $x$ divided by $y$. The result is zero, if $y$ is the divisor of the $x$. The operators $+$ and $-$ have the same precedence\index{operator!precedence}. The precedence is lower then the (equal) precedence of the operators $\ast, \slash$ and \%. The arithmetic operators are left associative\index{operator!associativity}. %The order of evaluation of the %associative and commutative operators (e.g. $\ast$ and %$+$) is left associative too. \section{Relational and logical operators}\index{operator!relational}\index{operator!logical} The relational operators are\\ \hspace{0.5cm}$>$\hspace{0.5cm}$>\,=$\hspace{0.5cm}$<$\hspace{0.5cm}$<\,=$\\ Each of them has the same precedence\index{operator!precedence}. The operators of equality are behind them in the precedence\\ \hspace{0.5cm}$==$\hspace{0.5cm}$!=$\\ (both have the same precedence). The relational operators have the lower precedence than the arithmetic ones. The logical operators\index{operator!logical} \&\& and $||$ are left associative\index{operator!associativity}. The logical expressions are evaluated from left to right. %These behaviors are important for the writing good programs. The precedence of the operator \&\& is higher than the operator $||$. Both of them have the lower precedence than the relational and equality operators. \section{Type conversion} In an expression, the operands can differ in types. The coercions\index{coercion} take place in the expressions which have a sense. For example, using a variable which has type double as an array subscript has no sense; therefore the coercion is not processed. In this case the interpreter announces an error. If one of the operands is a double, all operands become double. Always, types of both processed operands are compared. Then the coercion is made to the type of operand which is "wider". The order of the implemented types from the "narrowest" to the "widest" is as follows: {\it char, int, float, double}. Another type of coercion\index{coercion} is in an assignment. The right side value of the expression is converted to the type of the variable on the left side. The type of result is the same as type of the variable on the left side of the expression. The type of the result can be forced by cast operator which causes an explicit conversion. In a statement\\ {\em (name\_of\_type) expression}\\ the {\em expression} is converted to the {\em name\_of\_type}. \section{Increment and decrement operators}\index{operator!increment}\index{operator!decrement} The language of the interpreter has operators for the increment and decrement of the variables\index{variable!increment}\index{variable!decrement}. The increment operator ($++$) adds one to the operand. The decrement operator ($--$) subtracts one from the operand. The operators can be used only in the prefix notation\index{notation!prefix}. E.g. let n is 5, the expression\\ \begin{verbatim} x = ++n; \end{verbatim} assigns to the variable n the value 6. Then the value 6 is assigned to the variable x. \section{Bitwise logical operators}\index{operator!bitwise logical} The \CiF\ has operators for bit manipulating\\ \begin{tabbing} \&\hspace{3cm} \=the bitwise AND operator\\ $|$ \>the bitwise inclusive OR operator\\ $\hat{}$ \>the bitwise exclusive OR operator\\ $<<$ \>the left shift operator\\ $>>$ \>the right shift operator\\ $\tilde{}$ \>the unary one's complement operator\\\index{operator!one's complement}\index{operator!unary} \end{tabbing} The bitwise AND operator\index{operator!AND} (\&) is often used as a mask of the bits. The bitwise inclusive OR operator\index{operator!OR} ($|$) is used in a setting of bits. An user should bear in mind the big difference between the bitwise logical operators \&, $|$ and logical operators \&\&, $||$. For example if $x$ is 1 and $y$ is 2 then expression $x$\&$y$ is equal zero, while $x$\&\&$y$ is equal one. The result of bitwise logical AND and bitwise logical OR is always {\it int}. The shift operators\index{operator!shift} $<<$ and $>>$ cause the shift of the left operand to the left or right. The number of shifted bits is in the right operand. The result of these operations is undefined if the right operand is negative or greater than or equal to the length of object in this bits. The unary one's complement operator\index{operator!unary} $\tilde{}$ changes each bit, ones to zeros and vice versa. The type of the operand must be integer. \section{Conditional expression} There is a short form for the conditional statement using only expressions instead of statements, i.e.: {\mybasel \begin{tabbing} \sf expr1 ? expr2 : expr3; \end{tabbing}} The {\sf expr1} is evaluated. If it is true, the {\sf expr2} is executed. If the {\sf expr1} is false, {\sf expr3} is executed. \section{Assignment operators} \label{sec:ao} There are the following compound assign operators:\\ \newline {\mybasel \begin{center} \begin{tabular}{|c|}\hline $*=$ \\ \hline $/=$ \\ \hline $\%=$ \\ \hline $+=$ \\ \hline $-=$ \\ \hline $<<=$ \\ \hline $>>=$ \\ \hline $\&=$ \\ \hline $\hat{}=$ \\ \hline $|=$ \\ \hline \end{tabular} \end{center}} \section{The precedence and the order of the evaluation}\index{operator!precedence} The following table offers the survey of the operators. The operators in the same line have the same precedence. The precedence increases line by line.\\ \newline {\mybasel \begin{center} \begin{tabular}{|l|c|} \hline {\bf Operator} & {\bf Associativity}\\ \hline \hline $=$ $+=$ $-=$ $*=$ $/=$ $\%=$ $\&=$ $\hat{}=$ $|=$ $<<=$ $>>=$ & right to left\\ \hline $?:$ & right to left \\ \hline $||$ & left to right\\ \hline $\&\&$ & left to right\\ \hline $|$ & left to right\\ \hline $\hat{}$ & left to right\\ \hline $\&$ & left to right\\ \hline $==$ $!=$ & left to right\\ \hline $<$ $<=$ $>$ $>=$& left to right\\ \hline $<<$ $>>$ & left to right\\ \hline $+$ $-$ & left to right\\ \hline $*$ $/$ $\%$ & left to right\\ \hline $\tilde{}$ $!$ $++$ $--$ $-$ ({\it name\_of\_type})& right to left\\ \hline $($ $)$ $[$ $]$ & left to right\\ \hline \end{tabular} \end{center}} \vspace{1cm} The table must be born in mind to write correct program without complications. \chapter{Control flow} \section{Conditional statement} The conditional statement\index{statement!if@{\sf if}} {\sf if-else} has the following syntax: {\mybasel \begin{tabbing} \sf if \sf ( \sf expr \sf ) \= \\ \> \sf \{ \sf stat1 \sf \} \\ \sf else \\ \> \sf \{ \sf stat2 \sf \} \\ \end{tabbing}} The {\sf else }part is not compulsory. The {\sf expr} is evaluated and if it is nonzero, the first substatement is executed. If the {\sf expr} is equal zero and if the {\sf else} part exists, the second substatement is executed ({\sf stat2}). \section{Statement {\sf switch-case}} If more conditional statements have to be used in a sequence, a {\sf switch}\index{statement!switch@{\sf switch}} can be used. Then the different branches can be followed using {\sf case}\index{statement!case@{\sf case}} statement. I.e., {\mybasel \begin{tabbing} \sf switch \sf ( \sf expr \sf ) \= \\ \> \sf \{ \\ \> \sf case \sf expr1 : \sf stat1 \\ \> \sf case \sf expr2 : \sf stat2 \\ \> \sf default : \sf stat3 \\ \> \} \\ \end{tabbing}} The {\sf expr} is evaluated. Then it is compared to {\sf expr1}. If they are equal then the {\sf stat1} is executed. If they are not equal the execution continues at the next label ({\sf expr2} in this case). The expressions in labels have to be constant expressions. {\sf default} is executed only if no expression in label statements is equal to the {\sf expr}. The {\sf default} statement can be omitted. A usage is in the following example:\index{function!cprintf@{\sf cprintf()}}\index{function!cscanf@{\sf cscanf()}} {\mybasel \begin{verbatim} export_type extern int cprintf(); extern int cscanf(); int a; cprintf(1,"%s\n","input a"); cscanf(0,"%d",a); switch (a) { default: cprintf(1,"%s\n","default"); case 1: cprintf(1,"%s\n","1"); break; case 2|5: cprintf(1,"%s\n","2|5"); break; case 3: cprintf(1,"%s\n","3"); cprintf(1,"%s\n","no break"); case 4: cprintf(1,"%s\n","4"); break; } exit; \end{verbatim}} \section{{\sf while}, {\sf do while} and {\sf for} loops}\index{statement!while@{\sf while}}\index{statement!for@{\sf for}}\index{statement!do@{\sf do}} In {\mybasel \begin{tabbing} \sf while \sf ( \sf expr \sf )\= \\ \> \sf \{ \sf stat \sf \} \\ \end{tabbing}} the {\sf expr} is evaluated. If its value is nonzero, the {\sf stat} is executed and the {\sf expr} is evaluated again. The loop\index{loop} continues until the {\sf expr} becomes 0. After loop finishing, it is proceeded below the {\sf stat}. The sequence of statements\index{statement!do@{\sf do}} {\mybasel \begin{tabbing} \sf do \sf \= \\ \> \sf \{ \sf stat \sf \} \\ \> \sf while \sf ( \sf expr \sf ) \\ \end{tabbing}} is executed at least once. The {\sf while expr} is evaluated at the end of the loop sequence. If the {\sf expr} is true the sequence of statements in the loop is repeated. The statement {\sf for}\\ {\mybasel \begin{tabbing} \sf for \sf ( \sf expr1; \sf expr2; \sf expr3) \= \\ \> \sf \{ \sf stat \sf \} \\ \end{tabbing}} is equal with the sequence of the following commands\\ {\mybasel \begin{tabbing} \sf expr1;\\ \sf while \sf ( \sf expr2 \sf ) \= \\ \> \sf \{ \sf stat \\ \> \sf expr3; \sf \}\\ \end{tabbing}} All three parts of the statement {\sf for} are expressions\index{expression}. The expressions {\sf expr1} and {\sf expr3} are usually assignments. The {\sf expr2} is a relational expression. Thus the first expression specifies initialization for the loop\index{loop!initialization}; the second specifies a test, made before each iteration, such that the loop is exited when expression becomes 0. The third expression often specifies an incrementing\index{operation!increment} that is performed after each iteration. If all three parts are dropped, the {\sf expr2} is considered true and\\ {\mybasel \begin{tabbing} \sf for \sf( \sf ; \sf ; \sf ) \sf \{ \= \\ \> $\dots$ \\ \> \sf \} \\ \end{tabbing}} is an infinite loop\index{loop!infinite}. It is assumed another termination of the loop. For example by the statements\index{statement!break@{\sf break}} {\sf break} or {\sf return}\index{statement!return@{\sf return}}. Everyone should consider which loop statement\index{loop!statement} to use. If we need not to initialize or to reinitialize the loop variable\index{loop!initialize}, we can take an advantage of the statement {\sf while}. The loop statement\index{statement!for@{\sf for}} {\sf for} is useful if we need to initialize and reinitialize the loop variable. The control statements are concentrated at the beginning of the loop. \section{Statement {\sf break}}\index{statement!break@{\sf break}} It is useful to break processing of the loop at arbitrary place. The statement\index{statement!break@{\sf break}} {\sf break} causes termination of the most inner {\sf while}\index{statement!while@{\sf while}} or {\sf for}\index{statement!for@{\sf for}}. The following program shows function of the {\sf break}\index{statement!break@{\sf break}}:\index{function!cprintf@{\sf cprintf()}} {\mybasel \begin{verbatim} export_type extern int cprintf(); int x; x=1; while (x<=10) { cprintf(1,"%s\n","now in while"); if(x == 5) { cprintf(1,"%s\n","now in IF"); cprintf(1,"%s\n","*********************************"); x++; break; } cprintf(1,"x=%d\n",x); x++; } exit; \end{verbatim}} Control passes to the statement following the terminated compound statement. \section{Statement {\sf continue}}\index{statement!continue@{\sf continue}} Statement {\sf continue} is related to the statement {\sf break}. It causes control to pass to the loop-continuation part of the most inner loop ({\sf for, while})\index{statement!while@{\sf while}}\index{statement!for@{\sf for}}, i.e. to the end of the loop. The {\sf while} loop proceeds at the expression. The {\sf for} loop proceeds at the reinitialization. The program with the statement {\sf continue} follows:\index{function!cprintf@{\sf cprintf()}} {\mybasel \begin{verbatim} export_type extern int cprintf(); int x; for (x=1;x<=10;x++) { cprintf(1,"%s\n","now in for"); if(x == 5) { cprintf(1,"%s\n","now in IF"); print(1,"%s\n","*********************************"); continue; } cprintf(1,"x=%d\n",x); } exit; \end{verbatim}} and more complex example:\index{function!cprintf@{\sf cprintf()}} {\mybasel \begin{verbatim} /* test program for nested loop */ export_type extern int cprintf(); int x,y; y=1; for(x=1;x<15;x++) { cprintf(1,"%s\n","now in for"); cprintf(1,"x=%d\n",x); while(x>5 && x<10) { cprintf(1,"%s\n","now in while"); cprintf(1,"x=%d\n",x); if(x==9) { cprintf(1,"%s\n","now in the body of the first condition"); cprintf(1,"x=%d\n",x); continue; } if(x==8) { cprintf(1,"%s\n","now in the body of the second condition"); break; } x=x+y; cprintf(1,"x=%d\n",x); } if(x==14) { cprintf(1,"%s\n","now in the body of the third condition"); cprintf(1,"x=%d\n",x); break; } } exit; \end{verbatim}} \section{Statement {\sf goto}}\index{statement!goto@{\sf goto}} Although the {\sf goto} statement is a part of unstructured programming the \CiF environment supports this syntactic construction as well. The {\sf goto} statement is used for unconditional branching of programs. The jump is possible only in the level one. There is no possibility to jump with {\sf goto} statement across functions. Typical usage is in the following example: \index{function!cprintf@{\sf cprintf()}} {\mybasel \begin{verbatim} export_type extern int cprintf(); int i; cprintf(1,"%s\n","in front"); { a: cprintf(1,"%s ","a"); if (10 == i) { cprintf(1,"%s ","in if"); ++i; goto b; } else { ++i; } goto a; b: cprintf(1,"%s ","b"); } cprintf(1,"%s\n","after"); exit; \end{verbatim} } \chapter{Functions and program structure} Bigger tasks can be split by functions to the parts. Programmer can use the parts which were designed by other authors. \section{Fundamentals} Each function looks like {\mybasel \begin{tabbing} \sf type \sf name \sf(type \sf argument, \sf \ldots \sf )\= \\ \> \sf \{ \\ \> \sf declarations \sf a \sf statements \\ \> \sf \} \\ \end{tabbing}} (The types are mentioned on the page~\pageref{`types'}. In addition, the type {\sf void}\index{type!void@{\sf void}} can be in a function declaration). The {\sf void} type denotes an nonexistent return value. Some parts of functions can be dropped out; minimal function is\\ {\sf type dummy() \{ \}\\}. (The function can be useful in filling place in program design). {\sf return} statement\index{statement!return@{\sf return}} returns value of the called function to the calling function. Syntax of the statement {\sf return} is as follows:\\ {\sf return ( expr );\\}\\ The calling function can ignore the return value. \section{Scope rules} Global variables\index{variable!global} must have been declared before they are used. Functions\index{function!declaration} must be declared before the formal call as well. The functions must be defined\index{function!definition} before the real call. The part of program where the name is declared is a scope of the name\index{variable!scope}. The global variables\index{variable!global} are valid during whole interpreter session\index{interpreter!session}. The local variables\index{variable!local} are only valid during the processing of the function. The interpreter searches the table of local variables for the variable. If it is not successful, it proceeds searching the table of global variables for the variable. If it is not successful again it announces an error. \section{Recursion} Functions\index{function!recursive} can be written in recursive form (e.g. a function can call {\em itself}). The recursion can be direct or indirect. An example of the recursion is n! (factorial):\index{function!cprintf@{\sf cprintf()}}\index{function!cscanf@{\sf cscanf()}} {\mybasel \begin{verbatim} export_type extern int cprintf(); extern int cscanf(); int n; int fak(int n) { if(n==1) {return(1);} return(fak(n-1)*n); } cprintf(1,"%s\n","input n"); cscanf(0,"%d",n); n=fak(n); cprintf(1,"factorial =%d\n",n); exit; \end{verbatim}} Other examples follow:\\ Recursive function for Fibonacci sequence\index{function!cprintf@{\sf cprintf()}}\index{function!cscanf@{\sf cscanf()}} {\mybasel \begin{verbatim} export_type extern int cprintf(); extern int cscanf(); int n; int fib(int n) { if(n<=1) { return(1); } else { return(fib(n-1)+fib(n-2)); } } cprintf(1,"%s\n","input n"); cscanf(0,"%d",n); n=fib(n); cprintf(1,"n=%d\n",n); exit; \end{verbatim}} or for $n \choose k$\index{function!cprintf@{\sf cprintf()}}\index{function!cscanf@{\sf cscanf()}} {\mybasel \begin{verbatim} export_type extern int cprintf(); extern int cscanf(); int n,k; int komb(int n,int k) { if((n==k) || (k==0)) { return(1); } else { return(komb(n-1,k)+komb(n-1,k-1)); } } cprintf(1,"%s\n","input n"); cscanf(0,"%d",n); cprintf(1,"%s\n","input k"); cscanf(0,"%d",k); n=komb(n,k); cprintf(1,"n=%d\n",n); exit; \end{verbatim}} and for ${n \choose k} \cdot \sum \limits_{i=1}^{l}i $\index{function!cprintf@{\sf cprintf()}}\index{function!cscanf@{\sf cscanf()}} {\mybasel \begin{verbatim} export_type extern int cprintf(); extern int cscanf(); int n,k,l; int f(int n,int k) { if((k==0) || (n==k)) { return(1); } return(f(n-1,k)+f(n-1,k-1)); } int komb(int n,int k,int l) { if((k==0) || (n==k)) { return(1); } if(l==1) { return(f(n,k)); } return(komb(n-1,k,l-1)+f(n-1,k)*l+komb(n-1,k-1,l-1)+f(n-1,k-1)*l); } cprintf(1,"%s\n","input n"); cscanf(0,"%d",n); cprintf(1,"%s\n","input k"); cscanf(0,"%d",k); cprintf(1,"%s\n","input l"); cscanf(0,"%d",l); n=komb(n,k,l); cprintf(1,"n=%d\n",n); exit; \end{verbatim}} \section{Including files for interpretation during the session}\index{interpreter!session} Users can include a file into the interpreter by statement\index{statement!load@{\sf load}}\\ {\sf load ( name\_of\_file);\\} The file will be interpreted automatically. \chapter{Derived variable types}\index{variable!type} \section{Arrays}\index{array} One and multidimensional type of arrays\index{array!onedimensional}\index{array!multidimensional} are available in the interpreter. They are used to group the sets of the like variables. Example of one-dimensional array follows: \begin{verbatim} type name_of_array[number_of_elements]; \end{verbatim} The size of an array\index{array!size of} must be an integer constant\index{constant!int@{\sf int}}. An element of the array\index{array!subscript} can be accessed through subscripting. For example:\\ \begin{verbatim} a[7]=56; \end{verbatim} In the interpreter, subscripting\index{array!subscript} begins with zero. An integer expression\index{expression} can be between the brackets; i.e. a subscripting variable\index{variable!subscripting}, an expression\index{expression}, or return value from a function call. \subsection{Internal representation of arrays}\index{array!internal representation of} Arrays are containing certain data type. They are stored in a contiguous set of these data types. See figure \ref{pole} \begin{figure} \begin{center} \unitlength=1.00mm %\special{em:linewidth 0.4pt} \linethickness{0.4pt} \begin{picture}(73.00,128.33) \put(50.00,46.00){\framebox(23.00,81.00)[cc]{}} \put(50.00,122.67){\line(1,0){23.00}} \put(50.00,120.67){\line(1,0){23.00}} \put(61.00,118.67){\makebox(0,0)[cc]{.}} \put(61.00,114.67){\makebox(0,0)[cc]{.}} \put(61.00,108.67){\makebox(0,0)[cc]{.}} \put(50.00,99.00){\line(1,0){23.00}} \put(46.00,109.00){\makebox(0,0)[cc]{0}} \put(46.00,84.67){\makebox(0,0)[cc]{1}} \put(61.00,36.00){\makebox(0,0)[cc]{.}} \put(61.00,40.00){\makebox(0,0)[cc]{.}} \put(61.00,44.00){\makebox(0,0)[cc]{.}} \put(50.00,4.67){\framebox(23.00,18.67)[cc]{}} \put(60.67,101.67){\makebox(0,0)[cc]{n}} \put(25.67,127.00){\line(0,-1){122.33}} \put(50.00,74.33){\line(1,0){23.00}} \put(46.00,56.33){\makebox(0,0)[cc]{n}} \put(0.67,41.00){\line(1,0){52.67}} \put(16.34,91.00){\makebox(0,0)[cc]{0}} \put(16.00,21.67){\makebox(0,0)[cc]{1}} \put(36.33,127.00){\vector(1,0){13.67}} \put(42.33,128.33){\makebox(0,0)[cc]{A}} \put(45.67,18.00){\makebox(0,0)[cc]{.}} \put(45.67,22.00){\makebox(0,0)[cc]{.}} \put(45.67,26.00){\makebox(0,0)[cc]{.}} \put(16.00,11.00){\makebox(0,0)[cc]{.}} \put(16.00,15.00){\makebox(0,0)[cc]{.}} \put(16.00,19.00){\makebox(0,0)[cc]{.}} \end{picture} \caption[Internal representation of arrays]{Internal representation of arrays}\label{pole} \end{center} \end{figure} \section{Multidimensional arrays}\index{array!multidimensional} In the interpreter, arrays of arbitrary dimensions can also be declared. The two-dimensional array with $m\times n$ elements is declared as follows: \begin{verbatim} type name_of_array[m][n]; \end{verbatim} An element of the array can again be accessed through subscripting\index{array!subscripting}, e.g. \begin{verbatim} a[7][9] \end{verbatim} This will access the element in the 8-th row (row number 7) and in the 10-th column (column number 9). \section{Array names in expressions} The element of the array\index{array!element of} in an expression can only be accessed through subscripting\index{array!subscript}, but there is an exception; the array can be passed as a parameter to a function (without subscripting). An example of the parameter passing\index{parameter!passing} mechanism using an array as a parameter\index{array!as parameter} follows:\index{function!cprintf@{\sf cprintf()}} {\mybasel \begin{verbatim} export_type extern int cprintf(); int a[5][5][5][5][5]; a[0][0][0][0][0]=1; a[1][1][1][1][1]=1; a[2][2][2][2][2]=1; a[3][3][3][3][3]=1; a[4][4][4][4][4]=a[3][3][3][3][3]; int z(int b[][5][5][5][5]) { cprintf(1,"%d\n",b[0][0][0][0][0]); cprintf(1,"%d\n",b[1][1][1][1][1]); cprintf(1,"%d\n",b[2][2][2][2][2]); cprintf(1,"%d\n",b[3][3][3][3][3]); cprintf(1,"%d\n",b[4][4][4][4][4]); } z(a); exit; \end{verbatim}} \chapter{Termination of the \CiF\ session} Statement {\sf exit;}\index{statement!exit@{\sf exit}} terminates the interpreter session\index{interpreter!session}. This statement terminates correctly work of the interpreter environment. \chapter{Run-string handling} So far, the input was always standard input. But the interpreter can have specified parameters\index{parameter!run-string}\index{command line} in the run-string (command line) which are names of programs. The input is redirected and a file\index{file@open} is opened instead of the standard input.\index{input!standard} Other parameters can appear in the command line. One of the parameters is {\sf $\slash$help} evoking brief help. Another parameter is for resetting of the size of main memory\index{memory} areas of the interpreter\index{interpreter!memory area of}. The size is specified relatively. This parameter can be specified in the run-string\index{parameter!run-string} as follows: \begin{verbatim} /bc= \end{verbatim} As the {\sf $<$number$>$} can be specified a positive integer. The default value is 10. \chapter{The standard I/O routines} So far, all our sample programs have written data to the standard output\index{output!standard}\index{stdout@{\it stdout}} and read data from standard input\index{input!standard}\index{stdin@{\it stdin}} (in both cases the terminal). As long as we are accessing\index{data!access} not large portions of data, thus data in the simple form, this type of I/O routines is sufficient. However, large amounts of data are generally stored in files\index{file}. To perform I/O from and to files\index{file} I/O functions are included in the interpreter. Access to files generally requires four basic functions: \begin{description} \item[open] This enables access to a file and establishes the file handle. \item[close] This terminates access to the file. When the access to a file is complete, it should be closed. The number of files that the interpreter can simultaneously manage is limited. Therefore the files should be properly closed. \item[read] This function gets data from the file. \item[write] This function adds information to the file or replaces information already in the file. \end{description} \section{Opening a file}\index{file!open} The standard I/O function used to open a file is named copen(). The function returns a handle\index{handle} to the opened file\index{file!open}. The function has to be declared as follows:\index{function!copen@{\sf copen()}} \begin{verbatim} extern int copen(); \end{verbatim} The function has two arguments\index{function!argument}: \begin{itemize} \item {\sf file\_name} is the starting address of a character string describing the name of the file. This can be a string constant or an array name\index{array!as parameter}. \item {\sf mode} which describes the action that should be performing on the file. The modes are: \begin{itemize} \item {\sf r} The file\index{file!open} is opened for reading started at the beginning of the file. \item {\sf w} The file\index{file!open} is opened for writing; it is assumed that the file is to be created. If the file does not exist, it is created; if it exists, it is truncated (size of the file is reduced to zero) and positioned at the beginning of the file. \item {\sf a} The file\index{file!open} is opened for writing. The mode is the same as mode for {\sf w} except that the initial position is at the end of the file, i.e. the file is not truncated. \item {\sf r+} The file\index{file!open} is opened for update, i.e. the file is opened for reading and writing and is not truncated. The initial position is at the beginning of the file. \item {\sf w+} The file\index{file!open} is opened for update, i.e. the file is opened for reading and writing and is truncated, if the file already exists. If it does not exist, it is created. The initial position is at the beginning of the file. \item {\sf a+} The file\index{file!open} is opened for update, i.e. the file is opened for reading and writing and is not truncated and the initial position is at the end of the file. \end{itemize} \end{itemize} The function returns\index{function!return} an handle\index{handle} (integer number) if opening is successful. Otherwise the function returns\index{function!return} {\it EOF}\index{EOF@{\it EOF}}. \section{Closing a file}\index{file!close} If the access to a file was completed, the file\index{file!close} should be closed. The declaration\index{function!declaration} of the function is as follows:\index{function!cclose@{\sf cclose()}} \begin{verbatim} extern int cclose(); \end{verbatim} The argument of the {\sf cclose()}\index{function!cclose@{\sf cclose()}} function\index{function!argument} is the return value\index{function!return} from the {\sf copen()}\index{function!copen@{\sf copen()}} function (the handle\index{handle}). The handle is released. If the program exits without closing a file\index{file!close}, the system closes automatically the opened file. The return\index{function!return} values are 0 that means a successful file\index{file!close} closing or {\it EOF}\index{EOF@{\it EOF}} that means an error was encountered during the closing of the file. \section{Reading from a file} As far, we have only used the {\sf cscanf()}\index{function!cscanf@{\sf cscanf()}} function. Another function that can be used is {\sf cgetc()}\index{function!cgetc@{\sf cgetc()}} function. The parameter of the function\index{function!parameter} is an integer number (handle\index{handle}), which was returned by a {\sf copen()}\index{function!copen@{\sf copen()}} function. The {\sf cgetc()}\index{function!cgetc@{\sf cgetc()}} function reads a character from the file\index{file} which is pointed by the handle. The function {\sf cgetc()}\index{function!cgetc@{\sf cgetc()}} is declared as follows:\index{function!cgetc@{\sf cgetc()}} \begin{verbatim} extern int cgetc(); \end{verbatim} This function returns\index{function!return} an {\it EOF}\index{EOF@{\it EOF}} character when an error occurred or at the end-of-file. \section{Writing to a file}\index{file!write} In the previous sections we only write to the {\it stdout}\index{stdout@{\it stdout}} via the {\sf cprintf()} function. Analogous function to the {\sf cgetc()}\index{function!cgetc@{\sf cgetc()}} is a function {\sf cputc()}\index{function!cputc@{\sf cputc()}}. The function is declared\index{function!declaration}:\index{function!cputc@{\sf cputc()}} \begin{verbatim} extern int cputc(); \end{verbatim} The function writes a character into the file\index{file!write}. On failure, the function\index{function!return} returns an {\it EOF}\index{EOF@{\it EOF}}. \section{Functions {\sf cscanf()} and {\sf cprintf()}}\index{function!cscanf@{\sf cscanf()}}\index{function!cprintf@{\sf cprintf()}} The functions used in previous section read from standard input and wrote to standard output. Default handles for {\it stdin}\index{stdin@{\it stdin}}, {\it stdout}\index{stdout@{\it stdout}} and {\it stderr}\index{stderr@{\it stderr}} are 0,1,2 respectively. These functions can read\index{file!read} from or write\index{file!write} to a file. As the first parameter of the functions\index{function!parameter} is used a handle\index{handle} of the file, for example:\index{function!cscanf@{\sf cscanf()}}\index{function!cprintf@{\sf cprintf()}} {\mybasel \begin{verbatim} float f; int a,b; extern int cscanf (); export_type extern int cprintf (); extern int cclose (); extern int copen (); cscanf(0,"%f",f); b=copen("test_file","w"); cprintf(1,"handle = %d\n",b); cprintf(b," f=%f\n",f); cscanf(0,"%d",a); cprintf(b,"integer value = %d\n",a); cclose(b); cprintf(1,"%s\n","I am a string"); exit; \end{verbatim}} The second parameter in the {\sf cscanf()} function is a format string and the third parameter is a variable name for storing the input. The second parameter of the {\sf cprintf()} function is a format string and/or string constant and the third parameter is a variable name for output. The following list describes valid format strings\index{string!format}: \begin{description} \item[d] the input/output field is a decimal integer; the corresponding variable name must point to the integer \item[u] the input/output field is a decimal integer; the corresponding variable name must point to the integer; value is unsigned \item[o] the input/output field is a octal integer; the corresponding variable name must point to the integer \item[x] the input/output field is a hexadecimal integer; the corresponding variable name must point to the integer \item[e,f,g] the input/output field is an optionally signed string of digits. The field may contain a radix character and an exponent field begins with a letter E or e, followed by an optional sign or space and an integer. The variable must point to the floating point variable. If you specify l, the variable must point to the double precision variable. \item[s] the input/output field is a character string. The variable must point to an array of characters large enough to contain the string and a termination character ($\backslash 0$). The {\sf cscanf()} function adds the termination character automatically. A white-space character terminates the input string, so the input string cannot contain spaces. \item[c] the input/output field is a character or character string. The variable must point to either a character variable or a character array. \end{description} \chapter{Graphics interface} So far, the sample programs have written data to the standard output\index{output!standard} in the numerical form. The interpreter also provides graphics outputs\index{output!graphics}. Certain type of graphics functions\index{function!graphics} is included in the interpreter. A call to the graphics functions results in establishment of a channel\index{channel}. Access to channels generally requires four basic operations: \\ \begin{description} \item[open] First channel\index{channel!open} should be opened which allows access to the other graphics functions\index{function!graphics}. \item[close] This terminates access to the channel\index{channel!close}. When the access to the channel is complete, it should be closed. The number of channels that can simultaneously be opened is limited. \item[write] This adds data to the channel\index{channel!write}. \item[flush] This flushes all data from the channel\index{channel!flush} to the output device. \end{description} \section{Opening a channel} The graphics interface function used to open a channel\index{channel!open} is named {\sf chopen()}\index{function!chopen@{\sf chopen()}}. It returns a integer number - handle\index{handle}, if opening succeeds; otherwise it returns -1. The handle must be saved; all other graphics functions require the handle as an argument. The {\sf chopen()}\index{function!chopen@{\sf chopen()}} function should be declared as follows: \begin{verbatim} extern int chopen("arguments"); \end{verbatim} This function creates a window for a graphics output\index{output!graphics}. This must be done before attempts are made to write in to the channel\index{channel!write}. The {\sf chopen()}\index{function!chopen@{\sf chopen()}} has the following arguments (arguments are in the form of sublanguage):\index{drawn object} \begin{description} \item[fields]\label{`fields'}\index{fields} This record is compulsive. This is an integer number which specifies number of records written to the channel\index{channel!record}. The other arguments have their default\index{default} values. \item[style] This specifies the type and path (attributes) of the drawn object. The {\sf style}\index{style} is a positive integer number. \item[lower]\index{lower} This denotes lower boundary of the drawn object. \item[upper]\index{upper} This denotes upper boundary of the drawn object. \item[print\_format]\index{print\_format} The available values are {\sf point}\index{point@{\sf point}} and {\sf line}\index{line@{\sf line}}. Default\index{default} is {\sf line}. \item[start\_time]\index{start\_time} Initial setup of the time. The available values are {\sf automatic}\index{automatic@{\sf automatic}} and an arbitrary real number. The {\sf automatic}\index{automatic@{\sf automatic}} means that the window is cleared when the output reaches the right end of the window. New initial time continues at the end value of the time in previous window. Default\index{default} value is 0.0. \item[duration\_time]\index{duration\_time} This means a length of the window, i.e. the number of the records contained in the window in the vertical direction. The available values are {\sf automatic}\index{automatic@{\sf automatic}} and an arbitrary real number. The {\sf automatic}\index{automatic@{\sf automatic}} means if the output reaches the right end of the window then output is redrawn, i. e. the {\sf duration\_time} size is changed. Default\index{default} value is 1000.0. \item[w\_resolution]\index{w\_resolution} This specifies the size of the window. The default \index{default}value is 256 by 256 pixels. \item[type]\index{type} This specifies if the alphanumeric window should be created as well. The available values are {\sf alpha}\index{alpha} and {\sf graphic}\index{graphic}. Default\index{default} value is the {\sf graphic}. \item[OnLeaveW]\index{OnLeaveW} The parameter specifies if the interpreter should be stopped temporarily when enriches the right end of the window. The available values are {\sf noevent}\index{noevent} and {\sf suspend}\index{suspend}. The default\index{default} value is the {\sf noevent}. \end{description} The records\index{channel!record} are separated by a backslash immediately followed by a newline. The first record should be the {\sf fields}\index{fields}. The other records can be arbitrarily ordered. \section{Closing a channel}\index{channel!close} When the program has completed its use of a channel, the channel should be closed using {\sf chclose()}\index{function!chclose@{\sf chclose()}} function. This function is declared as follows: \begin{verbatim} extern void chclose(); \end{verbatim} This function closes the specified channel and releases the {\sf handle}\index{handle}. The {\sf handle} is the only parameter of the {\sf chclose} function. If program exits without closing a channel, the system will automatically close the channel. \section{Writing to a channel}\index{channel!write} The graphics interface function used for writing to a channel is named {\sf chwrite}\index{function!chwrite@{\sf chwrite()}}. This function is declared as follows: \begin{verbatim} extern void chwrite(); \end{verbatim} The function has the following arguments: The first argument is the {\sf handle}\index{handle} of the channel in to which data should be written. The second argument is a datum. The data are collected in the specified channel\index{data!collected in channel}. When number of records is equal to the number specified in the record {\sf fields}\index{fields} (see page~\pageref{`fields'} for more details), the data are put into the window. \section{Flushing a channel}\index{channel!flush} This function flushes a channel in which were collected data. The function is declared:\index{function!chflush@{\sf chflush()}} \begin{verbatim} extern void chflush(); \end{verbatim} The function has no arguments. It flushes all opened graphics channels. This function is necessary at the end of putting image to the window, when data are in the channel but in the window. The following program shows a use of graphics interface functions:\index{function!sin@{\sf sin()}} {\mybasel \begin{verbatim} double x,y; extern double sin(); /* declaration of graphics functions */ extern int chopen(); extern void chwrite(); extern void chclose(); extern void chflush(); int handle; handle=chopen("fields=6\ lower(0)=-0.5\ upper (0) = 0.5\ style (0) = 10\ lower(1)=-1.5\ upper (1) = 1.5\ style (1) = 20\ lower(2)=-3.\ upper (2) = 3.\ style (2) = 15\ lower(3)=-3.5\ upper (3) = 3.5\ style (3) = 5\ lower(4)=-4.\ upper (4) = 4.\ style (4) = 17\ lower(5)=-4.5\ upper (5) = 4.5\ style (5) = 7\ start_time=automatic\ duration_time=256.\ w_resolution=600 400\ print_format=point\ type=alpha\ OnLeaveW=suspend"); for(x=0;x<6.5;x=x+0.01) { y=sin(x); chwrite(handle,y); chwrite(handle,y); chwrite(handle,y); chwrite(handle,y); chwrite(handle,y); chwrite(handle,y); } chclose(handle); exit; \end{verbatim}} \chapter{Interrupt handling}\index{interrupt!handling} The run of the virtual machine of the interpreter can be interrupted. The interpreter provides two kinds of the interrupts; synchronous\index{interrupt!synchronous} and asynchronous\index{interrupt!asynchronous}. \section{Synchronous interrupt} The synchronous interrupt is specified in the form of statements\index{statement!csuspend@{\sf csuspend}} in a program. The following statement can be placed where it is useful: \begin{verbatim} csuspend; \end{verbatim} When the interpreter reaches the statement it is stopped and echoed: \begin{verbatim} clif interrupt level \end{verbatim} Where the {\sf $<$number$>$} is a positive number. A user, at any interrupt level\index{interrupt!level}, can do anything what is available in the interpreter. To resume the run of the interpreter a user should write the following statement\index{statement!resume@{\sf resume}}: \begin{verbatim} resume; \end{verbatim} or press the key DC4 (Ctrl-t)\index{Ctrl-t}. The interpreter is then echoed: \begin{verbatim} clif interrupt level -1 \end{verbatim} which means that the interrupt level is decreased. The lowest interrupt level\index{interrupt!level} is zero. An example of use of the synchronous interrupt\index{interrupt!synchronous} follows:\index{function!cprintf@{\sf cprintf()}}\index{function!cscanf@{\sf cscanf()}} {\mybasel \begin{verbatim} int a,n; extern int cscanf(); export_type extern int cprintf(); int fakt(int n) { csuspend; if(n==1) { return(1); } else { return(fakt(n-1)*n); } } cprintf(1,"input n %d\n",n); cscanf(0,"%d",n); csuspend; a=fakt(n); cprintf(1,"factorial = %d\n",a); exit; \end{verbatim}} \section{Asynchronous interrupt}\index{interrupt!asynchronous} An asynchronous interrupt can be invoked by the user with pressing the key {\sf Ctrl-t}\index{Ctrl-t} while the virtual machine\index{virtual machine} of the interpreter is running. A dummy program in which a user can follow the use of asynchronous interrupt is:\index{function!cprintf@{\sf cprintf()}} {\mybasel \begin{verbatim} extern int cscanf(); export_type extern int cprintf(); int i; for(i=0;i<100000;++i) { cprintf(1,"%d",i); } cprintf(1,"%s\n","loop is over"); exit; \end{verbatim}} After making statements requested by the user, the further processing can be invoked as by the synchronous interrupt\index{interrupt!synchronous} with pressing {\sf Ctrl-t} or typing {\sf resume}\index{statement!resume@{\sf resume}}. %\input{gu10a.tex} \chapter{Errors} \section{\CiF\ error messages} In this chapter is a list of \CiF\ error messages. \subsection{Syntax error messages} {\mybasel \begin{verbatim} case 1000: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: variable `%s' isn't declared\n", err_no, line_counter, text); break; case 1001: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: variable `%s' was already declared\n", err_no, line_counter, text); break; case 1002: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: remote procedure %s is not declared\n", err_no, line_counter, proc_name_text[proc]); break; case 1003: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: local variable `%s' was already declared\n", err_no, text); break; case 1004: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: at the %d-th char, near the \"%s\"\n", err_no, line_counter, char_counter, yytext); break; case 1005: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: Invalid type of the operand, %d-th character\n", err_no, line_counter, char_counter); break; case 1006: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: Remote function %s already declared\n", err_no, text); break; case 1007: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: Remote function isn't declared\n", err_no); break; case 1008: print_source_line (); fprintfx (stderr, "Error %d: Remote functions are not in the load table\n", err_no); break; case 1009: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: Void type in expression at line\n", err_no, line_counter); break; case 1010: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: Void type assigned to l_value\n", err_no, line_counter); break; case 1011: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: load can't open file `%s'\n", err_no, yytext); break; case 1012: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: variable or field `%s' declared void\n", err_no, line_counter, text); break; case 1013: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: switch quantity not an integer\n", err_no, line_counter); break; case 1014: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: case label does not reduce to an integer constant\n", err_no, line_counter); break; case 1015: print_file_name (); fprintfx (stderr, "Error %d: line %d: duplicate case value", err_no, tmp_c->line_number); print_file_name (); fprintfx (stderr, "Error %d: line %d: this is the first entry for that value\n", err_no, tmp_m->line_number); break; case 1016: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: case label not within a switch statement\n", err_no, line_counter); break; case 1017: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: struct tag `%s' was already declared\n", err_no, line_counter, text); break; case 1018: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: union tag `%s' was already declared\n", err_no, line_counter, text); break; case 1019: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: enum tag `%s' was already declared\n", err_no, line_counter, text); break; \end{verbatim} } \subsection{\CiF\ compilation error messages} {\mybasel \begin{verbatim} case 2000: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: invalid number of subscripts\n", err_no, line_counter); break; case 2001: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: `%s' is not an array variable\n", err_no, line_counter, text); break; case 2002: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: invalid type of array subscript\n", err_no, line_counter); break; case 2003: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: type of formal parameter does not match previous declaration\n", err_no, line_counter); break; case 2004: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: number of formal parameters does not match previous declaration\n", err_no, line_counter); break; case 2005: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: name of formal paramter does not match previous declaration\n", err_no, line_counter); break; case 2006: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: size of array subscript of formal parameter does not match previous declaration\n", err_no, line_counter); break; case 2007: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: number of array subscripts of formal parameter does not match previous declaration\n", err_no, line_counter); break; \end{verbatim} } \subsection{\CiF\ } {\mybasel \begin{verbatim} case 3000: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: \"break\" outside loop or switch\n", err_no, line_counter); break; case 3001: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: bad used continue\n", err_no, line_counter); break; case 3002: print_source_line (); print_file_name (); fprintfx (stderr, "Error %d: line %d: default label not within a switch statement\n", err_no, line_counter); break; case 3003: print_file_name (); fprintfx (stderr, "Error %d: line %d: multiple default labels in one switch", err_no, line_counter); print_file_name (); fprintfx (stderr, "Error %d: line %d: this is the first default label\n", err_no, fixp->switch1.def_use.line_number); break; case 3004: print_file_name (); fprintfx (stderr, "Error %d: line %d: duplicate label `%s'\n", err_no, line_counter, text); break; case 3005: print_file_name (); fprintfx (stderr, "Error %d: line %d: label `%s' used but not defined\n", err_no, error_line_number, text); break; \end{verbatim} } \subsection{\CiF\ run-time error messages} {\mybasel \begin{verbatim} case 4000: fprintfx (stderr, "Error %d: interpreter: full memory\n", err_no); break; case 4001: fprintfx (stderr, "Error %d: interpreter: stack overflow\n", err_no); break; case 4002: fprintfx (stderr, "Error %d: Operating system out of memory\n", err_no); break; \end{verbatim} } \subsection{\CiF\ fatal error messages} {\mybasel \begin{verbatim} case 5000: fprintfx (stderr, "Compile fatal error %d:\nInterpreter Internal Error\n(unknown operand type)\nin line %d\ne-mail: %s\n", err_no, line_counter, EMAIL); break; case 5001: fprintfx (stderr, "Run-time fatal error %d:\nInternal Interpreter Error\n(unknown instruction)\ne-mail: %s\n", err_no, EMAIL); break; case 5002: fprintfx (stderr, "Compile fatal error %d:\nInterpreter Internal Error\n(error in book-keeping)\nin line %d\ne-mail: %s\n", err_no, line_counter, EMAIL); break; \end{verbatim} } \subsection{\CiF\ warning messages} {\mybasel \begin{verbatim} case 6000: if (warning_yes) { fprintfx (stderr, "Warning %d: line %d: remote function %s already declared\n", err_no, line_counter, text); } return; break; case 6001: if (warning_yes) { print_file_name (); fprintfx (stderr, "Warning %d: line %d: `return' with no value, in function returning non-void\n", err_no, line_counter); } return; break; case 6002: if (warning_yes) { print_file_name (); fprintfx (stderr, "Warning %d: line %d: `return' with a value, in function returning void\n", err_no, line_counter); } return; break; case 6003: if (warning_yes) { if (proc) { fprintfx (stderr, "%s: In function `%s':\n%s: Warning %d: unused variable `%s'\n", argvv[argc_counter], proc_name_text[proc], argvv[argc_counter], err_no, text); } else { fprintfx (stderr, "%s: In block finishing at line %d:\n%s: Warning %d: unused variable `%s'\n", argvv[argc_counter], line_counter, argvv[argc_counter], err_no, text); } } return; break; case 6004: if (warning_yes) { fprintfx (stderr, "Warning %d: line %d: label `%s' defined but not used\n", err_no, error_line_number, text); } return; break; case 6005: if (warning_yes) { fprintfx (stderr, "Warning %d: `/*' within comment\n", err_no); } return; break; case 6006: if (warning_yes) { if (proc) { fprintfx (stderr, "%s: In function `%s':\n%s: Warning %d: `%s' might be used uninitialized in this function\n", argvv[argc_counter], proc_name_text[proc], argvv[argc_counter], err_no, text); } else { fprintfx (stderr, "%s: In block finishing at line %d:\n%s: Warning %d: `%s' might be used uninitialized in the block\n", argvv[argc_counter], line_counter, argvv[argc_counter], err_no, text); } } return; break; case 6007: if (warning_yes) { print_file_name (); fprintfx (stderr, "In function `%s':\n%s: Warning %d: number of locals is greater than the ANSI allows\n", proc_name_text[proc], argvv[argc_counter], err_no); } return; break; case 6008: if (warning_yes) { print_file_name (); fprintfx (stderr, "In function `%s':\n%s: Warning %d: number of params is greater than the ANSI allows\n", proc_name_text[proc], argvv[argc_counter], err_no); } return; break; \end{verbatim} } \subsection{\CiF\ initialization error messages} {\mybasel \begin{verbatim} case 7000: fprintfx (stderr, "Error %d: in run-string and/or in `clif.ini' file\n", err_no); break; case 7001: fprintfx (stderr, "Error %d: interpreter: can't open file %s\n\n", err_no, argvv[argc_counter]); break; default: fprintfx (stderr, "Fatal error invalid error number (%d)\ne-mail: %s\n", err_no, EMAIL); break; \end{verbatim} } \bibliographystyle{plain} \bibliography{knia} \printindex \end{document} clif-0.93/doc/reccycla.ps100644 1750 1750 73021 6476615674 14067 0ustar korenkoren%!PS-Adobe-2.0 %%Title: reccycla.ps %%Creator: fig2dev Version 3.2 Patchlevel 0-beta3 %%CreationDate: Mon Mar 2 20:51:08 1998 %%For: koren@yedi.vm.stuba.sk (Ludo &) %%Orientation: Landscape %%BoundingBox: 23 -99 571 941 %%Pages: 1 %%BeginSetup %%IncludeFeature: *PageSize A4 %%EndSetup %%Magnification: 0.8247 %%EndComments /$F2psDict 200 dict def $F2psDict begin $F2psDict /mtrx matrix put /col-1 {0 setgray} bind def /col0 {0.000 0.000 0.000 srgb} bind def /col1 {0.000 0.000 1.000 srgb} bind def /col2 {0.000 1.000 0.000 srgb} bind def /col3 {0.000 1.000 1.000 srgb} bind def /col4 {1.000 0.000 0.000 srgb} bind def /col5 {1.000 0.000 1.000 srgb} bind def /col6 {1.000 1.000 0.000 srgb} bind def /col7 {1.000 1.000 1.000 srgb} bind def /col8 {0.000 0.000 0.560 srgb} bind def /col9 {0.000 0.000 0.690 srgb} bind def /col10 {0.000 0.000 0.820 srgb} bind def /col11 {0.530 0.810 1.000 srgb} bind def /col12 {0.000 0.560 0.000 srgb} bind def /col13 {0.000 0.690 0.000 srgb} bind def /col14 {0.000 0.820 0.000 srgb} bind def /col15 {0.000 0.560 0.560 srgb} bind def /col16 {0.000 0.690 0.690 srgb} bind def /col17 {0.000 0.820 0.820 srgb} bind def /col18 {0.560 0.000 0.000 srgb} bind def /col19 {0.690 0.000 0.000 srgb} bind def /col20 {0.820 0.000 0.000 srgb} bind def /col21 {0.560 0.000 0.560 srgb} bind def /col22 {0.690 0.000 0.690 srgb} bind def /col23 {0.820 0.000 0.820 srgb} bind def /col24 {0.500 0.190 0.000 srgb} bind def /col25 {0.630 0.250 0.000 srgb} bind def /col26 {0.750 0.380 0.000 srgb} bind def /col27 {1.000 0.500 0.500 srgb} bind def /col28 {1.000 0.630 0.630 srgb} bind def /col29 {1.000 0.750 0.750 srgb} bind def /col30 {1.000 0.880 0.880 srgb} bind def /col31 {1.000 0.840 0.000 srgb} bind def end save 9.5 -110.0 translate 90 rotate 1 -1 scale /cp {closepath} bind def /ef {eofill} bind def /gr {grestore} bind def /gs {gsave} bind def /sa {save} bind def /rs {restore} bind def /l {lineto} bind def /m {moveto} bind def /rm {rmoveto} bind def /n {newpath} bind def /s {stroke} bind def /sh {show} bind def /slc {setlinecap} bind def /slj {setlinejoin} bind def /slw {setlinewidth} bind def /srgb {setrgbcolor} bind def /rot {rotate} bind def /sc {scale} bind def /sd {setdash} bind def /ff {findfont} bind def /sf {setfont} bind def /scf {scalefont} bind def /sw {stringwidth} bind def /tr {translate} bind def /tnt {dup dup currentrgbcolor 4 -2 roll dup 1 exch sub 3 -1 roll mul add 4 -2 roll dup 1 exch sub 3 -1 roll mul add 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} bind def /shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul 4 -2 roll mul srgb} bind def /reencdict 12 dict def /ReEncode { reencdict begin /newcodesandnames exch def /newfontname exch def /basefontname exch def /basefontdict basefontname findfont def /newfont basefontdict maxlength dict def basefontdict { exch dup /FID ne { dup /Encoding eq { exch dup length array copy newfont 3 1 roll put } { exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall newfont /FontName newfontname put newcodesandnames aload pop 128 1 255 { newfont /Encoding get exch /.notdef put } for newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat newfontname newfont definefont pop end } def /isovec [ 8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde 8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis 8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron 8#220 /dotlessi 8#230 /oe 8#231 /OE 8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling 8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis 8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot 8#255 /endash 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus 8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph 8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine 8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf 8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute 8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring 8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute 8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute 8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve 8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply 8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex 8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave 8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring 8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute 8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute 8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve 8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide 8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex 8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def /Courier /Courier-iso isovec ReEncode /Courier-Bold /Courier-Bold-iso isovec ReEncode /$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def /$F2psEnd {$F2psEnteredState restore end} def %%EndProlog $F2psBegin 10 setmiterlimit n -1000 11801 m -1000 -1000 l 21217 -1000 l 21217 11801 l cp clip 0.05195 0.05195 sc %%Page: 1 1 % Polyline 7.500 slw gs clippath 5085 5498 m 5250 5535 l 5085 5573 l 5295 5573 l 5295 5498 l cp clip n 5070 5535 m 5280 5535 l gs col-1 s gr gr % arrowhead n 5085 5498 m 5250 5535 l 5085 5573 l 5085 5535 l 5085 5498 l cp gs 0.00 setgray ef gr col-1 s % Polyline gs clippath 7733 7290 m 7695 7455 l 7658 7290 l 7658 7500 l 7733 7500 l cp clip n 7695 7185 m 7695 7485 l gs col-1 s gr gr % arrowhead n 7733 7290 m 7695 7455 l 7658 7290 l 7695 7290 l 7733 7290 l cp gs 0.00 setgray ef gr col-1 s % Polyline gs clippath 10125 5498 m 10290 5535 l 10125 5573 l 10335 5573 l 10335 5498 l cp clip n 10110 5535 m 10320 5535 l gs col-1 s gr gr % arrowhead n 10125 5498 m 10290 5535 l 10125 5573 l 10125 5535 l 10125 5498 l cp gs 0.00 setgray ef gr col-1 s % Polyline gs clippath 10125 9098 m 10290 9135 l 10125 9173 l 10335 9173 l 10335 9098 l cp clip n 10110 9135 m 10320 9135 l gs col-1 s gr gr % arrowhead n 10125 9098 m 10290 9135 l 10125 9173 l 10125 9135 l 10125 9098 l cp gs 0.00 setgray ef gr col-1 s % Polyline gs clippath 15165 9098 m 15330 9135 l 15165 9173 l 15375 9173 l 15375 9098 l cp clip n 15150 9135 m 15360 9135 l gs col-1 s gr gr % arrowhead n 15165 9098 m 15330 9135 l 15165 9173 l 15165 9135 l 15165 9098 l cp gs 0.00 setgray ef gr col-1 s % Polyline gs clippath 2693 3690 m 2655 3855 l 2618 3690 l 2618 3900 l 2693 3900 l cp clip n 2655 3585 m 2655 3885 l gs col-1 s gr gr % arrowhead n 2693 3690 m 2655 3855 l 2618 3690 l 2655 3690 l 2693 3690 l cp gs 0.00 setgray ef gr col-1 s % Polyline 0.000 slw n 10320 7485 m 15165 7485 l 15165 10800 l 10320 10800 l cp gs col7 1.00 shd ef gr % Polyline n 240 285 m 5085 285 l 5085 3600 l 240 3600 l cp gs col7 1.00 shd ef gr % Polyline n 15360 7485 m 20205 7485 l 20205 10800 l 15360 10800 l cp gs col7 1.00 shd ef gr % Polyline n 240 3885 m 5085 3885 l 5085 7200 l 240 7200 l cp gs col7 1.00 shd ef gr % Polyline n 5280 3885 m 10125 3885 l 10125 7200 l 5280 7200 l cp gs col7 1.00 shd ef gr % Polyline n 5280 7485 m 10125 7485 l 10125 10800 l 5280 10800 l cp gs col7 1.00 shd ef gr % Polyline n 10320 3885 m 15165 3885 l 15165 7200 l 10320 7200 l cp gs col7 1.00 shd ef gr % Polyline 7.500 slw n 2100 3015 m 4935 3015 l gs col-1 s gr % Polyline n 4965 1410 m 4965 3285 l gs col-1 s gr % Polyline n 1875 3285 m 4980 3285 l gs col-1 s gr % Polyline n 5010 585 m 5010 3525 l gs col-1 s gr % Polyline n 285 3525 m 5025 3525 l gs col-1 s gr % Polyline n 5055 300 m 5055 3570 l gs col-1 s gr % Polyline n 240 3570 m 5070 3570 l gs col-1 s gr % Polyline n 5070 300 m 5070 3585 l gs col-1 s gr % Polyline n 255 3585 m 5085 3585 l gs col-1 s gr /Courier-iso ff 150.00 scf sf 285 495 m gs 1 -1 sc (1) col-1 sh gr /Courier-iso ff 150.00 scf sf 390 495 m gs 1 -1 sc (: ) col-1 sh gr /Courier-Bold-iso ff 150.00 scf sf 600 495 m gs 1 -1 sc (*type) col-1 sh gr /Courier-iso ff 150.00 scf sf 510 780 m gs 1 -1 sc (input) col-1 sh gr /Courier-iso ff 150.00 scf sf 1560 780 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 1875 780 m gs 1 -1 sc (0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 510 975 m gs 1 -1 sc (arity) col-1 sh gr /Courier-iso ff 150.00 scf sf 1560 975 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 1875 975 m gs 1 -1 sc (0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 510 1170 m gs 1 -1 sc (field_name) col-1 sh gr /Courier-iso ff 150.00 scf sf 1560 1170 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 1875 1170 m gs 1 -1 sc (0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 510 1365 m gs 1 -1 sc (offset) col-1 sh gr /Courier-iso ff 150.00 scf sf 1560 1365 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 1875 1365 m gs 1 -1 sc (0) col-1 sh gr /Courier-iso ff 150.00 scf sf 510 2415 m gs 1 -1 sc (attribute) col-1 sh gr /Courier-iso ff 150.00 scf sf 1560 2415 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 2100 1605 m gs 1 -1 sc (function_class = POINTER) col-1 sh gr /Courier-iso ff 150.00 scf sf 2100 1875 m gs 1 -1 sc (export_type = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 2100 2145 m gs 1 -1 sc (type_qualifier = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 2100 2415 m gs 1 -1 sc (storage_class_specifier = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 2100 2685 m gs 1 -1 sc (arit_class = 0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 2100 2955 m gs 1 -1 sc (memory_size = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 2100 3225 m gs 1 -1 sc (domain = 0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 510 3465 m gs 1 -1 sc (output) col-1 sh gr /Courier-iso ff 150.00 scf sf 1575 3465 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-Bold-iso ff 150.00 scf sf 1890 3465 m gs 1 -1 sc (0x1f6718) col-1 sh gr % Polyline n 240 3885 m 5070 3885 l gs col-1 s gr % Polyline n 240 3900 m 240 7170 l gs col-1 s gr % Polyline n 285 4125 m 5025 4125 l gs col-1 s gr % Polyline n 285 4170 m 5025 4170 l gs col-1 s gr % Polyline n 285 4185 m 285 7125 l gs col-1 s gr % Polyline n 1875 4995 m 4980 4995 l gs col-1 s gr % Polyline n 1875 5010 m 1875 6885 l gs col-1 s gr % Polyline n 2100 5265 m 4935 5265 l gs col-1 s gr % Polyline n 2100 5535 m 4935 5535 l gs col-1 s gr % Polyline n 2100 5805 m 4935 5805 l gs col-1 s gr % Polyline n 2100 6075 m 4935 6075 l gs col-1 s gr % Polyline n 2100 6345 m 4935 6345 l gs col-1 s gr % Polyline n 2100 6615 m 4935 6615 l gs col-1 s gr % Polyline n 4965 5010 m 4965 6885 l gs col-1 s gr % Polyline n 1875 6885 m 4980 6885 l gs col-1 s gr % Polyline n 5010 4185 m 5010 7125 l gs col-1 s gr % Polyline n 285 7125 m 5025 7125 l gs col-1 s gr % Polyline n 5055 3900 m 5055 7170 l gs col-1 s gr % Polyline n 240 7170 m 5070 7170 l gs col-1 s gr % Polyline n 5070 3900 m 5070 7185 l gs col-1 s gr % Polyline n 255 7185 m 5085 7185 l gs col-1 s gr /Courier-iso ff 150.00 scf sf 285 4095 m gs 1 -1 sc (2) col-1 sh gr /Courier-iso ff 150.00 scf sf 390 4095 m gs 1 -1 sc (: ) col-1 sh gr /Courier-Bold-iso ff 150.00 scf sf 600 4095 m gs 1 -1 sc (*type->output) col-1 sh gr /Courier-iso ff 150.00 scf sf 510 4380 m gs 1 -1 sc (input) col-1 sh gr /Courier-iso ff 150.00 scf sf 1575 4380 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-Bold-iso ff 150.00 scf sf 1890 4380 m gs 1 -1 sc (0x1f67b8) col-1 sh gr /Courier-iso ff 150.00 scf sf 510 4575 m gs 1 -1 sc (arity) col-1 sh gr /Courier-iso ff 150.00 scf sf 1560 4575 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 1875 4575 m gs 1 -1 sc (0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 510 4770 m gs 1 -1 sc (field_name) col-1 sh gr /Courier-iso ff 150.00 scf sf 1560 4770 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 1875 4770 m gs 1 -1 sc (0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 510 4965 m gs 1 -1 sc (offset) col-1 sh gr /Courier-iso ff 150.00 scf sf 1560 4965 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 1875 4965 m gs 1 -1 sc (0) col-1 sh gr /Courier-iso ff 150.00 scf sf 510 6015 m gs 1 -1 sc (attribute) col-1 sh gr /Courier-iso ff 150.00 scf sf 1560 6015 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 2100 5205 m gs 1 -1 sc (function_class = STRUCT_FC) col-1 sh gr /Courier-iso ff 150.00 scf sf 2100 5475 m gs 1 -1 sc (export_type = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 2100 5745 m gs 1 -1 sc (type_qualifier = UNDEF_TQ) col-1 sh gr /Courier-iso ff 150.00 scf sf 2100 6015 m gs 1 -1 sc (storage_class_specifier = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 2100 6285 m gs 1 -1 sc (arit_class = 0x29dac) col-1 sh gr /Courier-iso ff 150.00 scf sf 2100 6555 m gs 1 -1 sc (memory_size = 8) col-1 sh gr /Courier-iso ff 150.00 scf sf 2100 6825 m gs 1 -1 sc (domain = 0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 510 7065 m gs 1 -1 sc (output) col-1 sh gr /Courier-iso ff 150.00 scf sf 1560 7065 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 1875 7065 m gs 1 -1 sc (0x0) col-1 sh gr % Polyline n 5280 3885 m 10110 3885 l gs col-1 s gr % Polyline n 5280 3900 m 5280 7170 l gs col-1 s gr % Polyline n 5325 4125 m 10065 4125 l gs col-1 s gr % Polyline n 5325 4170 m 10065 4170 l gs col-1 s gr % Polyline n 5325 4185 m 5325 7125 l gs col-1 s gr % Polyline n 6915 4995 m 10020 4995 l gs col-1 s gr % Polyline n 6915 5010 m 6915 6885 l gs col-1 s gr % Polyline n 7140 5265 m 9975 5265 l gs col-1 s gr % Polyline n 7140 5535 m 9975 5535 l gs col-1 s gr % Polyline n 7140 5805 m 9975 5805 l gs col-1 s gr % Polyline n 7140 6075 m 9975 6075 l gs col-1 s gr % Polyline n 7140 6345 m 9975 6345 l gs col-1 s gr % Polyline n 7140 6615 m 9975 6615 l gs col-1 s gr % Polyline n 10005 5010 m 10005 6885 l gs col-1 s gr % Polyline n 6915 6885 m 10020 6885 l gs col-1 s gr % Polyline n 10050 4185 m 10050 7125 l gs col-1 s gr % Polyline n 5325 7125 m 10065 7125 l gs col-1 s gr % Polyline n 10095 3900 m 10095 7170 l gs col-1 s gr % Polyline n 5280 7170 m 10110 7170 l gs col-1 s gr % Polyline n 10110 3900 m 10110 7185 l gs col-1 s gr % Polyline n 5295 7185 m 10125 7185 l gs col-1 s gr /Courier-iso ff 150.00 scf sf 5325 4095 m gs 1 -1 sc (3) col-1 sh gr /Courier-iso ff 150.00 scf sf 5430 4095 m gs 1 -1 sc (: ) col-1 sh gr /Courier-Bold-iso ff 150.00 scf sf 5640 4095 m gs 1 -1 sc (*type->output->input) col-1 sh gr /Courier-iso ff 150.00 scf sf 5550 4380 m gs 1 -1 sc (input) col-1 sh gr /Courier-iso ff 150.00 scf sf 6600 4380 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 6915 4380 m gs 1 -1 sc (0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 5550 4575 m gs 1 -1 sc (arity) col-1 sh gr /Courier-iso ff 150.00 scf sf 6615 4575 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-Bold-iso ff 150.00 scf sf 6930 4575 m gs 1 -1 sc (0x1f68e0) col-1 sh gr /Courier-iso ff 150.00 scf sf 5550 4770 m gs 1 -1 sc (field_name) col-1 sh gr /Courier-iso ff 150.00 scf sf 6600 4770 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 6915 4770 m gs 1 -1 sc (0x4a0fd "a") col-1 sh gr /Courier-iso ff 150.00 scf sf 5550 4965 m gs 1 -1 sc (offset) col-1 sh gr /Courier-iso ff 150.00 scf sf 6600 4965 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 6915 4965 m gs 1 -1 sc (0) col-1 sh gr /Courier-iso ff 150.00 scf sf 5550 6015 m gs 1 -1 sc (attribute) col-1 sh gr /Courier-iso ff 150.00 scf sf 6600 6015 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 7140 5205 m gs 1 -1 sc (function_class = POINTER) col-1 sh gr /Courier-iso ff 150.00 scf sf 7140 5475 m gs 1 -1 sc (export_type = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 7140 5745 m gs 1 -1 sc (type_qualifier = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 7140 6015 m gs 1 -1 sc (storage_class_specifier = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 7140 6285 m gs 1 -1 sc (arit_class = 0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 7140 6555 m gs 1 -1 sc (memory_size = 4) col-1 sh gr /Courier-iso ff 150.00 scf sf 7140 6825 m gs 1 -1 sc (domain = 0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 5550 7065 m gs 1 -1 sc (output) col-1 sh gr /Courier-iso ff 150.00 scf sf 6615 7065 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-Bold-iso ff 150.00 scf sf 6930 7065 m gs 1 -1 sc (0x1f67e8) col-1 sh gr % Polyline n 5280 7485 m 10110 7485 l gs col-1 s gr % Polyline n 5280 7500 m 5280 10770 l gs col-1 s gr % Polyline n 5325 7725 m 10065 7725 l gs col-1 s gr % Polyline n 5325 7770 m 10065 7770 l gs col-1 s gr % Polyline n 5325 7785 m 5325 10725 l gs col-1 s gr % Polyline n 6915 8595 m 10020 8595 l gs col-1 s gr % Polyline n 6915 8610 m 6915 10485 l gs col-1 s gr % Polyline n 7140 8865 m 9975 8865 l gs col-1 s gr % Polyline n 7140 9135 m 9975 9135 l gs col-1 s gr % Polyline n 7140 9405 m 9975 9405 l gs col-1 s gr % Polyline n 7140 9675 m 9975 9675 l gs col-1 s gr % Polyline n 7140 9945 m 9975 9945 l gs col-1 s gr % Polyline n 7140 10215 m 9975 10215 l gs col-1 s gr % Polyline n 10005 8610 m 10005 10485 l gs col-1 s gr % Polyline n 6915 10485 m 10020 10485 l gs col-1 s gr % Polyline n 10050 7785 m 10050 10725 l gs col-1 s gr % Polyline n 5325 10725 m 10065 10725 l gs col-1 s gr % Polyline n 10095 7500 m 10095 10770 l gs col-1 s gr % Polyline n 5280 10770 m 10110 10770 l gs col-1 s gr % Polyline n 10110 7500 m 10110 10785 l gs col-1 s gr % Polyline n 5295 10785 m 10125 10785 l gs col-1 s gr /Courier-iso ff 150.00 scf sf 5325 7695 m gs 1 -1 sc (4) col-1 sh gr /Courier-iso ff 150.00 scf sf 5430 7695 m gs 1 -1 sc (: ) col-1 sh gr /Courier-Bold-iso ff 150.00 scf sf 5640 7695 m gs 1 -1 sc (*type->ou...->output) col-1 sh gr /Courier-iso ff 150.00 scf sf 5550 7980 m gs 1 -1 sc (input) col-1 sh gr /Courier-iso ff 150.00 scf sf 6615 7980 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-Bold-iso ff 150.00 scf sf 6930 7980 m gs 1 -1 sc (0x1f6818) col-1 sh gr /Courier-iso ff 150.00 scf sf 5550 8175 m gs 1 -1 sc (arity) col-1 sh gr /Courier-iso ff 150.00 scf sf 6600 8175 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 6915 8175 m gs 1 -1 sc (0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 5550 8370 m gs 1 -1 sc (field_name) col-1 sh gr /Courier-iso ff 150.00 scf sf 6600 8370 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 6915 8370 m gs 1 -1 sc (0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 5550 8565 m gs 1 -1 sc (offset) col-1 sh gr /Courier-iso ff 150.00 scf sf 6600 8565 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 6915 8565 m gs 1 -1 sc (0) col-1 sh gr /Courier-iso ff 150.00 scf sf 5550 9615 m gs 1 -1 sc (attribute) col-1 sh gr /Courier-iso ff 150.00 scf sf 6600 9615 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 7140 8805 m gs 1 -1 sc (function_class = STRUCT_FC) col-1 sh gr /Courier-iso ff 150.00 scf sf 7140 9075 m gs 1 -1 sc (export_type = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 7140 9345 m gs 1 -1 sc (type_qualifier = UNDEF_TQ) col-1 sh gr /Courier-iso ff 150.00 scf sf 7140 9615 m gs 1 -1 sc (storage_class_specifier = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 7140 9885 m gs 1 -1 sc (arit_class = 0x29dac) col-1 sh gr /Courier-iso ff 150.00 scf sf 7140 10155 m gs 1 -1 sc (memory_size = 8) col-1 sh gr /Courier-iso ff 150.00 scf sf 7140 10425 m gs 1 -1 sc (domain = 0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 5550 10665 m gs 1 -1 sc (output) col-1 sh gr /Courier-iso ff 150.00 scf sf 6600 10665 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 6915 10665 m gs 1 -1 sc (0x0) col-1 sh gr % Polyline n 10320 7485 m 15150 7485 l gs col-1 s gr % Polyline n 10320 7500 m 10320 10770 l gs col-1 s gr % Polyline n 10365 7725 m 15105 7725 l gs col-1 s gr % Polyline n 10365 7770 m 15105 7770 l gs col-1 s gr % Polyline n 10365 7785 m 10365 10725 l gs col-1 s gr % Polyline n 11955 8595 m 15060 8595 l gs col-1 s gr % Polyline n 11955 8610 m 11955 10485 l gs col-1 s gr % Polyline n 12180 8865 m 15015 8865 l gs col-1 s gr % Polyline n 12180 9135 m 15015 9135 l gs col-1 s gr % Polyline n 12180 9405 m 15015 9405 l gs col-1 s gr % Polyline n 12180 9675 m 15015 9675 l gs col-1 s gr % Polyline n 12180 9945 m 15015 9945 l gs col-1 s gr % Polyline n 12180 10215 m 15015 10215 l gs col-1 s gr % Polyline n 15045 8610 m 15045 10485 l gs col-1 s gr % Polyline n 11955 10485 m 15060 10485 l gs col-1 s gr % Polyline n 15090 7785 m 15090 10725 l gs col-1 s gr % Polyline n 10365 10725 m 15105 10725 l gs col-1 s gr % Polyline n 15135 7500 m 15135 10770 l gs col-1 s gr % Polyline n 10320 10770 m 15150 10770 l gs col-1 s gr % Polyline n 15150 7500 m 15150 10785 l gs col-1 s gr % Polyline n 10335 10785 m 15165 10785 l gs col-1 s gr /Courier-iso ff 150.00 scf sf 10365 7695 m gs 1 -1 sc (6) col-1 sh gr /Courier-iso ff 150.00 scf sf 10470 7695 m gs 1 -1 sc (: ) col-1 sh gr /Courier-Bold-iso ff 150.00 scf sf 10680 7695 m gs 1 -1 sc (*type->ou...t->input) col-1 sh gr /Courier-iso ff 150.00 scf sf 10590 7980 m gs 1 -1 sc (input) col-1 sh gr /Courier-iso ff 150.00 scf sf 11640 7980 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 11955 7980 m gs 1 -1 sc (0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 10590 8175 m gs 1 -1 sc (arity) col-1 sh gr /Courier-iso ff 150.00 scf sf 11655 8175 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-Bold-iso ff 150.00 scf sf 11970 8175 m gs 1 -1 sc (0x1f6848) col-1 sh gr /Courier-iso ff 150.00 scf sf 10590 8370 m gs 1 -1 sc (field_name) col-1 sh gr /Courier-iso ff 150.00 scf sf 11640 8370 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 11955 8370 m gs 1 -1 sc (0x4a0fd "a") col-1 sh gr /Courier-iso ff 150.00 scf sf 10590 8565 m gs 1 -1 sc (offset) col-1 sh gr /Courier-iso ff 150.00 scf sf 11640 8565 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 11955 8565 m gs 1 -1 sc (0) col-1 sh gr /Courier-iso ff 150.00 scf sf 10590 9615 m gs 1 -1 sc (attribute) col-1 sh gr /Courier-iso ff 150.00 scf sf 11640 9615 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 12180 8805 m gs 1 -1 sc (function_class = SIMPLE) col-1 sh gr /Courier-iso ff 150.00 scf sf 12180 9075 m gs 1 -1 sc (export_type = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 12180 9345 m gs 1 -1 sc (type_qualifier = UNDEF_TQ) col-1 sh gr /Courier-iso ff 150.00 scf sf 12180 9615 m gs 1 -1 sc (storage_class_specifier = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 12180 9885 m gs 1 -1 sc (arit_class = 0x29dac) col-1 sh gr /Courier-iso ff 150.00 scf sf 12180 10155 m gs 1 -1 sc (memory_size = 4) col-1 sh gr /Courier-iso ff 150.00 scf sf 12180 10425 m gs 1 -1 sc (domain = 0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 10590 10665 m gs 1 -1 sc (output) col-1 sh gr /Courier-iso ff 150.00 scf sf 11640 10665 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 11955 10665 m gs 1 -1 sc (0x0) col-1 sh gr % Polyline n 15360 7485 m 20190 7485 l gs col-1 s gr % Polyline n 15360 7500 m 15360 10770 l gs col-1 s gr % Polyline n 15405 7725 m 20145 7725 l gs col-1 s gr % Polyline n 15405 7770 m 20145 7770 l gs col-1 s gr % Polyline n 15405 7785 m 15405 10725 l gs col-1 s gr % Polyline n 16995 8595 m 20100 8595 l gs col-1 s gr % Polyline n 16995 8610 m 16995 10485 l gs col-1 s gr % Polyline n 17220 8865 m 20055 8865 l gs col-1 s gr % Polyline n 17220 9135 m 20055 9135 l gs col-1 s gr % Polyline n 17220 9405 m 20055 9405 l gs col-1 s gr % Polyline n 17220 9675 m 20055 9675 l gs col-1 s gr % Polyline n 17220 9945 m 20055 9945 l gs col-1 s gr % Polyline n 17220 10215 m 20055 10215 l gs col-1 s gr % Polyline n 20085 8610 m 20085 10485 l gs col-1 s gr % Polyline n 16995 10485 m 20100 10485 l gs col-1 s gr % Polyline n 20130 7785 m 20130 10725 l gs col-1 s gr % Polyline n 15405 10725 m 20145 10725 l gs col-1 s gr % Polyline n 20175 7500 m 20175 10770 l gs col-1 s gr % Polyline n 15360 10770 m 20190 10770 l gs col-1 s gr % Polyline n 20190 7500 m 20190 10785 l gs col-1 s gr % Polyline n 15375 10785 m 20205 10785 l gs col-1 s gr /Courier-iso ff 150.00 scf sf 15405 7695 m gs 1 -1 sc (7) col-1 sh gr /Courier-iso ff 150.00 scf sf 15510 7695 m gs 1 -1 sc (: ) col-1 sh gr /Courier-Bold-iso ff 150.00 scf sf 15720 7695 m gs 1 -1 sc (*type->ou...t->arity) col-1 sh gr /Courier-iso ff 150.00 scf sf 15630 7980 m gs 1 -1 sc (input) col-1 sh gr /Courier-iso ff 150.00 scf sf 16680 7980 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 16995 7980 m gs 1 -1 sc (0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 15630 8175 m gs 1 -1 sc (arity) col-1 sh gr /Courier-iso ff 150.00 scf sf 16680 8175 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 16995 8175 m gs 1 -1 sc (0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 15630 8370 m gs 1 -1 sc (field_name) col-1 sh gr /Courier-iso ff 150.00 scf sf 16680 8370 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 16995 8370 m gs 1 -1 sc (0x4a101 "b") col-1 sh gr /Courier-iso ff 150.00 scf sf 15630 8565 m gs 1 -1 sc (offset) col-1 sh gr /Courier-iso ff 150.00 scf sf 16680 8565 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 16995 8565 m gs 1 -1 sc (4) col-1 sh gr /Courier-iso ff 150.00 scf sf 15630 9615 m gs 1 -1 sc (attribute) col-1 sh gr /Courier-iso ff 150.00 scf sf 16680 9615 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 17220 8805 m gs 1 -1 sc (function_class = SIMPLE) col-1 sh gr /Courier-iso ff 150.00 scf sf 17220 9075 m gs 1 -1 sc (export_type = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 17220 9345 m gs 1 -1 sc (type_qualifier = UNDEF_TQ) col-1 sh gr /Courier-iso ff 150.00 scf sf 17220 9615 m gs 1 -1 sc (storage_class_specifier = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 17220 9885 m gs 1 -1 sc (arit_class = 0x29dac) col-1 sh gr /Courier-iso ff 150.00 scf sf 17220 10155 m gs 1 -1 sc (memory_size = 4) col-1 sh gr /Courier-iso ff 150.00 scf sf 17220 10425 m gs 1 -1 sc (domain = 0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 15630 10665 m gs 1 -1 sc (output) col-1 sh gr /Courier-iso ff 150.00 scf sf 16680 10665 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 16995 10665 m gs 1 -1 sc (0x0) col-1 sh gr % Polyline n 10320 3885 m 15150 3885 l gs col-1 s gr % Polyline n 10320 3900 m 10320 7170 l gs col-1 s gr % Polyline n 10365 4125 m 15105 4125 l gs col-1 s gr % Polyline n 10365 4170 m 15105 4170 l gs col-1 s gr % Polyline n 10365 4185 m 10365 7125 l gs col-1 s gr % Polyline n 11955 4995 m 15060 4995 l gs col-1 s gr % Polyline n 11955 5010 m 11955 6885 l gs col-1 s gr % Polyline n 12180 5265 m 15015 5265 l gs col-1 s gr % Polyline n 12180 5535 m 15015 5535 l gs col-1 s gr % Polyline n 12180 5805 m 15015 5805 l gs col-1 s gr % Polyline n 12180 6075 m 15015 6075 l gs col-1 s gr % Polyline n 12180 6345 m 15015 6345 l gs col-1 s gr % Polyline n 12180 6615 m 15015 6615 l gs col-1 s gr % Polyline n 15045 5010 m 15045 6885 l gs col-1 s gr % Polyline n 11955 6885 m 15060 6885 l gs col-1 s gr % Polyline n 15090 4185 m 15090 7125 l gs col-1 s gr % Polyline n 10365 7125 m 15105 7125 l gs col-1 s gr % Polyline n 15135 3900 m 15135 7170 l gs col-1 s gr % Polyline n 10320 7170 m 15150 7170 l gs col-1 s gr % Polyline n 15150 3900 m 15150 7185 l gs col-1 s gr % Polyline n 10335 7185 m 15165 7185 l gs col-1 s gr /Courier-iso ff 150.00 scf sf 10365 4095 m gs 1 -1 sc (5) col-1 sh gr /Courier-iso ff 150.00 scf sf 10470 4095 m gs 1 -1 sc (: ) col-1 sh gr /Courier-Bold-iso ff 150.00 scf sf 10680 4095 m gs 1 -1 sc (*type->ou...t->arity) col-1 sh gr /Courier-iso ff 150.00 scf sf 10590 4380 m gs 1 -1 sc (input) col-1 sh gr /Courier-iso ff 150.00 scf sf 11640 4380 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 11955 4380 m gs 1 -1 sc (0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 10590 4575 m gs 1 -1 sc (arity) col-1 sh gr /Courier-iso ff 150.00 scf sf 11640 4575 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 11955 4575 m gs 1 -1 sc (0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 10590 4770 m gs 1 -1 sc (field_name) col-1 sh gr /Courier-iso ff 150.00 scf sf 11640 4770 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 11955 4770 m gs 1 -1 sc (0x4a101 "b") col-1 sh gr /Courier-iso ff 150.00 scf sf 10590 4965 m gs 1 -1 sc (offset) col-1 sh gr /Courier-iso ff 150.00 scf sf 11640 4965 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 11955 4965 m gs 1 -1 sc (4) col-1 sh gr /Courier-iso ff 150.00 scf sf 10590 6015 m gs 1 -1 sc (attribute) col-1 sh gr /Courier-iso ff 150.00 scf sf 11640 6015 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 12180 5205 m gs 1 -1 sc (function_class = POINTER) col-1 sh gr /Courier-iso ff 150.00 scf sf 12180 5475 m gs 1 -1 sc (export_type = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 12180 5745 m gs 1 -1 sc (type_qualifier = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 12180 6015 m gs 1 -1 sc (storage_class_specifier = 0) col-1 sh gr /Courier-iso ff 150.00 scf sf 12180 6285 m gs 1 -1 sc (arit_class = 0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 12180 6555 m gs 1 -1 sc (memory_size = 4) col-1 sh gr /Courier-iso ff 150.00 scf sf 12180 6825 m gs 1 -1 sc (domain = 0x0) col-1 sh gr /Courier-iso ff 150.00 scf sf 10590 7065 m gs 1 -1 sc (output) col-1 sh gr /Courier-iso ff 150.00 scf sf 11655 7065 m gs 1 -1 sc ( = ) col-1 sh gr /Courier-iso ff 150.00 scf sf 11970 7065 m gs 1 -1 sc (0x1f6718) col-1 sh gr % Polyline gs clippath 2310 7302 m 2340 7182 l 2370 7302 l 2370 7140 l 2310 7140 l cp clip n 12285 7200 m 12285 7380 l 2340 7380 l 2340 7155 l gs col0 s gr gr % arrowhead n 2310 7302 m 2340 7182 l 2370 7302 l 2340 7302 l 2310 7302 l cp gs 0.00 setgray ef gr col0 s % Polyline n 240 285 m 5070 285 l gs col-1 s gr % Polyline n 240 300 m 240 3570 l gs col-1 s gr % Polyline n 285 525 m 5025 525 l gs col-1 s gr % Polyline n 285 570 m 5025 570 l gs col-1 s gr % Polyline n 285 585 m 285 3525 l gs col-1 s gr % Polyline n 1875 1395 m 4980 1395 l gs col-1 s gr % Polyline n 1875 1410 m 1875 3285 l gs col-1 s gr % Polyline n 2100 1665 m 4935 1665 l gs col-1 s gr % Polyline n 2100 1935 m 4935 1935 l gs col-1 s gr % Polyline n 2100 2205 m 4935 2205 l gs col-1 s gr % Polyline n 2100 2475 m 4935 2475 l gs col-1 s gr % Polyline n 2100 2745 m 4935 2745 l gs col-1 s gr $F2psEnd rs showpage clif-0.93/utils/ 40755 1750 1750 0 7130620254 12163 5ustar korenkorenclif-0.93/utils/yy.c100644 1750 1750 25763 5515100360 13116 0ustar korenkoren# include "stdio.h" # define U(x) ((x)&0377) # define NLSTATE yyprevious=YYNEWLINE # define BEGIN yybgin = yysvec + 1 + # define INITIAL 0 # define YYLERR yysvec # define YYSTATE (yyestate-yysvec-1) # define YYOPTIM 1 # define YYLMAX 200 # define output(c) putc(c,yyout) # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) # define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;} # define yymore() (yymorfg=1) # define ECHO fprintf(yyout, "%s",yytext) # define REJECT { nstr = yyreject(); goto yyfussy;} int yyleng; extern char yytext[]; int yymorfg; extern char *yysptr, yysbuf[]; int yytchar; FILE *yyin ={stdin}, *yyout ={stdout}; extern int yylineno; struct yysvf { struct yywork *yystoff; struct yysvf *yyother; int *yystops;}; struct yysvf *yyestate; extern struct yysvf yysvec[], *yybgin; #include #include char name[20]; FILE *pf, *spf[10]; int s; char *argvv; char *argvv_tmp; char *calloc(); #ifdef input #undef input #undef yywrap #endif # define YYNEWLINE 10 yylex(){ int nstr; extern int yyprevious; while((nstr = yylook()) >= 0) yyfussy: switch(nstr){ case 0: if(yywrap()) return(0); break; case 1: {strcat(yytext,argvv); printf("%s",yytext);} break; case 2: {strcat(yytext,argvv); printf("%s",yytext);} break; case 3: {strcat(yytext,argvv); printf("%s",yytext);} break; case 4: {strcat(yytext,argvv); printf("%s",yytext);} break; case 5: {strcat(yytext,argvv); printf("%s",yytext);} break; case 6: {strcat(yytext,argvv); printf("%s",yytext);} break; case 7: {strcat(yytext,argvv); printf("%s",yytext);} break; case 8: {argvv_tmp=calloc(1,sizeof("U")); strcat(argvv_tmp,"U"); strcat(argvv_tmp,argvv); strcat(argvv_tmp,"("); strcpy(yytext,argvv_tmp); free(argvv_tmp); /* strcpy(yytext,strcat(strcat("U",argvv),"("));*/ printf("%s",yytext);} break; case 9: {strcat(yytext,argvv); printf("%s",yytext);} break; case 10: {strcat(yytext,argvv); printf("%s",yytext);} break; case 11: {strcat(yytext,argvv); printf("%s",yytext);} break; case 12: {strcat(yytext,argvv); printf("%s",yytext);} break; case -1: break; default: fprintf(yyout,"bad switch yylook %d",nstr); } return(0); } /* end of yylex */ input() { yytchar=yysptr>yysbuf?U(*--yysptr):getc(pf); if (yytchar == 10) yylineno++; if (yytchar == EOF) { if (s==1) { fclose(spf[s]); exit(0); } fclose(spf[s]); s = s-1; pf = spf[s]; yytchar = yysptr > yysbuf ? U(*--yysptr) : getc(pf); } return (yytchar); } main(argc,argv) int argc; char *argv[]; { info(argc,argv); init_incl(argc,argv); yylex(); } init_incl(argc1,argv1) int argc1; char *argv1[]; { FILE *fopen(); int b; s = argc1 -2; spf[0] = stdin; argvv=argv1[1]; for (b=2;b1 && !strcmp(argv[1],"/help"))|| argc == 1) { fprintf(stderr,"call program by: yy \n"); fprintf(stderr," is necessary \n"); fprintf(stderr,"the first parameter is a string used for renaming \n"); fprintf(stderr,"the second parameter is the name of file which is opened as input. Output is always standard output\n"); exit(0); } } yywrap() { return(1); } int yyvstop[] ={ 0, 8, 0, 2, 0, 1, 0, 6, 0, 10, 0, 4, 0, 11, 0, 12, 0, 7, 0, 9, 0, 5, 0, 3, 0, 0}; # define YYTYPE unsigned char struct yywork { YYTYPE verify, advance; } yycrank[] ={ 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 8,20, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 39,47, 1,3, 4,16, 40,48, 1,4, 3,15, 7,19, 15,27, 1,5, 16,28, 17,29, 6,18, 19,31, 1,6, 5,17, 27,36, 28,37, 1,7, 18,30, 29,38, 1,8, 30,39, 31,40, 36,45, 1,9, 9,21, 38,46, 46,52, 47,53, 48,54, 52,56, 53,57, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,10, 0,0, 0,0, 0,0, 0,0, 1,11, 1,12, 10,22, 13,25, 22,32, 11,23, 23,33, 1,13, 12,24, 24,34, 25,35, 1,14, 14,26, 32,41, 33,42, 34,43, 35,44, 41,49, 43,50, 44,51, 50,55, 0,0}; struct yysvf yysvec[] ={ 0, 0, 0, yycrank+1, 0, 0, yycrank+0, yysvec+1, 0, yycrank+2, 0, 0, yycrank+1, 0, 0, yycrank+2, 0, 0, yycrank+1, 0, 0, yycrank+3, 0, 0, yycrank+1, 0, 0, yycrank+2, 0, 0, yycrank+3, 0, 0, yycrank+1, 0, 0, yycrank+2, 0, 0, yycrank+4, 0, 0, yycrank+2, 0, 0, yycrank+2, 0, 0, yycrank+3, 0, 0, yycrank+3, 0, 0, yycrank+1, 0, 0, yycrank+4, 0, 0, yycrank+0, 0, yyvstop+1, yycrank+0, 0, yyvstop+3, yycrank+3, 0, 0, yycrank+1, 0, 0, yycrank+4, 0, 0, yycrank+9, 0, 0, yycrank+0, 0, yyvstop+5, yycrank+8, 0, 0, yycrank+3, 0, 0, yycrank+1, 0, 0, yycrank+3, 0, 0, yycrank+19, 0, 0, yycrank+7, 0, 0, yycrank+11, 0, 0, yycrank+14, 0, 0, yycrank+10, 0, 0, yycrank+11, 0, 0, yycrank+0, 0, yyvstop+7, yycrank+19, 0, 0, yycrank+1, 0, 0, yycrank+2, 0, 0, yycrank+12, 0, 0, yycrank+0, 0, yyvstop+9, yycrank+12, 0, 0, yycrank+14, 0, 0, yycrank+0, 0, yyvstop+11, yycrank+28, 0, 0, yycrank+10, 0, 0, yycrank+11, 0, 0, yycrank+0, 0, yyvstop+13, yycrank+15, 0, 0, yycrank+0, 0, yyvstop+15, yycrank+20, 0, 0, yycrank+28, 0, 0, yycrank+0, 0, yyvstop+17, yycrank+0, 0, yyvstop+19, yycrank+0, 0, yyvstop+21, yycrank+0, 0, yyvstop+23, 0, 0, 0}; struct yywork *yytop = yycrank+131; struct yysvf *yybgin = yysvec+1; char yymatch[] ={ 00 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , '(' ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 0}; char yyextra[] ={ 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0}; /* ncform 4.1 83/08/11 */ int yylineno =1; # define YYU(x) x # define NLSTATE yyprevious=YYNEWLINE char yytext[YYLMAX]; struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp; char yysbuf[YYLMAX]; char *yysptr = yysbuf; int *yyfnd; extern struct yysvf *yyestate; int yyprevious = YYNEWLINE; yylook(){ register struct yysvf *yystate, **lsp; register struct yywork *yyt; struct yysvf *yyz; int yych; struct yywork *yyr; # ifdef LEXDEBUG int debug; # endif char *yylastch; /* start off machines */ # ifdef LEXDEBUG debug = 0; # endif if (!yymorfg) yylastch = yytext; else { yymorfg=0; yylastch = yytext+yyleng; } for(;;){ lsp = yylstate; yyestate = yystate = yybgin; if (yyprevious==YYNEWLINE) yystate++; for (;;){ # ifdef LEXDEBUG if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1); # endif yyt = yystate->yystoff; if(yyt == yycrank){ /* may not be any transitions */ yyz = yystate->yyother; if(yyz == 0)break; if(yyz->yystoff == yycrank)break; } *yylastch++ = yych = input(); tryagain: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"unsigned char "); allprint(yych); putchar('\n'); } # endif yyr = yyt; if ( (int)yyt > (int)yycrank){ yyt = yyr + yych; if (yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } # ifdef YYOPTIM else if((int)yyt < (int)yycrank) { /* r < yycrank */ yyt = yyr = yycrank+(yycrank-yyt); # ifdef LEXDEBUG if(debug)fprintf(yyout,"compressed state\n"); # endif yyt = yyt + yych; if(yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } yyt = yyr + YYU(yymatch[yych]); # ifdef LEXDEBUG if(debug){ fprintf(yyout,"try fall back character "); allprint(YYU(yymatch[yych])); putchar('\n'); } # endif if(yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transition */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } if ((yystate = yystate->yyother) && (yyt= yystate->yystoff) != yycrank){ # ifdef LEXDEBUG if(debug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1); # endif goto tryagain; } # endif else {unput(*--yylastch);break;} contin: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"state %d char ",yystate-yysvec-1); allprint(yych); putchar('\n'); } # endif ; } # ifdef LEXDEBUG if(debug){ fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1); allprint(yych); putchar('\n'); } # endif while (lsp-- > yylstate){ *yylastch-- = 0; if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){ yyolsp = lsp; if(yyextra[*yyfnd]){ /* must backup */ while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){ lsp--; unput(*yylastch--); } } yyprevious = YYU(*yylastch); yylsp = lsp; yyleng = yylastch-yytext+1; yytext[yyleng] = 0; # ifdef LEXDEBUG if(debug){ fprintf(yyout,"\nmatch "); sprint(yytext); fprintf(yyout," action %d\n",*yyfnd); } # endif return(*yyfnd++); } unput(*yylastch); } if (yytext[0] == 0 /* && feof(yyin) */) { yysptr=yysbuf; return(0); } yyprevious = yytext[0] = input(); if (yyprevious>0) output(yyprevious); yylastch=yytext; # ifdef LEXDEBUG if(debug)putchar('\n'); # endif } } yyback(p, m) int *p; { if (p==0) return(0); while (*p) { if (*p++ == m) return(1); } return(0); } /* the following are only used in the lex library */ yyinput(){ return(input()); } yyoutput(c) int c; { output(c); } yyunput(c) int c; { unput(c); } clif-0.93/COPYING-2.0100644 1750 1750 43076 6022673340 12505 0ustar korenkoren GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. clif-0.93/COPYRIGHT100644 1750 1750 535 6023144140 12371 0ustar korenkorenThe interpreter clif is copyrighted under the GNU General Public License. For more details see the file COPYING-2.0 and the headers of the individual source files. The authors of clif are Tomas Hruz and Ludovit Koren Slovak Technical University Namestie Slobody 17 812 31 Bratislava Slovak Republic emails: hruz@vm.stuba.sk, koren@vm.stuba.sk clif-0.93/ChangeLog100644 1750 1750 167132 7130620214 12740 0ustar korenkorenWed Jul 5 12:09:57 2000 Ludo Koren * Version 0.93 released. * ys.y: rearrangements of definitions. WSTRINGC new token. array initialization for WSTRINGC. * tests/test65.ci (main): wide strings testing * s-conv.c (s_conv): concatenation of strings, wide string recognition (compare_format_args): CHAR and INTEGER pointer interchangeability * ls.l: wide string recognition * comp_maint.c (error_message): warning regrouping for format Sun Jun 25 10:57:15 2000 Ludo Koren * comp_maint.c (error_message): 1039 - redesign, 1040 - new. * Makefile.in (c-lex.o): (keyword.o): config.h * keyword.gperf: config.h Sat Jun 24 13:35:14 2000 Ludo Koren * ls.l: all character constants recognition (ANSI C standard). * ys.y (list_param): alignment for count[proc]. * pso.c: warning during compilation. Includes rearranged. * ys.y (cast_expression): checking for specifier constraints and setting of cast type memory size. * pso.c: comment. * pso.c: set_memory_size definition. * pso.h: set_memory_size added. Mon Apr 24 12:08:53 2000 Ludo Koren * comp_maint.c (error_message): error messages and warnings for character constants. * ls.l: character constants update. Sun Apr 9 10:45:01 2000 Ludo Koren * ys.y: declaration signature enhancement. * comp_maint.c: compatible type and composite type update in compare2trees. Sun Jan 10 16:59:49 1999 Ludo Koren * s-conv.c (s_conv): alert new. * ls.l (stringc): character set completed. trigraphs new. * run_str.l: -Wtrigraphs option. * run_str.y: -Wtrigraphs option. * comp_maint.c: warning_trigraphs definition. (error_message): 6032 new. * flags.h: warning_trigraphs declaration. * s-conv.c (s_conv): trigraph sequences added. Tue Jan 5 21:27:23 1999 Ludo Koren * Version 0.92 released. Sun Jan 3 10:55:42 1999 Ludo Koren * doc/clif.1: manual page update. * Makefile.in (pso.o): allocx.h added. * tables.c (add_spec_to_tag): TYPEDEF option added. (allocate_aggregate): TYPEDEF option added. * ys.y: the typedef_f flag enables the context of typename. It was changed according to the standard. (direct_declarator): typedef_copy function. (first_dekl): typedef_copy function. (list_dekl): typedef_copy function. (list_loc_dekl_1): typedef_copy function. * pso.h (typedef_copy): new function declaration. * pso.c (typedef_copy): new function. Sun Dec 20 15:21:31 1998 Ludo Koren * ys.y (list_stat_0): Code for initialization is executed even if the `main' function option was specified. (M): storage class specifier - new. (type_specifier): TYPEDEF_P - new. (type_qualifier): TYPEDEF_P - new. (pointer): TYPEDEF_P - new. (struct_or_union_specifier): TYPEDEF_P - new. (struct_or_union): TYPEDEF_P - new. (enum_specifier): TYPEDEF_P - new. (enumerator): storage class specifier - new. (direct_declarator): TYPEDEF_P - new. (initializer): initialization semantic - new. (initializer_list_complete): new rule. (initializer_list): new semantic. (storage_class_specifier): TYPEDEF, EXTERN, EXPORT_T, STATIC, AUTO, REGISTER - new semantic. (list_type_spec): error checking for type specifiers. (first_dekl): semantic for TYPEDEF added. (func_first): rules changed. Initialization part is added. (func_rest): rules changed. Initialization part is added. (list_dekl): rules changed. Initialization part is added. (initializer_optional): new rule. (R): new rule. (initialization): new rule. (list_form_param): storage class specifier semantic - new. (list_loc_dekl): redesigned. Semantic for initialization added. (list_loc_dekl_1): redesigned. Semantic for initialization and storage class specifiers added. (initializer_optional_loc): new rule. (P): new rule. (local_initialization): new rule. (list_param): call_by_value flag - special case - printf functions. (primary_expression): content of constants - corrected. (ident): semantic changed to call of the `lookup_tables' function. (postfix_expression): var_adr and offset changed to the `variable' array. (unary_expression): var_adr and offset changed to the `variable' array. (assignment_expression): var_adr and offset changed to the `variable' array. Sat Dec 19 19:00:43 1998 Ludo Koren * comp_maint.c (error_message): 6028 - warning changed, if the function is `main'. * tables.c (putstruct): semantic for typedef - new. (point_loc): new variable - `variable' used. (set_value): function redesigned. The variable `variable' in use. (allocate_aggregate): If the array is multidimensional, the size of each sub-dimension is set in attribute `memory_size'. (memory_size): new function. (check_init_bracket): new function. (get_memory_size): new function. (get_field_size): new function. (noninitialized_loc): new function. * tables.h (noninitialized_loc): new function declaration. * pso.c (struct var_s): new structure for variables. It is used for extern declaration. (lookup_tables): new variable of the type struct var_s. Function prototype changed. Usage of var_adr and offset changed to the new variable. * parser.h (struct var_s): new structure. It substitutes offset and var_adr variables. aggregate_memory_size - new variable. (SET_ADDRESS): changed for new variable of struct var_s. * pso.h (lookup_tables): prototype changed. * comp_maint.c (put_array_subscript): during initialization an array may be without dimensions. (error_message): 1036 - 1037, 2017 - 2018, 6030 - 6031, new. (type2string): UNSIGNED_AC new. (check_spec_constr): TYPEDEF_P added. * type.h (storage_class_specifier): UNSPEC_SC - new enum constant. (EXTERN_P): new manifest constant. (EXPORT_P): new manifest constant. (STATIC_P): new manifest constant. (AUTO_P): new manifest constant. (REGISTER_P): new manifest constant. (UNSPEC_P): new manifest constant. (UNDEF_P): new manifest constant. * tables.h (get_memory_size): new function declaration. (get_field_size): new function declaration. Sun Dec 6 12:16:42 1998 Ludo Koren * ls.l: matching of null character ('\0') * myintrinsic.c (do_fprintf): printing string pointers - call by value. Sat Dec 5 12:57:25 1998 Ludo Koren * s-conv.c (compare_format_args): warning for integer and pointer argument mismatch added. Sat Nov 28 17:45:26 1998 Ludo Koren * myintrinsic.c (do_fprintf): parsing of different kind of integers added. (transform_to_simple_type): support for different kind of integers added. Thu Oct 29 19:59:17 1998 Ludo Koren * comp_maint.c (implicit_cast): #if changed to #ifdef LONG_CAN_UINT Thu Aug 20 20:26:49 1998 Ludo Koren * doc/clif.1: manual page - new. Sun Aug 16 11:41:56 1998 Ludo Koren * Makefile.in ($(srcdir)/utils/yy): get rid of $< rule. Not supported correctly by all flavors of make. Sun Aug 2 13:54:30 1998 Ludo Koren * comp_maint.c (gen_cast_needed): type_com[set] is set to the new type (after cast). * parser.h: full_bracketing - new variable definition. Sat Aug 1 13:40:51 1998 Ludo Koren * s-conv.c (compare_format_args): FLT cast to DOUBLE if needed. * comp_maint.c (gen_cast_needed): new function. * comp_maint.h: gen_cast_needed new function declaration. * s-conv.c (compare_format_args): DOUBLE - FLT can be used interchangeably. * parser.h: initialize_only - new variable. Sun Jul 26 11:39:18 1998 Ludo Koren * parser.h (SET_CODE_GENERATION_BEGINNING): new macro. (RESET_CODE_GENERATION_BEGINNING): new macro. Sat Jul 25 17:26:49 1998 Ludo Koren * pso.h: new file. * pso.c: new file. * Makefile.in (OBJS): pso.o new. (c-parser.o): pso.h new. (pso.o): new target. Wed Jul 22 20:52:29 1998 Ludo Koren * Version 0.90.3 released. Tue Jul 21 21:34:18 1998 Ludo Koren * ys.y (expression): CLRT removed. * tables.c (typedef_p): typedef_f added. pa testing if the lookup in global table should be done. * ys.y: typedef_f - set and reset added. If the context can be TYPENAME, it is set to 1; 0 otherwise. * global.c: typedef_f new definition. * global.h: typedef_f new declaration. Mon Jul 20 20:31:22 1998 Ludo Koren * comp_maint.c (error_message): 6029 new. * ys.y (list_param): expression changed to assignment_expression. argument_expression_list removed. (expression): comma operator - new. Sun Jul 19 20:49:16 1998 Ludo Koren * ys.y: TYPENAME - new token. (jump_statement): return without value from function returning non-void - bug fixed. (M): UNUSED_AC - added. (type_specifier): TYPENAME token new. (typedef_name): deleted. (storage_class_specifier): semantic for TYPEDEF fixed. * comp_maint.c (fix_ret): error message for 6028 - new. (error_message): 1001 - new output. 6028 - new - control reaches end of non void function. * tables.c (has): declaration_line used. (has_loc): declaration_line used. (putstruct): TYPEDEF_P new. (putstruct_loc): TYPEDEF_P new. (typedef_p): TYPEDEF_P new. (get_declaration_line): new function. * type.h (enum intern_arit_class): enum's values changed to hex const. (TYPEDEF_P): new define. (UNUSED_P): new define. * tables.h (get_declaration_line): new function declaration. * struct.h (struct tab): declaration_line new. * ls.l: tables.h new. Decision making between typename and identifier. Sat Jul 18 19:17:20 1998 Ludo Koren * Makefile.in (c-lex.o): tables.h new. * tables.c (typedef_p): new function. * tables.h (typedef_p): new function declaration. Sun Jul 12 16:54:05 1998 Ludo Koren * Version 0.90.2 released. * tables.c: hastab_tag removed. pi_tag removed. tagtab definition changed. (clear_hash_tab): calling sequence of clear_hash_tab_next changed. (clear_hash_tab_next): new prototype. (clear_tag_tab): new function. (has_tag): redesigned. Scope level changes added. (putstruct_tag_body): Scope level changes added. (add_spec_to_tag): Scope level changes added. (add_ident_to_tag): Scope level changes added. (allocate_aggregate): bug fix for enum. * comp_maint.c (print_file_name): func_def_f used instead of count[proc]. (exit_scope): clear_tag_tab added * struct.h (struct ident_tab_loc): list_formal_param new field. * tables.h: clear_tag_tab new function declaration. * ys.y (func_first): exit_scope has to be sooner than the proc_name_text[proc--] for proper error messages. Sat Jul 11 09:38:28 1998 Ludo Koren * tables.c (enter_file_scope): bug fix - do not call enter_scope anymore. (exit_file_scope): bug fix - do not call exit_scope anymore. * ys.y (first_dekl): setting flag for function definition or declaration context. (func_first): resetting flag for function definition or declaration context. Bug fix - clear_hash_tab and exit_scope calling (removing where it was not necessary). * comp_maint.c (func_def_s): new function. (func_def_r): new function. (enter_scope): bug fix. (exit_scope): bug fix. * comp_maint.h: func_def_s and func_def_r - new function declarations. Mon Jul 6 18:52:22 1998 Ludo Koren * ys.y (list_loc_dekl): warning for empty declaration. Wed Apr 29 17:32:35 1998 Ludo Koren * Version 0.90.1 released. * Makefile.in (extraclean): some actions moved from clean. * configure.in: fixing bug - old sh cannot set variable. Fri Apr 24 08:23:13 1998 Ludo Koren * ys.y (statement): checking for statements with no effect. (for): checking for statements with no effect. (for_expr2): checking for statements with no effect. (postfix_expression): checking for invalid lvalue. (assignment_operator): checking for invalid lvalue. * comp_maint.c (init): initialization of current_instr. (error_message): last_error_line - new variable. 1034 - 1035 - new. 3006 - deleted. 6027 - new. * parser.h (MOV_P): new entry. (POPA_P): new entry. (PUSHA_P): new entry. * global.h (GENCODE): last_instr and current_instr settings. * global.c: last_instr, current_instr new variables. * comp_maint.c (clif): fatal error handling. (error_message): 4004 - new. * configure.in: inter_handl_posix.c, inter_handl_bsd.c, inter_handl_lin.c, inter_handl_svr3.c, inter_handl_svr4.c renamed to sig-posix.c, sig-bsd.c, sig-lin.c, sig-svr3.c, sig-svr4.c, respectively. * inter_handl_posix.c (fatal_handler): (fatal_handler_register): new functions. * inter_handl_bsd.c (fatal_handler): (fatal_handler_register): new functions. * inter_handl_lin.c (fatal_handler): (fatal_handler_register): new functions. * inter_handl_svr3.c (fatal_handler): (fatal_handler_register): new functions. * inter_handl_svr4.c (fatal_handler): (fatal_handler_register): new functions. * configure.in: complicated checks moved to aclocal.m4; simplified * aclocal.m4: new file. * ys.y (shift_expression): ERROR_P (assignment_operator): ERROR_P Thu Apr 23 16:39:42 1998 Ludo Koren * acconfig.h: MAX_ALIGNMENT - new entry. * configure.in: file rearrangement, new cache variables, their usage and simplification. * ys.y (ident): (postfix_expression): (unary_expression): (additive_expression): (logical_AND_expression): (logical_OR_expression): (assignment_operator): POINTER is LONG_AC. * tables.c (find_member): POINTER is LONG_AC. * virtual_machine.c (exe): MOV instructions for pointers changed. Casts to long ints. * tables.c (allocate_aggregate): sizeof (double) changed to the manifest constant MAX_ALIGNMENT. * tests/test46.ci (foobar): sizeof cannot be in output. It is depending on default MAX_ALIGNMENT. * tests/test47.ci: sizeof cannot be in output. It is depending on default MAX_ALIGNMENT. Wed Apr 22 15:21:36 1998 Ludo Koren * Makefile.in (all): all.progs all.config new targets (stamp-h): bug fixed (distclean): auto-config.h added Sun Apr 19 16:13:42 1998 Ludo Koren * tests/check-them: test[6-9][0-9] - compiler-like behavior. * ys.y (list_stat_0): handle_main - moved to clif function. (list_param): call_by_value - semantic added. (primary_expression): memory size for constant filled. (ident): semantic unified for locals and globals. Semantic added for call_by_value. (postfix_expression): subscripts are also for pointers possible. Last multiplication and addition moved to the subscript parsing. Postfix operator's semantic simplified. (unary_expression): semantic for arrays simplified. Memory size for address operator is properly set. * virtual_machine.c (exec): symbolic debugging option added. (exe): POPA - new instructions implementation (minors 2 - 771). CALLi - new instructions implementation (minors 14 - 26). * geninstr.h (GEN_PUSHAIld): bug fixed. (GEN_POPAe): minor changed. (GEN_POPAst): minor changed. (GEN_POPAi): (GEN_POPAui): (GEN_POPAli): (GEN_POPAlui): (GEN_POPAsi): (GEN_POPAsui): (GEN_POPAd): (GEN_POPAld): (GEN_POPAf): (GEN_POPAc): (GEN_POPAsc): (GEN_POPAuc): (GEN_POPAb): new instructions added. (GEN_XCALLiv): (GEN_XCALLdv): (GEN_XCALLfv): (GEN_XCALLcv): (GEN_XCALLvv): (GEN_XCALLuiv): (GEN_XCALLliv): (GEN_XCALLluiv): (GEN_XCALLsiv): (GEN_XCALLsuiv): (GEN_XCALLldv): (GEN_XCALLscv): (GEN_XCALLucv): new instructions added. * tables.c (putstruct): memory size of return value for functions added. (putstruct_loc): redesigned and support for call_by_value and call_by_reference flags. (find_member): type_ac was not properly set for pointers - fixed. * comp_maint.c (error_message): 2000 - error message deleted and 2001 moved to 2000. 2000 error message edited. * configure.in: isspace added * Makefile.in (remote_call.o): config.h added * myintrinsic.c (isspace): define or lib function. (BUFSIZ): define if not defined (do_fprintf): implementation of call by value and call by reference. (do_fscanf): redesign. parsing of format and reading per argument. * s-conv.c (compare_format_args): call by value - arguments to scanf checking. Fri Apr 17 08:46:22 1998 Ludo Koren * comp_maint.c (pointer_cast): assignment of struct or union to pointer added. * comp_maint.h: start_main declaration deleted. * comp_maint.c (clif): compiler-like behavior added * Makefile.in (comp_maint.o): flags.h, virtual_machine.h * input.c (terminate_buffer): do not switch to stdin, if the user has specified -fhandle-main (input_komp): the same as above only for at&t lex * ls.l: stuff for debugging added. * dbg-out.c: new file. * Makefile.in (Makefile): new target ($(srcdir)/configure): new target (config.status): new target ($(srcdir)/stamp-h.in): new target (stamp-h): new target Thu Apr 16 09:56:09 1998 Ludo Koren * Makefile.in (OBJS): dbg-out.o - new file (c-lex.o): dbg-out.h new (dbg-out.o): new target * dbg-out.h: new file * flags.h: dbg_symbols variable declaration. * run_str.l: -g option added. * run_str.y: -g option added. * comp_maint.c: dbg_symbols - new variable. * allocx.h (freex): new function declaration * allocx.c (mallocx): error checking (reallocx): error checking (freex): new function Mon Apr 13 09:42:10 1998 Ludo Koren * run_str.y: NO_CALL_BY_REFERENCE and NO_CALL_BY_VALUE - new. * run_str.l: NO_CALL_BY_REFERENCE and NO_CALL_BY_VALUE - new. * configure.in (LEX): new check. Check for float.h deleted. warning on automatic resume generation - new. * Makefile.in (LEX): new variable (rs-lex.o): allocx.h new (virtual_machine.o): lex_t.h new (store_cont.o): lex_t.h new (clif.o): config.h new (allocx.o): config.h new (input.o): lex_t.h new ($(srcdir)/c-lex.c): lex_t.h - define for flex scanner - new. * comp_maint.c: error_count, warnings_are_errors, call_by_reference, call_by_value - new variables. pf, spf have type of FILEATTR. (clif): call_by_value, call_by_reference skeleton - new. (init): spf used (error_message): error_count is used. spf is used. 4003, 7002, 7003 - new (print_file_name): spf is used (print_source_line): spf is used (add_constant_to_list): spf is used (add_default_to_fixp): spf is used (start_main): semantic fixed. * ys.y (YYDEBUG): new macro (list_stat_0): semantic for handle_main - fixed. (stat_0): syntax checking, if handle_main was specified. (compound_statement): ERROR_P macro used. (ident): call_by_reference and call_by_value skeleton - new. (dump_yacc): new function. * ls.l (yywrap): alternative calls when flex is used. (switch_to_stdin): new function (switch_to_char_buffer): new function (switch_to_buffer): new function (store_buffer_state): new function (flush_buffer): new function * virtual_machine.c: lex_t.h new file (exec): alternative calls when flex is used. Sun Apr 12 11:07:57 1998 Ludo Koren * parser.h: main_defined - new variable (ERROR_P): new macro. * store_cont.c: support for flex added * store_cont.h (struct CONTEXT): state in flex stored as well. * input.c (terminate_buffer): new function. * input.h: support for flex added - switch_to_stdin, switch_to_char_buffer, switch_to_buffer, terminate_buffer. * acconfig.h: HAVE_FLOAT_H removed - STDC_HEADERS should cover this. * flags.h: call_by_reference, call_by_value, warnings_are_errors new flags. * clif.c: config.h added. It is needed for CONTROL macro definition. * tables.c (has): setting of main_defined variable. * init_rs.c (switch_to_char_buffer): if str_ptr is null, don't switch to buffer. * run_str.l: WARNING_ERROR - new * run_str.y: WARNING_ERROR - new Fri Apr 10 12:10:32 1998 Ludo Koren * run_str.l: DUMP_YACC - new * run_str.y: dump_yacc - new * init_rs.c (switch_to_char_buffer): bug fixed for longer run time strings. (command line options) Thu Apr 9 07:32:17 1998 Ludo Koren * global.h: argv_rs declaration removed. * init_rs.c (switch_to_char_buffer): new function; now it is possible to use flex scanner as well. * run_str.l: CALL_BY_REFERENCE and CALL_BY_VALUE new options added. * run_str.y: CALL_BY_REFERENCE and CALL_BY_VALUE new options added. * config.h: HAVE_FLOAT_H - deleted. * allocx.c (mallocx): new function. (reallocx): new function. * allocx.h: mallocx, reallocx new prototypes. * tables.c: parens around isalpha macro. (set_value): malloc to mallocx. * global.c: line_counter removed. * global.h (struct fileattr): new struct. * tables.c (point_call): spf instead of argvv (point_loc): spf instead of argvv (set_value): spf instead of argvv (has_goto): spf instead of argvv (has_label): spf instead of argvv (enter_file_scope): spf instead of argvv (exit_file_scope): spf instead of argvv * s-conv.c (s_conv): spf - new struct with filename, file pointer and line counter per file. Mon Apr 6 18:43:57 1998 Ludo Koren * configure.in: usage of cached values added; auto-config.h created. * config.h: auto-config.h added * Makefile.in (inter_handl_posix.o): new target; config.h added * inter_handl_bsd.c: config.h * inter_handl_lin.c: config.h * inter_handl_svr3.c: config.h * inter_handl_svr4.c: config.h * inter_handl_posix.c: config.h * acconfig.h: new file. * comp_maint.h: error_count - new variable * ys.y (primary_expression): all integer constant tokens added; long double and float constant as well. * ls.l: all integer constant tokens added Tue Mar 31 20:02:27 1998 Ludo Koren * Version 0.90 released. Mon Mar 30 17:26:17 1998 Ludo Koren * tables.c (set_value): isalpha call (allocate_struct): VOID added * configure.in: AC_CHECK_FUNCS - isalpha * s-conv.c (s_conv): bug fixed - format of basic types (integer, etc.; we are not using += anymore for them). * tables.c (set_value): isalpha function call. * ys.y (statement): new data types for stack emptying added. (for): ditto. (for_expr2): ditto. (type_specifier): semantic for long, signed, unsigned, short type specifiers. (list_type_spec): check_spec_constr call. (first_dekl): ditto. (list_dekl): ditto. (list_form_param): ditto. (list_loc_dekl_1): ditto. (primary_expression): For constants, attribute domain points to the constant. * comp_maint.c (init): pri array - new initialization. (implicit_cast): new data types - semantic added (long, signed, unsigned, short). (l_value_cast): new data types - semantic added (long, signed, unsigned, short). (error_message): 2012 - 2016 new. 6025 - 6026 new. (type_transform): new data types - added (long, signed, unsigned, short). (mov2lvalue): new data types - semantic added (long, signed, unsigned, short). (check_spec_constr): new function. * tables.c (putstruct_loc): allocation of new data types added. (align_memory): (move_offset_aligned): MAX_CELL_MEMORY_SIZE - new macro used. (allocate_var): allocation of new data types added. (allocate_struct): allocation of new data types added. * geninstr.h: new instructions (minors) for new data types - long, signed, unsigned, short. * virtual_machine.c (exe): CVT class of instruction added. Now, there are cast instruction from each type to every type. * comp_maint.h (check_spec_constr): new function prototype. * instr.h: types for new PUSHAI instructions. * cast.h: casts for all C types added * configure.in: limits.h, float.h - new checks AC_C_LONG_DOUBLE - new check * myintrinsic.c (do_fprintf): args of type long double can be printed. (transform_to_simple_type): new global types added. * config.h: new file. * type.h: global type extended (CONST_P): new macro. * s-conv.c (compare_format_args): promotion of char to int enabled. Sun Mar 29 09:32:57 1998 Ludo Koren * Makefile.in (c-parser.o): (virtual_machine.o): (comp_maint.o): (tables.o): config.h new Wed Mar 25 20:08:27 1998 Ludo Koren * ys.y: all switch statements with type_ac[set] moved to geninstr.h * geninstr.h: all switch statements moved here from ys.y; macros for generic instructions. Tue Mar 24 15:03:38 1998 Ludo Koren * ys.y (list_param): compare_format_args interface changed type to type_ac, or arit_class dereferencing * type.h: VOID_P, CHAR_P, SHORT_P, INTEGER_P, LONG_P, FLOAT_P, DOUBLE_P, SIGNED_P, UNSIGNED_P - new macros INTEGER_CONS, DOUB_CONS, FLT_CONS, CHR_CONS, VID_CONS - deleted * tables.c (putstruct_loc): (allocate_var): (find_member): type to type_ac, or arit_class dereferencing integer_cons, doub_cons, flt_cons, chr_cons, vid_cons - deleted * comp_maint.c (implicit_cast): (l_value_cast): (put_array_subscript): (type2string): (compare2trees): (add_subs_to_spec_list): (move2lvalue): (put2table): (promote_type): type to type_ac, or arit_class dereferencing * s-conv.c (s_conv): long, short, signed, unsigned - new (compare_format_args): new calling interface; new type comparison * tables.h: type to type_ac * struct.h (struct attr): arit_class is not a pointer anymore * s-conv.h (compare_format_args): prototype changed * parser.h (TYPE_CLEAR): type to type_ac Mon Mar 23 13:19:53 1998 Ludo Koren * ys.y (type_specifier): long, short, signed, unsigned - new keywords * keyword.gperf: long, short, signed, unsigned - new keywords * type.h: enum intern_arit_class extended to all basic specifier. * comp_maint.c (error_message): warning_inhibit new (put_array_subscript): bug - fixed pri array - bug on size - fixed Tue Mar 17 16:42:45 1998 Ludo Koren * flags.h: warning_inhibit - new variable. * run_str.y: warning inhibit - new * run_str.l: rules added for all warning variables and handle main. Mon Mar 16 16:45:45 1998 Ludo Koren * tables.c (putstruct): POINTER - bug fix - memory_size was not set. * ys.y (postfix_expression): postfix increment and decrement operators for pointer arithmetic - new. (unary_expression): prefix increment and decrement operators for pointer arithmetic - new. (assignment_operator): ADD_ASSIGN, SUB_ASSIGN lvalue and rvalue have the same type_com. * tests/test58.ci: tests for pointer arithmetic. Sun Mar 15 09:28:01 1998 Ludo Koren * run_str.y: warning_aggregate_return new. * ys.y: flags.h new (list_stat_0): new flag handle_main (first_dekl): error_message for returning aggregate. (list_param): error_message for passing aggregate. move2lvalue calling interface changed. * comp_maint.c: flags.h new (pointer_cast): handling of functions and aggregates added. (error_message): tests in warnings for new warning variables added. 6023 - 6024 new. (mov2lvalue): interface changed. Implementation of STRUCT_FC and UNION_FC - new. (move2lvalue): interface changed. (start_main): new function. * virtual_machine.c (exe): MOVbv new instruction. * geninstr.h (GEN_MOVbv): new instruction. * comp_maint.h: start_main declaration. Sat Mar 14 13:25:22 1998 Ludo Koren * run_str.y: rules added for all warning variables and handle main. * flags.h: new file * s-conv.c: flags.h new * tables.c: flags.h new * Makefile.in (rs-parser.o): (c-parser.o): (tables.o): (s-conv.o): flags.h new * s-conv.c (s_conv): warning_comment added. * Makefile.in (diff): new target. Fri Mar 13 09:12:50 1998 Ludo Koren * comp_maint.c (type_compare): error_message (1028) commented out. * ys.y (primary_expression): arit_class added. (postfix_expression): bug for increment and decrement fixed. (unary_expression): walking through type_com for arrays now; STRUCT_FC, UNION_FC added pointer arithmetic and pointer operand type error checking implemented for expressions. * comp_maint.c (error_message): 1030 - 1033 new 6022 new (print_file_name): if a function call in function definition was parsed, the function name was not printed. (type2string): ARRAY_P added. * tables.c (set_value): bug fixed in finding of an identifier. * comp_maint.c (type_transform): POINTER - new * myintrinsic.c (do_fprintf): format 'p', 'n', 'G', 'E', 'i', 'o', 'u', 'x', 'X' new * s-conv.c (compare_format_args): bug for void pointers * ys.y (postfix_expression): implementation of postfix increment and decrement (postfix_expression): bug fix for postfix increment and decrement; arrays, structs not tested * comp_maint.c (type2string): return of pointer string * virtual_machine.c (exe): implementation of MOVvi, MOVvd, MOVvf, MOVvc instructions * instr.h (XCHG): new instruction * geninstr.h (GEN_MOVvi): (GEN_MOVvd): (GEN_MOVvf): (GEN_MOVvc): new instructions; MOV value on the arithmetic stack to temporaries. (GEN_XCHG): new instruction Wed Mar 11 14:45:41 1998 Ludo Koren * myintrinsic.c (do_fprintf): redesign to use all format strings. * ys.y (logical_AND_expression): ansi implementation of && (logical_OR_expression): ansi implementation of || * ansidecl.h: new file * s-conv.c (s_conv): args are evaluated only for functions. * comp_maint.c (error_message): ellipsis definition. * printf_unix.c (fprintfx): (printfx): ellipsis definition. * parser.h: and_jmp, or_jmp - fix addresses in && and || operators. * global.h: error_message declaration deleted; ansidecl.h new * printfx.h: fprintfx, printfx - ellipsis declaration * comp_maint.h: deleting error_message declaration. * ys.y: s-conv.h new (iteration_statement): call of promote_type (for_expr1): call of promote_type (list_param): args checking and format args error checking. (primary_expression): STRINGC bug fixed (type was not set). (postfix_expression): args checking in funtion call (unary_expression): bug fix for code generation for arrays. Semantic for arrays dereferencing. Tue Mar 10 12:38:19 1998 Ludo Koren * s-conv.h: new file * s-conv.c: allocx.h, type.h, struct.h, comp_maint.h, s-conv.h new num_args, args (s_conv): parsing and error checking of format strings for scanf and printf class functions. (store_arg_type): new function (compare_format_args): new function * comp_maint.c: s-conv.h new (error_message): new prototype; goto's to the va_end macro; (error_message): 6014 - 6021 new (get_num_args): new function (promote_type): new function * comp_maint.h: new prototype for error_message get_num_args new prototype promote_type new prototype * Makefile.in (c-parser.o): s-conv.h new (comp_maint.o): s-conv.h new (s-conv.o): s-conv.h new * global.h: new prototype for error_message * Makefile.in (s-conv.o): new header files (dist): distribution target changed. * input.c: error_message function declaration deleted * myintrinsic.c (cfflush): new function * intrinsic.h: fflush - new * io.ci: fflush added Sun Mar 8 18:27:09 1998 Ludo Koren * io.ci: printf, fprintf, scanf, fscanf, enum for stdin, stdout, stderr * intrinsic.h: cprintf to printf; fprintf new; cscanf to scanf; fscanf new * myintrinsic.c (cprintf): printf like new function (cfprintf): fprintf like new function (do_fprintf): internal fprintf with basic format parsing. (do_fscanf): internal fscanf (cfscanf): fscanf like new function (cscanf): scanf like new function * all tests changed from cprintf to printf and cscanf to scanf. Sat Mar 7 16:28:21 1998 Ludo Koren * tests/test03.ci: variable cprintf format * tests/test04.ci: variable cprintf format * tests/test05.ci: variable cprintf format * tests/test06.ci: variable cprintf format * ys.y (struct_or_union_specifier): struct_union_enum_name used. (struct_declaration): suen_count used. (enum_specifier): error checking and type setting for anonymous enum. (storage_class_specifier): TYPEDEF, EXTERN, EXPORT_T, STATIC, AUTO, REGISTER - semantic added. All calls to has replaced with put2table call. kodp = kodp1 changed to kodp1 = kodp. proc_name_text and proc_name are properly cleared now. Usage of the param_flag variable for enhanced error checking. (list_loc_dekl_1): added semantic for static variables. (ident): added semantic for static variables. * tables.c: hash_code_loc, hash_code_goto deleted (putstruct): kodp1 changed to kodp. necessary for static variables in functions. (hash_code): return value changed. size of the table is a parameter. (putstruct_loc): STATIC_SC now recognized (putstruct_loc): ENUM_FC, UNION_FC new. (allocate_var): address - new parameter. (allocate_var): kodp1 changed to kodp. (putstruct_static): new function. (enter_file_scope): new function. (exit_file_scope): new function. * tables.h (enter_file_scope): new function declaration. (exit_file_scope): new function declaration. * type.h: enum storage_class_specifier - new. (POINTER_P, STRUCT_P, UNION_P, ENUM_P, ARRAY_P, SIMPLE_P, LOCAL_P, REMOTE_P, STATIC_P): parenthesized * struct.h (struct attr): storage_class_specifier is enum now. (struct ident_tab_header): file_scope - new member. (struct ident_tab_loc): body, adr - new members * input.c (input_komp): exit_file_scope call - new. Static variables of file scope have to be changed to non valid. * global.h: struct_union_field, suen_count new variables. * global.c: struct_union_field, suen_count new variables. * comp_maint.h (put2table): new function declaration * comp_maint.c (ERROR_FULL_INFO): changing sequence of output to gcc-like (error_message): 1003 - changed to report line number (error_message): 1004 - function recognition moved to print_file_name function (error_message): 6003, 6006 - function recognition moved to print_file_name function (error_message): 6007, 6008 - ERROR_FULL_INFO added (error_message): 6009 output improved (print_file_name): recognition of function added (print_error_number): formatting of output changed (print_line_number): formatting of output changed (put2table): new function * tests/test_em_struct (bar): new part for testing of not properly defined types in param lists Tue Mar 3 13:34:06 1998 Ludo Koren * Version 0.9 released. * Makefile.in (mostlyclean): flc - new * doc/guide_programmers.tex: update Mon Mar 2 12:04:48 1998 Ludo Koren * s-conv.c (s_conv): new function. * Makefile.in (s-conv.o): new file. * ls.l: stringc - s_conv function is new module. * comp_maint.c (type_compare): check for pointers to SIMPLE variables added. (type_compare): warning for non compatible pointer to SIMPLE types. * tests/test48.ci: pointer to SIMPLE Sun Mar 1 11:08:45 1998 Ludo Koren * ys.y (statement): expression; bug for void fixed (declarator): semantic added (first_dekl): pointers added (list_dekl): pointers added (list_form_param): pointers added (list_loc_dekl_1): pointers added (list_param): semantic simplified. Generic PUSHA and MOV used instead. (primary_expression): semantic simplified. Generic PUSHA and MOV used instead. (ident): semantic changed. PUSHA is emitted immidiatelly when the variable is found in the hash table. (postfix_expression): pointers added. Get rid of kodp4. (unary_expression): semantic simplified. Generic PUSHA and MOV used at the other places instead. Semantic added for address operator (constant and variable). Semantic for pointer dereferencing. (assignment_expression): Semantic simplified. Get rid of kodp4. (ae_empty): semantic changed. * comp_maint.c (l_value_cast): pointer cast - new. (pointer_cast): new function. (error_message): 1028, 1029 - new (error_message): 6012, 6013 - new (type2string): new function (add_to_spec_list): ARRAY_P macro used. (copy_type): type is copied only in one level (not recursive as it was up to now). (clear_internal_type): semantic for cyclic definition and declaration added. (mov2lvalue): simplified for usage of new MOV instructions. (type_compare): new function. (cyclic_def): new function. * tables.c (putstruct): ARRAY definition unified. The allocate_aggregate function is always called. (putstruct): POINTER - new. (putstruct_loc): memory_size member is assigned for locals. (putstruct_loc): memory_size field assigned (for structures) if it was not yet. (putstruct_loc): POINTER - new. (allocate_struct): POINTER - new. (allocate_aggregate): for ARRAY, size evaluation - bug fixed. * virtual_machine.c(exe): redesign of MOV and PUSHA instruction. All instructions with offsets removed. Address' offsets are evaluated in arithmetical stack and placed on the top of it. In NEG instruction, a bug is fixed. * geninstr.h (GEN_PUSHA): (GEN_PUSHAr): (GEN_PUSHArr): redesign of PUSHA class of instructions. Get rid of all relative and offset PUSHA instruction. Strategy of variables access on the stack is changed. It is much more simple now. (GEN_MOVi): the same as above. Get rid of all relative MOV with address. (GEN_MOVap): new instruction. [AST] <- [[AST]] (GEN_MOVpa): new instruction. [AST] <- [AST] (GEN_MOVar): new instruction. [AST] <- [(AST - 1) + [AST]] Sat Feb 28 11:55:01 1998 Ludo Koren * tests/check-them (target): bug in *.core Tue Feb 24 21:17:38 1998 Ludo Koren * tests/check-them (target): *.core file - new Fri Feb 20 18:54:53 1998 Ludo Koren * ys.y (ae_empty): new; semantic for structures, arrays, unions in assignment_operator (assignment_operator): semantic shortened and move2lvalue used. Now the same semantic as specifies the standard is implemented. lvalue is evaluated only once. (unary_expression): prefix increment and decrement operators - semantic fixed to the standard. move2lvalue used. Thu Feb 19 19:05:43 1998 Ludo Koren * ys.y (func_rest): error - new * comp_maint.c (error_message): 1004 update - gcc type syntax error. Wed Feb 18 15:25:22 1998 Ludo Koren * ys.y (unary_expression): SIZEOF ( type_name ) - new * comp_maint.c (error_message): 1027 - new * ys.y (first_dekl): semantic for declaration of tags * comp_maint.c (error_message): 6010 and 6011 - new * ys.y (direct_declarator): UNION_P - new (list_param): UNION_P - new (primary_expression): ENUM_FC - new (postfix_expression): UNION_P - new; struct_union_field and subscript_flag with GEN_ADDi bug fixed * tables.c (putstruct): ENUM_FC - new UNION_FC - new (allocate_var): ENUM_FC - new (allocate_aggregate): UNION_FC - new * comp_maint.c (mov2lvalue): last two arguments changed from int to enum. (enum intern_func_class typec; enum intern_arit_class type;) ENUM_FC - new Tue Feb 17 15:59:22 1998 Ludo Koren * ys.y: functions for type changed to tag ENUM tag semantic new * tables.c: tables for type changed to tag (has_tag): redefinition of tag handled * tables.h: tables for type changed to tag * type.h (ENUM_P): new (UNION_P): new * comp_maint.c (error_message): 1026 * tables.c: ENUMT to ENUM_FC; STRUC to STRUCT_FC; UNIONT to UNION_FC; STRUC_P to STRUCT_P * comp_maint.c: ENUMT to ENUM_FC; STRUC to STRUCT_FC; UNIONT to UNION_FC; STRUC_P to STRUCT_P * type.h (STRUCT_P): from STRUC_P ENUMT to ENUM_FC; STRUC to STRUCT_FC; UNIONT to UNION_FC * ys.y (direct_declarator): check for recursive structure changed ENUMT to ENUM_FC; STRUC to STRUCT_FC; UNIONT to UNION_FC; STRUC_P to STRUCT_P Mon Feb 2 17:58:22 1998 Ludo Koren * tables.c (putstruct_type_body): COMPILE_P added * comp_maint.h (COMPILE_P): new * comp_maint.c (error_message): 1025 - new * ys.y (struct_or_union_specifier): set of the name of structure in struct_or_union IDENT (direct_declarator): check if a structure is recursive defined and appropriate action (struct_declaration): reset of the name of structure Fri Jan 30 18:57:22 1998 Ludo Koren * ys.y (unary_expression): ENUMT added * comp_maint.c (error_message): bad output for fatal errors (type_transform): ENUMT new * tables.c (allocate_struct): ENUMT - new Thu Jan 29 17:45:46 1998 Ludo Koren * tables.c * struct.h (struct attr): type_qualifier definition changed to enum type_qual. * type.h: enum type_qual - new * ys.y (enumerator): type_spec_count decrement (M): UNDEF_TQ CONST to CONST_TQ; VOLATILE to VOLATILE_TQ * tables.c (putstruct): ENUM to ENUMT; CONST to CONST_TQ; VOLATILE to VOLATILE_TQ (add_spec_to_type): ENUM to ENUMT (add_ident_to_type): ENUM to ENUMT (allocate_var): handling for CONST_TQ type_qualifier - new Fri Jan 23 15:41:17 1998 Ludo Koren * Makefile.in (mostlyclean): *core changed (distclean): *dumb.* added * configure.in (sigv): true POSIXized system option; dumb files, when we cannot find proper signal handling. Thu Jan 22 17:44:20 1998 Ludo Koren * Makefile.in (check): check-them with current directory specification. Get rid of $@ variable. * inter_handl_posix.c (interrupt_register): posix functions. (APUE) * sigig_posix.c (mysigignore): posix functions. * input.c: get rid of signal.h and termio.h; not needed anymore. Wed Aug 27 16:56:28 1997 Ludovit Koren * Version 0.8.2 released. * Makefile.in: utils/yy * configure.in (PROGS): utils/yy Sun Aug 24 17:06:26 1997 Ludovit Koren * inter_handl_*: function prototypes; new files inter_handl_posix.c and sigig_posix.c * configure.in: AC_DEFINE(HAVE_TIOCSTI) for linux * inter_handl_lin.c (interrupt_service): HAVE_TIOCSTI added Tue Jul 1 14:44:23 1997 Ludovit Koren * global.h: interrupt_service function declaration deleted * clif.c (main): interrupt_handler changed to interrupt_register Fri Jun 27 09:55:53 1997 Ludovit Koren * global.c: buf_pointer deleted * global.h: prototypes changed to extern; buf_pointer deleted * channel_maint.c: function prototypes; some definition moved from channel_maint.h * wind.c (wind): function prototypes; drawing to the pixmap only if needed * xwin.c: function prototypes; drawing to the pixmap only if needed * channel_maint.h (struct CHANNEL): pixmap defined only if needed; extern to declarations * wind_w.c (wind_w): function prototypes; drawing to the pixmap only if needed * input.c: definition of input pointer; buf_pointer is static * input.h: extern specifier for input * rw.c: function prototypes * graph.c: function prototypes * getc_unix.c: function prototypes * init_ch.c (input_channel): function prototypes * myintrinsic.c: function prototypes * struct.h (struct remote_tab): structure field adr changed * load.c (load): strict function cast * intrinsic.h: strict prototypes for intrinsic functions * Makefile.in (remote_call.o): remote_call.h added * remote_call.c (has_remote): INTRINSIC_FUNCTION - strict function cast and several function prototypes added * intrinsic.h: typedef and function protoypes added * clif.c: function prototypes added Thu Jun 26 09:35:44 1997 Ludovit Koren * run_str.l: VERBOSE and VERSION added * run_str.y: VERBOSE and VERSION added * comp_maint.h: verbose added * comp_maint.c (clif): verbose added * help.c (help): case 4 and 5 added * tables.c (set_value): bug fixed; *end in the loop is tested on '\0' as well. * input.h: function declarations changed to extern. * input.c: function declarations of this file deleted. * global.h: function prototypes changed to extern; input declaration deleted; interrupt declaration changed to RETSIGTYPE. Wed Jun 25 10:48:51 1997 Ludovit Koren * tables.c (allocate_aggregate): default added * ys.y: default for several switch statements added * type.h: end of enumeration types added * myintrinsic.c (transform_to_simple_type): default added Mon Jun 23 17:40:46 1997 Ludovit Koren * Makefile.in (distdir-start): adding check if README and guide_programmers.tex is up to date. (doc/guide_programmers.dvi): (doc/guide_users.dvi): commands corrected for dvi files (distclean): files for deleting added (clean): distribution directories added Sat Jun 14 19:57:03 1997 Ludovit Koren * parser.h (SET_ADDRESS): (OFFSET_LAST_ADD): renamed offset1 var_adr1 to offset and var_adr, respectively. * ys.y: renamed offset1 and var_adr1 to offset and var_adr, respectively. * tables.c (point_loc): renamed offset1 to offset Tue Jun 10 15:27:28 1997 Ludovit Koren * ys.y: in unary expression, OFFSET_LAST_ADD_ARRAY, OFFSET_LAST_ADD used * parser.h (OFFSET_LAST_ADD_ARRAY): new macro (OFFSET_LAST_ADD): new macro Mon Jun 9 17:49:49 1997 Ludovit Koren * parser.h: subscript_flag and struct_union_field defined as arrays. (TYPE_CLEAR): subscript_flag and struct_union_field added to the macro. Sun Jun 8 19:33:28 1997 Ludovit Koren * type.h (POINTER_P): moved from parser.h (STRUC_P): moved from parser.h (ARRAY_P): (SIMPLE_P): new macro * comp_maint.c (add_to_spec_list): bug in condition for array. * parser.h (DELETE_SUBSCRIPT): new macro Sat Jun 7 21:21:21 1997 Ludovit Koren * comp_maint.h: l_type_spec, ident_list added Fri Jun 6 10:32:15 1997 Ludovit Koren * comp_maint.c (error_message): redesigned * configure.in: AC_HEADER_STDC added * printfx.h: code added for conditional compilation (STDC_HEADERS). * printf_unix.c (printfx): (fprintfx): code added for conditional compilation. Thu Jun 5 10:49:14 1997 Ludovit Koren * tables.c (allocate_aggregate): new function. * comp_maint.c (l_value_cast): (implicit_cast): changed to support SET_ADDRESS macro; set-- is not done in this function anymore (error_message): several error messages added * parser.h (SET_ADDRESS): new macro * ys.y: SET_ADDRESS Wed Jun 4 16:12:29 1997 Ludovit Koren * parser.h (STRUC_P): macro - if pointer has a structure type. * ys.y: list_param added generation of PUSHA for STRUC * comp_maint.c (add_to_spec_list): copy_type function call added. Subscripts for array must be created twice as well. (copy_type): new function. Tue Jun 3 14:25:36 1997 Ludovit Koren * Makefile.in (SH_OBJS): changed. Now, it is set by configure. * configure.in: AC_SUBST(SH_OBJS) added Mon Jun 2 10:50:42 1997 Ludovit Koren * tables.c (allocate_struct): new function. * tables.h: declaration changed according to new parameters. * tables.c (has_goto): parameter label_name added (has): parameter var_name added (has_type): parameter type_name added (has_label): parameter label_name added (has_loc): parameter var_name added (point): parameter var_name added (point_loc): parameter var_name added * ls.l: IDENT has type mystring now. Sun Jun 1 16:40:39 1997 Ludovit Koren * Makefile.in: different targets - header files added. * configure.in: AC_FUNC_VPRINTF, AC_TYPE_SIGNAL added. Redesigning of checking signals. * allocx.h: prototypes added * load.c: prototypes added * tables.h: prototype of align_memory added * channel.y: prototypes added * store_cont.c: allocx.h added * allocx.c: prototypes added * symbols.c: prototypes added * run_str.y: prototypes added * help.c: prototypes added * init_rs.c: declaration of functions defined in module added. Sat May 31 17:12:03 1997 Ludovit Koren * parser.h: struct_union_field - new flag. Represents indirection of identifier. (POINTER_P): macro - if the type is pointer. * struct.h (struct attr): function_class and arit_class are enums now. Fri May 30 15:41:05 1997 Ludovit Koren * type.h: defines changed to enums (intern_arit_class, intern_func_class, global_type) * parser.h: is_address new variable - check if the address operator was not used twice in one expression Thu May 29 10:47:11 1997 Ludovit Koren * Makefile.in (TAGS): fixing bug * remote_call.h: new file * virtual_machine.h: new file * load.h: new file * memmove.h: new file * ys.h: only appropriate functions left (defined in ys.y) * ls.h: new file * run_str.h: new file * global.c: some variables moved to appropriate places * global.h: some variables moved to appropriate places * Makefile.in (c-parser.o): (comp_maint.o): new header files added * myintrinsic.c (transform_to_simple_type): parameter changed from int to enum global_type * comp_maint.h: now it contains only declarations of comp_maint.c * tables.h: new file * input.h: functions defined in input.c added * store_cont.c: include store_cont.h added * store_cont.h (struct CONTEXT): new file; CONTEXT moved from struct.h Tue May 27 15:04:19 1997 Ludovit Koren * type.h (POINTER): new define * ys.y: cast_expression changed according to the ANSI standard Mon May 26 15:44:08 1997 Ludovit Koren * ls.l: PTR token added * ys.y: sizeof implemented * comp_maint.c (move2lvalue): new function (part of ys.y assign semantics moved here). Tue May 20 09:14:41 1997 Ludovit Koren * virtual_machine.c (exe): instructions PUSHA and MOV relatively with offset changed. Now without a sizeof object (like a real instruction). * Makefile.in (CFLAGS): instead of -g the @CFLAGS@ variable specified. (It is because of problems on SGIs with as and gas; without optimization we cannot compile.) * comp_maint.c (error_message): error 2008 added Mon May 19 13:08:00 1997 Ludovit Koren * tables.c (offset_aggregate_ident): new function * struct.h (struct aggregate_identifier): New structure for compound identifier. (struct internal_type): field_name added Wed May 14 16:33:59 1997 Ludovit Koren * ys.y: function call rule added to the postfix_expression (according to the ANSI grammar). Tue May 13 14:50:45 1997 Ludovit Koren * comp_maint.c (error_message): error 3006 added Mon May 12 17:12:41 1997 Ludovit Koren * struct.h (struct CONTEXT): kodp4 added * store_cont.c (restore_context): (store_context): kodp4 added * global.c: kodp4 added * global.h: kodp4 added * ys.y: l_value not used anymore. Grammar is like ANSI in this case. The array rules moved to the postfix_expression. Now should be easier to have different types of identifiers (arrays, pointers, structures and mixed). Fri May 9 17:06:56 1997 Ludovit Koren * ys.y (postfix_expression): call moved from primary_expression Thu May 8 12:42:29 1997 Ludovit Koren * tests/check-them (target): rm -f core test.diff pokusny_subor added; now all of them are deleted in each iteration * configure.in (PROGS): AC_PATH_XTRA added Tue May 6 09:28:07 1997 Ludovit Koren * tables.c (putstruct): first_align added; the structure must be aligned to be used in array Tue Apr 29 14:17:11 1997 Ludovit Koren * run_str.l: adding long options for copying and warranty * ls.l: for matching '{stringc}', bad copying of yytext - fixed Mon Apr 28 08:05:20 1997 Ludovit Koren * comp_maint.c (add_to_spec_list): bug fixed for tmp_l * input.c (input_buf): (input_std): (input_komp): if the char is \n set the line number; reset the char_counter; reinitialize line_buf * ls.l: bug fixed for counting lines * tables.c (allocate_var): new function * global.c: pi variable deleted * global.h: pi variable deleted Fri Apr 25 16:36:41 1997 Ludovit Koren * tables.c (has_type): new function (has_type): new function (putstruct_type): new function (putstruct_type_body): new function Thu Apr 24 12:44:26 1997 Ludovit Koren * keyword.gperf: sizeof keyword added * ys.h: has_loc - parameter added * tables.c (has_loc): parameter added (putstruct_loc): parameter added * ys.y: typet variable deleted * global.c: typet variable deleted * global.h: typet variable deleted * comp_maint.c (add_to_spec_list): typet variable not used anymore * tables.c (putstruct): redesigned; now the typet variable is not used anymore. Tue Apr 22 12:40:49 1997 Ludovit Koren * Makefile.in (dvi): target for making documentation Sat Apr 19 16:56:16 1997 Ludovit Koren * tables.c (scope_offset_set): bad alignment fixed Thu Apr 17 09:45:30 1997 Ludovit Koren * comp_maint.c (error_message): new warning for too many params * tables.c (putstruct_loc): warning added for more parameters than 31 (ANSI) * ys.h: scope_offset_get scope_offset_set declaration * tables.c (scope_offset_get): new function (scope_offset_set): new function * comp_maint.c: func_def_f new variable - if the scope is about function definition. (enter_scope): (exit_scope): both functions are using func_def_f Wed Apr 16 09:11:05 1997 Ludovit Koren * comp_maint.h: declaration for clear_hash_tab added * tables.c (allocate_hastab_loc): new function (allocate_loc_tables): new function (set_value): (point_loc): the lookup_loc function call walk through all local tables (lookup_loc): second parameter added, which enables to walk through local tables list * struct.h (struct ident_tab_header): hastab_loc - new member * tables.c: hastab_loc as a global variable deleted * Makefile.in (check): bug if the $(srcdir) is not ./ fixed Tue Apr 15 09:13:25 1997 Ludovit Koren * global.h: pi_loc deleted * global.c: pi_loc deleted * tables.c: identtab_loc changed, it contains a header * struct.h (struct ident_tab_header): new structure for nested scope levels Mon Apr 14 17:40:17 1997 Ludovit Koren * comp_maint.c (exit_scope): new function * ys.y (func_first): (statement): exit_scope function call * ys.h: external definition of scope_level variable exit_scope declaration * ys.y (list_loc_dekl): rules added for parsing of function declaration Sat Apr 12 16:38:43 1997 Ludovit Koren * Makefile.in (tables.o): new object * comp_maint.c: deleted functions which moved to tables.c * comp_maint.h: deleted functions which moved to tables.c * tables.c: new file; functions moved from comp_maint.c * ys.h: enter_level declaration added * comp_maint.c (enter_level): new function * ys.y: func nonterminal replaced by compound_statement nonterminal. N - new nonterminal - enter new level Thu Apr 10 12:28:24 1997 Ludovit Koren * configure.in (PROGS): check for assert.h * allocx.c (allocate): assert - conditional compilation * comp_maint.c (align_memory): assert - conditional compilation * virtual_machine.c (move_stack_aligned): assert - conditional compilation * tests/check-them: added test for file output * load.c (load_new): fixing off by one for loop Wed Apr 9 09:51:30 1997 Ludovit Koren * tests/check-them: new file; automatic check * clif.c (main): return value added * ys.y (M): allocate changed from BLOCK to PERM * channel_maint.c: calling of allocate changed (fill_write): temporary string; automatic free * configure.in (sigv): changed DEFS to AC_DEFINE backslash added in front of $(srcdir). (Problems on Linux) * Makefile.in (ALL_CFLAGS): fixing typo Tue Apr 8 11:59:45 1997 Ludovit Koren * ls.l: fixed bug for line_counter in string matching (unput): customized unput Mon Apr 7 11:56:32 1997 Ludovit Koren * Makefile.in: tests directory added in distdir-start target Sun Mar 23 17:43:57 1997 Ludovit Koren * configure.in: new file * Makefile.in: new file Thu Mar 20 16:42:34 1997 Ludovit Koren * rcs-beginning symbol defined (changed from SCCS to RCS) Mon Mar 3 10:08:55 1997 Ludovit Koren * load.c (load): changing allocation strategy; calls of the new function. (load_new): calling string function. We get the same copy of a string. It can be used then in lookup functions. * comp_maint.c (lookup_loc): strcmp replaced by pointer comparison (lookup_goto_table): strcmp replaced by pointer comparison (lookup): strcmp replaced by pointer comparison * symbols.c (string): new module. It makes only one copy of each string found in the source file. * allocx.h: header file for new allocation inteface * allocx.c (allocate): new function (deallocate): new function (init_zero): new function * ls.l: changing allocation strategy; calls of the new function. * ys.y: changing allocation strategy; calls of the new function. * remote_call.c: point_remote function deleted; (has_remote): changing allocation strategy; calls of the new function. (lookup_remote): string comparison changed to pointer comparison. * channel.y: deleting old allocation call * virtual_machine.c (exe): new PUSHAI instructions (Immediate value properly aligned). (move_stack_aligned): new function * channel.y: changing allocation strategy; calls of the new function. * channel.l: changing allocation strategy; calls of the new function. * channel_maint.c: changing allocation strategy; calls of the new function. Fri Feb 28 12:08:10 1997 Ludovit Koren * ys.y: init_zero added (initialization of structures * init_rs.c (input_rs_): return added if there is nothing in the buffer. Thu Feb 27 12:01:07 1997 Ludovit Koren * comp_maint.c (put_array_subscript): bug solved (if an array subscript is NOT_DEFINED, it didn't work) * ls.l: permanent constants BACKSLASH, SP, NL, BS, FF, CR, HT, VT bug in \x escape sequence solved Wed Feb 26 16:18:22 1997 Ludovit Koren * virtual_machine.c (exe): execution of PUSHAI instructions changed * geninstr.h (GEN_PUSHAIc): (GEN_PUSHAIf): (GEN_PUSHAId): generation of instruction changed. Immediate value is properly aligned. * instr.h: deleting unused variables Tue Feb 25 09:54:22 1997 Ludovit Koren * run_str.l: allocation strategy changed. new function calling Fri Feb 14 16:42:04 1997 Ludovit Koren * clif.c (main): define CONTROL * intrinsic.h: define CONTROL * inter_handl_svr4.c (interrupt_service): warnings Thu Feb 13 14:35:35 1997 Ludovit Koren * allocx.c: renaming from callocx * Makefile (allocx.o): renaming from callocx Tue Feb 11 10:04:05 1997 Ludovit Koren * keyword.gperf: added to SCCS repository * run_str.y: renaming from run_str_y * channel.y: renaming from channel_y * ls.l: renaming from ls * ys.y: renaming from ys * Makefile: renaming ls, ys, run_str_y, channel_y Thu Dec 12 17:26:43 1996 Ludovit Koren * Makefile (IRIX): changed to the shared library creation (Linux): changed to the shared library creation * virtual_machine.c (exe): default actions changed to abort and line number output Sat Nov 30 15:33:01 1996 Ludovit Koren * run_str.l: added unix like options Fri Nov 29 16:24:38 1996 Ludovit Koren * Makefile (SunOS): -L/usr/openwin/lib added OBJS added, rules simplified to shared and nonshared * keyword.gperf: for keywords the perfect hash function used Command-line: gperf -t -p -k 2,3 keyword.gperf * ls: find_ident function redesigned Wed Sep 18 16:28:02 1996 Ludovit Koren * Makefile (sun-stamp): -L$(HOME)/lib -lclif_x -R$(HOME)/lib added (libclif_x.so): -KPIC added Thu Aug 15 10:40:40 1996 Ludo Koren * input.h (input): added prototype clif-0.93/INSTALL100644 1750 1750 13655 5727162560 12216 0ustar korenkoren This is a generic INSTALL file for utilities distributions. If this package does not come with, e.g., installable documentation or data files, please ignore the references to them below. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation, and creates the Makefile(s) (one in each subdirectory of the source directory). In some packages it creates a C header file containing system-dependent definitions. It also creates a file `config.status' that you can run in the future to recreate the current configuration. To compile this package: 1. Configure the package for your system. Normally, you just `cd' to the directory containing the package's source code and type `./configure'. If you're using `csh' on an old version of System V, you might need to type `sh configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While it is running, it prints some messages that tell what it is doing. If you don't want to see any messages, run `configure' with its standard output redirected to `/dev/null'; for example, `./configure >/dev/null'. To compile the package in a different directory from the one containing the source code, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If for some reason `configure' is not in the source code directory that you are configuring, then it will report that it can't find the source code. In that case, run `configure' with the option `--srcdir=DIR', where DIR is the directory that contains the source code. By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. Alternately, you can do so by consistently giving a value for the `prefix' variable when you run `make', e.g., make prefix=/usr/gnu make prefix=/usr/gnu install You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH' or set the `make' variable `exec_prefix' to PATH, the package will use PATH as the prefix for installing programs and libraries. Data files and documentation will still use the regular prefix. Normally, all files are installed using the same prefix. Some packages pay attention to `--with-PACKAGE' options to `configure', where PACKAGE is something like `gnu-as' or `x' (for the X Window System). They may also pay attention to `--enable-FEATURE' options, where FEATURE indicates an optional part of the package. The README should mention any `--with-' and `--enable-' options that the package recognizes. `configure' also recognizes the following options: `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' Do not print messages saying which checks are being made. `--verbose' Print the results of the checks. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `--x-includes=DIR' X include files are in DIR. `--x-libraries=DIR' X library files are in DIR. `configure' also accepts and ignores some other options. On systems that require unusual options for compilation or linking that the package's `configure' script does not know about, you can give `configure' initial values for variables by setting them in the environment. In Bourne-compatible shells, you can do that on the command line like this: CC='gcc -traditional' LIBS=-lposix ./configure On systems that have the `env' program, you can do it like this: env CC='gcc -traditional' LIBS=-lposix ./configure Here are the `make' variables that you might want to override with environment variables when running `configure'. For these variables, any value given in the environment overrides the value that `configure' would choose: - Variable: CC C compiler program. The default is `cc'. - Variable: INSTALL Program to use to install files. The default is `install' if you have it, `cp' otherwise. For these variables, any value given in the environment is added to the value that `configure' chooses: - Variable: DEFS Configuration options, in the form `-Dfoo -Dbar...'. Do not use this variable in packages that create a configuration header file. - Variable: LIBS Libraries to link with, in the form `-lfoo -lbar...'. If you need to do unusual things to compile the package, we encourage you to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the README so we can include them in the next release. 2. Type `make' to compile the package. If you want, you can override the `make' variables CFLAGS and LDFLAGS like this: make CFLAGS=-O2 LDFLAGS=-s 3. If the package comes with self-tests and you want to run them, type `make check'. If you're not sure whether there are any, try it; if `make' responds with something like make: *** No way to make target `check'. Stop. then the package does not come with self-tests. 4. Type `make install' to install programs, data files, and documentation. 5. You can remove the program binaries and object files from the source directory by typing `make clean'. To also remove the Makefile(s), the header file containing system-dependent definitions (if the package uses one), and `config.status' (all the files that `configure' created), type `make distclean'. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need it if you want to regenerate `configure' using a newer version of `autoconf'. clif-0.93/Makefile.in100444 1750 1750 30700 7125344715 13214 0ustar korenkoren# Clif - A C-like Interpreter Framework # Copyright (C) 1997 T. Hruz, L. Koren # 1998 L. Koren # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. srcdir = @srcdir@ prefix = $(srcdir) exec_prefix = $(prefix) bindir = $(exec_prefix)/bin libdir = VPATH = @srcdir@ CC = @CC@ ADD_IDIR = @ADD_IDIR@ YACC = @YACC@ YACCFLAGS = -dv LEX = @LEX@ CFLAGS = @CFLAGS@ INCLUDES = -I. -I$(srcdir) -I$(srcdir)/example X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ -lX11 X_EXTRA_LIBS = @X_EXTRA_LIBS@ ADD_OBJS = @ADD_OBJS@ ADD_FORK = @ADD_FORK@ LIBS = @LIBS@ -lm DEFS = @DEFS@ -DXWIN INSTALL = INSTALL_PROGRAM = INSTALL_DATA = ALL_CFLAGS = $(ADD_IDIR) $(CFLAGS) $(X_CFLAGS) SHELL = /bin/sh SH_OBJS = @SH_OBJS@ OBJS = c-parser.o c-lex.o keyword.o rs-parser.o rs-lex.o tables.o \ help.o global.o store_cont.o virtual_machine.o clif.o getc_unix.o \ comp_maint.o allocx.o printf_unix.o input.o memmove.o symbols.o \ remote_call.o ch-parser.o ch-lex.o channel_maint.o s-conv.o \ dbg-out.o pso.o \ $(ADD_OBJS) $(SH_OBJS) ALL = all.config all.progs version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.h` .c.o: $(CC) -c $(DEFS) $(ALL_CFLAGS) $(INCLUDES) $< all: $(ALL) all.progs: @PROGS@ all.config: config.status auto-config.h install: uninstall: check: all @cwd=`pwd`; \ cd $(srcdir)/tests; ./check-them $$cwd clif: $(OBJS) $(CC) $(OBJS) $(LIBS) $(X_LIBS) $(X_EXTRA_LIBS) -o clif dvi: doc/guide_users.dvi doc/guide_programmers.dvi # Avoid a lot of time thinking about remaking Makefile.in. .SUFFIXES: .in Makefile: $(srcdir)/Makefile.in config.status $(srcdir)/version.h cp config.status config.run $(SHELL) config.run rm -f config.run $(srcdir)/configure: $(srcdir)/configure.in cd $(srcdir); autoconf # autoheader might not change config.h.in, so touch a stamp file. $(srcdir)/config.in: $(srcdir)/stamp-h.in $(srcdir)/stamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h cd $(srcdir) && autoheader echo timestamp > $(srcdir)/stamp-h.in auto-config.h: stamp-h stamp-h: config.in config.status CONFIG_HEADERS=auto-config.h:config.in $(SHELL) config.status echo > stamp-h config.status: configure @if [ ! -f config.status ]; then \ echo You must configure clif. ; \ false; \ else \ $(SHELL) config.status --recheck; \ fi # object of the main parser function c-parser.o: c-parser.c global.h instr.h geninstr.h \ control.h type.h mystdio.h struct.h ys.h parser.h \ allocx.h load.h virtual_machine.h ls.h memmove.h \ tables.h remote_call.h printfx.h s-conv.h flags.h \ config.h pso.h c-lex.o: c-lex.c config.h global.h mystdio.h token.h \ input.h buf.h allocx.h dbg-out.h tables.h keyword.o: keyword.c token.h config.h # interaface to remote procedure call remote_call.o: remote_call.c global.h intrinsic.h myintrinsic.c \ type.h struct.h define.h load.c load.h mystdio.h allocx.h \ remote_call.h config.h # object of the run string compiler rs-parser.o: rs-parser.c flags.h rs-lex.o: rs-lex.c init_rs.c allocx.h rs-parser.h # object of the virtual machine virtual_machine.o: virtual_machine.c global.h cast.h instr.h \ input.h virtual_machine.h printfx.h tables.h config.h lex_t.h # global variables and parameters global.o: global.c type.h # inerrupt handler maintenance inter_handl_svr3.o: inter_handl_svr3.c global.h config.h inter_handl_bsd.o: inter_handl_bsd.c global.h config.h inter_handl_svr4.o: inter_handl_svr4.c global.h config.h inter_handl_lin.o: inter_handl_lin.c global.h config.h inter_handl_posix.o: inter_handl_posix.c global.h config.h # procedures for switching context of the virtual # machine in interrupt handling store_cont.o: store_cont.c global.h mystdio.h input.h \ allocx.h lex_t.h # machine dependent main function clif.o: clif.c global.h config.h # machine dependent getc function getc_unix.o: getc_unix.c # main compiler maintenance comp_maint.o: comp_maint.c global.h define.h control.h \ struct.h type.h mystdio.h instr.h token.h geninstr.h \ comp_maint.h version.h allocx.h ys.h run_str.h ls.h \ tables.h input.h printfx.h s-conv.h config.h flags.h \ virtual_machine.h # symbol table maintenance tables.o: tables.c global.h cast.h struct.h define.h mystdio.h \ type.h token.h instr.h allocx.h comp_maint.h tables.h printfx.h \ flags.h config.h # machine dependent alloc function allocx.o: allocx.c config.h allocx.h global.h # machine dependent "print" function printf_unix.o: printf_unix.c printfx.h # machine dependent "memmove" function memmove.o: memmove.c global.h cast.h memmove.h # redefined input of the main compiler input.o: input.c global.h input.h lex_t.h # function printing command line options help.o: help.c # saving a copy of each string symbols.o: symbols.c allocx.h # conversion strings s-conv.o: s-conv.c global.h allocx.h type.h struct.h comp_maint.h \ s-conv.h flags.h # debugging support dbg-out.o: dbg-out.c global.h allocx.h printfx.h dbg-out.h # parser support functions pso.o: pso.c global.h geninstr.h flags.h comp_maint.h pso.h \ struct.h tables.h type.h instr.h allocx.h # non compulsive parts begin here # # graphics interface - dynamic library libclif_x.so: ch-parser.o ch-lex.o remote_call.o channel_maint.o \ example/lin_clnt.o example/lin_xdr.o ld $(ALL_LDFLAGS) ch-parser.o ch-lex.o remote_call.o \ channel_maint.o example/lin_clnt.o example/lin_xdr.o -o libclif_x.so cp libclif_x.so $(HOME)/lib/libclif_x.so ch-parser.o: ch-parser.c global.h mystdio.h channel_maint.h \ allocx.h printfx.h ch-lex.o: ch-lex.c buf.h init_ch.c mystdio.h channel_maint.o: channel_maint.c channel_maint.h mystdio.h \ xwin.c graph.c wind.c wind_w.c $(srcdir)/ch-parser.c: $(srcdir)/channel.y cd $(srcdir); $(YACC) $(YACCFLAGS) channel.y @$(srcdir)/utils/yy _channel $(srcdir)/y.tab.c > $(srcdir)/ch-parser.c @$(srcdir)/utils/yy _channel $(srcdir)/y.tab.h > $(srcdir)/ch-parser.h @rm $(srcdir)/y.tab.c $(srcdir)/y.tab.h $(srcdir)/ch-lex.c: $(srcdir)/channel.l cd $(srcdir); $(LEX) channel.l @$(srcdir)/utils/yy _channel $(srcdir)/lex.yy.c > $(srcdir)/ch-lex.c @rm $(srcdir)/lex.yy.c rw: $(srcdir)/rw.c $(srcdir)/sigig.c $(srcdir)/sigig_bsd.c \ $(srcdir)/sigig_lin.c $(srcdir)/sigig_posix.c $(CC) $(DEFS) $(ALL_CFLAGS) $(INCLUDES) $(srcdir)/rw.c \ $(ADD_FORK) $(LDFLAGS) $(LIBS) $(X_LIBS) $(X_EXTRA_LIBS) -o rw # grammar of the clif $(srcdir)/c-parser.c: $(srcdir)/ys.y cd $(srcdir); $(YACC) $(YACCFLAGS) ys.y @mv $(srcdir)/y.tab.c $(srcdir)/c-parser.c @mv $(srcdir)/y.tab.h $(srcdir)/token.h # lexical analysis of the clif $(srcdir)/c-lex.c: $(srcdir)/ls.l cd $(srcdir); $(LEX) ls.l @mv $(srcdir)/lex.yy.c $(srcdir)/c-lex.c @if test $(LEX) = flex; then \ echo "#define FLEX_SCANNER" > lex_t.h; \ else \ echo "#undef FLEX_SCANNER" > lex_t.h; \ fi # grammar of the run string parsing $(srcdir)/rs-parser.c: $(srcdir)/run_str.y cd $(srcdir); $(YACC) $(YACCFLAGS) run_str.y @$(srcdir)/utils/yy _rs_ $(srcdir)/y.tab.c > $(srcdir)/rs-parser.c @$(srcdir)/utils/yy _rs_ $(srcdir)/y.tab.h > $(srcdir)/rs-parser.h @rm $(srcdir)/y.tab.c $(srcdir)/y.tab.h # lexical analysis of a run string $(srcdir)/rs-lex.c: $(srcdir)/run_str.l cd $(srcdir); $(LEX) run_str.l @$(srcdir)/utils/yy _rs_ $(srcdir)/lex.yy.c > $(srcdir)/rs-lex.c @rm $(srcdir)/lex.yy.c $(srcdir)/keyword.c: $(srcdir)/keyword.gperf gperf -t -p -k 2,3 $(srcdir)/keyword.gperf > $(srcdir)/keyword.c # Optional parts lin_clnt.o: example/lin_clnt.c example/lin.h $(CC) -c $(DEFS) $(ALL_CFLAGS) $(INCLUDES) $< lin_xdr.o: example/lin_xdr.c example/lin.h $(CC) -c $(DEFS) $(ALL_CFLAGS) $(INCLUDES) $< $(srcdir)/utils/yy: $(srcdir)/utils/yy.c cd $(srcdir)/utils; $(CC) yy.c -o yy ############################################################# # Update the tags table TAGS: force cd $(srcdir); \ mkdir temp; \ mv -f *-parser.[ch] temp; \ etags *.y *.h *.c; \ mv temp/* .; \ rm -rf temp ############################################################# sharedclean: rm -f *.so rm -f $(HOME)/libclif_x.so extraclean: distclean -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs -rm -f *.gz -rm -f y.* -rm -f utils/yy -rm -rf clif-$(version) tmp maintainer-clean: distclean -rm -f c-lex.c *-parser.* ch-lex.* rs-lex.* y.* -rm TAGS distclean: clean -rm -f Makefile -rm -f config.status config.cache auto-config.h -rm -f doc/*.aux doc/*.idx doc/*.ilg doc/*.ind \ doc/*.log doc/*.lof doc/*.toc -rm -f *dumb.* -rm -f stamp-h clean: mostlyclean -rm -f @PROGS@ mostlyclean: -rm -f *.o *~ "#"*"#" *.dvi *.log *core code *.flc # Create the distribution tar.gz file dist: clif.xtar gzip --best < clif.xtar > tmp-clif.xtar.gz mv tmp-clif.xtar.gz clif-$(version).tar.gz clif.xtar: distdir tar -chf clif.xtar clif-$(version) distdir: distdir-start distdir-finish distdir-start: @if grep -s "\myver}{$(version)" doc/guide_programmers.tex > /dev/null; \ then true; \ else echo "You must update version number in \`doc/guide_programmers.tex'"; sleep 10; \ fi # Update version number in README awk '$$1 == "Version" \ { $$2 = version; print "\t\t\t",$$0 } \ $$1 != "Version"' \ version=$(version) README > tmp.README mv tmp.README README -rm -rf clif-$(version) tmp # Put all the files in a temporary subdirectory # which has the name that we want to have in the tar file. mkdir tmp mkdir tmp/example mkdir tmp/tests mkdir tmp/doc mkdir tmp/utils for file in *[0-9a-zA-Z+]; do \ ln $$file tmp > /dev/null 2>&1 || cp $$file tmp; \ done cd example; \ for file in *[0-9a-zA-Z+]; do \ if test -d $$file && test "$$file" != RCS; then \ mkdir ../tmp/example/$$file; \ cd $$file; \ for subfile in *[0-9a-zA-Z+]; do \ ln $$subfile ../../tmp/example/$$file > /dev/null 2>&1 \ || cp $$subfile ../../tmp/example/$$file; \ done; \ cd ..; \ else \ ln $$file ../tmp/example > /dev/null 2>&1 \ || cp $$file ../tmp/example; \ fi; \ done cd tests; \ for file in *[0-9a-zA-Z+]; do \ if test -d $$file && test "$$file" != RCS; then \ mkdir ../tmp/tests/$$file; \ cd $$file; \ for subfile in *[0-9a-zA-Z+]; do \ ln $$subfile ../../tmp/tests/$$file > /dev/null 2>&1 \ || cp $$subfile ../../tmp/tests/$$file; \ done; \ cd ..; \ else \ ln $$file ../tmp/tests > /dev/null 2>&1 \ || cp $$file ../tmp/tests; \ fi; \ done cd doc; \ for file in *[0-9a-zA-Z+]; do \ if test -d $$file && test "$$file" != RCS; then \ mkdir ../tmp/doc/$$file; \ cd $$file; \ for subfile in *[0-9a-zA-Z+]; do \ ln $$subfile ../../tmp/doc/$$file > /dev/null 2>&1 \ || cp $$subfile ../../tmp/doc/$$file; \ done; \ cd ..; \ else \ ln $$file ../tmp/doc > /dev/null 2>&1 \ || cp $$file ../tmp/doc; \ fi; \ done cd utils; \ for file in *[0-9a-zA-Z+]; do \ if test -d $$file && test "$$file" != RCS; then \ mkdir ../tmp/utils/$$file; \ cd $$file; \ for subfile in *[0-9a-zA-Z+]; do \ ln $$subfile ../../tmp/utils/$$file > /dev/null 2>&1 \ || cp $$subfile ../../tmp/utils/$$file; \ done; \ cd ..; \ else \ ln $$file ../tmp/utils > /dev/null 2>&1 \ || cp $$file ../tmp/utils; \ fi; \ done distdir-finish: mv tmp clif-$(version) cd clif-$(version); make extraclean # make diff oldversion=M.N # creates a diff file between an older distribution and this one. # The -P option assumes this is GNU diff. diff: diff -rc2P -x "*.dvi" \ -x TAGS -x INSTALL -x configure \ clif-$(oldversion) clif-$(version) > clif-$(oldversion)-$(version).diff doc/guide_programmers.dvi: doc/guide_programmers.tex cd doc; latex guide_programmers.tex cd doc; latex guide_programmers.tex cd doc; makeindex guide_programmers.idx cd doc; latex guide_programmers.tex doc/guide_users.dvi: doc/guide_users.tex cd doc; latex guide_users.tex cd doc; latex guide_users.tex cd doc; makeindex guide_users.idx cd doc; latex guide_users.tex force: clif-0.93/README100644 1750 1750 10626 7130620245 12025 0ustar korenkoren Clif - A C-like Interpreter Framework. -------------------------------------- Version 0.93 Maintainer: Ludo Koren (koren@vm.stuba.sk) Note. ----- For uncompressing the package: cat clif-xx.tar.gz | gunzip |tar xf - Introduction. ------------- Our intention is to develop a C language interpreter. As far as this version, the environment does not support all syntactic and semantic structures of the C language. We keep developing full data abstraction of the environment, as well as the C language preprocessor and its integration with the Clif. The biggest difference so far is the parameter passing mechanism (for details see documentation). In our development we stress on user interfaces on all levels of the interpreter system. A user can write procedures within the Clif specification, he can build modules using different languages and link those modules into the Clif but even more he can add new language structures to Clif. A detailed description can be found in the directory doc. The directory contains an IFAC paper, user's and programmer's manual. (Because the main development goes to the interpretation of Standard C language the user's guide is not updated anymore.) Compiling. ---------- To compile Clif, please, follow these steps: 1. Run configure shell script (in this directory) that attempts to guess correct values for system-dependent variables (see INSTALL about that) and produces appropriate Makefiles, then run make. If this step fails follow the step 2. 2. We recommend to read the file PORTING and try to adapt Makefile (this is only if --enable-CONTROL for configure was specified). The last resort is to send us a mail with the problem description and we will be pleased to try to include a new platform. If you use configure shell script you can change CC variable (default is set to gcc) in Makefile.in to cc. We prefer to try compilation with GNU C compiler. Checking functionality of the Clif. ----------------------------------- If you have compiled the Clif using a Makefile created by configure shell script you can just type make check and all non-interactive tests will be processed. If you have compiled the Clif another way you can test the interpreter manually by typing clif in the tests/ directory. If you used data from .in you could compare your output with .out. You can do the same typing check-them . Test tests/test33.ci is designed for testing of interrupts from the keyboard. If you have configured the Clif with --enable-CONTROL option then you can interrupt Clif by pressing Ctrl-T and Clif echoes: "clif interrupt level 1". Then the user can use any Clif statement that is immediately executed. You can resume the execution by pressing Ctrl-T or entering the statement "resume;". Clif echoes: "clif interrupt level 0". Tests tests/test5[345].ci are designed for testing graphical subsystem. If you are using X terminal, you can try it. You should see 6 sine curves (for tests/test55.ci only one) in different colors and scales. When the curves reach the end of the window, you have to press any key for continuing. Platforms. ---------- Here is the list of platforms where the Clif was successfully compiled: - CDC 4680, EP/IX 2.1.1AC RISCos mips - DEC 5000/240, ULTRIX 4.2, RISC - SUN Sparc Station, SunOS 5.2 and later - PC, Linux 1.0 and later, i486 - PC, FreeBSD 2.2.5-RELEASE, i586 - IBM/RS6000 - 365, AIX 3.2 - HP 9000/720, HP UX A.B8.05 - SGI Indigo 2, IRIX 5.2 Problems. --------- Some problems may arise during compilation of the Clif parser (c-parser.c file) due to the big switch statement. Try to compile the file with optimization flag -O2. Some compilers are not able to compile the file anyway (e.g. IRIX). Additional requests or bugs reporting. -------------------------------------- clif@vm.stuba.sk Ending note. ------------ If you use the compiler (and like it!) -- send me a note. If you have really problems that you can not figure out, feel free to mail me and I will try to help. (See documentation what to include in your mail.) I warn you that response time may be a bit slow... But I will do my best to help. Latest version of this package you can find at ftp server: ftp://dec50.vm.stuba.sk/pub/csgrp/packages/clif/ Acknowledgments. --------------- Thanks to Tomas Hruz who teach me how to write compilers and Jozef Repisky who started work on this project. ---- Ludovit Koren koren@vm.stuba.sk clif-0.93/TAGS100644 1750 1750 146102 7125346752 11661 0ustar korenkoren channel.y,92 int yyerror(51,1474 list_stat_0 59,1560 stat_0 64,1610 d_time 172,4629 s_time 180,4837 run_str.y,112 #define PROTO(PROTO60,1707 #define PROTO(PROTO62,1738 yyerror 71,1899 list_stat_0 80,1980 stat_0 85,2030 ys.y,2292 #define YYDEBUG 79,2190 list_stat_0 154,3896 list_stat 193,4701 stat_0 200,4794 stat_1 225,5200 jump_statement250,5503 declaration_specifiers310,6719 M 319,6941 declarations 350,7658 statement 387,8532 selection_statement472,10361 iteration_statement525,11616 while_stat 597,12989 do_while_stat 613,13293 for_stat 621,13368 for 624,13390 for_expr1:682,14634 for_expr2:706,15034 type_specifier 772,16471 type_qualifier920,20018 pointer943,20502 type_qualifier_list971,21214 struct_or_union_specifier976,21294 struct_or_union1037,22894 struct_declaration_list1075,23750 struct_declaration1086,23937 specifier_qualifier_list1094,24100 struct_declarator_list1101,24252 struct_declarator1106,24348 enum_specifier1112,24449 enumerator_list1194,26306 enumerator1199,26374 declarator1228,27401 direct_declarator1245,27700 initializer1307,29373 initializer_list_complete1320,29574 initializer_list1367,30818 type_name1413,31716 abstract_declarator1418,31810 direct_abstract_declarator1424,31913 storage_class_specifier1436,32241 list_type_spec 1520,34631 list_dim_or_pointer 1551,35444 first_dekl 1638,37825 func_first 1907,45861 func_rest 2060,49140 list_dekl 2115,50015 initializer_optional2362,57695 R 2403,58530 initialization2445,59437 then 2549,61924 switch_body 2568,62236 labeled_statement 2575,62287 compound_statement2638,63928 N2654,64349 list_form_param 2665,64466 list_dim 2862,70353 list_loc_dekl2883,70619 list_loc_dekl_12910,71263 initializer_optional_loc3136,77555 P 3159,77943 local_initialization3202,78884 call 3336,82308 list_param 3345,82436 primary_expression3530,86632 ident 3763,94197 postfix_expression3769,94257 unary_expression4075,101445 cast_expression4327,107321 multiplicative_expression4454,110012 additive_expression4513,111342 shift_expression4568,112684 relational_expression4623,113837 equality_expression4702,115848 bit_AND_expression4747,117030 exclusive_OR_expression4775,117620 inclusive_OR_expression4803,118217 logical_AND_expression4831,118824 logical_OR_expression4882,120212 conditional_expression4934,121594 assignment_expression4968,122188 ae_empty:5009,122977 assignment_operator5024,123351 expression5288,129389 constant_expression5337,130583 dump_yacc 5345,130662 acconfig.h,0 allocx.h,126 #define _ALLOCX_H25,880 #define PERM 27,899 #define BLOCK 28,914 #define PROTO(PROTO33,1012 #define PROTO(PROTO35,1043 ansidecl.h,282 #define _ANSIDECL_H_22,808 #define PROTO(PROTO26,910 #define PROTO(PROTO28,941 #define PVPROTO(PVPROTO34,1011 #define VPROTO(VPROTO35,1039 #define VA_START(VA_START36,1076 #define PVPROTO(PVPROTO38,1135 #define VPROTO(VPROTO39,1161 #define VA_START(VA_START40,1211 auto-config.h,300 #define MAX_ALIGNMENT 4,181 #define HAVE_ASSERT_H 23,650 #define HAVE_LONG_DOUBLE 29,809 #define HAVE_VPRINTF 32,885 #define RETSIGTYPE 35,976 #define STDC_HEADERS 38,1052 #define HAVE_ISALPHA 44,1223 #define HAVE_ISSPACE 47,1295 #define HAVE_ASSERT_H 50,1373 #define HAVE_LIMITS_H 53,1452 buf.h,44 #define _BUF_H9,100 #define YYLMAX 14,151 cast.h,630 #define _CAST_H29,918 #define CS 31,935 #define CCI 32,981 #define CCUI 33,1033 #define CCLI 34,1103 #define CCSI 35,1165 #define CCLSI 36,1229 #define CCLUI 38,1316 #define CCSUI 40,1403 #define CCD 42,1493 #define CCLD 43,1547 #define CCF 44,1611 #define CCC 45,1663 #define CCSC 46,1713 #define CCUC 47,1777 #define CCV 48,1845 #define CFI 49,1888 #define CFUI 50,1954 #define CFLI 52,2048 #define CFLUI 54,2131 #define CFSI 56,2234 #define CFSUI 58,2319 #define CFD 60,2425 #define CFLD 61,2492 #define CFF 63,2578 #define CFC 64,2643 #define CFSC 65,2706 #define CFUC 67,2792 #define CFV 69,2884 channel_maint.h,278 #define _CHANNEL_MAINT_H29,934 #define NUMBER_OF_CHANNELS 43,1066 #define RECORD_WIDTH 44,1097 #define DIMENSION 45,1122 #define LINEAR_WINDOW_CONSTANT 46,1142 struct RECORDRECORD49,1178 struct LISTLIST55,1233 struct FIELD FIELD61,1297 struct CHANNELCHANNEL78,1502 comp_maint.h,88 #define _COMP_MAINT_H27,890 #define COMPILE_ONLY 124,3773 #define COMPILE_P 125,3814 config.h,312 #define _CONFIG_H21,804 #define MAX_CELL_MEMORY_SIZE 28,919 #define LDOUBLE_EQ_DOUBLE38,1250 #define LONG_EQ_INT47,1387 #define SHORT_EQ_INT51,1462 #define UINT_EQ_USHORT55,1517 #define UINT_EQ_ULONG59,1574 #define LONG_CAN_UINT63,1629 } pointer_size;pointer_size81,1880 #define POINTER_SIZE 83,1898 control.h,279 #define _CONTROL_H10,111 } WHILE1;WHILE119,236 } FOR1;FOR133,594 struct break1 break135,604 struct cont1 cont141,663 } IF1;IF152,776 struct default_usagedefault_usage54,785 } SWITCH1;SWITCH173,1263 struct list_const1 list_const175,1276 union fixfix88,1717 dbg-out.h,26 #define _DBG_OUT_H21,805 define.h,408 #define _DEFINE_H8,67 #define BC 11,146 #define SIZE_SPACE 17,211 #define SIZE_ARIT_STACK 18,269 #define SIZE_TMP_STACK 19,346 #define PAGE 25,475 #define SIZE_HAS 26,527 #define SIZE_HAS_LOC 27,583 #define SIZE_HAS_GOTO 28,650 #define MAX_IDENT 30,727 #define MAX_IDENT_LOC 31,787 #define SIZE_ADR_STACK 32,854 #define SIZE_STRUCT_FIX 33,924 #define SIZE_REMOTE 34,1003 #define MASKA 39,1109 environ.h,228 #define _ENVIRON_H2,19 #define PATH_SEPARATOR 4,39 #define DIRECTORY_SEPARATOR 5,66 #define STRING_TERMINATOR 6,98 #define EXTENSION 7,129 #define CLIF_INCLUDE 8,153 #define PROTO(PROTO13,269 #define PROTO(PROTO15,300 flags.h,24 #define _FLAGS_H22,804 geninstr.h,20476 #define _GENINSTR_H30,963 #define GEN_ADDi 36,1050 #define GEN_ADDss(GEN_ADDss40,1195 #define GEN_ADDui 45,1388 #define GEN_ADDli 49,1534 #define GEN_ADDsi 54,1686 #define GEN_ADDlui 59,1839 #define GEN_ADDsui 64,1992 #define GEN_ADDd 69,2146 #define GEN_ADDld 73,2292 #define GEN_ADDf 77,2439 #define GEN_ADDc 82,2591 #define GEN_ADDsc 86,2737 #define GEN_ADDuc 90,2884 #define GEN_ADD 95,3038 #define GEN_SUBi 128,3859 #define GEN_SUBss(GEN_SUBss132,4003 #define GEN_SUBui 137,4196 #define GEN_SUBli 141,4341 #define GEN_SUBlui 145,4486 #define GEN_SUBd 149,4632 #define GEN_SUBld 153,4778 #define GEN_SUBf 157,4925 #define GEN_SUBc 162,5077 #define GEN_SUB 167,5230 #define GEN_MULTi 200,6051 #define GEN_MULTui 204,6197 #define GEN_MULTli 208,6344 #define GEN_MULTlui 212,6491 #define GEN_MULTd 216,6639 #define GEN_MULTld 220,6787 #define GEN_MULTf 224,6936 #define GEN_MULTc 229,7090 #define GEN_MULT 234,7245 #define GEN_DIVi 267,8070 #define GEN_DIVui 271,8214 #define GEN_DIVli 275,8359 #define GEN_DIVlui 279,8504 #define GEN_DIVd 283,8650 #define GEN_DIVld 287,8796 #define GEN_DIVf 291,8943 #define GEN_DIVc 296,9095 #define GEN_DIV 301,9248 #define GEN_MOD 334,10069 #define GEN_ORi 337,10170 #define GEN_ORui 341,10312 #define GEN_ORli 345,10455 #define GEN_ORlui 349,10598 #define GEN_ORd 353,10742 #define GEN_ORld 357,10886 #define GEN_ORf 361,11031 #define GEN_ORc 366,11181 #define GEN_OR 371,11332 #define GEN_ANDi 402,12145 #define GEN_ANDui 406,12289 #define GEN_ANDli 410,12434 #define GEN_ANDlui 414,12579 #define GEN_ANDd 418,12725 #define GEN_ANDld 422,12871 #define GEN_ANDf 426,13018 #define GEN_ANDc 431,13170 #define GEN_AND 436,13323 #define GEN_ORB 468,14142 #define GEN_ANDB 471,14242 #define GEN_EQi 474,14344 #define GEN_EQui 478,14486 #define GEN_EQli 482,14629 #define GEN_EQlui 486,14772 #define GEN_EQd 490,14916 #define GEN_EQld 494,15060 #define GEN_EQf 498,15205 #define GEN_EQc 503,15355 #define GEN_EQ 508,15506 #define GEN_LOi 539,16319 #define GEN_LOui 543,16461 #define GEN_LOli 547,16604 #define GEN_LOlui 551,16747 #define GEN_LOd 555,16891 #define GEN_LOld 559,17035 #define GEN_LOf 563,17180 #define GEN_LOc 568,17330 #define GEN_LO 573,17481 #define GEN_GRi 604,18294 #define GEN_GRui 608,18436 #define GEN_GRli 612,18579 #define GEN_GRlui 616,18722 #define GEN_GRd 620,18866 #define GEN_GRld 624,19010 #define GEN_GRf 628,19155 #define GEN_GRc 633,19305 #define GEN_GR 638,19456 #define GEN_LEi 669,20269 #define GEN_LEui 673,20411 #define GEN_LEli 677,20554 #define GEN_LElui 681,20697 #define GEN_LEd 685,20841 #define GEN_LEld 689,20985 #define GEN_LEf 693,21130 #define GEN_LEc 698,21280 #define GEN_LE 703,21431 #define GEN_GEi 734,22244 #define GEN_GEui 738,22386 #define GEN_GEli 742,22529 #define GEN_GElui 746,22672 #define GEN_GEd 750,22816 #define GEN_GEld 754,22960 #define GEN_GEf 758,23105 #define GEN_GEc 763,23255 #define GEN_GE 768,23406 #define GEN_NEi 799,24219 #define GEN_NEui 803,24361 #define GEN_NEli 807,24504 #define GEN_NElui 811,24647 #define GEN_NEd 815,24791 #define GEN_NEld 819,24935 #define GEN_NEf 823,25080 #define GEN_NEc 828,25230 #define GEN_NE 833,25381 #define GEN_NEGi 865,26195 #define GEN_NEGui 869,26339 #define GEN_NEGli 873,26484 #define GEN_NEGlui 877,26629 #define GEN_NEGd 881,26775 #define GEN_NEGld 885,26921 #define GEN_NEGf 889,27068 #define GEN_NEGc 894,27220 #define GEN_NEG 899,27373 #define GEN_NOT 930,28191 #define GEN_SAL 933,28291 #define GEN_SAR 936,28391 #define GEN_XOR 939,28491 #define GEN_INi(GEN_INi948,28653 #define GEN_INri(GEN_INri953,28849 #define GEN_INrri(GEN_INrri958,29038 #define GEN_INoi(GEN_INoi963,29226 #define GEN_INroi(GEN_INroi968,29423 #define GEN_INrroi(GEN_INrroi973,29613 #define GEN_INd(GEN_INd978,29802 #define GEN_INrd(GEN_INrd983,30000 #define GEN_INrrd(GEN_INrrd988,30191 #define GEN_INod(GEN_INod993,30381 #define GEN_INrod(GEN_INrod998,30580 #define GEN_INrrod(GEN_INrrod1003,30772 #define GEN_INf(GEN_INf1008,30963 #define GEN_INrf(GEN_INrf1013,31161 #define GEN_INrrf(GEN_INrrf1018,31352 #define GEN_INof(GEN_INof1023,31542 #define GEN_INrof(GEN_INrof1028,31741 #define GEN_INrrof(GEN_INrrof1033,31933 #define GEN_INc(GEN_INc1038,32124 #define GEN_INrc(GEN_INrc1043,32322 #define GEN_INrrc(GEN_INrrc1048,32513 #define GEN_INoc(GEN_INoc1053,32703 #define GEN_INroc(GEN_INroc1058,32902 #define GEN_INrroc(GEN_INrroc1063,33094 #define GEN_OUTi(GEN_OUTi1068,33285 #define GEN_OUTri(GEN_OUTri1073,33483 #define GEN_OUTrri(GEN_OUTrri1078,33674 #define GEN_OUToi(GEN_OUToi1083,33864 #define GEN_OUTroi(GEN_OUTroi1088,34063 #define GEN_OUTrroi(GEN_OUTrroi1093,34255 #define GEN_OUTd(GEN_OUTd1098,34446 #define GEN_OUTrd(GEN_OUTrd1103,34646 #define GEN_OUTrrd(GEN_OUTrrd1108,34839 #define GEN_OUTod(GEN_OUTod1113,35031 #define GEN_OUTrod(GEN_OUTrod1118,35232 #define GEN_OUTrrod(GEN_OUTrrod1123,35426 #define GEN_OUTf(GEN_OUTf1128,35619 #define GEN_OUTrf(GEN_OUTrf1133,35819 #define GEN_OUTrrf(GEN_OUTrrf1138,36012 #define GEN_OUTof(GEN_OUTof1143,36204 #define GEN_OUTrof(GEN_OUTrof1148,36405 #define GEN_OUTrrof(GEN_OUTrrof1153,36599 #define GEN_OUTc(GEN_OUTc1158,36792 #define GEN_OUTrc(GEN_OUTrc1163,36992 #define GEN_OUTrrc(GEN_OUTrrc1168,37185 #define GEN_OUToc(GEN_OUToc1173,37377 #define GEN_OUTroc(GEN_OUTroc1178,37578 #define GEN_OUTrroc(GEN_OUTrroc1183,37772 #define GEN_PUSHA(GEN_PUSHA1194,38032 #define GEN_PUSHAr(GEN_PUSHAr1199,38232 #define GEN_PUSHArr(GEN_PUSHArr1204,38424 #define GEN_PUSHAIi(GEN_PUSHAIi1209,38617 #define GEN_PUSHAIui(GEN_PUSHAIui1214,38807 #define GEN_PUSHAIli(GEN_PUSHAIli1219,39002 #define GEN_PUSHAIlui(GEN_PUSHAIlui1224,39197 #define GEN_PUSHAIsi(GEN_PUSHAIsi1229,39397 #define GEN_PUSHAIsui(GEN_PUSHAIsui1235,39628 #define GEN_PUSHAId(GEN_PUSHAId1241,39864 #define GEN_PUSHAIld(GEN_PUSHAIld1248,40106 #define GEN_PUSHAIf(GEN_PUSHAIf1255,40367 #define GEN_PUSHAIc(GEN_PUSHAIc1262,40606 #define GEN_PUSHAIst(GEN_PUSHAIst1268,40838 #define GEN_PUSHAIsc(GEN_PUSHAIsc1273,41035 #define GEN_PUSHAIuc(GEN_PUSHAIuc1279,41273 #define GEN_PUSHAI(GEN_PUSHAI1285,41511 #define GEN_POPAe 1332,42993 #define GEN_POPAst(GEN_POPAst1336,43139 #define GEN_POPAi(GEN_POPAi1341,43326 #define GEN_POPAui(GEN_POPAui1346,43512 #define GEN_POPAli(GEN_POPAli1351,43699 #define GEN_POPAlui(GEN_POPAlui1356,43886 #define GEN_POPAsi(GEN_POPAsi1361,44074 #define GEN_POPAsui(GEN_POPAsui1366,44261 #define GEN_POPAd(GEN_POPAd1371,44449 #define GEN_POPAld(GEN_POPAld1376,44637 #define GEN_POPAf(GEN_POPAf1381,44826 #define GEN_POPAc(GEN_POPAc1386,45014 #define GEN_POPAsc(GEN_POPAsc1391,45202 #define GEN_POPAuc(GEN_POPAuc1396,45391 #define GEN_POPAb(GEN_POPAb1401,45580 #define GEN_POPA(GEN_POPA1406,45768 #define GEN_PUSHb 1453,47100 #define GEN_PUSHt 1457,47246 #define GEN_PUSHf 1461,47392 #define GEN_POPb 1465,47538 #define GEN_POPt 1469,47682 #define GEN_POPf 1473,47826 #define GEN_MOVi 1483,48057 #define GEN_MOVbs 1487,48201 #define GEN_MOVsb 1491,48346 #define GEN_MOVt 1495,48491 #define GEN_MOVfs 1499,48635 #define GEN_MOVsf 1503,48780 #define GEN_MOVaa 1507,48925 #define GEN_MOVap 1511,49070 #define GEN_MOVpa 1515,49215 #define GEN_MOVar 1519,49360 #define GEN_MOVvi 1523,49505 #define GEN_MOVbv 1527,49651 #define GEN_MOVui 1531,49797 #define GEN_MOVli 1535,49943 #define GEN_MOVlui 1539,50089 #define GEN_MOVsi 1543,50236 #define GEN_MOVsui 1547,50382 #define GEN_MOVvui 1551,50529 #define GEN_MOVvli 1555,50676 #define GEN_MOVvlui 1559,50823 #define GEN_MOVvsi 1563,50971 #define GEN_MOVvsui 1567,51118 #define GEN_MOVd 1571,51266 #define GEN_MOVvd 1575,51412 #define GEN_MOVld 1579,51560 #define GEN_MOVvld 1583,51707 #define GEN_MOVf 1587,51855 #define GEN_MOVvf 1591,52001 #define GEN_MOVc 1595,52148 #define GEN_MOVvc 1599,52294 #define GEN_MOVsc 1603,52441 #define GEN_MOVuc 1607,52588 #define GEN_MOVvsc 1611,52735 #define GEN_MOVvuc 1615,52883 #define GEN_MOV 1619,53031 #define GEN_MOVv 1666,54290 #define GEN_CLRT 1720,55683 #define GEN_CLRTr 1723,55785 #define GEN_CVTIDt 1726,55889 #define GEN_CVTIDb 1730,56035 #define GEN_CVTDI 1734,56181 #define GEN_CVTIFt 1738,56326 #define GEN_CVTIFb 1742,56472 #define GEN_CVTFI 1746,56618 #define GEN_CVTFDt 1750,56763 #define GEN_CVTFDb 1754,56909 #define GEN_CVTDF 1758,57055 #define GEN_CVTCIt 1762,57200 #define GEN_CVTCIb 1766,57346 #define GEN_CVTIC 1770,57493 #define GEN_CVTCDt 1774,57639 #define GEN_CVTCDb 1778,57786 #define GEN_CVTDC 1782,57933 #define GEN_CVTCFt 1786,58079 #define GEN_CVTCFb 1790,58226 #define GEN_CVTFC 1794,58373 #define GEN_CVTUIDt 1798,58529 #define GEN_CVTUIDb 1802,58677 #define GEN_CVTUIFt 1806,58825 #define GEN_CVTUIFb 1810,58973 #define GEN_CVTUILIt 1814,59121 #define GEN_CVTUILIb 1818,59270 #define GEN_CVTUILUIt1823,59440 #define GEN_CVTUILUIb1824,59462 #define GEN_CVTUILUIt 1826,59490 #define GEN_CVTUILUIb 1830,59640 #define GEN_CVTUII 1835,59797 #define GEN_CVTUISI 1840,59964 #define GEN_CVTUISI 1842,60001 #define GEN_CVTUISUI1848,60178 #define GEN_CVTUISUI 1850,60205 #define GEN_CVTUIC 1855,60361 #define GEN_CVTUISC 1859,60508 #define GEN_CVTUIUC 1863,60656 #define GEN_CVTLIDt 1869,60824 #define GEN_CVTLIDb 1870,60855 #define GEN_CVTLIFt 1871,60886 #define GEN_CVTLIFb 1872,60917 #define GEN_CVTLILUIt 1873,60948 #define GEN_CVTLILUIb 1874,60983 #define GEN_CVTLII1875,61018 #define GEN_CVTLIUI 1876,61037 #define GEN_CVTLISI1879,61090 #define GEN_CVTLISI 1881,61116 #define GEN_CVTLISUI 1884,61155 #define GEN_CVTLIC 1885,61188 #define GEN_CVTLISC 1886,61217 #define GEN_CVTLIUC 1887,61248 #define GEN_CVTLIDt 1890,61286 #define GEN_CVTLIDb 1894,61434 #define GEN_CVTLIFt 1898,61582 #define GEN_CVTLIFb 1902,61730 #define GEN_CVTLILUIt 1906,61878 #define GEN_CVTLILUIb 1910,62028 #define GEN_CVTLII 1914,62178 #define GEN_CVTLIUI 1918,62325 #define GEN_CVTLISI 1923,62493 #define GEN_CVTLISI 1925,62530 #define GEN_CVTLISUI 1930,62685 #define GEN_CVTLIC 1934,62834 #define GEN_CVTLISC 1938,62981 #define GEN_CVTLIUC 1942,63129 #define GEN_CVTLUIDt 1948,63305 #define GEN_CVTLUIDb 1949,63338 #define GEN_CVTLUIFt 1950,63371 #define GEN_CVTLUIFb 1951,63404 #define GEN_CVTLUILI 1952,63437 #define GEN_CVTLUIUI1953,63471 #define GEN_CVTLUII 1954,63492 #define GEN_CVTLUISUI 1955,63523 #define GEN_CVTLUISI 1956,63558 #define GEN_CVTLUIC 1957,63591 #define GEN_CVTLUISC 1958,63622 #define GEN_CVTLUIUC 1959,63655 #define GEN_CVTLUIDt 1963,63696 #define GEN_CVTLUIDb 1967,63845 #define GEN_CVTLUIFt 1971,63994 #define GEN_CVTLUIFb 1975,64143 #define GEN_CVTLUILI 1979,64292 #define GEN_CVTLUIUI 1983,64441 #define GEN_CVTLUII 1987,64590 #define GEN_CVTLUISUI 1991,64738 #define GEN_CVTLUISI 1995,64888 #define GEN_CVTLUIC 1999,65037 #define GEN_CVTLUISC 2003,65185 #define GEN_CVTLUIUC 2007,65334 #define GEN_CVTSIDt 2013,65510 #define GEN_CVTSIDb 2014,65541 #define GEN_CVTSIFt 2015,65572 #define GEN_CVTSIFb 2016,65603 #define GEN_CVTSILIt 2017,65634 #define GEN_CVTSILIb 2018,65667 #define GEN_CVTSILUIt 2019,65700 #define GEN_CVTSILUIb 2020,65735 #define GEN_CVTSIIt2021,65770 #define GEN_CVTSIIb2022,65790 #define GEN_CVTSIUIt 2023,65810 #define GEN_CVTSIUIb 2024,65843 #define GEN_CVTSISUI 2025,65876 #define GEN_CVTSIC 2026,65909 #define GEN_CVTSIUC 2027,65938 #define GEN_CVTSISC 2028,65969 #define GEN_CVTSIDt 2032,66008 #define GEN_CVTSIDb 2036,66156 #define GEN_CVTSIFt 2040,66304 #define GEN_CVTSIFb 2044,66452 #define GEN_CVTSILIt 2049,66619 #define GEN_CVTSILIb 2050,66652 #define GEN_CVTSILIt 2052,66691 #define GEN_CVTSILIb 2056,66840 #define GEN_CVTSILUIt 2061,66996 #define GEN_CVTSILUIb 2065,67146 #define GEN_CVTSIIt 2069,67296 #define GEN_CVTSIIb 2073,67444 #define GEN_CVTSIUIt 2077,67592 #define GEN_CVTSIUIb 2081,67741 #define GEN_CVTSISUI 2085,67890 #define GEN_CVTSIC 2089,68039 #define GEN_CVTSIUC 2093,68186 #define GEN_CVTSISC 2097,68334 #define GEN_CVTSUIDt 2103,68511 #define GEN_CVTSUIDb 2104,68544 #define GEN_CVTSUIFt 2105,68577 #define GEN_CVTSUIFb 2106,68610 #define GEN_CVTSUILIt 2107,68643 #define GEN_CVTSUILIb 2108,68678 #define GEN_CVTSUILUIt 2109,68713 #define GEN_CVTSUILUIb 2110,68750 #define GEN_CVTSUIIt 2111,68787 #define GEN_CVTSUIIb 2112,68820 #define GEN_CVTSUIUIt2113,68853 #define GEN_CVTSUIUIb2114,68875 #define GEN_CVTSUISI 2115,68897 #define GEN_CVTSUIC 2116,68930 #define GEN_CVTSUIUC 2117,68961 #define GEN_CVTSUISC 2118,68994 #define GEN_CVTSUIDt 2121,69034 #define GEN_CVTSUIDb 2125,69183 #define GEN_CVTSUIFt 2129,69332 #define GEN_CVTSUIFb 2133,69481 #define GEN_CVTSUILIt 2137,69630 #define GEN_CVTSUILIb 2141,69780 #define GEN_CVTSUILUIt 2145,69930 #define GEN_CVTSUILUIb 2149,70081 #define GEN_CVTSUIIt 2153,70232 #define GEN_CVTSUIIb 2157,70381 #define GEN_CVTSUIUIt 2161,70530 #define GEN_CVTSUIUIb 2165,70680 #define GEN_CVTSUISI 2169,70830 #define GEN_CVTSUIC 2173,70979 #define GEN_CVTSUIUC 2177,71127 #define GEN_CVTSUISC 2181,71276 #define GEN_CVTCLIt 2187,71451 #define GEN_CVTCLIb 2188,71482 #define GEN_CVTCLIt 2190,71519 #define GEN_CVTCLIb 2194,71667 #define GEN_CVTCLUIt 2200,71843 #define GEN_CVTCLUIb 2201,71876 #define GEN_CVTCLUIt 2203,71915 #define GEN_CVTCLUIb 2207,72064 #define GEN_CVTCUIt 2212,72220 #define GEN_CVTCUIb 2216,72368 #define GEN_CVTCSI 2221,72536 #define GEN_CVTCSI 2223,72571 #define GEN_CVTCSUI 2229,72747 #define GEN_CVTCSUI 2231,72785 #define GEN_CVTCSC 2236,72940 #define GEN_CVTCUC 2240,73087 #define GEN_CVTSCDt 2244,73234 #define GEN_CVTSCDb 2248,73382 #define GEN_CVTSCFt 2252,73531 #define GEN_CVTSCFb 2256,73680 #define GEN_CVTSCLIt 2261,73848 #define GEN_CVTSCLIb 2262,73881 #define GEN_CVTSCLIt 2264,73920 #define GEN_CVTSCLIb 2268,74070 #define GEN_CVTSCLUIt 2274,74248 #define GEN_CVTSCLUIb 2275,74283 #define GEN_CVTSCLUIt 2277,74324 #define GEN_CVTSCLUIb 2281,74475 #define GEN_CVTSCIt 2286,74633 #define GEN_CVTSCIb 2290,74782 #define GEN_CVTSCUIt 2294,74931 #define GEN_CVTSCUIb 2298,75081 #define GEN_CVTSCSI 2303,75251 #define GEN_CVTSCSI 2305,75289 #define GEN_CVTSCSUI 2311,75467 #define GEN_CVTSCSUI 2313,75507 #define GEN_CVTSCC 2318,75664 #define GEN_CVTSCUC 2322,75812 #define GEN_CVTUCDt 2326,75961 #define GEN_CVTUCDb 2330,76110 #define GEN_CVTUCFt 2334,76259 #define GEN_CVTUCFb 2338,76408 #define GEN_CVTUCLIt 2343,76576 #define GEN_CVTUCLIb 2344,76609 #define GEN_CVTUCLIt 2346,76648 #define GEN_CVTUCLIb 2350,76798 #define GEN_CVTUCLUIt 2356,76976 #define GEN_CVTUCLUIb 2357,77011 #define GEN_CVTUCLUIt 2359,77052 #define GEN_CVTUCLUIb 2363,77203 #define GEN_CVTUCIt 2368,77361 #define GEN_CVTUCIb 2372,77510 #define GEN_CVTUCUIt 2376,77659 #define GEN_CVTUCUIb 2380,77809 #define GEN_CVTUCSI 2385,77979 #define GEN_CVTUCSI 2387,78017 #define GEN_CVTUCSUI 2393,78195 #define GEN_CVTUCSUI 2395,78235 #define GEN_CVTUCC 2400,78392 #define GEN_CVTUCSC 2404,78540 #define GEN_CVTDLI 2409,78708 #define GEN_CVTDLI 2411,78743 #define GEN_CVTDLUI 2417,78919 #define GEN_CVTDLUI 2419,78956 #define GEN_CVTDUI 2424,79112 #define GEN_CVTDSI 2429,79280 #define GEN_CVTDSI 2431,79315 #define GEN_CVTDSUI 2437,79492 #define GEN_CVTDSUI 2439,79529 #define GEN_CVTDSC 2444,79685 #define GEN_CVTDUC 2448,79833 #define GEN_CVTFLI 2453,80000 #define GEN_CVTFLI 2455,80035 #define GEN_CVTFLUI 2461,80211 #define GEN_CVTFLUI 2463,80248 #define GEN_CVTFUI 2468,80404 #define GEN_CVTFSI 2473,80572 #define GEN_CVTFSI 2475,80607 #define GEN_CVTFSUI 2481,80784 #define GEN_CVTFSUI 2483,80821 #define GEN_CVTFSC 2488,80977 #define GEN_CVTFUC 2492,81125 #define GEN_CVTILIt2497,81292 #define GEN_CVTILIb2498,81312 #define GEN_CVTILIt 2500,81338 #define GEN_CVTILIb 2504,81487 #define GEN_CVTILUIt 2510,81664 #define GEN_CVTILUIb 2511,81697 #define GEN_CVTILUIt 2513,81736 #define GEN_CVTILUIb 2517,81886 #define GEN_CVTIUIt 2522,82043 #define GEN_CVTIUIb 2526,82192 #define GEN_CVTISI2531,82361 #define GEN_CVTISI 2533,82386 #define GEN_CVTISUI 2539,82563 #define GEN_CVTISUI 2541,82601 #define GEN_CVTISC 2546,82757 #define GEN_CVTIUC 2550,82905 #define GEN_CVTLDD2556,83079 #define GEN_CVTLDF 2557,83098 #define GEN_CVTLDLI 2558,83127 #define GEN_CVTLDLUI 2559,83158 #define GEN_CVTLDI 2560,83191 #define GEN_CVTLDUI 2561,83220 #define GEN_CVTLDSI 2562,83251 #define GEN_CVTLDSUI 2563,83282 #define GEN_CVTLDC 2564,83315 #define GEN_CVTLDUC 2565,83344 #define GEN_CVTLDSC 2566,83375 #define GEN_CVTILDt 2567,83406 #define GEN_CVTILDb 2568,83437 #define GEN_CVTUILDt 2569,83468 #define GEN_CVTUILDb 2570,83501 #define GEN_CVTLILDt 2571,83534 #define GEN_CVTLILDb 2572,83567 #define GEN_CVTSILDt 2573,83600 #define GEN_CVTSILDb 2574,83633 #define GEN_CVTLUILDt 2575,83666 #define GEN_CVTLUILDb 2576,83701 #define GEN_CVTSUILDt 2577,83736 #define GEN_CVTSUILDb 2578,83771 #define GEN_CVTDLDt2579,83806 #define GEN_CVTDLDb2580,83826 #define GEN_CVTFLDt 2581,83846 #define GEN_CVTFLDb 2582,83877 #define GEN_CVTCLDt 2583,83908 #define GEN_CVTCLDb 2584,83939 #define GEN_CVTSCLDt 2585,83970 #define GEN_CVTSCLDb 2586,84003 #define GEN_CVTUCLDt 2587,84036 #define GEN_CVTUCLDb 2588,84069 #define GEN_CVTLDD 2591,84109 #define GEN_CVTLDF 2595,84257 #define GEN_CVTLDLI 2600,84424 #define GEN_CVTLDLI 2602,84461 #define GEN_CVTLDLUI 2608,84638 #define GEN_CVTLDLUI 2610,84677 #define GEN_CVTLDI 2615,84834 #define GEN_CVTLDUI 2619,84982 #define GEN_CVTLDSI 2624,85151 #define GEN_CVTLDSI 2626,85188 #define GEN_CVTLDSUI 2632,85366 #define GEN_CVTLDSUI 2634,85405 #define GEN_CVTLDC 2639,85562 #define GEN_CVTLDUC 2643,85710 #define GEN_CVTLDSC 2647,85859 #define GEN_CVTILDt 2651,86008 #define GEN_CVTILDb 2655,86157 #define GEN_CVTUILDt 2659,86306 #define GEN_CVTUILDb 2663,86456 #define GEN_CVTLILDt 2668,86625 #define GEN_CVTLILDb 2669,86658 #define GEN_CVTLILDt 2671,86697 #define GEN_CVTLILDb 2675,86847 #define GEN_CVTSILDt 2681,87024 #define GEN_CVTSILDb 2682,87057 #define GEN_CVTSILDt 2684,87096 #define GEN_CVTSILDb 2688,87246 #define GEN_CVTLUILDt 2694,87424 #define GEN_CVTLUILDb 2695,87459 #define GEN_CVTLUILDt 2697,87500 #define GEN_CVTLUILDb 2701,87651 #define GEN_CVTSUILDt 2707,87831 #define GEN_CVTSUILDb 2708,87866 #define GEN_CVTSUILDt 2710,87907 #define GEN_CVTSUILDb 2714,88058 #define GEN_CVTDLDt 2719,88216 #define GEN_CVTDLDb 2723,88365 #define GEN_CVTFLDt 2727,88514 #define GEN_CVTFLDb 2731,88663 #define GEN_CVTCLDt 2735,88812 #define GEN_CVTCLDb 2739,88961 #define GEN_CVTSCLDt 2743,89110 #define GEN_CVTSCLDb 2747,89260 #define GEN_CVTUCLDt 2751,89410 #define GEN_CVTUCLDb 2755,89560 #define GEN_MESS(GEN_MESS2760,89717 #define GEN_STOP 2770,89936 #define GEN_INTER 2773,90038 #define GEN_IRET 2776,90142 #define GEN_HALT 2779,90244 #define GEN_JMP 2787,90410 #define GEN_JZ 2790,90510 #define GEN_JNZ 2793,90608 #define GEN_CALL(GEN_CALL2801,90780 #define GEN_XCALLi(GEN_XCALLi2806,90980 #define GEN_XCALLd(GEN_XCALLd2811,91172 #define GEN_XCALLf(GEN_XCALLf2816,91366 #define GEN_XCALLc(GEN_XCALLc2821,91560 #define GEN_XCALLv(GEN_XCALLv2826,91754 #define GEN_XCALLui(GEN_XCALLui2831,91948 #define GEN_XCALLli(GEN_XCALLli2836,92141 #define GEN_XCALLlui(GEN_XCALLlui2841,92334 #define GEN_XCALLsi(GEN_XCALLsi2846,92528 #define GEN_XCALLsui(GEN_XCALLsui2851,92721 #define GEN_XCALLld(GEN_XCALLld2856,92916 #define GEN_XCALLsc(GEN_XCALLsc2861,93110 #define GEN_XCALLuc(GEN_XCALLuc2866,93304 #define GEN_XCALLiv(GEN_XCALLiv2871,93498 #define GEN_XCALLdv(GEN_XCALLdv2876,93692 #define GEN_XCALLfv(GEN_XCALLfv2881,93888 #define GEN_XCALLcv(GEN_XCALLcv2886,94084 #define GEN_XCALLvv(GEN_XCALLvv2891,94280 #define GEN_XCALLuiv(GEN_XCALLuiv2896,94476 #define GEN_XCALLliv(GEN_XCALLliv2901,94671 #define GEN_XCALLluiv(GEN_XCALLluiv2906,94866 #define GEN_XCALLsiv(GEN_XCALLsiv2911,95062 #define GEN_XCALLsuiv(GEN_XCALLsuiv2916,95257 #define GEN_XCALLldv(GEN_XCALLldv2921,95453 #define GEN_XCALLscv(GEN_XCALLscv2926,95648 #define GEN_XCALLucv(GEN_XCALLucv2931,95843 #define GEN_XCALL 2936,96038 #define GEN_RET 3077,99706 #define GEN_XCHG 3080,99807 global.h,761 #define _GLOBAL_H30,922 typedef struct fileattr FILEATTR;FILEATTR149,4932 struct fileattrfileattr151,4967 #define HANDLER_TEST 159,5049 #define HANDLER_SET 160,5078 #define VIRTUAL_MACHINE_SUSPENDED_SET 161,5110 #define VIRTUAL_MACHINE_SUSPENDED_RESET 162,5178 #define CLIF_INTERRUPT_LEVEL_INCREMENT 163,5248 #define CLIF_INTERRUPT_LEVEL_DECREMENT 164,5310 #define HANDLER_TEST 168,5440 #define HANDLER_SET 169,5473 #define VIRTUAL_MACHINE_SUSPENDED_SET 170,5505 #define VIRTUAL_MACHINE_SUSPENDED_RESET 171,5565 #define CLIF_INTERRUPT_LEVEL_INCREMENT 172,5627 #define CLIF_INTERRUPT_LEVEL_DECREMENT 173,5682 #define GENCODE 181,5944 #define GENCODE 185,6051 #define check_stack(check_stack194,6266 #define check_stack(check_stack200,6364 input.h,24 #define _INPUT_H29,932 instr.h,1701 #define _INSTR_H30,959 struct OPERAND_0_maOPERAND_0_ma35,1010 struct OPERAND_0_miOPERAND_0_mi43,1093 struct OPERAND_1_maOPERAND_1_ma52,1183 struct OPERAND_1_miOPERAND_1_mi61,1279 struct OPERAND_1_iOPERAND_1_i71,1409 struct OPERAND_1_uiOPERAND_1_ui81,1545 struct OPERAND_1_liOPERAND_1_li91,1687 struct OPERAND_1_luiOPERAND_1_lui101,1834 struct OPERAND_1_siOPERAND_1_si111,1983 struct OPERAND_1_suiOPERAND_1_sui121,2132 struct OPERAND_1_idOPERAND_1_id131,2275 struct OPERAND_1_ildOPERAND_1_ild141,2410 struct OPERAND_1_ifOPERAND_1_if151,2545 struct OPERAND_1_icOPERAND_1_ic161,2672 struct OPERAND_1_iscOPERAND_1_isc171,2805 struct OPERAND_1_iucOPERAND_1_iuc181,2948 #define ADD 191,3069 #define SUB 192,3086 #define MULT 193,3103 #define DIV 194,3120 #define MOD 195,3137 #define OR 196,3154 #define AND 197,3171 #define ORB 198,3188 #define ANDB 199,3206 #define EQ 200,3224 #define LO 201,3241 #define GR 202,3259 #define LE 203,3276 #define GE 204,3293 #define NE 205,3310 #define NEG 206,3326 #define NOT 207,3342 #define SAL 208,3358 #define SAR 209,3374 #define XOR 210,3390 #define CVT 211,3406 #define JMP 216,3455 #define JNZ 217,3472 #define JZ 218,3489 #define RET 219,3507 #define CALLi 220,3525 #define HALT 221,3543 #define STOP 222,3560 #define INTER 223,3578 #define IRET 224,3596 #define OUT 229,3642 #define IN 230,3659 #define MESS 231,3677 #define PUSHAI 236,3729 #define PUSHA 237,3748 #define MOV 238,3766 #define PUSH 239,3782 #define POP 240,3799 #define POPA 241,3815 #define POPAD 242,3832 #define PUSHAD 243,3850 #define CLRT 244,3869 #define XCHG 245,3886 intrinsic.h,141 #define _INTRINSIC_H30,939 typedef void (*INTRINSIC_FUNCTION)INTRINSIC_FUNCTION39,1053 struct INTRINTR41,1107 #define SIZE_REM 78,2353 lex_t.h,25 #define FLEX_SCANNER1,0 load.h,79 #define _LOAD_H26,860 #define PROTO(PROTO30,957 #define PROTO(PROTO32,988 ls.h,77 #define _LS_H26,856 #define PROTO(PROTO30,951 #define PROTO(PROTO32,982 memmove.h,82 #define _MEMMOVE_H26,866 #define PROTO(PROTO30,966 #define PROTO(PROTO32,997 mystdio.h,45 #define _MYSTDIO_H6,40 #define NULL 12,106 parser.h,486 #define _PARSER_H30,923 struct var_svar_s35,1078 #define TYPE_CLEAR 80,2477 #define SET_ADDRESS 86,2636 #define FUNCTION_PROLOGUE 89,2711 #define FUNCTION_EPILOGUE 94,2820 #define DELETE_SUBSCRIPT 99,2926 #define OFFSET_LAST_ADD 102,2993 #define OFFSET_LAST_ADD_ARRAY 115,3339 #define ERROR_P 122,3487 #define MOV_P 125,3549 #define POPA_P 127,3616 #define PUSHA_P 129,3685 #define RESET_CODE_GENERATION_BEGINNING 131,3756 #define SET_CODE_GENERATION_BEGINNING 134,3869 printfx.h,26 #define _PRINTFX_H27,884 pso.h,0 remote_call.h,87 #define _REMOTE_CALL_H26,874 #define PROTO(PROTO30,978 #define PROTO(PROTO32,1009 run_str.h,82 #define _RUN_STR_H26,866 #define PROTO(PROTO30,966 #define PROTO(PROTO32,997 s-conv.h,132 #define _S_CONV_H_2,19 #define PRINTF_P 4,39 #define SCANF_P 7,151 typedef struct internal_type *FORMAT_ARGS;FORMAT_ARGS15,478 store_cont.h,59 #define _STORE_CONT_H26,867 struct CONTEXTCONTEXT30,933 struct.h,533 #define _STRUCT_H27,882 struct tab tab32,937 struct rangerange48,1390 struct FIX FIX59,1488 struct attrattr71,1712 struct internal_typeinternal_type86,2047 struct ident_list_strident_list_str98,2244 struct ident_tab ident_tab107,2361 struct ident_tab_headerident_tab_header120,2606 struct ident_tab_loc ident_tab_loc132,2832 struct return1 return1146,3105 struct remote_tab remote_tab158,3320 struct remote_has_tab remote_has_tab171,3567 struct goto_adr goto_adr183,3792 struct goto_tab goto_tab192,4031 tables.h,82 #define _TABLES_H27,882 #define PROTO(PROTO31,981 #define PROTO(PROTO33,1012 token.h,1787 } YYSTYPE;YYSTYPE12,216 #define NUMBERI 13,227 #define NUMBERUI 14,247 #define NUMBERLI 15,268 #define NUMBERLUI 16,289 #define NUMBERD 17,311 #define NUMBERLD 18,331 #define NUMBERF 19,352 #define STRINGC 20,372 #define WSTRINGC 21,392 #define NUMBERC 22,413 #define AUTO 23,433 #define STATIC 24,450 #define REGISTER 25,469 #define EXTERN 26,490 #define REMOTE 27,509 #define UNLOAD 28,528 #define INTRINSIC 29,547 #define RPC 30,569 #define IDENT 31,585 #define INT 32,603 #define DOUBLE 33,619 #define FLOAT 34,638 #define CHAR 35,656 #define VOID 36,673 #define LONG 37,690 #define SHORT 38,707 #define SIGNED 39,725 #define UNSIGNED 40,744 #define CONST 41,765 #define VOLATILE 42,783 #define ENUM 43,804 #define STRUCT 44,821 #define UNION 45,840 #define EXIT 46,858 #define IF 47,875 #define ELSE 48,890 #define SIZEOF 49,907 #define SWITCH 50,926 #define WHILE 51,945 #define FOR 52,963 #define DO 53,979 #define CONTINUE 54,994 #define BREAK 55,1015 #define RETURN 56,1033 #define GOTO 57,1052 #define CASE 58,1069 #define DEFAULT 59,1086 #define CSUSPEND 60,1106 #define RESUME 61,1127 #define EXPORT_T 62,1146 #define TYPEDEF 63,1167 #define TYPENAME 64,1187 #define MUL_ASSIGN 65,1208 #define DIV_ASSIGN 66,1231 #define MOD_ASSIGN 67,1254 #define ADD_ASSIGN 68,1277 #define SUB_ASSIGN 69,1300 #define LEFT_ASSIGN 70,1323 #define RIGHT_ASSIGN 71,1347 #define AND_ASSIGN 72,1372 #define XOR_ASSIGN 73,1395 #define OR_ASSIGN 74,1418 #define OR_A 75,1440 #define AND_A 76,1457 #define EQ_A 77,1475 #define NE_A 78,1492 #define LQ 79,1509 #define GQ 80,1524 #define SHIL 81,1539 #define SHIR 82,1556 #define NEG_T 83,1573 #define NEG_B 84,1591 #define PP 85,1609 #define MM 86,1624 #define PTR 87,1639 type.h,1496 #define TYPE_H28,925 #define INTERNAL_TYPE(INTERNAL_TYPE30,941 enum intern_arit_class intern_arit_class32,993 #define PAR 47,1462 #define VAR 48,1504 enum intern_func_class intern_func_class50,1545 #define YES 65,2067 #define NOT_DEFINED 66,2084 enum global_type global_type71,2202 #define GLOBAL_TYPE(GLOBAL_TYPE72,2221 enum type_qual type_qual95,2977 #define TYPE_QUAL(TYPE_QUAL96,2994 enum storage_class_specifier storage_class_specifier106,3179 #define SC_SPEC(SC_SPEC107,3210 #define POINTER_P(POINTER_P121,3492 #define STRUCT_P(STRUCT_P122,3556 #define UNION_P(UNION_P123,3621 #define ENUM_P(ENUM_P124,3684 #define ARRAY_P(ARRAY_P125,3745 #define SIMPLE_P(SIMPLE_P126,3805 #define LOCAL_P(LOCAL_P127,3867 #define REMOTE_P(REMOTE_P128,3927 #define TYPEDEF_P(TYPEDEF_P130,3992 #define EXTERN_P(EXTERN_P132,4081 #define EXPORT_P(EXPORT_P134,4170 #define STATIC_P(STATIC_P136,4259 #define AUTO_P(AUTO_P138,4348 #define REGISTER_P(REGISTER_P140,4433 #define UNSPEC_P(UNSPEC_P142,4525 #define VOID_P(VOID_P145,4615 #define CHAR_P(CHAR_P146,4673 #define SHORT_P(SHORT_P147,4731 #define INTEGER_P(INTEGER_P148,4795 #define LONG_P(LONG_P149,4860 #define FLOAT_P(FLOAT_P150,4922 #define DOUBLE_P(DOUBLE_P151,4981 #define SIGNED_P(SIGNED_P152,5042 #define UNSIGNED_P(UNSIGNED_P153,5108 #define UNUSED_P(UNUSED_P154,5178 #define TYPES_EQ_P(TYPES_EQ_P156,5246 #define CONST_P(CONST_P159,5346 #define UNDEF_P(UNDEF_P160,5415 version.h,0 virtual_machine.h,91 #define _VIRTUAL_MACHINE_H26,882 #define PROTO(PROTO30,990 #define PROTO(PROTO32,1021 ys.h,77 #define _YS_H26,856 #define PROTO(PROTO30,951 #define PROTO(PROTO32,982 allocx.c,283 #define MASK 42,1091 #define PAGE 43,1106 #define K 44,1124 union alignalign46,1138 struct pool_chunkpool_chunk54,1215 union headerheader61,1299 callocx 72,1481 allocate 79,1568 deallocate 121,2333 init_zero 135,2551 mallocx 144,2633 reallocx 155,2779 freex 167,2944 c-lex.c,3798 #define FLEX_SCANNER7,155 #define YY_FLEX_MAJOR_VERSION 8,176 #define YY_FLEX_MINOR_VERSION 9,208 #define __cplusplus17,363 #define YY_USE_PROTOS28,507 #define YY_USE_CONST31,581 #define YY_USE_PROTOS37,644 #define YY_USE_CONST38,666 #define YY_USE_CONST48,830 #define YY_USE_PROTOS49,851 #define yyconst 53,901 #define yyconst55,929 #define YY_PROTO(YY_PROTO60,975 #define YY_PROTO(YY_PROTO62,1011 #define YY_NULL 66,1079 #define YY_SC_TO_UI(YY_SC_TO_UI73,1326 #define BEGIN 79,1557 #define YY_START 85,1754 #define YYSTATE 86,1792 #define YY_STATE_EOF(YY_STATE_EOF89,1875 #define YY_NEW_FILE 92,1995 #define YY_END_OF_BUFFER_CHAR 94,2034 #define YY_BUF_SIZE 97,2103 typedef struct yy_buffer_state *YY_BUFFER_STATE;YY_BUFFER_STATE99,2130 #define EOB_ACT_CONTINUE_SCAN 104,2227 #define EOB_ACT_END_OF_FILE 105,2259 #define EOB_ACT_LAST_MATCH 106,2289 #define yyless(yyless124,2863 #define unput(unput135,3118 typedef unsigned int yy_size_t;yy_size_t141,3356 struct yy_buffer_stateyy_buffer_state144,3390 #define YY_BUFFER_NEW 186,4441 #define YY_BUFFER_NORMAL 187,4465 #define YY_BUFFER_EOF_PENDING 198,4963 #define YY_CURRENT_BUFFER 207,5196 #define YY_FLUSH_BUFFER 236,6190 #define yy_new_buffer 246,6629 #define yy_set_interactive(yy_set_interactive248,6669 #define yy_set_bol(yy_set_bol255,6874 #define YY_AT_BOL(YY_AT_BOL262,7047 typedef unsigned char YY_CHAR;YY_CHAR264,7099 typedef int yy_state_type;yy_state_type266,7176 #define yytext_ptr 268,7224 #define YY_DO_BEFORE_ACTION 278,7619 #define YY_NUM_RULES 285,7773 #define YY_END_OF_BUFFER 286,7797 #define REJECT 464,16693 #define yymore(yymore465,16737 #define YY_MORE_ADJ 466,16783 #define YY_RESTORE_YY_MORE_OFFSET467,16805 #define INITIAL 470,16868 #define LG_MC 508,17995 #define MAX_MESS 509,18044 #define YY_NO_UNPUT522,18355 #define NL 535,18632 #define YY_NO_PUSH_STATE 587,19784 #define YY_NO_POP_STATE 588,19811 #define YY_NO_TOP_STATE 589,19837 #define YY_READ_BUF_SIZE 609,20253 #define ECHO 618,20472 #define YY_INPUT(YY_INPUT625,20664 #define yyterminate(yyterminate648,21434 #define YY_START_STACK_INCR 653,21569 #define YY_FATAL_ERROR(YY_FATAL_ERROR658,21659 #define YY_DECL 665,21834 #define YY_USER_ACTION672,22007 #define YY_BREAK 677,22100 #define YY_RULE_SETUP 680,22132 if 1050,29619 if 1075,30110 while 1083,30311 if 1105,30773 if 1112,30931 if 1119,31097 if 1126,31246 case YY_STATE_EOF(1370,36457 static int yy_get_next_buffer(1511,40180 static yy_state_type yy_get_previous_state(1643,43302 static yy_state_type yy_try_NUL_trans(1678,44206 static void yyunput(1708,45010 static int yyinput(1752,46069 void yyrestart(1825,47587 void yy_switch_to_buffer(1840,47876 void yy_load_buffer_state(1870,48606 YY_BUFFER_STATE yy_create_buffer(1883,48884 void yy_delete_buffer(1914,49599 void yy_init_buffer(1940,50038 void yy_flush_buffer(1967,50468 YY_BUFFER_STATE yy_scan_buffer(1998,51065 YY_BUFFER_STATE yy_scan_string(2036,51950 YY_BUFFER_STATE yy_scan_bytes(2053,52232 static void yy_push_state(2092,53026 static void yy_pop_state(2125,53703 static int yy_top_state(2136,53902 #define YY_EXIT_FAILURE 2143,54014 static void yy_fatal_error(2147,54069 #define yyless(yyless2162,54322 static void yy_flex_strncpy(2179,54630 static int yy_flex_strlen(2195,54902 static void *yy_flex_alloc(2211,55103 static void *yy_flex_realloc(2221,55273 static void yy_flex_free(2239,55844 int main(2249,55971 struct el_mc el_mc2257,56034 find_ident 2269,56227 yywrap 2282,56418 #define unput(unput2296,56567 switch_to_stdin 2306,56728 switch_to_char_buffer 2315,56872 switch_to_buffer 2321,56940 store_buffer_state 2335,57170 flush_buffer 2344,57355 ch-lex.c,1139 # define U_channel(U_channel2,19 # define NLSTATE_channel 3,43 # define BEGIN_channel 4,105 # define INITIAL_channel 5,166 # define YY_channelLERR 6,193 # define YY_channelSTATE 7,232 # define YY_channelOPTIM 8,293 # define YY_channelLMAX 9,320 # define output_channel(output_channel11,371 # define lex_output_channel(lex_output_channel13,432 # define unput_channel(unput_channel56,1311 # define yy_channelmore(yy_channelmore57,1439 # define input_channel(input_channel59,1505 # define lex_input_channel(lex_input_channel61,1716 #define ECHO_channel 63,1932 # define REJECT_channel 64,1997 struct yy_channelsvf yy_channelsvf72,2313 #define PROTO(PROTO100,2915 #define PROTO(PROTO102,2946 # define YY_channelNEWLINE 111,3124 yy_channellex(112,3154 # define YY_channelTYPE 640,6767 struct yy_channelwork yy_channelwork641,6805 # define YY_channelU_channel(YY_channelU_channel937,18799 # define NLSTATE_channel 938,18833 int yy_channellook(946,19220 int yy_channelback(1125,25072 int yy_channelinput_channel(1140,25335 void yy_channeloutput_channel(1152,25548 void yy_channelunput_channel(1165,25764 channel_maint.c,261 #define PROTO(PROTO34,1059 #define PROTO(PROTO36,1090 chwrite 83,2246 chclose 188,4798 chflush 205,5081 append 214,5163 append_record 237,5561 redraw_dur_aut 264,6118 reset_start_aut 319,7412 free_list 350,8193 fill_write 362,8329 chopen 413,9423 clif.c,14 main 40,1154 comp_maint.c,1381 #define EMAIL 206,5906 info 228,6502 clif 244,7238 brfix 310,8423 cofix 421,10772 retfix 501,12328 fix_cont_w 540,12956 fix_cont_f 561,13318 fix_break_w 582,13668 fix_break_f 606,14077 fix_ret 626,14415 fix_break_s 648,14742 init 668,15095 yyerror 787,17740 hierarchy 800,17887 implicit_cast 810,17998 l_value_cast 2188,51078 pointer_cast 2811,64370 array_subscript 2861,65633 put_array_subscript 2877,65960 #define ERR_NO_INFO 2927,67604 #define ERROR_INFO 2929,67654 #define ERROR_FULL_INFO(ERROR_FULL_INFO2931,67706 error_message VPROTO(2940,67884 print_file_name 3887,91553 print_source_line 3914,92225 print_error_number 3927,92535 print_line_number 3945,92883 type2string 3957,93056 type_transform 3989,93662 add_to_spec_list 4142,96898 add_to_ident_list 4173,97606 compare2trees 4203,98274 copy_type 4337,102342 add_subs_to_spec_list 4370,103323 clear_internal_type 4415,104721 search_duplicate_labels 4443,105295 add_constant_to_list 4478,105969 add_default_to_fixp 4536,107283 func_def_s 4586,108232 func_def_r 4593,108275 enter_scope 4612,108839 exit_scope 4622,108929 mov2lvalue 4631,109037 move2lvalue 4726,110673 type_compare 4734,110802 cyclic_def 4765,111580 put2table 4797,112333 get_num_args 4826,112935 promote_type 4845,113253 start_main 4864,113581 check_spec_constr 4888,114091 gen_cast_needed 4938,115238 dbg-out.c,244 typedef struct dbg_list DBGLIST;DBGLIST29,946 struct dbg_listdbg_list31,980 typedef struct dbg_files DBGFILES;DBGFILES38,1053 struct dbg_filesdbg_files40,1089 store_pos 50,1231 dbg_create 80,1999 get_pos 119,3029 dbg_print 135,3273 environ.c,64 init_env 10,137 get_next_path 28,428 check_valid_name 42,597 getc_unix.c,73 #define PROTO(PROTO33,1014 #define PROTO(PROTO35,1045 getcx 42,1117 global.c,0 graph.c,123 #define PROTO(PROTO31,970 #define PROTO(PROTO33,1001 window 57,1677 move 78,2249 draw 100,2821 draw_point 123,3373 help.c,71 #define PROTO(PROTO31,980 #define PROTO(PROTO33,1011 help 45,1207 init_ch.c,122 #define PROTO(PROTO31,1034 #define PROTO(PROTO33,1065 input_channel 47,1255 init_ch 61,1559 yy_channelwrap 72,1711 init_rs.c,148 #define PROTO(PROTO36,1116 #define PROTO(PROTO38,1147 input_rs_ 75,1849 switch_to_char_buffer 134,3038 init_rs 168,3627 yy_rs_wrap 206,4274 input.c,129 #define U(U52,1391 input_komp 73,1980 input_std 127,3309 input_buf 162,4017 terminate_buffer 179,4278 init_input 202,4689 keyword.c,187 struct el_mc el_mc10,203 #define MIN_WORD_LENGTH 15,248 #define MAX_WORD_LENGTH 16,274 #define MIN_HASH_VALUE 17,301 #define MAX_HASH_VALUE 18,326 hash 25,416 in_word_set 59,1325 load.c,107 #define PROTO(PROTO32,1031 #define PROTO(PROTO34,1062 load 47,1267 load_new 90,2062 unload 109,2308 memmove.c,18 *memmovex(32,966 myintrinsic.c,511 #define HT 36,1102 #define NL 37,1118 #define VT 38,1134 #define NP 39,1150 #define CR 40,1166 #define SP 41,1182 #define isspace(isspace42,1197 #define PROTO(PROTO52,1442 #define PROTO(PROTO54,1473 #define BUFSIZ 59,1527 double sin_(98,2367 double exp_(102,2441 do_fprintf 105,2508 cfprintf 274,6249 cprintf 282,6333 do_fscanf 290,6407 cfscanf 431,9151 cscanf 439,9233 copen 450,9325 cclose 468,9556 cputc 483,9725 cgetc 498,9906 cfflush 510,10014 transform_to_simple_type 525,10221 printf_unix.c,49 fprintfx VPROTO(31,947 printfx PVPROTO(52,1278 pso.c,98 struct var_svar_s21,793 lookup_tables 44,1231 typedef_copy 137,3453 set_memory_size 159,4105 remote_call.c,98 has_remote 56,1595 putstruct_remote 107,2870 lookup_remote 126,3224 hash_code_remote 147,3570 rs-lex.c,3807 #define FLEX_SCANNER7,169 #define YY_rs__FLEX_MAJOR_VERSION 8,190 #define YY_rs__FLEX_MINOR_VERSION 9,226 #define __cplusplus17,385 #define YY_rs__USE_PROTOS28,529 #define YY_rs__USE_CONST31,607 #define YY_rs__USE_PROTOS37,674 #define YY_rs__USE_CONST38,700 #define YY_rs__USE_CONST48,868 #define YY_rs__USE_PROTOS49,893 #define yy_rs_const 53,951 #define yy_rs_const55,983 #define YY_rs__PROTO(YY_rs__PROTO60,1037 #define YY_rs__PROTO(YY_rs__PROTO62,1077 #define YY_rs__NULL 66,1149 #define YY_rs__SC_TO_UI(YY_rs__SC_TO_UI73,1400 #define BEGIN_rs_ 79,1639 #define YY_rs__START 85,1852 #define YY_rs_STATE 86,1898 #define YY_rs__STATE_EOF(YY_rs__STATE_EOF89,1989 #define YY_rs__NEW_FILE 92,2117 #define YY_rs__END_OF_BUFFER_CHAR 94,2168 #define YY_rs__BUF_SIZE 97,2245 typedef struct yy_rs__buffer_state *YY_rs__BUFFER_STATE;YY_rs__BUFFER_STATE99,2276 #define EOB_ACT_CONTINUE_SCAN 104,2393 #define EOB_ACT_END_OF_FILE 105,2425 #define EOB_ACT_LAST_MATCH 106,2455 #define yy_rs_less(yy_rs_less124,3041 #define unput_rs_(unput_rs_135,3344 typedef unsigned int yy_rs__size_t;yy_rs__size_t141,3598 struct yy_rs__buffer_stateyy_rs__buffer_state144,3636 #define YY_rs__BUFFER_NEW 186,4771 #define YY_rs__BUFFER_NORMAL 187,4799 #define YY_rs__BUFFER_EOF_PENDING 198,5321 #define YY_rs__CURRENT_BUFFER 207,5566 #define YY_rs__FLUSH_BUFFER 236,6696 #define yy_rs__new_buffer 246,7231 #define yy_rs__set_interactive(yy_rs__set_interactive248,7279 #define yy_rs__set_bol(yy_rs__set_bol255,7516 #define YY_rs__AT_BOL(YY_rs__AT_BOL262,7721 typedef unsigned char YY_rs__CHAR;YY_rs__CHAR264,7785 typedef int yy_rs__state_type;yy_rs__state_type266,7874 #define yy_rs_text_ptr 268,7930 #define YY_rs__DO_BEFORE_ACTION 278,8385 #define YY_rs__NUM_RULES 285,8583 #define YY_rs__END_OF_BUFFER 286,8611 #define REJECT_rs_ 511,20482 #define yy_rs_more(yy_rs_more512,20530 #define YY_rs__MORE_ADJ 513,20584 #define YY_rs__RESTORE_YY_rs__MORE_OFFSET514,20610 #define INITIAL_rs_ 517,20690 #define PROTO(PROTO556,21871 #define PROTO(PROTO558,21902 #define YY_rs__NO_UNPUT563,21961 #define YY_rs__NO_PUSH_STATE 616,23209 #define YY_rs__NO_POP_STATE 617,23240 #define YY_rs__NO_TOP_STATE 618,23270 #define YY_rs__READ_BUF_SIZE 638,23702 #define ECHO_rs_ 647,23933 #define YY_rs__INPUT(YY_rs__INPUT654,24153 #define yy_rs_terminate(yy_rs_terminate677,24975 #define YY_rs__START_STACK_INCR 682,25122 #define YY_rs__FATAL_ERROR(YY_rs__FATAL_ERROR687,25220 #define YY_rs__DECL 694,25407 #define YY_rs__USER_ACTION701,25604 #define YY_rs__BREAK 706,25705 #define YY_rs__RULE_SETUP 709,25741 static int yy_rs__get_next_buffer(1193,36889 static yy_rs__state_type yy_rs__get_previous_state(1325,40335 static yy_rs__state_type yy_rs__try_NUL_trans(1360,41423 static void yy_rs_unput_rs_(1390,42399 static int yy_rs_input_rs_(1434,43630 void yy_rs_restart(1507,45292 void yy_rs__switch_to_buffer(1522,45641 void yy_rs__load_buffer_state(1552,46451 YY_rs__BUFFER_STATE yy_rs__create_buffer(1565,46793 void yy_rs__delete_buffer(1596,47592 void yy_rs__init_buffer(1622,48091 void yy_rs__flush_buffer(1649,48577 YY_rs__BUFFER_STATE yy_rs__scan_buffer(1680,49246 YY_rs__BUFFER_STATE yy_rs__scan_string(1718,50251 YY_rs__BUFFER_STATE yy_rs__scan_bytes(1735,50589 static void yy_rs__push_state(1774,51455 static void yy_rs__pop_state(1807,52216 static int yy_rs__top_state(1818,52443 #define YY_rs__EXIT_FAILURE 1825,52571 static void yy_rs__fatal_error(1829,52634 #define yy_rs_less(yy_rs_less1844,52911 static void yy_rs__flex_strncpy(1861,53271 static int yy_rs__flex_strlen(1877,53567 static void *yy_rs__flex_alloc(1893,53788 static void *yy_rs__flex_realloc(1903,53978 static void yy_rs__flex_free(1921,54569 int main(1931,54708 rw.c,72 #define PROTO(PROTO55,1500 #define PROTO(PROTO57,1531 main 66,1655 s-conv.c,391 #define BACKSLASH 22,849 #define SP 23,872 #define ALERT 24,887 #define BS 25,906 #define FF 26,922 #define NL 27,938 #define CR 28,954 #define HT 29,970 #define VT 30,986 #define HASH 32,1003 #define DOT 33,1020 #define STAR 34,1036 #define CIRCUMFLEX 35,1053 #define TICK 36,1076 s_conv 62,1639 alloc_type 423,11031 store_arg_type 437,11444 compare_format_args 447,11655 sig-bsd.c,259 #define OFF(OFF37,1077 #define ON(ON38,1108 #define SPACE 39,1135 #define NL 40,1154 interrupt_service 63,1661 interrupt_register 95,2266 interrupt_service_sync 115,2662 term_restore 125,2793 fatal_handler 131,2869 fatal_handler_register 144,3076 sig-lin.c,259 #define OFF(OFF37,1081 #define ON(ON38,1112 #define SPACE 39,1139 #define NL 40,1158 interrupt_register 61,1604 interrupt_service 78,1988 interrupt_service_sync 107,2546 term_restore 117,2677 fatal_handler 123,2753 fatal_handler_register 138,2997 sig-posix.c,236 #define OFF(OFF35,1006 #define ON(ON36,1037 #define NL 37,1064 interrupt_service 58,1543 interrupt_register 85,2027 interrupt_service_sync 110,2634 term_restore 119,2765 fatal_handler 125,2846 fatal_handler_register 143,3162 sig-svr3.c,259 #define OFF(OFF40,1135 #define ON(ON41,1166 #define SPACE 42,1193 #define NL 43,1212 interrupt_register 63,1627 interrupt_service 85,2176 interrupt_service_sync 114,2719 term_restore 128,2913 fatal_handler 136,3006 fatal_handler_register 146,3135 sig-svr4.c,236 #define OFF(OFF39,1104 #define ON(ON40,1135 #define NL 41,1162 interrupt_service 61,1590 interrupt_register 88,2078 interrupt_service_sync 104,2425 term_restore 113,2556 fatal_handler 119,2632 fatal_handler_register 130,2803 sigig.c,76 #define PROTO(PROTO12,197 #define PROTO(PROTO14,228 mysigignore 21,306 sigig_bsd.c,81 #define PROTO(PROTO15,237 #define PROTO(PROTO17,268 void mysigignore(23,340 sigig_lin.c,76 #define PROTO(PROTO15,242 #define PROTO(PROTO17,273 mysigignore 24,351 sigig_posix.c,84 #define PROTO(PROTO34,1060 #define PROTO(PROTO36,1091 void mysigignore(42,1163 store_cont.c,48 store_context 45,1200 restore_context 79,1855 symbols.c,190 #define PROTO(PROTO31,997 #define PROTO(PROTO33,1028 #define SIZE_HAS 37,1067 #define PAGE 38,1089 #define K 39,1107 static struct stringstring44,1193 hash 52,1310 string 68,1484 tables.c,1542 #define isalpha(isalpha38,1103 #define ANSI_NUMBER_OF_LOCALS 58,1736 #define ANSI_NUMBER_OF_PARAMS 59,1770 hastab_init 181,5133 hastab_goto_init 197,5377 identtab_init 215,5674 allocate_hastab_loc 231,5911 allocate_loc_tables 253,6313 clear_hash_tab_declaration 283,7132 clear_hash_tab 306,7603 clear_hash_tab_next_declaration 351,8772 clear_hash_tab_next 369,9009 clear_tag_tab 397,9498 point 432,10282 point_call 454,10596 has 512,11742 putstruct 576,13099 putstruct_body 674,15670 lookup 711,16423 hash_code 734,16805 point_loc 757,17095 has_loc 808,18121 putstruct_loc 867,19574 lookup_loc 1140,27268 add_spec_to_has 1165,27810 add_ident_to_has 1192,28369 link_function 1238,29210 set_value 1276,29907 fix_and_clear_goto_table 1303,30370 has_goto 1377,31908 has_label 1458,33812 lookup_goto_table 1520,35078 align_memory 1542,35447 scope_offset_get 1556,35664 scope_offset_set 1565,35769 move_offset_aligned 1585,36152 lookup_tag 1603,36474 has_tag 1622,36789 putstruct_tag 1720,39030 putstruct_tag_body 1737,39393 add_spec_to_tag 1751,39674 add_ident_to_tag 1801,40733 allocate_var 1843,41618 allocate_struct 2225,50764 find_member 2370,54128 offset_aggregate_ident 2399,54691 allocate_aggregate 2405,54779 putstruct_static 2539,58519 enter_file_scope 2618,60371 exit_file_scope 2629,60570 typedef_p 2639,60813 get_declaration_line 2673,61482 memory_size 2703,62040 check_init_bracket 2747,63039 get_memory_size 2790,64008 get_field_size 2819,64642 noninitialized_loc 2843,65172 virtual_machine.c,322 #define MASK 45,1359 exec(77,2162 exe 121,3013 vtrue 7853,202384 vfalse 7865,202569 div_yes 7877,202730 divui_yes 7888,202937 divli_yes 7899,203167 divlui_yes 7910,203389 divd_yes 7924,203660 divld_yes 7935,203877 divf_yes 7949,204134 divc_yes 7964,204380 mod_yes 7979,204618 move_stack_aligned 7990,204824 wind.c,14 wind 49,1186 wind_w.c,73 #define PROTO(PROTO31,986 #define PROTO(PROTO33,1017 wind_w 52,1252 xwin.c,206 d_move 43,1273 d_draw 54,1427 d_point 71,1794 d_flush 83,2102 d_clear 92,2176 d_clear_text 107,2488 d_destroy_window 122,2813 d_destroy_window_write 136,3058 d_draw_text 150,3328 d_pause 165,3711 clif-0.93/TODO100644 1750 1750 3347 5732412160 11620 0ustar korenkorenThe remote procedure call slot that we have built currently into the interpreter supports a remote procedure call paradigm, where client (or caller) waits until the finish of the remote procedure. We would like to improve this mechanism with a possibility of concurrent computation and synchronization via internal mechanism which would allow the interpreter to proceed with a computation even if the data from the remote call are not at the disposal. The interpreter runs until there is no reference to the results of the remote call and then blocks just before the first such reference. (There is possibility of changing syntax of the language). We suppose to implement the following special atomary types: integers with arbitrary precision, matrices with a dynamical allocation of memory and splines. To allow a more flexibility in language syntax we propose a procedure where for each stage of the compiler development there are two compilers. One is the active compiler with a full semantic and the other one is the same parser but with a special semantic which is directed to a source-source translation towards a new syntax. We also think about a possibility to conduct a research towards a compiler with a unified parser working in a heterogeneous environment with different code generation parts for particular environments. We have in mind to apply the methods used in object programming to solve "inheritance anomaly" for this problem. When we look at the parser constructed with YACC it can be seen that parsing and code generation parts are interspersed in such a way that it is not possible to separate and encapsulate those parts from each other. This is an instance of inheritance anomaly which can be approached with recently discovered methods. clif-0.93/acconfig.h100444 1750 1750 773 6517406575 13047 0ustar korenkoren/* Define default alignment for doubles. */ #undef MAX_ALIGNMENT /* Define if you want to check stack. */ #undef CHKSTACK /* Define if you want to generate output from the virtual machine. */ #undef CODE /* Define if you want to have automatic control enhancements. */ #undef CONTROL /* Define if you want to use more output during compilation and run-time. */ #undef DEBUG /* Define if you have TIOCSTI macro. */ #undef HAVE_TIOCSTI /* Define if you have . */ #undef HAVE_ASSERT_H @TOP@ clif-0.93/aclocal.m4100555 1750 1750 4653 6520053377 13001 0ustar korenkorenAC_DEFUN(CLIF_SVR_SIGS, [AC_MSG_CHECKING(for SVR signals) AC_CACHE_VAL(clif_cv_sigs, [AC_TRY_LINK( [#include #include<$op_signal> #include<$op_termio> #include<$op_fcntl>], [sigset(SIGINT,(void *)NULL);], clif_cv_sigs=yes, clif_cv_sigs=no)]) AC_MSG_RESULT($clif_cv_sigs)]) AC_DEFUN(CLIF_SVR3_TERM, [AC_MSG_CHECKING(for SVR3 features) AC_CACHE_VAL(clif_cv_lnctl, [AC_TRY_LINK( [#include<$op_termio>], [int x = LNEW_CTLECH;], clif_cv_lnctl=yes, clif_cv_lnctl=no)]) AC_MSG_RESULT($clif_cv_lnctl)]) AC_DEFUN(CLIF_BSD_SIG, [AC_MSG_CHECKING(for old-BSD signals) AC_CACHE_VAL(clif_cv_sigv, [AC_TRY_LINK([#include #include<$op_signal> #include<$op_termio> #include<$op_fcntl>], [struct sigvec vec,ovec; sigvec(SIGINT,&vec,&ovec);], clif_cv_sigv=yes, clif_cv_sigv=no)]) AC_MSG_RESULT($clif_cv_sigv)]) AC_DEFUN(CLIF_LINUX_SIG, [AC_MSG_CHECKING(for Linux signals) AC_CACHE_VAL(clif_cv_lsig, [AC_TRY_COMPILE([#include #include #include #include], [struct sigvec vec,ovec; sigvec(SIGINT,&vec,&ovec);], ADD_OBJS="$ADD_OBJS inter_handl_lin.o" ADD_FORK="$ADD_FORK \$(srcdir)/sigig_lin.c" ADD_IDIR="$ADD_IDIR -I/usr/include" AC_TRY_LINK([#include #include #include #include], [ioctl (stdin, TIOCSTI, "\n");], AC_DEFINE(HAVE_TIOCSTI)) clif_cv_lsig=yes, clif_cv_lsig=no)]) AC_MSG_RESULT($clif_cv_lsig)]) AC_DEFUN(CLIF_POSIX_SIG, [AC_MSG_CHECKING(if it is a true POSIXized system) AC_CACHE_VAL(clif_cv_psig, [AC_TRY_COMPILE([#include #include <$op_signal> #include <$op_termio>], [struct termios term; struct sigaction act, oact; int fd; tcgetattr (fd, &term); sigemptyset (&act.sa_mask); sigaction (SIGINT, &act, &oact);], clif_cv_psig=yes, clif_cv_psig=no)]) AC_MSG_RESULT($clif_cv_psig)]) AC_DEFUN(CLIF_MAX_ALIGNMENT, [AC_MSG_CHECKING(for default alignment) AC_CACHE_VAL(clif_cv_align, [AC_TRY_RUN( [#include struct foo { int a; double b;}; int main () { exit ((int)&((struct foo *)0)->b != sizeof (int));}], clif_cv_align=4, clif_cv_align=8, clif_cv_align=8)]) if test $clif_cv_align -eq 4; then AC_DEFINE(MAX_ALIGNMENT, 4) else AC_DEFINE(MAX_ALIGNMENT, 8) fi AC_MSG_RESULT($clif_cv_align)]) clif-0.93/allocx.c100444 1750 1750 5664 6515353345 12571 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * allocx.c * * calloc interface * */ #include #include "config.h" #include "global.h" #ifdef STDC_HEADERS #include #else #include #endif #ifdef HAVE_ASSERT_H #include #endif #include "allocx.h" #define MASK 7 #define PAGE 1024 #define K 10 union align { long l; char *p; double d; int (*f) PROTO((void)); }; struct pool_chunk { struct pool_chunk *next; char *position; char *limit; }; union header { struct pool_chunk p; union align a; }; static struct pool_chunk first[] = {{ NULL }, { NULL }}, *pool[] = { &first[0], &first[1]}, *freeblock; char * callocx (n, size) unsigned n, size; { return((char *)calloc(n,size)); } char * allocate (n, a) unsigned n,a; { register struct pool_chunk *cp; #ifdef HAVE_ASSERT_H assert (a < sizeof(pool)/sizeof(pool[0])); #endif cp = pool[a]; if (n & MASK) n += 8 - (n & MASK); while (cp->position + n > cp->limit) { if (NULL != (cp->next = freeblock)) { freeblock = freeblock->next; cp = cp->next; } else { unsigned m = sizeof(union header) + n + K * PAGE; cp->next = (struct pool_chunk *)callocx (1, m); cp = cp->next; if (NULL == cp) { error_message (4002); exit (1); } cp->limit = (char *)cp + m; } cp->position = (char *)(cp + sizeof (union header)); cp->next = NULL; pool[a] = cp; } cp->position += n; return cp->position - n; } void deallocate (a) unsigned a; { #ifdef HAVE_ASSERT_H assert (a < sizeof(pool)/sizeof(pool[0])); #endif pool[a]->next = freeblock; freeblock = first[a].next; first[a].next = NULL; pool[a] = &first[a]; } void init_zero (p, n) char *p; unsigned n; { while (n--) *p++ = 0; } void * mallocx (size) unsigned int size; { register void *res = malloc (size); if (res == NULL) error_message (4002); return res; } void * reallocx (ptr, size) void *ptr; unsigned size; { register void *res = realloc (ptr, size); if (res == NULL) error_message (4002); return res; } void freex (ptr) void *ptr; { return (free (ptr)); } clif-0.93/allocx.h100444 1750 1750 2516 6515353304 12562 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* allocx.h */ #ifndef _ALLOCX_H #define _ALLOCX_H #define PERM 0 #define BLOCK 1 #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif char *allocate PROTO((unsigned, unsigned)); char *callocx PROTO((unsigned, unsigned)); void deallocate PROTO((unsigned)); void init_zero PROTO((char *, unsigned)); void *mallocx PROTO((unsigned)); void *reallocx PROTO((void *, unsigned)); void freex PROTO((void *)); #endif clif-0.93/ansidecl.h100444 1750 1750 2402 6501540053 13046 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _ANSIDECL_H_ #define _ANSIDECL_H_ #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif #ifndef VPROTO #ifdef __STDC__ #define PVPROTO(ARGS) ARGS #define VPROTO(ARGS) ARGS #define VA_START(va_list,var) va_start(va_list,var) #else #define PVPROTO(ARGS) () #define VPROTO(ARGS) (va_alist) va_dcl #define VA_START(va_list,var) va_start(va_list) #endif #endif #endif clif-0.93/buf.h100444 1750 1750 301 6126276370 12027 0ustar korenkoren/* * buf.h * * changes buffer size of input buffer for lexical analyzer * */ #ifndef _BUF_H #define _BUF_H #ifdef YYLMAX #undef YYLMAX #endif #define YYLMAX 10000 #endif /* _BUF_H */ clif-0.93/c-lex.c100644 1750 1750 163344 7130574566 12365 0ustar korenkoren/* A lexical scanner generated by flex */ /* Scanner skeleton version: * $FreeBSD: src/usr.bin/lex/skel.c,v 1.2.2.1 1999/08/29 15:29:33 peter Exp $ */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include #include /* Use prototypes in function declarations. */ #define YY_USE_PROTOS /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ #if __STDC__ #define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ #pragma warn -rch #pragma warn -use #include #include #define YY_USE_CONST #define YY_USE_PROTOS #endif #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif #ifdef YY_USE_PROTOS #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #define YY_BUF_SIZE 16384 typedef struct yy_buffer_state *YY_BUFFER_STATE; extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* The funky do-while in the following #define is used to turn the definition * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * * if ( condition_holds ) * yyless( 5 ); * else * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the yyless() call. */ /* Return all but the first 'n' matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ *yy_cp = yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yytext_ptr ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ typedef unsigned int yy_size_t; struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; static YY_BUFFER_STATE yy_current_buffer = 0; /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". */ #define YY_CURRENT_BUFFER yy_current_buffer /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart YY_PROTO(( FILE *input_file )); void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); void yy_load_buffer_state YY_PROTO(( void )); YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); static void *yy_flex_alloc YY_PROTO(( yy_size_t )); static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( void )); static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yytext_ptr = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; #define YY_NUM_RULES 55 #define YY_END_OF_BUFFER 56 static yyconst short int yy_accept[130] = { 0, 0, 0, 56, 54, 1, 2, 40, 54, 54, 54, 54, 54, 54, 54, 54, 54, 12, 12, 54, 54, 54, 54, 18, 18, 54, 18, 54, 41, 37, 0, 0, 28, 32, 29, 0, 0, 0, 0, 26, 38, 24, 39, 25, 44, 15, 0, 27, 15, 12, 0, 9, 8, 0, 43, 36, 34, 35, 42, 0, 18, 0, 0, 30, 18, 31, 33, 21, 21, 17, 17, 0, 17, 0, 0, 0, 0, 13, 14, 0, 0, 0, 15, 0, 0, 15, 11, 10, 7, 23, 22, 51, 49, 46, 48, 53, 47, 50, 45, 52, 0, 18, 21, 0, 21, 21, 0, 16, 0, 0, 0, 15, 19, 0, 0, 15, 4, 3, 18, 0, 0, 0, 15, 6, 5, 0, 20, 0, 20, 0 } ; static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 7, 15, 16, 17, 18, 19, 19, 19, 19, 19, 19, 19, 20, 20, 7, 7, 21, 22, 23, 24, 7, 25, 25, 25, 25, 26, 27, 28, 28, 28, 28, 28, 29, 28, 28, 28, 28, 28, 28, 28, 28, 30, 28, 28, 31, 28, 28, 7, 32, 7, 33, 28, 7, 34, 35, 25, 36, 26, 37, 28, 28, 28, 28, 28, 38, 28, 39, 40, 28, 28, 41, 28, 42, 30, 43, 28, 44, 28, 28, 7, 45, 7, 46, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst int yy_meta[47] = { 0, 1, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 2, 2, 2, 2, 4, 4, 4, 5, 5, 5, 5, 2, 2, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 2, 2 } ; static yyconst short int yy_base[136] = { 0, 0, 0, 257, 343, 343, 343, 229, 218, 227, 38, 42, 226, 35, 36, 34, 42, 59, 203, 40, 224, 45, 221, 0, 59, 219, 66, 28, 343, 343, 50, 64, 343, 343, 343, 230, 229, 228, 101, 343, 343, 343, 343, 343, 343, 128, 67, 343, 72, 183, 90, 195, 57, 0, 202, 343, 343, 343, 200, 162, 0, 177, 94, 343, 174, 343, 343, 157, 194, 343, 343, 194, 189, 83, 103, 0, 109, 343, 343, 181, 70, 177, 163, 173, 96, 215, 343, 343, 101, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 158, 122, 199, 150, 252, 289, 143, 343, 152, 143, 132, 162, 120, 192, 195, 198, 87, 140, 130, 102, 151, 201, 211, 343, 343, 232, 95, 77, 77, 343, 326, 330, 332, 337, 67, 59 } ; static yyconst short int yy_def[136] = { 0, 129, 1, 129, 129, 129, 129, 129, 130, 129, 129, 131, 129, 129, 129, 129, 129, 129, 17, 129, 129, 129, 129, 132, 132, 129, 132, 129, 129, 129, 130, 130, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 133, 129, 45, 17, 129, 129, 129, 134, 129, 129, 129, 129, 129, 129, 132, 130, 131, 129, 132, 129, 129, 129, 130, 129, 129, 129, 129, 129, 129, 135, 129, 129, 129, 133, 133, 133, 48, 129, 129, 129, 129, 129, 134, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 38, 132, 129, 129, 130, 130, 130, 129, 129, 135, 129, 85, 129, 129, 129, 85, 129, 129, 132, 129, 133, 129, 85, 129, 129, 129, 129, 129, 129, 0, 129, 129, 129, 129, 129, 129 } ; static yyconst short int yy_nxt[390] = { 0, 4, 5, 6, 5, 7, 8, 4, 9, 10, 11, 4, 4, 12, 13, 14, 15, 16, 17, 18, 18, 19, 20, 21, 22, 23, 23, 23, 23, 24, 23, 23, 4, 25, 23, 23, 23, 23, 26, 23, 23, 23, 23, 23, 23, 27, 28, 33, 36, 40, 65, 42, 45, 45, 45, 46, 67, 41, 43, 44, 34, 54, 55, 109, 47, 61, 37, 57, 58, 62, 68, 88, 61, 66, 38, 48, 62, 49, 49, 49, 80, 128, 31, 80, 81, 50, 87, 112, 51, 52, 82, 82, 82, 107, 120, 87, 31, 51, 83, 128, 36, 108, 108, 53, 84, 84, 64, 71, 85, 85, 85, 72, 69, 69, 85, 85, 85, 123, 37, 73, 74, 108, 108, 110, 110, 71, 100, 111, 111, 111, 116, 117, 75, 71, 125, 71, 71, 120, 71, 116, 71, 126, 71, 71, 71, 75, 45, 45, 45, 105, 111, 111, 111, 69, 76, 77, 61, 78, 118, 102, 102, 102, 69, 61, 80, 77, 78, 91, 127, 124, 119, 119, 92, 93, 94, 31, 74, 95, 124, 96, 111, 111, 111, 97, 98, 99, 103, 114, 114, 113, 80, 115, 115, 115, 80, 103, 104, 104, 104, 69, 105, 102, 102, 102, 69, 61, 121, 121, 101, 31, 122, 122, 122, 115, 115, 115, 115, 115, 115, 122, 122, 122, 90, 106, 89, 86, 31, 129, 103, 122, 122, 122, 106, 85, 85, 85, 125, 103, 70, 69, 69, 63, 77, 126, 78, 59, 56, 129, 39, 32, 31, 29, 77, 78, 104, 104, 104, 129, 105, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 106, 129, 129, 31, 129, 129, 129, 129, 129, 106, 104, 104, 104, 129, 61, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 106, 129, 129, 31, 129, 129, 129, 129, 129, 106, 30, 129, 30, 30, 35, 35, 35, 35, 60, 60, 79, 79, 79, 79, 79, 3, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129 } ; static yyconst short int yy_chk[390] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 11, 13, 27, 14, 15, 15, 15, 16, 30, 13, 14, 14, 10, 19, 19, 135, 16, 24, 11, 21, 21, 24, 31, 134, 26, 27, 11, 17, 26, 17, 17, 17, 46, 128, 30, 80, 46, 17, 52, 80, 17, 17, 48, 48, 48, 73, 127, 52, 31, 17, 48, 126, 62, 73, 73, 17, 50, 50, 26, 38, 50, 50, 50, 38, 119, 74, 84, 84, 84, 116, 62, 38, 38, 74, 74, 76, 76, 38, 62, 76, 76, 76, 88, 88, 38, 38, 118, 38, 38, 112, 38, 88, 38, 118, 38, 38, 38, 38, 45, 45, 45, 106, 110, 110, 110, 109, 45, 45, 103, 45, 101, 67, 67, 67, 108, 67, 120, 45, 45, 59, 120, 117, 108, 108, 59, 59, 59, 106, 100, 59, 117, 59, 111, 111, 111, 59, 59, 59, 67, 83, 83, 82, 81, 83, 83, 83, 79, 67, 68, 68, 68, 72, 68, 102, 102, 102, 71, 102, 113, 113, 64, 61, 113, 113, 113, 114, 114, 114, 115, 115, 115, 121, 121, 121, 58, 68, 54, 51, 68, 49, 102, 122, 122, 122, 68, 85, 85, 85, 125, 102, 37, 36, 35, 25, 85, 125, 85, 22, 20, 18, 12, 9, 8, 7, 85, 85, 104, 104, 104, 3, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104, 0, 0, 104, 0, 0, 0, 0, 0, 104, 105, 105, 105, 0, 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105, 0, 0, 105, 0, 0, 0, 0, 0, 105, 130, 0, 130, 130, 131, 131, 131, 131, 132, 132, 133, 133, 133, 133, 133, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "ls.l" #define INITIAL 0 #line 2 "ls.l" /* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998, 1999, 2000 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * ls * * lex source for Clif's compiler */ #include #include "config.h" #ifdef STDC_HEADERS #include #endif #include "global.h" #include "mystdio.h" #include "tables.h" #include "token.h" #include "dbg-out.h" #define LG_MC 35 /* Max length of identifiers */ #define MAX_MESS 250 /* * Max size of output messages (obsolete) */ char *text; char message[MAX_MESS]; /* * Buffer of output messages (obsolete) */ extern FILEATTR pf, spf[]; extern int s, char_counter; #include "input.h" /* * Redefining of the input function */ #ifdef FLEX_SCANNER #define YY_NO_UNPUT extern char string_resume[]; #endif #include "buf.h" /* * Changes size of buffer */ #include "allocx.h" static int find_ident PROTO((char *, int)); extern char *string PROTO((char *)); extern void s_conv PROTO((char *)); extern int dbg_symbols; #define NL '\n' /* In the following there is no the " character. */ /* The $, `, @ characters are not in ANSI C Standard. */ #line 557 "lex.yy.c" /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap YY_PROTO(( void )); #else extern int yywrap YY_PROTO(( void )); #endif #endif #ifndef YY_NO_UNPUT static void yyunput YY_PROTO(( int c, char *buf_ptr )); #endif #ifndef yytext_ptr static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen YY_PROTO(( yyconst char * )); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput YY_PROTO(( void )); #else static int input YY_PROTO(( void )); #endif #endif #if YY_STACK_USED static int yy_start_stack_ptr = 0; static int yy_start_stack_depth = 0; static int *yy_start_stack = 0; #ifndef YY_NO_PUSH_STATE static void yy_push_state YY_PROTO(( int new_state )); #endif #ifndef YY_NO_POP_STATE static void yy_pop_state YY_PROTO(( void )); #endif #ifndef YY_NO_TOP_STATE static int yy_top_state YY_PROTO(( void )); #endif #else #define YY_NO_PUSH_STATE 1 #define YY_NO_POP_STATE 1 #define YY_NO_TOP_STATE 1 #endif #ifdef YY_MALLOC_DECL YY_MALLOC_DECL #else #if __STDC__ #ifndef __cplusplus #include #endif #else /* Just try to get by without declaring the routines. This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * or sizeof(void*) != sizeof(int). */ #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( yy_current_buffer->yy_is_interactive ) \ { \ int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL int yylex YY_PROTO(( void )) #endif /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 90 "ls.l" #line 710 "lex.yy.c" if ( yy_init ) { yy_init = 0; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yy_start ) yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yy_c_buf_p; /* Support of yytext. */ *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yy_start; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 130 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 343 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yy_hold_char; yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; goto yy_find_action; case 1: YY_RULE_SETUP #line 91 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); /* * tabs, spaces */} YY_BREAK case 2: YY_RULE_SETUP #line 95 "ls.l" { #ifdef FLEX_SCANNER spf[s].line_counter++; line_buf[0] = 0; char_counter = 0; #endif if (dbg_symbols) dbg_create (); } YY_BREAK case 3: YY_RULE_SETUP #line 104 "ls.l" { sscanf (yytext, "%ux", &yylval.myuint); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERUI); } YY_BREAK case 4: YY_RULE_SETUP #line 110 "ls.l" { sscanf (yytext, "%lx", &yylval.mylint); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERLI); } YY_BREAK case 5: YY_RULE_SETUP #line 116 "ls.l" { sscanf (yytext, "%lux", &yylval.myluint); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERLUI); } YY_BREAK case 6: YY_RULE_SETUP #line 122 "ls.l" { sscanf (yytext, "%lx", &yylval.myluint); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERLUI); } YY_BREAK case 7: YY_RULE_SETUP #line 128 "ls.l" { sscanf (yytext, "%x", &yylval.myint); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERI); } YY_BREAK case 8: YY_RULE_SETUP #line 134 "ls.l" { sscanf (yytext, "%u", &yylval.myuint); char_counter += yyleng; strcat (line_buf,yytext); return (NUMBERUI); /* * Matches integer numbers */} YY_BREAK case 9: YY_RULE_SETUP #line 142 "ls.l" { sscanf (yytext, "%ld", &yylval.mylint); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERLI); /* * Matches integer numbers */} YY_BREAK case 10: YY_RULE_SETUP #line 150 "ls.l" { sscanf (yytext, "%lu", &yylval.myluint); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERLUI); /* * Matches integer numbers */} YY_BREAK case 11: YY_RULE_SETUP #line 158 "ls.l" { sscanf (yytext, "%lu", &yylval.myluint); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERLUI); /* * Matches integer numbers */} YY_BREAK case 12: YY_RULE_SETUP #line 166 "ls.l" { sscanf (yytext, "%d", &yylval.myint); char_counter += yyleng; strcat (line_buf,yytext); return (NUMBERI); /* * Matches integer numbers */} YY_BREAK case 13: YY_RULE_SETUP #line 174 "ls.l" { sscanf (yytext, "%f", &yylval.myfloat); char_counter += yyleng; strcat (line_buf,yytext); return (NUMBERF); /* * Matches float numbers */} YY_BREAK case 14: YY_RULE_SETUP #line 182 "ls.l" { sscanf (yytext, "%Lf", &yylval.myldouble); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERLD); /* * Matches long double numbers */} YY_BREAK case 15: YY_RULE_SETUP #line 190 "ls.l" { sscanf (yytext, "%lf", &yylval.mydouble); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERD); /* * Matches double numbers */} YY_BREAK case 16: YY_RULE_SETUP #line 198 "ls.l" {char_counter += yyleng; yytext[0] = 0; strcat (line_buf, "'\\0'"); yylval.mychar = 0; return (NUMBERC); } YY_BREAK case 17: YY_RULE_SETUP #line 204 "ls.l" { int i, j; char_counter += yyleng; strcat (line_buf, yytext); for (i = 1; yytext[i] != '\0'; i++) if (yytext[i - 1] == '\\' && yytext[i] == 'X') { error_message (6033, "X"); break; } if (yytext[0] == 'l') { error_message (1038, "l"); error_message (1039, "character"); } #if 0 /* Constant L 'a' should be wide character constant. It seems, there is no difference in representation yet. */ if (yytext[0] == 'L') { for (i = 0; yytext[i] != '\0'; i++) if (yytext[i] == '\'') break; yytext[0] = yytext[i + 1]; sscanf (yytext, "%d", &yylval.myint); return (NUMBERI); } #endif for (i = 0; yytext[i] != '\0'; i++) if (yytext[i] == '\'') break; for (j = i + 1, i = 0; yytext[j] != '\0'; j++, i++) yytext[i] = yytext[j]; yytext[i] = '\0'; if (yytext[0] == '\\') { switch (yytext[1]) { case '\'': yylval.mychar = '\''; break; case '"': yylval.mychar = '\"'; break; case '?': yylval.mychar = '\?'; break; case '\\': yylval.mychar = '\\'; break; case 'a': yylval.mychar = '\a'; break; case 'b': yylval.mychar = '\b'; break; case 'f': yylval.mychar = '\f'; break; case 'n': yylval.mychar = '\n'; break; case 'r': yylval.mychar = '\r'; break; case 't': yylval.mychar = '\t'; break; case 'v': yylval.mychar = '\v'; break; case 'x': yytext[0] = '0'; sscanf (yytext, "%x", (unsigned *) &yylval.mychar); break; default: yytext[0] = '0'; sscanf (yytext, "%o", (unsigned *) &yylval.mychar); break; } } else sscanf (yytext, "%c", &yylval.mychar); return (NUMBERC); } YY_BREAK case 18: YY_RULE_SETUP #line 289 "ls.l" { int i; strcat (line_buf, yytext); char_counter += yyleng; i = find_ident (yytext, yyleng); /* * Matches keywords */ if (i) return i; else { text = string (yytext); yylval.mystring = text; /* If the identifier just matched was previously declared as typedef return it as TYPENAME; IDENT otherwise. */ if (typedef_p (text)) return TYPENAME; else return IDENT; } } YY_BREAK case 19: YY_RULE_SETUP #line 311 "ls.l" { #ifdef FLEX_SCANNER char *str; #endif char_counter += yyleng; strcat (line_buf, yytext); if (NULL != strstr (&yytext[2], "/*")) {error_message (6005);} /* * Matches and discards comments */ #ifdef FLEX_SCANNER str = yytext; str = strstr (str, "\n"); while (str != NULL) { spf[s].line_counter++; str = &str[1]; str = strstr (str, "\n"); } #endif } YY_BREAK case 20: YY_RULE_SETUP #line 333 "ls.l" {char name[20],*tmp_p; int w,ab=' '; char_counter += yyleng; strcat (line_buf, yytext); for (w = 0; ab != ';'; w++) { ab = input (); name[w] = ab; } tmp_p = (char *)strchr (name,')'); if (NULL == tmp_p) { error_message (1004, ")"); return (0); } *tmp_p = '\0'; tmp_p = (char *)strchr (name,' '); if (NULL != tmp_p) { *tmp_p = '\0'; } char_counter += w; strcat (line_buf, name); s++; spf[s].fp = fopen (name, "r"); if (NULL == spf[s].fp) { yytext[0] = '\0'; s--; strcpy (yytext, name); error_message (1011); return (0); } if (NULL == (spf[s].name = (char *) allocate (strlen (name) + 1, PERM))) { error_message (4002); return (0); } strcpy (spf[s].name, name); spf[s].line_counter = 1; #ifdef FLEX_SCANNER yy_switch_to_buffer (yy_create_buffer (spf[s].fp, YY_BUF_SIZE)); #else pf = spf[s]; #endif } YY_BREAK case 21: YY_RULE_SETUP #line 379 "ls.l" {int wide_string = 0; char_counter += yyleng; if (yytext[0] == 'l') { error_message (1040); error_message (1039, "string"); } else if (yytext[0] == 'L') wide_string = 1; strcat (line_buf, yytext); s_conv (yytext); /* I do not differentiate between strings and wide string literal. However, there is room for it in the union. */ yylval.mystring = string (yytext); if (wide_string) return (WSTRINGC); else return (STRINGC); } YY_BREAK case 22: YY_RULE_SETUP #line 399 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (RIGHT_ASSIGN);} YY_BREAK case 23: YY_RULE_SETUP #line 400 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (LEFT_ASSIGN);} YY_BREAK case 24: YY_RULE_SETUP #line 401 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (ADD_ASSIGN);} YY_BREAK case 25: YY_RULE_SETUP #line 402 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (SUB_ASSIGN);} YY_BREAK case 26: YY_RULE_SETUP #line 403 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (MUL_ASSIGN);} YY_BREAK case 27: YY_RULE_SETUP #line 404 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (DIV_ASSIGN);} YY_BREAK case 28: YY_RULE_SETUP #line 405 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (MOD_ASSIGN);} YY_BREAK case 29: YY_RULE_SETUP #line 406 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (AND_ASSIGN);} YY_BREAK case 30: YY_RULE_SETUP #line 407 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (XOR_ASSIGN);} YY_BREAK case 31: YY_RULE_SETUP #line 408 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (OR_ASSIGN);} YY_BREAK case 32: YY_RULE_SETUP #line 409 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (AND_A);} YY_BREAK case 33: YY_RULE_SETUP #line 410 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (OR_A);} YY_BREAK case 34: YY_RULE_SETUP #line 411 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (EQ_A);} YY_BREAK case 35: YY_RULE_SETUP #line 412 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (GQ);} YY_BREAK case 36: YY_RULE_SETUP #line 413 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (LQ);} YY_BREAK case 37: YY_RULE_SETUP #line 414 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (NE_A);} YY_BREAK case 38: YY_RULE_SETUP #line 415 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (PP);} YY_BREAK case 39: YY_RULE_SETUP #line 416 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (MM);} YY_BREAK case 40: YY_RULE_SETUP #line 417 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (NEG_T);} YY_BREAK case 41: YY_RULE_SETUP #line 418 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (NEG_B);} YY_BREAK case 42: YY_RULE_SETUP #line 419 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (SHIR);} YY_BREAK case 43: YY_RULE_SETUP #line 420 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (SHIL);} YY_BREAK case 44: YY_RULE_SETUP #line 421 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (PTR);} YY_BREAK case 45: YY_RULE_SETUP #line 422 "ls.l" {char_counter += yyleng; strcat (line_buf, "#"); error_message (6032); return ('#'); } YY_BREAK case 46: YY_RULE_SETUP #line 427 "ls.l" {char_counter += yyleng; strcat (line_buf, "["); error_message (6032); return ('['); } YY_BREAK case 47: YY_RULE_SETUP #line 432 "ls.l" {char_counter += yyleng; strcat (line_buf, "\\"); error_message (6032); return ('\\'); } YY_BREAK case 48: YY_RULE_SETUP #line 437 "ls.l" {char_counter += yyleng; strcat (line_buf, "]"); error_message (6032); return (']'); } YY_BREAK case 49: YY_RULE_SETUP #line 442 "ls.l" {char_counter += yyleng; strcat (line_buf, "^"); error_message (6032); return ('^'); } YY_BREAK case 50: YY_RULE_SETUP #line 447 "ls.l" {char_counter += yyleng; strcat (line_buf, "{"); error_message (6032); return ('{'); } YY_BREAK case 51: YY_RULE_SETUP #line 452 "ls.l" {char_counter += yyleng; strcat (line_buf, "|"); error_message (6032); return ('|'); } YY_BREAK case 52: YY_RULE_SETUP #line 457 "ls.l" {char_counter += yyleng; strcat (line_buf, "}"); error_message (6032); return ('}'); } YY_BREAK case 53: YY_RULE_SETUP #line 462 "ls.l" {char_counter += yyleng; strcat (line_buf, "~"); error_message (6032); return ('~'); } YY_BREAK case 54: YY_RULE_SETUP #line 468 "ls.l" {char_counter += yyleng; strcat (line_buf, yytext); return (*yytext); /* * Returns rest simple characters */} YY_BREAK case 55: YY_RULE_SETUP #line 472 "ls.l" ECHO; YY_BREAK #line 1394 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between yy_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yy_n_chars = yy_current_buffer->yy_n_chars; yy_current_buffer->yy_input_file = yyin; yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yy_c_buf_p; goto yy_find_action; } } else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_did_buffer_switch_on_eof = 0; if ( yywrap() ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yy_c_buf_p = &yy_current_buffer->yy_ch_buf[yy_n_chars]; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer() { register char *dest = yy_current_buffer->yy_ch_buf; register char *source = yytext_ptr; register int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( yy_current_buffer->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ yy_current_buffer->yy_n_chars = yy_n_chars = 0; else { int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ #ifdef YY_USES_REJECT YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); #else /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = yy_current_buffer; int yy_c_buf_p_offset = (int) (yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yy_flex_realloc( (void *) b->yy_ch_buf, b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; #endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, num_to_read ); yy_current_buffer->yy_n_chars = yy_n_chars; } if ( yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; yy_n_chars += number_to_move; yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state() { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = yy_start; for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 130 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) yy_state_type yy_current_state; #endif { register int yy_is_jam; register char *yy_cp = yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 130 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 129); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) int c; register char *yy_bp; #endif { register char *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = yy_n_chars + 2; register char *dest = &yy_current_buffer->yy_ch_buf[ yy_current_buffer->yy_buf_size + 2]; register char *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); yy_current_buffer->yy_n_chars = yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; yytext_ptr = yy_bp; yy_hold_char = *yy_cp; yy_c_buf_p = yy_cp; } #endif /* ifndef YY_NO_UNPUT */ #ifdef __cplusplus static int yyinput() #else static int input() #endif { int c; *yy_c_buf_p = yy_hold_char; if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* This was really a NUL. */ *yy_c_buf_p = '\0'; else { /* need more input */ int offset = yy_c_buf_p - yytext_ptr; ++yy_c_buf_p; switch ( yy_get_next_buffer() ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart( yyin ); /* fall through */ case EOB_ACT_END_OF_FILE: { if ( yywrap() ) return EOF; if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + offset; break; } } } c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ *yy_c_buf_p = '\0'; /* preserve yytext */ yy_hold_char = *++yy_c_buf_p; return c; } #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) #else void yyrestart( input_file ) FILE *input_file; #endif { if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_init_buffer( yy_current_buffer, input_file ); yy_load_buffer_state(); } #ifdef YY_USE_PROTOS void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) #else void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { if ( yy_current_buffer == new_buffer ) return; if ( yy_current_buffer ) { /* Flush out information for old buffer. */ *yy_c_buf_p = yy_hold_char; yy_current_buffer->yy_buf_pos = yy_c_buf_p; yy_current_buffer->yy_n_chars = yy_n_chars; } yy_current_buffer = new_buffer; yy_load_buffer_state(); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ yy_did_buffer_switch_on_eof = 1; } #ifdef YY_USE_PROTOS void yy_load_buffer_state( void ) #else void yy_load_buffer_state() #endif { yy_n_chars = yy_current_buffer->yy_n_chars; yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; yyin = yy_current_buffer->yy_input_file; yy_hold_char = *yy_c_buf_p; } #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) #else YY_BUFFER_STATE yy_create_buffer( file, size ) FILE *file; int size; #endif { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer( b, file ); return b; } #ifdef YY_USE_PROTOS void yy_delete_buffer( YY_BUFFER_STATE b ) #else void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; if ( b == yy_current_buffer ) yy_current_buffer = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yy_flex_free( (void *) b->yy_ch_buf ); yy_flex_free( (void *) b ); } #ifndef YY_ALWAYS_INTERACTIVE #ifndef YY_NEVER_INTERACTIVE extern int isatty YY_PROTO(( int )); #endif #endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else void yy_init_buffer( b, file ) YY_BUFFER_STATE b; FILE *file; #endif { yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; #if YY_ALWAYS_INTERACTIVE b->yy_is_interactive = 1; #else #if YY_NEVER_INTERACTIVE b->yy_is_interactive = 0; #else b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; #endif #endif } #ifdef YY_USE_PROTOS void yy_flush_buffer( YY_BUFFER_STATE b ) #else void yy_flush_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == yy_current_buffer ) yy_load_buffer_state(); } #ifndef YY_NO_SCAN_BUFFER #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) #else YY_BUFFER_STATE yy_scan_buffer( base, size ) char *base; yy_size_t size; #endif { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer( b ); return b; } #endif #ifndef YY_NO_SCAN_STRING #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) #else YY_BUFFER_STATE yy_scan_string( yy_str ) yyconst char *yy_str; #endif { int len; for ( len = 0; yy_str[len]; ++len ) ; return yy_scan_bytes( yy_str, len ); } #endif #ifndef YY_NO_SCAN_BYTES #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) #else YY_BUFFER_STATE yy_scan_bytes( bytes, len ) yyconst char *bytes; int len; #endif { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) yy_flex_alloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < len; ++i ) buf[i] = bytes[i]; buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #endif #ifndef YY_NO_PUSH_STATE #ifdef YY_USE_PROTOS static void yy_push_state( int new_state ) #else static void yy_push_state( new_state ) int new_state; #endif { if ( yy_start_stack_ptr >= yy_start_stack_depth ) { yy_size_t new_size; yy_start_stack_depth += YY_START_STACK_INCR; new_size = yy_start_stack_depth * sizeof( int ); if ( ! yy_start_stack ) yy_start_stack = (int *) yy_flex_alloc( new_size ); else yy_start_stack = (int *) yy_flex_realloc( (void *) yy_start_stack, new_size ); if ( ! yy_start_stack ) YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); } yy_start_stack[yy_start_stack_ptr++] = YY_START; BEGIN(new_state); } #endif #ifndef YY_NO_POP_STATE static void yy_pop_state() { if ( --yy_start_stack_ptr < 0 ) YY_FATAL_ERROR( "start-condition stack underflow" ); BEGIN(yy_start_stack[yy_start_stack_ptr]); } #endif #ifndef YY_NO_TOP_STATE static int yy_top_state() { return yy_start_stack[yy_start_stack_ptr - 1]; } #endif #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif #ifdef YY_USE_PROTOS static void yy_fatal_error( yyconst char msg[] ) #else static void yy_fatal_error( msg ) char msg[]; #endif { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ yytext[yyleng] = yy_hold_char; \ yy_c_buf_p = yytext + n; \ yy_hold_char = *yy_c_buf_p; \ *yy_c_buf_p = '\0'; \ yyleng = n; \ } \ while ( 0 ) /* Internal utility routines. */ #ifndef yytext_ptr #ifdef YY_USE_PROTOS static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) #else static void yy_flex_strncpy( s1, s2, n ) char *s1; yyconst char *s2; int n; #endif { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN #ifdef YY_USE_PROTOS static int yy_flex_strlen( yyconst char *s ) #else static int yy_flex_strlen( s ) yyconst char *s; #endif { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #ifdef YY_USE_PROTOS static void *yy_flex_alloc( yy_size_t size ) #else static void *yy_flex_alloc( size ) yy_size_t size; #endif { return (void *) malloc( size ); } #ifdef YY_USE_PROTOS static void *yy_flex_realloc( void *ptr, yy_size_t size ) #else static void *yy_flex_realloc( ptr, size ) void *ptr; yy_size_t size; #endif { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } #ifdef YY_USE_PROTOS static void yy_flex_free( void *ptr ) #else static void yy_flex_free( ptr ) void *ptr; #endif { free( ptr ); } #if YY_MAIN int main() { yylex(); return 0; } #endif #line 472 "ls.l" struct el_mc { char *name; int tok; }; extern struct el_mc * in_word_set PROTO((register char *, register unsigned int)); /* * Looks up if a identifier is not a keyword */ static int find_ident (s, len) char *s; int len; { register struct el_mc *ret_val; ret_val = in_word_set (s, len); if (ret_val) return ret_val->tok; else return 0; } int yywrap () { #ifdef FLEX_SCANNER return (! switch_to_buffer ()); #else return 1; #endif } #ifndef FLEX_SCANNER #ifdef unput #undef unput #endif #define unput(c) {yytchar = (c); \ if (NL == yytchar) \ { \ yylineno--; \ spf[s].line_counter--; \ } \ *yysptr++ = yytchar;} #else void switch_to_stdin () { s++; spf[s] = spf[0]; yy_switch_to_buffer (yy_create_buffer (stdin, YY_BUF_SIZE)); yy_set_interactive (1); } void switch_to_char_buffer () { yy_scan_string (string_resume); } int switch_to_buffer () { if (terminate_buffer ()) return 0; else { yy_delete_buffer (YY_CURRENT_BUFFER); yy_switch_to_buffer (yy_create_buffer (spf[s].fp, YY_BUF_SIZE)); } return 1; } void * store_buffer_state () { YY_BUFFER_STATE *state; state = (YY_BUFFER_STATE *) allocate (sizeof (YY_BUFFER_STATE), 0); *state = YY_CURRENT_BUFFER; return ((void *) state); } void flush_buffer (state) void *state; { yy_flush_buffer (YY_CURRENT_BUFFER); yy_switch_to_buffer (*(YY_BUFFER_STATE *)state); #if 0 deallocate (state); #endif } #endif /* ! FLEX_SCANNER */ clif-0.93/c-parser.c100644 1750 1750 616144 7130600325 13051 0ustar korenkoren /* A Bison parser, made from ys.y by GNU Bison version 1.28 */ #define YYBISON 1 /* Identify Bison output. */ #define NUMBERI 257 #define NUMBERUI 258 #define NUMBERLI 259 #define NUMBERLUI 260 #define NUMBERD 261 #define NUMBERLD 262 #define NUMBERF 263 #define STRINGC 264 #define WSTRINGC 265 #define NUMBERC 266 #define AUTO 267 #define STATIC 268 #define REGISTER 269 #define EXTERN 270 #define REMOTE 271 #define UNLOAD 272 #define INTRINSIC 273 #define RPC 274 #define IDENT 275 #define INT 276 #define DOUBLE 277 #define FLOAT 278 #define CHAR 279 #define VOID 280 #define LONG 281 #define SHORT 282 #define SIGNED 283 #define UNSIGNED 284 #define CONST 285 #define VOLATILE 286 #define ENUM 287 #define STRUCT 288 #define UNION 289 #define EXIT 290 #define IF 291 #define ELSE 292 #define SIZEOF 293 #define SWITCH 294 #define WHILE 295 #define FOR 296 #define DO 297 #define CONTINUE 298 #define BREAK 299 #define RETURN 300 #define GOTO 301 #define CASE 302 #define DEFAULT 303 #define CSUSPEND 304 #define RESUME 305 #define EXPORT_T 306 #define TYPEDEF 307 #define TYPENAME 308 #define MUL_ASSIGN 309 #define DIV_ASSIGN 310 #define MOD_ASSIGN 311 #define ADD_ASSIGN 312 #define SUB_ASSIGN 313 #define LEFT_ASSIGN 314 #define RIGHT_ASSIGN 315 #define AND_ASSIGN 316 #define XOR_ASSIGN 317 #define OR_ASSIGN 318 #define OR_A 319 #define AND_A 320 #define EQ_A 321 #define NE_A 322 #define LQ 323 #define GQ 324 #define SHIL 325 #define SHIR 326 #define NEG_T 327 #define NEG_B 328 #define PP 329 #define MM 330 #define PTR 331 #line 27 "ys.y" #include #include "global.h" #include "config.h" #ifdef STDC_HEADERS #include #include #else #include #endif #include "instr.h" /* * Header of structures. * Defines size of virtual machine * instructions. */ #include "geninstr.h" /* * Header of macros. * Defines instruction set of the * virtual machine. */ #include "control.h" /* * Header of fixative structures */ #include "type.h" /* * Header of internal representation * of types. */ #include "struct.h" /* * Header of globally used structures */ #include "mystdio.h" /* * Defining NULL */ #include "ys.h" /* * Header of compiler maintenance functions. */ #include "allocx.h" #include "comp_maint.h" #include "load.h" #include "virtual_machine.h" #include "ls.h" #include "tables.h" #include "memmove.h" #include "remote_call.h" #include "printfx.h" #include "s-conv.h" #include "flags.h" #include "parser.h" /* * Header for parser specific variables. */ #include "pso.h" #define YYDEBUG 1 void dump_yacc PROTO((void)); #line 83 "ys.y" typedef union { int myint; unsigned int myuint; long int mylint; long unsigned int myluint; double mydouble; long double myldouble; float myfloat; char *mystring; wchar_t *mywstring; char mychar; } YYSTYPE; #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YYFINAL 601 #define YYFLAG -32768 #define YYNTBASE 100 #define YYTRANSLATE(x) ((unsigned)(x) <= 331 ? yytranslate[x] : 254) static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 85, 72, 2, 90, 91, 83, 81, 99, 82, 94, 84, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 55, 96, 75, 67, 77, 56, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 92, 2, 93, 71, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 98, 70, 97, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 73, 74, 76, 78, 79, 80, 86, 87, 88, 89, 95 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 3, 4, 7, 8, 10, 12, 15, 17, 20, 22, 26, 28, 31, 34, 37, 40, 44, 47, 49, 52, 54, 57, 59, 62, 63, 67, 76, 85, 89, 91, 93, 96, 98, 100, 102, 105, 108, 109, 116, 117, 124, 125, 126, 134, 135, 144, 148, 150, 152, 154, 155, 161, 162, 167, 168, 173, 174, 178, 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, 205, 207, 209, 211, 213, 216, 219, 223, 225, 228, 229, 236, 237, 243, 246, 248, 250, 252, 255, 260, 262, 265, 267, 270, 272, 276, 278, 281, 285, 286, 292, 293, 300, 303, 305, 309, 311, 315, 318, 320, 322, 325, 327, 328, 332, 335, 339, 341, 342, 347, 350, 354, 356, 358, 361, 365, 368, 372, 376, 381, 384, 388, 392, 397, 399, 401, 403, 405, 407, 409, 412, 413, 419, 423, 429, 431, 433, 439, 446, 451, 452, 456, 457, 462, 463, 468, 469, 475, 476, 481, 482, 488, 490, 491, 495, 496, 501, 502, 507, 508, 513, 514, 518, 519, 523, 524, 529, 530, 535, 538, 539, 543, 544, 549, 550, 555, 556, 561, 562, 568, 569, 575, 578, 581, 585, 586, 591, 592, 595, 596, 601, 603, 605, 606, 611, 612, 613, 620, 621, 626, 631, 632, 639, 640, 644, 645, 652, 657, 658, 666, 671, 672, 680, 686, 687, 696, 699, 703, 708, 712, 716, 717, 723, 724, 728, 729, 734, 735, 741, 742, 749, 750, 757, 758, 763, 764, 770, 771, 778, 779, 787, 788, 796, 799, 800, 805, 808, 809, 814, 818, 822, 823, 826, 828, 830, 833, 834, 839, 841, 843, 845, 847, 849, 851, 853, 855, 857, 859, 861, 865, 867, 869, 870, 876, 880, 884, 887, 890, 891, 896, 898, 901, 904, 907, 910, 913, 914, 918, 922, 926, 929, 934, 936, 941, 943, 947, 951, 955, 957, 961, 965, 967, 971, 975, 977, 981, 985, 989, 993, 995, 999, 1003, 1005, 1009, 1011, 1015, 1017, 1021, 1023, 1024, 1029, 1031, 1032, 1037, 1039, 1040, 1041, 1049, 1051, 1052, 1057, 1060, 1061, 1065, 1069, 1073, 1077, 1081, 1085, 1089, 1093, 1097, 1101, 1103, 1104, 1109 }; static const short yyrhs[] = { 100, 102, 0, 0, 101, 103, 0, 0, 107, 0, 108, 0, 51, 96, 0, 96, 0, 1, 96, 0, 108, 0, 47, 21, 96, 0, 96, 0, 1, 97, 0, 1, 96, 0, 45, 96, 0, 44, 96, 0, 46, 251, 96, 0, 46, 96, 0, 154, 0, 154, 105, 0, 126, 0, 126, 105, 0, 127, 0, 127, 105, 0, 0, 106, 105, 158, 0, 17, 98, 19, 99, 10, 97, 21, 96, 0, 17, 98, 20, 99, 10, 97, 21, 96, 0, 18, 21, 96, 0, 189, 0, 194, 0, 251, 96, 0, 109, 0, 112, 0, 104, 0, 36, 96, 0, 50, 96, 0, 0, 37, 90, 251, 91, 110, 186, 0, 0, 40, 90, 251, 91, 111, 188, 0, 0, 0, 41, 113, 90, 251, 91, 114, 116, 0, 0, 43, 115, 117, 41, 90, 251, 91, 96, 0, 42, 119, 118, 0, 103, 0, 103, 0, 103, 0, 0, 90, 251, 96, 120, 122, 0, 0, 90, 96, 121, 122, 0, 0, 251, 96, 123, 125, 0, 0, 96, 124, 125, 0, 251, 91, 0, 91, 0, 22, 0, 23, 0, 24, 0, 25, 0, 26, 0, 27, 0, 28, 0, 29, 0, 30, 0, 130, 0, 139, 0, 54, 0, 31, 0, 32, 0, 83, 0, 83, 129, 0, 83, 128, 0, 83, 129, 128, 0, 127, 0, 129, 127, 0, 0, 133, 21, 131, 98, 134, 97, 0, 0, 133, 132, 98, 134, 97, 0, 133, 21, 0, 34, 0, 35, 0, 135, 0, 134, 135, 0, 106, 136, 137, 96, 0, 126, 0, 126, 136, 0, 127, 0, 127, 136, 0, 138, 0, 137, 99, 138, 0, 144, 0, 55, 253, 0, 144, 55, 253, 0, 0, 33, 98, 140, 142, 97, 0, 0, 33, 21, 98, 141, 142, 97, 0, 33, 21, 0, 143, 0, 142, 99, 143, 0, 21, 0, 21, 67, 253, 0, 128, 145, 0, 145, 0, 21, 0, 21, 202, 0, 247, 0, 0, 98, 147, 148, 0, 149, 97, 0, 149, 99, 97, 0, 146, 0, 0, 149, 99, 150, 146, 0, 106, 136, 0, 106, 136, 152, 0, 128, 0, 153, 0, 128, 153, 0, 90, 152, 91, 0, 92, 93, 0, 153, 92, 93, 0, 92, 253, 93, 0, 153, 92, 253, 93, 0, 90, 91, 0, 153, 90, 91, 0, 90, 155, 91, 0, 153, 90, 155, 91, 0, 53, 0, 16, 0, 52, 0, 14, 0, 13, 0, 15, 0, 106, 105, 0, 0, 106, 105, 99, 156, 155, 0, 106, 105, 157, 0, 106, 105, 157, 99, 155, 0, 202, 0, 128, 0, 90, 128, 91, 90, 91, 0, 90, 128, 91, 90, 155, 91, 0, 90, 128, 91, 202, 0, 0, 21, 159, 182, 0, 0, 21, 202, 160, 182, 0, 0, 128, 21, 161, 182, 0, 0, 128, 21, 202, 162, 182, 0, 0, 21, 90, 163, 165, 0, 0, 128, 21, 90, 164, 165, 0, 96, 0, 0, 91, 166, 182, 0, 0, 155, 91, 167, 182, 0, 0, 197, 91, 168, 182, 0, 0, 197, 91, 169, 194, 0, 0, 91, 170, 194, 0, 0, 91, 172, 182, 0, 0, 155, 91, 173, 182, 0, 0, 197, 91, 174, 182, 0, 1, 98, 0, 0, 21, 176, 182, 0, 0, 21, 202, 177, 182, 0, 0, 21, 90, 178, 171, 0, 0, 128, 21, 179, 182, 0, 0, 128, 21, 202, 180, 182, 0, 0, 128, 21, 90, 181, 171, 0, 96, 184, 0, 185, 96, 0, 99, 184, 175, 0, 0, 185, 183, 99, 175, 0, 0, 67, 146, 0, 0, 103, 187, 38, 103, 0, 103, 0, 103, 0, 0, 21, 55, 190, 103, 0, 0, 0, 48, 191, 253, 192, 55, 103, 0, 0, 49, 55, 193, 103, 0, 98, 196, 101, 97, 0, 0, 98, 196, 203, 195, 101, 97, 0, 0, 106, 105, 21, 0, 0, 106, 105, 21, 99, 198, 197, 0, 106, 105, 21, 202, 0, 0, 106, 105, 21, 202, 99, 199, 197, 0, 106, 105, 128, 21, 0, 0, 106, 105, 128, 21, 99, 200, 197, 0, 106, 105, 128, 21, 202, 0, 0, 106, 105, 128, 21, 202, 99, 201, 197, 0, 92, 93, 0, 92, 3, 93, 0, 202, 92, 3, 93, 0, 106, 105, 205, 0, 106, 105, 96, 0, 0, 106, 105, 96, 204, 203, 0, 0, 21, 206, 216, 0, 0, 21, 202, 207, 216, 0, 0, 21, 90, 91, 208, 216, 0, 0, 21, 90, 155, 91, 209, 216, 0, 0, 21, 90, 197, 91, 210, 216, 0, 0, 128, 21, 211, 216, 0, 0, 128, 21, 202, 212, 216, 0, 0, 128, 21, 90, 91, 213, 216, 0, 0, 128, 21, 90, 155, 91, 214, 216, 0, 0, 128, 21, 90, 197, 91, 215, 216, 0, 96, 219, 0, 0, 96, 219, 217, 203, 0, 220, 96, 0, 0, 220, 96, 218, 203, 0, 99, 219, 205, 0, 220, 99, 205, 0, 0, 67, 146, 0, 222, 0, 91, 0, 247, 91, 0, 0, 247, 99, 223, 222, 0, 225, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 90, 251, 91, 0, 21, 0, 224, 0, 0, 226, 227, 92, 251, 93, 0, 226, 94, 21, 0, 226, 95, 21, 0, 226, 88, 0, 226, 89, 0, 0, 226, 90, 228, 221, 0, 226, 0, 72, 229, 0, 83, 229, 0, 86, 229, 0, 87, 229, 0, 81, 229, 0, 0, 82, 230, 229, 0, 88, 229, 249, 0, 89, 229, 249, 0, 39, 229, 0, 39, 90, 151, 91, 0, 229, 0, 90, 151, 91, 231, 0, 231, 0, 232, 83, 231, 0, 232, 84, 231, 0, 232, 85, 231, 0, 232, 0, 233, 81, 232, 0, 233, 82, 232, 0, 233, 0, 234, 79, 233, 0, 234, 80, 233, 0, 234, 0, 235, 75, 234, 0, 235, 77, 234, 0, 235, 76, 234, 0, 235, 78, 234, 0, 235, 0, 236, 73, 235, 0, 236, 74, 235, 0, 236, 0, 237, 72, 236, 0, 237, 0, 238, 71, 237, 0, 238, 0, 239, 70, 238, 0, 239, 0, 0, 240, 69, 241, 239, 0, 240, 0, 0, 242, 68, 243, 240, 0, 242, 0, 0, 0, 242, 56, 245, 251, 55, 246, 244, 0, 244, 0, 0, 229, 248, 67, 247, 0, 229, 250, 0, 0, 57, 249, 247, 0, 58, 249, 247, 0, 59, 249, 247, 0, 60, 249, 247, 0, 61, 249, 247, 0, 62, 249, 247, 0, 63, 249, 247, 0, 64, 249, 247, 0, 65, 249, 247, 0, 66, 249, 247, 0, 247, 0, 0, 251, 99, 252, 247, 0, 244, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, 154, 187, 193, 194, 200, 201, 206, 212, 213, 225, 226, 234, 235, 239, 258, 264, 270, 290, 311, 312, 313, 314, 315, 316, 319, 350, 354, 372, 374, 387, 389, 395, 437, 438, 439, 440, 450, 473, 488, 488, 503, 526, 536, 548, 548, 559, 580, 597, 614, 621, 624, 670, 670, 680, 682, 697, 697, 704, 706, 753, 772, 783, 794, 805, 816, 826, 842, 858, 874, 890, 891, 892, 921, 931, 944, 966, 967, 968, 972, 973, 977, 987, 1002, 1008, 1018, 1038, 1056, 1076, 1080, 1087, 1095, 1096, 1097, 1098, 1102, 1103, 1107, 1108, 1109, 1113, 1132, 1137, 1161, 1171, 1195, 1196, 1200, 1224, 1229, 1239, 1248, 1267, 1308, 1309, 1318, 1321, 1361, 1368, 1389, 1399, 1414, 1415, 1419, 1420, 1421, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1437, 1462, 1477, 1488, 1497, 1506, 1520, 1532, 1545, 1545, 1547, 1551, 1573, 1583, 1595, 1609, 1638, 1652, 1652, 1689, 1689, 1716, 1716, 1757, 1757, 1823, 1823, 1891, 1891, 1907, 1926, 1926, 1947, 1947, 1971, 1971, 1992, 2011, 2038, 2060, 2073, 2073, 2087, 2087, 2105, 2105, 2115, 2130, 2130, 2168, 2168, 2232, 2232, 2258, 2258, 2298, 2298, 2360, 2363, 2367, 2371, 2372, 2400, 2403, 2446, 2550, 2556, 2562, 2569, 2577, 2587, 2587, 2606, 2626, 2628, 2633, 2642, 2646, 2652, 2656, 2667, 2686, 2706, 2706, 2733, 2763, 2763, 2782, 2802, 2802, 2829, 2858, 2863, 2868, 2874, 2885, 2886, 2897, 2909, 2912, 2933, 2933, 2980, 2980, 2984, 2984, 2988, 2988, 2992, 2992, 3024, 3024, 3072, 3072, 3093, 3093, 3114, 3114, 3134, 3138, 3142, 3147, 3147, 3151, 3156, 3156, 3157, 3160, 3204, 3337, 3338, 3346, 3435, 3521, 3532, 3554, 3575, 3597, 3619, 3641, 3659, 3677, 3695, 3719, 3769, 3787, 3790, 3797, 3798, 3838, 3870, 3925, 3968, 4001, 4037, 4066, 4103, 4141, 4192, 4209, 4231, 4254, 4260, 4266, 4273, 4291, 4309, 4333, 4355, 4356, 4482, 4483, 4499, 4515, 4541, 4542, 4568, 4596, 4597, 4624, 4651, 4652, 4671, 4690, 4709, 4730, 4731, 4750, 4775, 4776, 4803, 4804, 4831, 4832, 4859, 4860, 4882, 4910, 4911, 4933, 4962, 4963, 4975, 4984, 4996, 4997, 5020, 5030, 5036, 5052, 5069, 5086, 5114, 5142, 5170, 5198, 5226, 5255, 5284, 5316, 5317, 5362, 5365 }; #endif #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) static const char * const yytname[] = { "$","error","$undefined.","NUMBERI", "NUMBERUI","NUMBERLI","NUMBERLUI","NUMBERD","NUMBERLD","NUMBERF","STRINGC","WSTRINGC", "NUMBERC","AUTO","STATIC","REGISTER","EXTERN","REMOTE","UNLOAD","INTRINSIC", "RPC","IDENT","INT","DOUBLE","FLOAT","CHAR","VOID","LONG","SHORT","SIGNED","UNSIGNED", "CONST","VOLATILE","ENUM","STRUCT","UNION","EXIT","IF","ELSE","SIZEOF","SWITCH", "WHILE","FOR","DO","CONTINUE","BREAK","RETURN","GOTO","CASE","DEFAULT","CSUSPEND", "RESUME","EXPORT_T","TYPEDEF","TYPENAME","':'","'?'","MUL_ASSIGN","DIV_ASSIGN", "MOD_ASSIGN","ADD_ASSIGN","SUB_ASSIGN","LEFT_ASSIGN","RIGHT_ASSIGN","AND_ASSIGN", "XOR_ASSIGN","OR_ASSIGN","'='","OR_A","AND_A","'|'","'^'","'&'","EQ_A","NE_A", "'<'","LQ","'>'","GQ","SHIL","SHIR","'+'","'-'","'*'","'/'","'%'","NEG_T","NEG_B", "PP","MM","'('","')'","'['","']'","'.'","PTR","';'","'}'","'{'","','","list_stat_0", "list_stat","stat_0","stat_1","jump_statement","declaration_specifiers","M", "declarations","statement","selection_statement","@1","@2","iteration_statement", "@3","@4","@5","while_stat","do_while_stat","for_stat","for","@6","@7","for_expr1", "@8","@9","for_expr2","type_specifier","type_qualifier","pointer","type_qualifier_list", "struct_or_union_specifier","@10","@11","struct_or_union","struct_declaration_list", "struct_declaration","specifier_qualifier_list","struct_declarator_list","struct_declarator", "enum_specifier","@12","@13","enumerator_list","enumerator","declarator","direct_declarator", "initializer","@14","initializer_list_complete","initializer_list","@15","type_name", "abstract_declarator","direct_abstract_declarator","storage_class_specifier", "list_type_spec","@16","list_dim_or_pointer","first_dekl","@17","@18","@19", "@20","@21","@22","func_first","@23","@24","@25","@26","@27","func_rest","@28", "@29","@30","list_dekl","@31","@32","@33","@34","@35","@36","initializer_optional", "@37","R","initialization","then","@38","switch_body","labeled_statement","@39", "@40","@41","@42","compound_statement","@43","N","list_form_param","@44","@45", "@46","@47","list_dim","list_loc_dekl","@48","list_loc_dekl_1","@49","@50","@51", "@52","@53","@54","@55","@56","@57","@58","initializer_optional_loc","@59","@60", "P","local_initialization","call","list_param","@61","primary_expression","ident", "postfix_expression","@62","@63","unary_expression","@64","cast_expression", "multiplicative_expression","additive_expression","shift_expression","relational_expression", "equality_expression","bit_AND_expression","exclusive_OR_expression","inclusive_OR_expression", "logical_AND_expression","@65","logical_OR_expression","@66","conditional_expression", "@67","@68","assignment_expression","@69","ae_empty","assignment_operator","expression", "@70","constant_expression", NULL }; #endif static const short yyr1[] = { 0, 100, 100, 101, 101, 102, 102, 102, 102, 102, 103, 103, 103, 103, 103, 104, 104, 104, 104, 105, 105, 105, 105, 105, 105, 106, 107, 107, 107, 107, 108, 108, 108, 108, 108, 108, 108, 108, 110, 109, 111, 109, 113, 114, 112, 115, 112, 112, 116, 117, 118, 120, 119, 121, 119, 123, 122, 124, 122, 125, 125, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 127, 127, 128, 128, 128, 128, 129, 129, 131, 130, 132, 130, 130, 133, 133, 134, 134, 135, 136, 136, 136, 136, 137, 137, 138, 138, 138, 140, 139, 141, 139, 139, 142, 142, 143, 143, 144, 144, 145, 145, 146, 147, 146, 148, 148, 149, 150, 149, 151, 151, 152, 152, 152, 153, 153, 153, 153, 153, 153, 153, 153, 153, 154, 154, 154, 154, 154, 154, 155, 156, 155, 155, 155, 157, 157, 157, 157, 157, 159, 158, 160, 158, 161, 158, 162, 158, 163, 158, 164, 158, 158, 166, 165, 167, 165, 168, 165, 169, 165, 170, 165, 172, 171, 173, 171, 174, 171, 171, 176, 175, 177, 175, 178, 175, 179, 175, 180, 175, 181, 175, 182, 182, 182, 183, 182, 184, 185, 187, 186, 186, 188, 190, 189, 191, 192, 189, 193, 189, 194, 195, 194, 196, 197, 198, 197, 197, 199, 197, 197, 200, 197, 197, 201, 197, 202, 202, 202, 203, 203, 204, 203, 206, 205, 207, 205, 208, 205, 209, 205, 210, 205, 211, 205, 212, 205, 213, 205, 214, 205, 215, 205, 216, 217, 216, 216, 218, 216, 216, 216, 219, 220, 221, 221, 222, 223, 222, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 225, 226, 227, 226, 226, 226, 226, 226, 228, 226, 229, 229, 229, 229, 229, 229, 230, 229, 229, 229, 229, 229, 231, 231, 232, 232, 232, 232, 233, 233, 233, 234, 234, 234, 235, 235, 235, 235, 235, 236, 236, 236, 237, 237, 238, 238, 239, 239, 240, 241, 240, 242, 243, 242, 244, 245, 246, 244, 247, 248, 247, 247, 249, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 251, 252, 251, 253 }; static const short yyr2[] = { 0, 2, 0, 2, 0, 1, 1, 2, 1, 2, 1, 3, 1, 2, 2, 2, 2, 3, 2, 1, 2, 1, 2, 1, 2, 0, 3, 8, 8, 3, 1, 1, 2, 1, 1, 1, 2, 2, 0, 6, 0, 6, 0, 0, 7, 0, 8, 3, 1, 1, 1, 0, 5, 0, 4, 0, 4, 0, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 1, 2, 0, 6, 0, 5, 2, 1, 1, 1, 2, 4, 1, 2, 1, 2, 1, 3, 1, 2, 3, 0, 5, 0, 6, 2, 1, 3, 1, 3, 2, 1, 1, 2, 1, 0, 3, 2, 3, 1, 0, 4, 2, 3, 1, 1, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 1, 1, 1, 1, 1, 1, 2, 0, 5, 3, 5, 1, 1, 5, 6, 4, 0, 3, 0, 4, 0, 4, 0, 5, 0, 4, 0, 5, 1, 0, 3, 0, 4, 0, 4, 0, 4, 0, 3, 0, 3, 0, 4, 0, 4, 2, 0, 3, 0, 4, 0, 4, 0, 4, 0, 5, 0, 5, 2, 2, 3, 0, 4, 0, 2, 0, 4, 1, 1, 0, 4, 0, 0, 6, 0, 4, 4, 0, 6, 0, 3, 0, 6, 4, 0, 7, 4, 0, 7, 5, 0, 8, 2, 3, 4, 3, 3, 0, 5, 0, 3, 0, 4, 0, 5, 0, 6, 0, 6, 0, 4, 0, 5, 0, 6, 0, 7, 0, 7, 2, 0, 4, 2, 0, 4, 3, 3, 0, 2, 1, 1, 2, 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 0, 5, 3, 3, 2, 2, 0, 4, 1, 2, 2, 2, 2, 2, 0, 3, 3, 3, 2, 4, 1, 4, 1, 3, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 3, 3, 1, 3, 3, 1, 3, 1, 3, 1, 3, 1, 0, 4, 1, 0, 4, 1, 0, 0, 7, 1, 0, 4, 2, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 0, 4, 1 }; static const short yydefact[] = { 2, 0, 0, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 0, 0, 281, 0, 0, 0, 0, 42, 0, 45, 0, 0, 0, 206, 0, 0, 0, 0, 0, 297, 0, 0, 0, 0, 0, 25, 8, 214, 1, 35, 0, 5, 6, 33, 34, 30, 31, 282, 269, 291, 303, 305, 309, 312, 315, 320, 323, 325, 327, 329, 332, 335, 339, 354, 0, 9, 0, 0, 204, 36, 0, 281, 25, 301, 0, 0, 0, 0, 0, 16, 15, 18, 0, 0, 209, 37, 7, 0, 292, 296, 0, 293, 294, 295, 343, 343, 0, 0, 0, 4, 139, 138, 140, 136, 61, 62, 63, 64, 65, 66, 67, 68, 69, 73, 74, 0, 86, 87, 137, 135, 72, 0, 21, 23, 70, 83, 71, 19, 287, 288, 289, 0, 0, 0, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 0, 342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 330, 336, 333, 32, 355, 0, 0, 29, 0, 0, 0, 0, 0, 53, 0, 0, 0, 12, 50, 10, 47, 49, 0, 17, 303, 357, 207, 0, 298, 299, 300, 91, 93, 121, 0, 280, 0, 0, 212, 104, 100, 151, 75, 163, 0, 26, 22, 24, 85, 0, 20, 0, 285, 286, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 306, 307, 308, 310, 311, 313, 314, 316, 318, 317, 319, 321, 322, 324, 326, 328, 0, 0, 0, 0, 0, 0, 205, 38, 302, 40, 0, 0, 51, 14, 13, 0, 0, 0, 210, 92, 94, 25, 0, 123, 122, 124, 304, 211, 3, 0, 4, 102, 0, 159, 0, 0, 153, 79, 77, 76, 155, 0, 25, 265, 290, 264, 0, 0, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 341, 331, 0, 334, 356, 0, 0, 0, 0, 43, 57, 54, 0, 0, 11, 0, 0, 131, 0, 0, 0, 127, 0, 125, 25, 0, 234, 231, 0, 230, 0, 0, 107, 0, 105, 25, 0, 227, 0, 198, 198, 152, 196, 0, 0, 80, 78, 161, 0, 157, 25, 0, 25, 88, 266, 267, 284, 337, 0, 0, 202, 39, 203, 41, 0, 0, 55, 52, 0, 208, 141, 126, 133, 129, 132, 0, 128, 0, 25, 236, 0, 25, 244, 213, 0, 0, 101, 0, 164, 0, 0, 160, 0, 228, 114, 199, 113, 193, 0, 194, 0, 0, 154, 25, 156, 0, 25, 0, 84, 89, 0, 0, 0, 0, 0, 48, 44, 60, 58, 0, 0, 0, 0, 142, 147, 144, 146, 134, 130, 238, 0, 0, 0, 0, 262, 262, 235, 0, 233, 25, 246, 0, 103, 108, 106, 0, 0, 141, 166, 168, 0, 181, 0, 195, 0, 229, 162, 158, 82, 111, 0, 0, 0, 95, 97, 110, 268, 338, 27, 28, 0, 59, 56, 46, 0, 25, 25, 0, 240, 242, 237, 263, 254, 0, 257, 0, 248, 0, 0, 0, 245, 165, 173, 215, 147, 0, 0, 0, 118, 115, 0, 185, 0, 183, 187, 197, 112, 98, 109, 90, 0, 0, 201, 0, 143, 145, 239, 0, 0, 25, 260, 25, 261, 0, 250, 252, 247, 216, 218, 221, 167, 169, 171, 116, 119, 0, 182, 0, 191, 0, 189, 96, 99, 25, 150, 241, 243, 256, 259, 249, 0, 0, 25, 219, 222, 224, 117, 0, 0, 174, 0, 186, 0, 184, 0, 188, 0, 148, 0, 251, 253, 0, 217, 25, 25, 225, 120, 180, 0, 176, 178, 192, 190, 149, 0, 220, 223, 25, 175, 0, 0, 0, 226, 177, 179, 0, 0 }; static const short yydefgoto[] = { 1, 201, 41, 275, 42, 124, 394, 44, 184, 46, 312, 313, 47, 78, 369, 81, 421, 187, 185, 80, 318, 258, 316, 425, 370, 423, 125, 126, 333, 286, 127, 288, 214, 128, 357, 358, 198, 467, 468, 129, 279, 336, 338, 339, 469, 470, 400, 455, 504, 505, 562, 100, 271, 272, 130, 395, 480, 430, 210, 282, 349, 353, 410, 340, 408, 396, 450, 500, 501, 502, 451, 566, 583, 594, 595, 458, 507, 542, 540, 544, 571, 569, 346, 405, 402, 347, 366, 419, 368, 48, 173, 86, 264, 192, 49, 277, 102, 397, 557, 578, 579, 592, 431, 203, 386, 334, 385, 437, 482, 522, 523, 446, 494, 528, 555, 556, 441, 524, 526, 487, 442, 291, 292, 415, 50, 51, 52, 136, 216, 53, 93, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 247, 64, 249, 65, 248, 416, 66, 147, 194, 148, 67, 250, 191 }; static const short yypact[] = {-32768, 589, -74,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768, -54, 43, 13, -14, -4, 498, 62,-32768, 71,-32768, 69, 87, 933,-32768, 153, 122, 127, 1236, 1236,-32768, 1236, 1236, 1236, 1236, 1236, 1288,-32768,-32768, -32768,-32768, 1366,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768, 121, 500,-32768, 118, 157, 164, 150, 180, 142, 189, 235, 239, 60,-32768,-32768, 123,-32768, 246, 216, -32768,-32768, 1288,-32768, 1288,-32768, 1288, 231, 978, 881, 881,-32768,-32768,-32768, 141, 1288,-32768,-32768,-32768, 1288, -32768,-32768, 1236,-32768,-32768,-32768,-32768,-32768, 715, 233, -29, 1399,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768, 9,-32768,-32768, -32768,-32768,-32768, 12, 1366, 1366,-32768, 301,-32768, 1366, -32768,-32768,-32768, 305, 306, 237,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768, 263,-32768, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288,-32768,-32768,-32768,-32768,-32768, 232, 234,-32768, 881, 27, 245, 32, 1288,-32768, 152, 214, 319,-32768,-32768,-32768,-32768,-32768, 300,-32768,-32768,-32768, -32768, 881,-32768,-32768,-32768, 715, 715, 37, 1288,-32768, 685, 1366,-32768, 244,-32768, 139, 10,-32768, 324,-32768, -32768,-32768, 249, 250,-32768, 1179,-32768,-32768, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, -32768,-32768,-32768, 118, 118, 157, 157, 164, 164, 164, 164, 150, 150, 180, 142, 189, 1288, 1288, 1288, 1288, 339, 340,-32768,-32768,-32768,-32768, 68, 1030,-32768,-32768, -32768, 255, 262, 298,-32768,-32768,-32768, 86, 1086, 182, -32768, 186,-32768,-32768,-32768, 17,-32768,-32768, 334,-32768, 5, 55, 265,-32768,-32768, 10, 187, 260,-32768,-32768, -32768,-32768, 90, 81,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768, 235, 6, 239,-32768, 264, 266, 881, 881,-32768,-32768,-32768, 163, 1030,-32768, 1288, 881,-32768, 1366, 269, 271,-32768, 272, 186, 273, 1142, 190, 1432, 345,-32768, 783, 334, 302, 20,-32768, 276, 277,-32768, 452,-32768,-32768,-32768, 275, 369, 55,-32768, -32768,-32768, 55, 265,-32768, 715, 278,-32768,-32768,-32768, -32768,-32768, 353, 355, 342,-32768,-32768,-32768, 881, 1199, -32768,-32768, 96,-32768, 80,-32768,-32768,-32768,-32768, 286, -32768, 285, 291, 265, 95,-32768, 194,-32768, 196, 1288, -32768, 334, 288, 1366, 292,-32768, 296,-32768,-32768,-32768, -32768,-32768, 11,-32768, 289, 297,-32768, 276,-32768, 55, 294, 8,-32768,-32768, 1288, 1288, 293, 304, 356,-32768, -32768,-32768,-32768, 105, 1199, 307, 310,-32768,-32768, 303, 265,-32768,-32768,-32768, 314, 315, 95, 452,-32768,-32768, -32768, 165,-32768, 316, 265, 95,-32768,-32768,-32768, 55, 311, 0,-32768, 313, 452, 204, 375,-32768, 11,-32768, -32768,-32768,-32768, 309, 1288, 377, 174,-32768, 357,-32768, -32768,-32768,-32768,-32768, 881,-32768,-32768,-32768, 322,-32768, -32768, 95,-32768,-32768,-32768,-32768, 1465, 14, 1498, 14, -32768, 323, 325, 95,-32768,-32768,-32768, -52, 394, 55, 55, 311,-32768,-32768, 200,-32768, 55, 265, 210,-32768, 265,-32768,-32768,-32768, 8, 1288,-32768, 211,-32768,-32768, -32768, 95, 95,-32768,-32768,-32768,-32768, 95,-32768,-32768, -32768,-32768, 72, 100,-32768,-32768,-32768,-32768, 320, 1108, -32768, 55,-32768, 55, 265,-32768,-32768, 327, 265,-32768, -32768,-32768,-32768,-32768, 95, 95,-32768,-32768,-32768, 106, -32768, 452, 321,-32768, 330,-32768, 331,-32768, 1108,-32768, 55,-32768, 333,-32768,-32768, 1366,-32768,-32768,-32768,-32768, -32768,-32768, 55,-32768,-32768,-32768,-32768,-32768, 28,-32768, -32768,-32768,-32768, 55, 55, 394,-32768,-32768,-32768, 425, -32768 }; static const short yypgoto[] = {-32768, 149,-32768, -71,-32768, -123, -1,-32768, 426,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768, 110,-32768,-32768, 4, -87, -93, -120,-32768,-32768, -32768,-32768,-32768, 75, -330, -172,-32768, -82,-32768,-32768, -32768, 98, 54,-32768, -19, -412,-32768,-32768,-32768,-32768, 374, 183, 184,-32768, -223,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768, 42,-32768,-32768,-32768,-32768,-32768, -117,-32768,-32768,-32768, 7,-32768,-32768,-32768,-32768,-32768, -32768, -163,-32768, 120,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768, -417,-32768,-32768, -372,-32768,-32768,-32768, -32768, -175, -371,-32768, -184,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768, -398,-32768,-32768, 30,-32768, -32768, 52,-32768,-32768,-32768,-32768,-32768,-32768, -17,-32768, -84, 138, 160, 77, 159, 312, 308, 317, 221, 223, -32768,-32768,-32768, -81,-32768,-32768, -170,-32768, 299,-32768, -2,-32768, -241 }; #define YYLAST 1552 static const short yytable[] = { 43, 76, 211, 212, 209, 190, 197, 215, 341, 183, 186, 436, 196, 91, 92, 443, 94, 95, 96, 97, 98, 498, 68, 85, 266, 267, 486, 414, 327, 464, 204, 283, 456, 206, 497, 331, 101, 99, 331, 485, 281, 116, 117, 503, 69, 325, 293, 532, 495, 498, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 362, 200, 465, 70, 231, 232, 233, 71, 189, 169, 174, 493, 101, 99, 176, 193, 179, 270, 276, 309, 414, 72, 207, 521, 537, 73, 285, 101, 382, 427, 207, 281, 207, 207, 207, 531, 207, 342, 428, 207, 202, 253, 197, 197, 169, 380, 205, 208, 196, 196, 207, 354, 332, 284, 273, 166, 391, 254, 392, 207, 265, 343, 256, 550, 551, 169, 268, 167, 269, 554, 169, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 270, 448, 581, 344, 77, 552, 345, 553, 384, 574, 575, 314, 435, 79, 438, 207, 348, 82, 351, 169, 567, 207, 427, 558, 281, 401, 361, 257, 268, 322, 269, 428, 169, 359, 189, 83, 412, 577, 407, 426, 190, 360, 409, 439, 281, 350, 440, 169, 476, 567, 348, 559, 375, 149, 150, 151, 169, 580, 590, 591, 87, 131, 132, 133, 445, -283, 162, 134, 135, 294, 88, 168, 597, 492, 169, 89, 512, 156, 157, 158, 159, 280, 189, 281, 189, 238, 239, 240, 241, 188, 152, 153, 169, 365, 367, 154, 155, 293, 307, 462, 259, 190, 374, 169, 189, 160, 161, 429, 317, 519, 520, 371, 163, 489, 169, 197, 490, 170, 171, 323, 401, 196, 514, 452, 268, 515, 269, 547, 329, 352, 330, 281, 383, 508, 281, 457, 444, 401, 281, 496, 356, 511, 234, 235, 466, 447, 506, 392, 281, 538, 420, 539, 543, 548, 281, 281, 525, 164, 527, 479, 165, 190, 260, 261, 172, 189, 236, 237, 317, 565, 373, 242, 243, 177, 213, 533, 199, 573, 217, 218, 323, 219, 230, 251, 499, 252, 545, 472, 255, 535, 536, 457, 262, 263, 278, 549, 541, 287, 565, -81, 289, 310, 311, 319, 320, 321, 356, 337, 356, 348, 355, 560, 376, 363, 377, 364, 379, 378, 387, 393, 424, 390, 398, 404, 406, 189, 417, 413, 418, 432, 433, 568, -200, 570, 434, 453, 190, 202, -172, 454, 459, 473, 460, 463, 401, 207, 475, 466, 509, 195, 464, 189, 474, 281, 481, 478, 517, 483, 484, 491, 587, 40, 356, -170, 516, 518, 529, 534, 530, 561, 572, 582, 593, 584, 585, 424, 588, 601, 335, 45, 372, 477, 411, 598, 599, 546, 389, 190, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 449, 513, 189, 175, 461, 324, 586, 589, 328, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 403, 510, 471, 306, 596, 488, 245, 308, 74, 244, 0, 0, 0, 0, 323, 323, 246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 189, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 202, 30, 202, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 0, 18, 34, 35, 36, 37, 38, 0, 0, 0, 0, 323, 0, 0, 399, 0, 0, 0, 0, 0, 576, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, -340, 0, 0, 30, 0, 0, 0, 0, 0, 0, 576, 576, 31, 32, 33, 0, 0, 34, 35, 36, 37, 75, 600, 2, 576, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -25, -25, -25, -25, 13, 14, 0, 0, 15, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, 16, 17, 0, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, -25, -25, -25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 0, 0, 34, 35, 36, 37, 38, 0, 0, 0, 0, 0, 39, 180, 40, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 17, 0, 18, 19, 20, 21, 22, 23, 24, 25, 181, 26, 27, 28, 0, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 123, 0, 34, 35, 36, 37, 38, 0, 0, 0, 0, 0, 182, 274, 40, 180, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 17, 0, 18, 19, 20, 21, 22, 23, 24, 25, 181, 26, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 0, 0, 34, 35, 36, 37, 38, 0, 0, 0, 0, 0, 182, 388, 40, 180, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 17, 0, 18, 19, 20, 21, 22, 23, 24, 25, 181, 26, 27, 28, 0, 0, 0, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 30, 74, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 0, 0, 34, 35, 36, 37, 38, 18, 0, 0, 0, 0, 182, 0, 40, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 18, 0, 34, 35, 36, 37, 38, 0, 0, 0, 0, 0, 84, 0, 0, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 30, 74, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 0, 0, 34, 35, 36, 37, 38, 18, 0, 0, 0, 0, 178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 30, 0, 0, 0, 0, 74, 0, 563, 0, 31, 32, 33, 0, 0, 34, 35, 36, 37, 38, -25, -25, -25, -25, 18, 315, 0, 0, 0, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 30, 0, -25, -25, -25, 74, 0, 0, 0, 31, 32, 33, 0, 0, 34, 35, 36, 37, 38, 0, 0, 326, 0, 18, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 564, 74, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 30, 0, 0, 0, 18, 0, 74, 0, 0, 31, 32, 33, 0, 0, 34, 35, 36, 37, 38, 0, 0, 381, 0, 0, 18, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 30, 0, 0, 0, 0, 0, 74, 0, 0, 31, 32, 33, 0, 0, 34, 35, 36, 37, 38, 290, 30, 0, 0, 0, 18, 0, 0, 0, 0, 31, 32, 33, 0, 0, 34, 35, 36, 37, 38, 422, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 30, 74, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 0, 0, 34, 35, 36, 37, 90, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 0, 0, 34, 35, 36, 37, 38, 103, 104, 105, 106, 0, 0, 0, 0, 0, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -25, -25, -25, -25, 0, 0, 121, 122, 123, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -232, -232, -232, -232, 0, 0, -25, -25, -25, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -255, -255, -255, -255, 0, 0, -232, -232, -232, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -258, -258, -258, -258, 0, 0, -255, -255, -255, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -258, -258, -258 }; static const short yycheck[] = { 1, 18, 125, 126, 124, 86, 99, 130, 3, 80, 81, 383, 99, 30, 31, 386, 33, 34, 35, 36, 37, 21, 96, 25, 196, 197, 438, 357, 269, 21, 21, 206, 21, 21, 451, 21, 38, 38, 21, 437, 92, 31, 32, 455, 98, 268, 216, 99, 446, 21, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 55, 91, 55, 21, 149, 150, 151, 55, 86, 99, 73, 444, 75, 75, 77, 93, 79, 198, 202, 250, 411, 96, 83, 482, 502, 90, 207, 90, 330, 90, 83, 92, 83, 83, 83, 494, 83, 93, 99, 83, 102, 173, 196, 197, 99, 329, 98, 96, 196, 197, 83, 287, 96, 207, 199, 56, 97, 91, 99, 83, 192, 67, 91, 522, 523, 99, 90, 68, 92, 528, 99, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 268, 390, 562, 96, 90, 524, 99, 526, 331, 555, 556, 91, 383, 90, 67, 83, 92, 96, 286, 99, 540, 83, 90, 99, 92, 343, 93, 177, 90, 91, 92, 99, 99, 91, 199, 96, 356, 557, 349, 91, 269, 99, 353, 96, 92, 286, 99, 99, 91, 569, 92, 99, 323, 83, 84, 85, 99, 99, 578, 579, 55, 88, 89, 90, 387, 92, 72, 94, 95, 219, 96, 96, 592, 444, 99, 96, 465, 75, 76, 77, 78, 90, 247, 92, 249, 156, 157, 158, 159, 96, 81, 82, 99, 312, 313, 79, 80, 415, 248, 410, 96, 330, 321, 99, 269, 73, 74, 375, 258, 480, 481, 96, 71, 96, 99, 356, 99, 19, 20, 268, 438, 356, 96, 394, 90, 99, 92, 516, 90, 90, 92, 92, 90, 456, 92, 403, 90, 455, 92, 450, 289, 464, 152, 153, 412, 97, 90, 99, 92, 97, 369, 99, 90, 90, 92, 92, 488, 70, 490, 427, 69, 390, 96, 97, 96, 330, 154, 155, 318, 540, 320, 160, 161, 90, 21, 498, 91, 548, 21, 21, 329, 92, 67, 99, 452, 99, 509, 416, 91, 500, 501, 459, 21, 41, 98, 518, 507, 21, 569, 98, 98, 10, 10, 96, 90, 55, 355, 21, 357, 92, 98, 534, 91, 97, 91, 97, 91, 93, 21, 91, 370, 67, 93, 96, 3, 390, 21, 97, 21, 91, 93, 542, 38, 544, 91, 91, 465, 386, 98, 91, 99, 96, 93, 97, 562, 83, 38, 515, 21, 98, 21, 416, 96, 92, 99, 96, 475, 91, 91, 91, 571, 98, 411, 98, 55, 91, 91, 21, 91, 97, 91, 98, 583, 91, 91, 425, 91, 0, 277, 1, 318, 425, 355, 594, 595, 515, 336, 516, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 392, 466, 465, 75, 408, 268, 569, 576, 270, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 345, 459, 415, 247, 589, 440, 163, 249, 21, 162, -1, -1, -1, -1, 480, 481, 164, -1, -1, -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, -1, -1, -1, 516, -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, -1, -1, 524, 72, 526, -1, -1, -1, -1, -1, -1, -1, 81, 82, 83, -1, 39, 86, 87, 88, 89, 90, -1, -1, -1, -1, 548, -1, -1, 98, -1, -1, -1, -1, -1, 557, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, -1, -1, 72, -1, -1, -1, -1, -1, -1, 578, 579, 81, 82, 83, -1, -1, 86, 87, 88, 89, 90, 0, 1, 592, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, -1, -1, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, -1, 39, 40, 41, 42, 43, 44, 45, 46, -1, 48, 49, 50, 51, 52, 53, 54, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, 83, -1, -1, 86, 87, 88, 89, 90, -1, -1, -1, -1, -1, 96, 1, 98, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, 37, -1, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, -1, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, 72, -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, 83, 54, -1, 86, 87, 88, 89, 90, -1, -1, -1, -1, -1, 96, 97, 98, 1, -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, 37, -1, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, 83, -1, -1, 86, 87, 88, 89, 90, -1, -1, -1, -1, -1, 96, 97, 98, 1, -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, 37, -1, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, -1, -1, -1, -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, 72, 21, -1, -1, -1, -1, -1, -1, -1, 81, 82, 83, -1, -1, 86, 87, 88, 89, 90, 39, -1, -1, -1, -1, 96, -1, 98, -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, -1, -1, -1, -1, 72, -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, 83, 39, -1, 86, 87, 88, 89, 90, -1, -1, -1, -1, -1, 96, -1, -1, -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, 72, 21, -1, -1, -1, -1, -1, -1, -1, 81, 82, 83, -1, -1, 86, 87, 88, 89, 90, 39, -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, -1, 72, -1, -1, -1, -1, 21, -1, 1, -1, 81, 82, 83, -1, -1, 86, 87, 88, 89, 90, 13, 14, 15, 16, 39, 96, -1, -1, -1, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, -1, 72, -1, 52, 53, 54, 21, -1, -1, -1, 81, 82, 83, -1, -1, 86, 87, 88, 89, 90, -1, -1, 93, -1, 39, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, 91, 21, -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, 72, -1, -1, -1, 39, -1, 21, -1, -1, 81, 82, 83, -1, -1, 86, 87, 88, 89, 90, -1, -1, 93, -1, -1, 39, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, 72, -1, -1, -1, -1, -1, 21, -1, -1, 81, 82, 83, -1, -1, 86, 87, 88, 89, 90, 91, 72, -1, -1, -1, 39, -1, -1, -1, -1, 81, 82, 83, -1, -1, 86, 87, 88, 89, 90, 91, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, 72, 21, -1, -1, -1, -1, -1, -1, -1, 81, 82, 83, -1, -1, 86, 87, 88, 89, 90, 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, 83, -1, -1, 86, 87, 88, 89, 90, 13, 14, 15, 16, -1, -1, -1, -1, -1, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13, 14, 15, 16, -1, -1, 52, 53, 54, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13, 14, 15, 16, -1, -1, 52, 53, 54, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13, 14, 15, 16, -1, -1, 52, 53, 54, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13, 14, 15, 16, -1, -1, 52, 53, 54, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, 53, 54 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/share/misc/bison.simple" /* This file comes from bison-1.28. */ /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ #ifndef YYSTACK_USE_ALLOCA #ifdef alloca #define YYSTACK_USE_ALLOCA #else /* alloca not defined */ #ifdef __GNUC__ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) #define YYSTACK_USE_ALLOCA #include #else /* not sparc */ /* We think this test detects Watcom and Microsoft C. */ /* This used to test MSDOS, but that is a bad idea since that symbol is in the user namespace. */ #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) #if 0 /* No need for malloc.h, which pollutes the namespace; instead, just don't use alloca. */ #include #endif #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) /* I don't know what this was needed for, but it pollutes the namespace. So I turned it off. rms, 2 May 1997. */ /* #include */ #pragma alloca #define YYSTACK_USE_ALLOCA #else /* not MSDOS, or __TURBOC__, or _AIX */ #if 0 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, and on HPUX 10. Eventually we can turn this on. */ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #endif /* __hpux */ #endif #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc */ #endif /* not GNU C */ #endif /* alloca not defined */ #endif /* YYSTACK_USE_ALLOCA not defined */ #ifdef YYSTACK_USE_ALLOCA #define YYSTACK_ALLOC alloca #else #define YYSTACK_ALLOC malloc #endif /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the switch. */ #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(token, value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { yychar = (token), yylval = (value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 #ifndef YYPURE #define YYLEX yylex() #endif #ifdef YYPURE #ifdef YYLSP_NEEDED #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) #else #define YYLEX yylex(&yylval, &yylloc) #endif #else /* not YYLSP_NEEDED */ #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, YYLEX_PARAM) #else #define YYLEX yylex(&yylval) #endif #endif /* not YYLSP_NEEDED */ #endif /* If nonreentrant, generate the variables here */ #ifndef YYPURE int yychar; /* the lookahead symbol */ YYSTYPE yylval; /* the semantic value of the */ /* lookahead symbol */ #ifdef YYLSP_NEEDED YYLTYPE yylloc; /* location data for the lookahead */ /* symbol */ #endif int yynerrs; /* number of parse errors so far */ #endif /* not YYPURE */ #if YYDEBUG != 0 int yydebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* YYINITDEPTH indicates the initial size of the parser's stacks */ #ifndef YYINITDEPTH #define YYINITDEPTH 200 #endif /* YYMAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ #if YYMAXDEPTH == 0 #undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif /* Define __yy_memcpy. Note that the size argument should be passed with type unsigned int, because that is what the non-GCC definitions require. With GCC, __builtin_memcpy takes an arg of type size_t, but it can handle unsigned int. */ #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (to, from, count) char *to; char *from; unsigned int count; { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (char *to, char *from, unsigned int count) { register char *t = to; register char *f = from; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif #line 217 "/usr/share/misc/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef YYPARSE_PARAM #ifdef __cplusplus #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM #define YYPARSE_PARAM_DECL #else /* not __cplusplus */ #define YYPARSE_PARAM_ARG YYPARSE_PARAM #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; #endif /* not __cplusplus */ #else /* not YYPARSE_PARAM */ #define YYPARSE_PARAM_ARG #define YYPARSE_PARAM_DECL #endif /* not YYPARSE_PARAM */ /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ #ifdef YYPARSE_PARAM int yyparse (void *); #else int yyparse (void); #endif #endif int yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { register int yystate; register int yyn; register short *yyssp; register YYSTYPE *yyvsp; int yyerrstatus; /* number of tokens to shift before error messages enabled */ int yychar1 = 0; /* lookahead token as an internal (translated) token number */ short yyssa[YYINITDEPTH]; /* the state stack */ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ short *yyss = yyssa; /* refer to the stacks thru separate pointers */ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ #ifdef YYLSP_NEEDED YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else #define YYPOPSTACK (yyvsp--, yyssp--) #endif int yystacksize = YYINITDEPTH; int yyfree_stacks = 0; #ifdef YYPURE int yychar; YYSTYPE yylval; int yynerrs; #ifdef YYLSP_NEEDED YYLTYPE yylloc; #endif #endif YYSTYPE yyval; /* the variable used to return */ /* semantic values from the action */ /* routines */ int yylen; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Starting parse\n"); #endif yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss - 1; yyvsp = yyvs; #ifdef YYLSP_NEEDED yylsp = yyls; #endif /* Push a new state, which is found in yystate . */ /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yynewstate: *++yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* Give user a chance to reallocate the stack */ /* Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; #ifdef YYLSP_NEEDED YYLTYPE *yyls1 = yyls; #endif /* Get the current used size of the three stacks, in elements. */ int size = yyssp - yyss + 1; #ifdef yyoverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ #ifdef YYLSP_NEEDED /* This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yyls1, size * sizeof (*yylsp), &yystacksize); #else yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yystacksize); #endif yyss = yyss1; yyvs = yyvs1; #ifdef YYLSP_NEEDED yyls = yyls1; #endif #else /* no yyoverflow */ /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) { yyerror("parser stack overflow"); if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 2; } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; #ifndef YYSTACK_USE_ALLOCA yyfree_stacks = 1; #endif yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); __yy_memcpy ((char *)yyss, (char *)yyss1, size * (unsigned int) sizeof (*yyssp)); yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * (unsigned int) sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); __yy_memcpy ((char *)yyls, (char *)yyls1, size * (unsigned int) sizeof (*yylsp)); #endif #endif /* no yyoverflow */ yyssp = yyss + size - 1; yyvsp = yyvs + size - 1; #ifdef YYLSP_NEEDED yylsp = yyls + size - 1; #endif #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Stack size increased to %d\n", yystacksize); #endif if (yyssp >= yyss + yystacksize - 1) YYABORT; } #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Entering state %d\n", yystate); #endif goto yybackup; yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* yychar is either YYEMPTY or YYEOF or a valid token in external form. */ if (yychar == YYEMPTY) { #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Reading a token: "); #endif yychar = YYLEX; } /* Convert token to internal form (in yychar1) for indexing tables with */ if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; yychar = YYEOF; /* Don't call YYLEX any more */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Now at end of input.\n"); #endif } else { yychar1 = YYTRANSLATE(yychar); #if YYDEBUG != 0 if (yydebug) { fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ #ifdef YYPRINT YYPRINT (stderr, yychar, yylval); #endif fprintf (stderr, ")\n"); } #endif } yyn += yychar1; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; yyn = yytable[yyn]; /* yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yyn < 0) { if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); #endif /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif /* count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /* Do the default action for the current state. */ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: yylen = yyr2[yyn]; if (yylen > 0) yyval = yyvsp[1-yylen]; /* implement default value of the action */ #if YYDEBUG != 0 if (yydebug) { int i; fprintf (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) fprintf (stderr, "%s ", yytname[yyrhs[i]]); fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 1: #line 159 "ys.y" { GEN_STOP; GENCODE; if (handle_main && ! no_compile_only) fix_and_clear_goto_table (); if (no_compile_only && (! handle_main || initialize_only)) { /* Code for initialization is executed even if the `main' function option was specified. */ fix_and_clear_goto_table (); #ifndef NOT_MSWIN_AND_YES_DOS VIRTUAL_MACHINE_SUSPENDED_RESET; #endif if (0 == exec ()) return 0; #ifndef NOT_MSWIN_AND_YES_DOS VIRTUAL_MACHINE_SUSPENDED_SET; #endif } else if (! s) return 0; initialize_only ? initialize_only-- : initialize_only; RESET_CODE_GENERATION_BEGINNING; #if 0 deallocate (BLOCK); #endif ; break;} case 6: #line 202 "ys.y" { if (handle_main) error_message (7003); ; break;} case 7: #line 207 "ys.y" { if (handle_main) error_message (7003); GEN_IRET; GENCODE; ; break;} case 9: #line 214 "ys.y" { yyerrok; /* I changed ";" to text. I don't know, if parse error is always reported correctly. */ error_message (1004, text); ; break;} case 11: #line 227 "ys.y" { if (no_compile_only) { has_goto (yyvsp[-1].mystring); GEN_JMP; GENCODE; } ; break;} case 13: #line 236 "ys.y" { yyerrok; error_message (1004, "}"); ; break;} case 14: #line 240 "ys.y" { yyerrok; error_message (1004, ";"); ; break;} case 15: #line 259 "ys.y" { brfix (); GEN_JMP; GENCODE; ; break;} case 16: #line 265 "ys.y" { cofix (); GEN_JMP; GENCODE; ; break;} case 17: #line 271 "ys.y" { if (VID == type_ac[set - 1]) error_message (6002); if ((-1 == l_value_cast ()) && (2 < set)) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; if (NULL != kodp3) { memmovex (kodp3 + sizeof(struct OPERAND_0_ma), kodp3, (unsigned int)(kodp - kodp3)); GEN_CLRTr; GENCODE; kodp3 = NULL; } retfix (); GEN_JMP; GENCODE; is_address = 0; ; break;} case 18: #line 291 "ys.y" { if (VID != type_ac[set]) error_message (6001); retfix (); GEN_JMP; GENCODE; ; break;} case 25: #line 320 "ys.y" { typeh[++type_spec_count] = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)typeh[type_spec_count], sizeof(struct internal_type)); typeh[type_spec_count]->attribute.function_class = SIMPLE; typeh[type_spec_count]->attribute.type_qualifier = UNDEF_TQ; typeh[type_spec_count]->attribute.arit_class = UNUSED_AC; typeh[type_spec_count]->attribute.storage_class_specifier = UNSPEC_SC; body_flag = 1; ; break;} case 27: #line 355 "ys.y" { typeh[++type_spec_count] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)typeh[type_spec_count], sizeof(struct internal_type)); /* typeh[type_spec_count]->attribute.arit_class = LIB;*/ typeh[type_spec_count]->attribute.function_class = LIB; body_flag = 1; if (-1 == has (yyvsp[-1].mystring)) COMPILE_ONLY; if (!load_new () && !load (&remote_ptr_C)) has_remote (remote_ptr_C); typeh[type_spec_count--] = NULL; ; break;} case 28: #line 373 "ys.y" {; break;} case 29: #line 375 "ys.y" { body_flag = 0; unload (); ; break;} case 31: #line 390 "ys.y" { GEN_ADDss(scope_offset_get ()); GENCODE; exit_scope (); ; break;} case 32: #line 399 "ys.y" { if (! LOCAL_P(type_com[set]) && ! REMOTE_P(type_com[set]) && ! MOV_P && ! POPA_P) error_message (6027); switch (type_ac[set]) { /* No breaks here. */ case INTEGER: case SIGNED_AC | INTEGER: case UNSIGNED_AC | INTEGER: case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: case LONG_AC | UNSIGNED_AC | INTEGER: case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: case SHORT_AC | UNSIGNED_AC | INTEGER: case DOUB: case LONG_AC | DOUB: case FLT: case CHR: case SIGNED_AC | CHR: case UNSIGNED_AC | CHR: GEN_POPAe; GENCODE; break; case VID: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GEN_CLRT;GENCODE;kodp3 = NULL; is_address = 0; SET_ADDRESS; TYPE_CLEAR; ; break;} case 36: #line 441 "ys.y" { GEN_HALT; GENCODE; ; break;} case 37: #line 451 "ys.y" { GEN_INTER; GENCODE; ; break;} case 38: #line 474 "ys.y" { SET_ADDRESS; TYPE_CLEAR; kodp3 = NULL; GEN_CLRT; GENCODE; fixp++; #ifdef DEBUG printfx ("fixp=%u\n",fixp); #endif fixp->if1.major = IF; fixp->if1.jz = kodp; GEN_JZ;GENCODE; is_address = 0; ; break;} case 40: #line 489 "ys.y" { if (INTEGER != type_ac[set]) error_message (1013); kodp3 = NULL; fixp++; #ifdef DEBUG printfx ("fixp=%u\n",fixp); #endif fixp->switch1.major = SWITCH; fixp->switch1.jz = NULL; fixp->switch1.def_use.def_flag = 0; fixp->switch1.jmp = kodp; GEN_JMP; GENCODE; is_address = 0; ; break;} case 41: #line 503 "ys.y" { search_duplicate_labels (); if (fixp->switch1.def_use.def_flag) /* Note: We have to backpatch the address for default label here because we don't know where the default label appeared. (In general case, it can be anywhere in the switch statement.) */ ((struct OPERAND_1_ma *)(fixp->switch1.jz))->adr = fixp->switch1.def_use.adr; else if (NULL != fixp->switch1.jz) ((struct OPERAND_1_ma *)(fixp->switch1.jz))->adr = kodp; fix_break_s (); SET_ADDRESS; TYPE_CLEAR; GEN_CLRT; GENCODE; fixp--; ; break;} case 42: #line 527 "ys.y" { fixp++; fixp->while1.major = WHILE; fixp->while1.jmp = kodp; #ifdef DEBUG printfx ("JMP jump to address=%u\n", fixp->while1.jmp); #endif ; break;} case 43: #line 537 "ys.y" { promote_type (); SET_ADDRESS; TYPE_CLEAR; kodp3 = NULL; GEN_CLRT; GENCODE; fixp->while1.jz = kodp; GEN_JZ; GENCODE; is_address = 0; ; break;} case 45: #line 549 "ys.y" { fixp++; fixp->while1.major = WHILE; fixp->while1.jmp = kodp; #ifdef DEBUG printfx ("JMP jump to address=%u\n", fixp->while1.jmp); #endif ; break;} case 46: #line 560 "ys.y" { promote_type (); SET_ADDRESS; TYPE_CLEAR; kodp3 = NULL; GEN_CLRT; GENCODE; fixp->while1.jz = kodp; GEN_JZ; GENCODE; ((struct OPERAND_1_ma *)kodp)->adr = fixp->while1.jmp; GEN_JMP; GENCODE; ((struct OPERAND_1_ma *)(fixp->while1.jz))->adr = kodp; #ifdef DEBUG printfx ("JZ jump to address=%u\n",kodp); #endif fix_break_w (); fix_cont_w (); fixp--; is_address = 0; ; break;} case 47: #line 581 "ys.y" { ((struct OPERAND_1_ma *)kodp)->adr = fixp->for1.jmp3; GEN_JMP; GENCODE; if (NULL != fixp->for1.jn) ((struct OPERAND_1_ma *)(fixp->for1.jn))->adr = kodp; fix_break_f (); fix_cont_f (); fixp--; ; break;} case 48: #line 598 "ys.y" { ((struct OPERAND_1_ma *)kodp)->adr = fixp->while1.jmp; GEN_JMP; GENCODE; ((struct OPERAND_1_ma *)(fixp->while1.jz))->adr = kodp; #ifdef DEBUG printfx ("JZ jump to address=%u\n", kodp); #endif fix_break_w (); fix_cont_w (); fixp--; ; break;} case 51: #line 625 "ys.y" { if (! LOCAL_P(type_com[set]) && ! REMOTE_P(type_com[set]) && ! MOV_P && ! POPA_P) error_message (6027); switch (type_ac[set]) { /* No breaks here. */ case INTEGER: case SIGNED_AC | INTEGER: case UNSIGNED_AC | INTEGER: case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: case LONG_AC | UNSIGNED_AC | INTEGER: case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: case SHORT_AC | UNSIGNED_AC | INTEGER: case DOUB: case LONG_AC | DOUB: case FLT: case CHR: case SIGNED_AC | CHR: case UNSIGNED_AC | CHR: GEN_POPAe; GENCODE; break; case VID: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } kodp3 = NULL; GEN_CLRT; GENCODE; fixp++; #ifdef DEBUG printfx ("fixp=%u\n", fixp); #endif fixp->for1.major = FOR; jmp1 = kodp; is_address = 0; SET_ADDRESS; TYPE_CLEAR; ; break;} case 53: #line 671 "ys.y" { fixp++; #ifdef DEBUG printfx ("fixp=%u\n", fixp); #endif fixp->for1.major = FOR; jmp1 = kodp; ; break;} case 55: #line 683 "ys.y" { promote_type (); SET_ADDRESS; TYPE_CLEAR; kodp3 = NULL; GEN_CLRT; GENCODE; fixp->for1.jn = kodp; GEN_JZ; GENCODE; fixp->for1.jmp2 = kodp; GEN_JMP; GENCODE; fixp->for1.jmp3 = kodp; is_address = 0; ; break;} case 57: #line 698 "ys.y" { fixp->for1.jn = NULL; fixp->for1.jmp2 = NULL; fixp->for1.jmp3 = kodp; ; break;} case 59: #line 707 "ys.y" { if (! LOCAL_P(type_com[set]) && ! REMOTE_P(type_com[set]) && ! MOV_P && ! POPA_P) error_message (6027); switch (type_ac[set]) { /* No breaks here. */ case INTEGER: case SIGNED_AC | INTEGER: case UNSIGNED_AC | INTEGER: case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: case LONG_AC | UNSIGNED_AC | INTEGER: case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: case SHORT_AC | UNSIGNED_AC | INTEGER: case DOUB: case LONG_AC | DOUB: case FLT: case CHR: case SIGNED_AC | CHR: case UNSIGNED_AC | CHR: GEN_POPAe; GENCODE; break; case VID: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } kodp3 = NULL; GEN_CLRT; GENCODE; if (NULL != fixp->for1.jn) { ((struct OPERAND_1_ma *)kodp)->adr = jmp1; GEN_JMP; GENCODE; ((struct OPERAND_1_ma *)(fixp->for1.jmp2))->adr = kodp; } is_address = 0; SET_ADDRESS; TYPE_CLEAR; ; break;} case 60: #line 754 "ys.y" { if (NULL != fixp->for1.jn) { fixp->for1.jmp3 = jmp1; ((struct OPERAND_1_ma *)(fixp->for1.jmp2))->adr = kodp; } else fixp->for1.jmp3 = kodp; ; break;} case 61: #line 773 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output->attribute.arit_class += INTEGER; else typeh[type_spec_count]->attribute.arit_class += INTEGER; typedef_f = 0; ; break;} case 62: #line 784 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output->attribute.arit_class += DOUB; else typeh[type_spec_count]->attribute.arit_class += DOUB; typedef_f = 0; ; break;} case 63: #line 795 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output->attribute.arit_class += FLT; else typeh[type_spec_count]->attribute.arit_class += FLT; typedef_f = 0; ; break;} case 64: #line 806 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output->attribute.arit_class += CHR; else typeh[type_spec_count]->attribute.arit_class += CHR; typedef_f = 0; ; break;} case 65: #line 817 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output->attribute.arit_class += VID; else typeh[type_spec_count]->attribute.arit_class += VID; typedef_f = 0; ; break;} case 66: #line 827 "ys.y" { if (LONG_P(typeh[type_spec_count])) error_message (6025, "long"); if (TYPEDEF_P(typeh[type_spec_count])) { if (LONG_P(typeh[type_spec_count]->output)) error_message (6025, "long"); typeh[type_spec_count]->output->attribute.arit_class += LONG_AC; } else typeh[type_spec_count]->attribute.arit_class += LONG_AC; typedef_f = 0; ; break;} case 67: #line 843 "ys.y" { if (SHORT_P(typeh[type_spec_count])) error_message (6025, "short"); if (TYPEDEF_P(typeh[type_spec_count])) { if (SHORT_P(typeh[type_spec_count]->output)) error_message (6025, "short"); typeh[type_spec_count]->output->attribute.arit_class += SHORT_AC; } else typeh[type_spec_count]->attribute.arit_class += SHORT_AC; typedef_f = 0; ; break;} case 68: #line 859 "ys.y" { if (SIGNED_P(typeh[type_spec_count])) error_message (6025, "signed"); if (TYPEDEF_P(typeh[type_spec_count])) { if (SIGNED_P(typeh[type_spec_count]->output)) error_message (6025, "signed"); typeh[type_spec_count]->output->attribute.arit_class += SIGNED_AC; } else typeh[type_spec_count]->attribute.arit_class += SIGNED_AC; typedef_f = 0; ; break;} case 69: #line 875 "ys.y" { if (UNSIGNED_P(typeh[type_spec_count])) error_message (6025, "unsigned"); if (TYPEDEF_P(typeh[type_spec_count])) { if (UNSIGNED_P(typeh[type_spec_count]->output)) error_message (6025, "unsigned"); typeh[type_spec_count]->output->attribute.arit_class += UNSIGNED_AC; } else typeh[type_spec_count]->attribute.arit_class += UNSIGNED_AC; typedef_f = 0; ; break;} case 72: #line 893 "ys.y" { struct ident_tab_loc *ptr; int unused_p = UNUSED_P(typeh[type_spec_count]); if (! unused_p) { error_message (1001); COMPILE_ONLY; } ptr = point_loc (yyvsp[0].mystring); if (NULL == ptr) { struct ident_tab *ptr1 = point (yyvsp[0].mystring); if (NULL == ptr1) COMPILE_ONLY; if (unused_p) typeh[type_spec_count] = ptr1->type->output; else ptr1->type = typeh[type_spec_count]; } else if (unused_p) typeh[type_spec_count] = ptr->type->output; else ptr->type = typeh[type_spec_count]; typedef_f = 0; ; break;} case 73: #line 922 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output->attribute.type_qualifier = CONST_TQ; else typeh[type_spec_count]->attribute.type_qualifier = CONST_TQ; ; break;} case 74: #line 932 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output->attribute.type_qualifier = VOLATILE_TQ; else typeh[type_spec_count]->attribute.type_qualifier = VOLATILE_TQ; ; break;} case 75: #line 945 "ys.y" { struct internal_type *help; help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; typeh[type_spec_count]->output->attribute.arit_class = POINTER; } else { help->output = typeh[type_spec_count]; typeh[type_spec_count] = help; typeh[type_spec_count]->attribute.function_class = POINTER; } ; break;} case 81: #line 978 "ys.y" { typedef_f = 0; body_flag = 0; if (-1 == has_tag (0, yyvsp[0].mystring)) COMPILE_ONLY; struct_union_enum_name[++suen_count] = text; if (param_flag) error_message (6009); ; break;} case 82: #line 988 "ys.y" { proc_name_text[++proc] = struct_union_enum_name[suen_count]; if (-1 == add_spec_to_tag ()) COMPILE_ONLY; if (-1 == add_ident_to_tag ()) COMPILE_ONLY; proc_name_text[proc--] = NULL; body_flag = 1; text = struct_union_enum_name[suen_count]; if (-1 == has_tag (0, text)) COMPILE_ONLY; struct_union_enum_name[suen_count--] = NULL; ; break;} case 83: #line 1003 "ys.y" { typedef_f = 0; if (param_flag) error_message (6009); ; break;} case 84: #line 1009 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output->input = l_type_spec; else typeh[type_spec_count]->input = l_type_spec; l_type_spec = NULL; if (param_flag) error_message (6009); ; break;} case 85: #line 1019 "ys.y" { typedef_f = 0; body_flag = 0; if (-1 == (body_flag = has_tag (1, yyvsp[0].mystring))) COMPILE_ONLY; if (TYPEDEF_P(typeh[type_spec_count])) { if (0 == typeh[type_spec_count]->output->attribute.memory_size) struct_union_enum_name[++suen_count] = yyvsp[0].mystring; } else { if (0 == typeh[type_spec_count]->attribute.memory_size) struct_union_enum_name[++suen_count] = yyvsp[0].mystring; } ; break;} case 86: #line 1039 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) { typeh[type_spec_count]->output->attribute.arit_class = INTEGER; typeh[type_spec_count]->output->attribute.function_class = STRUCT_FC; } else { typeh[type_spec_count]->attribute.arit_class = INTEGER; typeh[type_spec_count]->attribute.function_class = STRUCT_FC; } ; break;} case 87: #line 1057 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) { typeh[type_spec_count]->output->attribute.arit_class = INTEGER; typeh[type_spec_count]->output->attribute.function_class = UNION_FC; } else { typeh[type_spec_count]->attribute.arit_class = INTEGER; typeh[type_spec_count]->attribute.function_class = UNION_FC; } ; break;} case 88: #line 1077 "ys.y" { typeh[type_spec_count--] = NULL; ; break;} case 89: #line 1081 "ys.y" { typeh[type_spec_count--] = NULL; ; break;} case 90: #line 1088 "ys.y" { if (1 < suen_count) struct_union_enum_name[suen_count--] = NULL; ; break;} case 100: #line 1114 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) { typeh[type_spec_count]->output->attribute.arit_class = INTEGER; typeh[type_spec_count]->output->attribute.function_class = ENUM_FC; } else { typeh[type_spec_count]->attribute.arit_class = INTEGER; typeh[type_spec_count]->attribute.function_class = ENUM_FC; } if (param_flag) error_message (6009); typedef_f = 0; ; break;} case 101: #line 1133 "ys.y" { enum_value = 0; ; break;} case 102: #line 1138 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) { typeh[type_spec_count]->output->attribute.arit_class = INTEGER; typeh[type_spec_count]->output->attribute.function_class = ENUM_FC; } else { typeh[type_spec_count]->attribute.arit_class = INTEGER; typeh[type_spec_count]->attribute.function_class = ENUM_FC; } body_flag = 0; if (-1 == has_tag (0, yyvsp[-1].mystring)) COMPILE_ONLY; struct_union_enum_name[++suen_count] = text; if (param_flag) error_message (6009); typedef_f = 0; ; break;} case 103: #line 1162 "ys.y" { enum_value = 0; body_flag = 1; text = struct_union_enum_name[suen_count]; if (-1 == has_tag (0, text)) COMPILE_ONLY; struct_union_enum_name[suen_count--] = NULL; ; break;} case 104: #line 1172 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) { typeh[type_spec_count]->output->attribute.arit_class = INTEGER; typeh[type_spec_count]->output->attribute.function_class = ENUM_FC; } else { typeh[type_spec_count]->attribute.arit_class = INTEGER; typeh[type_spec_count]->attribute.function_class = ENUM_FC; } body_flag = 0; if (-1 == (body_flag = has_tag (1, yyvsp[0].mystring))) COMPILE_ONLY; typedef_f = 0; ; break;} case 107: #line 1201 "ys.y" { typeh[++type_spec_count] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)typeh[type_spec_count], sizeof(struct internal_type)); typeh[type_spec_count]->attribute.arit_class = INTEGER; typeh[type_spec_count]->attribute.function_class = SIMPLE; typeh[type_spec_count]->attribute.type_qualifier = CONST_TQ; typeh[type_spec_count]->attribute.storage_class_specifier = UNSPEC_SC; typeh[type_spec_count]->attribute.domain = (char *) allocate (sizeof (int), PERM); init_zero ((char *)typeh[type_spec_count]->attribute.domain, sizeof(struct internal_type)); *(int *)typeh[type_spec_count]->attribute.domain = enum_value++; /* The enum_value++ has to be at the end. */ put2table (yyvsp[0].mystring, typeh[type_spec_count]); typeh[type_spec_count--] = NULL; ; break;} case 108: #line 1225 "ys.y" {fprintfx (stderr, "Assignment in an enumeration not supported yet\n");; break;} case 109: #line 1230 "ys.y" { /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(typeh[type_spec_count])) { typeh[type_spec_count] = typeh[type_spec_count]->output; } ; break;} case 111: #line 1249 "ys.y" { struct internal_type *type = typeh[type_spec_count]; if (TYPEDEF_P(type)) type = type->output; if ((STRUCT_P (type) || UNION_P (type)) && suen_count > 1 && (0 == type->attribute.memory_size)) { error_message (1025); COMPILE_ONLY; } type->field_name = yyvsp[0].mystring; if (-1 == add_to_spec_list ()) COMPILE_ONLY; type->field_name = NULL; if (-1 == add_to_ident_list ()) COMPILE_ONLY; ; break;} case 112: #line 1268 "ys.y" { struct internal_type *help, *arch, *type = typeh[type_spec_count]; if (TYPEDEF_P(type)) type = type->output; if ((STRUCT_P (type) || UNION_P (type)) && suen_count > 1 && (0 == type->attribute.memory_size)) { error_message (1025); COMPILE_ONLY; } help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); help->output = type; help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; help->field_name = yyvsp[-1].mystring; arch = type; if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output = help; else typeh[type_spec_count] = help; if (-1 == add_to_spec_list ()) COMPILE_ONLY; help->field_name = NULL; if (-1 == add_to_ident_list ()) COMPILE_ONLY; count_arr = 1; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; DELETE_SUBSCRIPT; ; break;} case 114: #line 1310 "ys.y" { if (! initialize_only && ! full_bracketing) { GEN_MOVaa; GENCODE; } full_bracketing++; ; break;} case 116: #line 1322 "ys.y" { int bracket_initializers; if (dim[poc] >= 0 && full_bracketing == poc) { bracket_initializers = initialize_only % dim[poc - 1]; if (bracket_initializers) initialize_only += (dim[poc - 1] - bracket_initializers); aggregate_memory_size[full_bracketing] = 0; } if (ARRAY_P(type_com[set])) { int i = initialize_only, j = get_field_size (&i, type_com[set]), k = aggregate_memory_size[full_bracketing]; i = j * initialize_only; while (0 != k && i >= k) k += aggregate_memory_size[full_bracketing]; for (; i < k; i++) { GEN_MOVaa; GENCODE; GEN_PUSHAIi(i); GENCODE; GEN_MOVar; GENCODE; GEN_PUSHAIc((char)0); GENCODE; GEN_MOVc; GENCODE; GEN_POPAe; GENCODE; } if (j * initialize_only < k) initialize_only = k / j; } if (full_bracketing > 1 && ! type_com[set]->attribute.memory_size ) type_com[set]->attribute.memory_size += 2 * aggregate_memory_size[full_bracketing]; aggregate_memory_size[full_bracketing] = 0; full_bracketing--; ; break;} case 117: #line 1362 "ys.y" { full_bracketing--; ; break;} case 118: #line 1369 "ys.y" { if (set > 1) { initialize_only++; if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; move2lvalue (); GEN_POPAe; GENCODE; } if (ARRAY_P(type_com[set]) || STRUCT_P(type_com[set])) { aggregate_memory_size[full_bracketing] = get_memory_size (full_bracketing, type_com[set], initialize_only); } ; break;} case 119: #line 1390 "ys.y" { int i = initialize_only, j = get_field_size (&i, type_com[set]); GEN_MOVaa; GENCODE; GEN_PUSHAIi(initialize_only * j); GENCODE; GEN_MOVar; GENCODE; ; break;} case 120: #line 1399 "ys.y" { if (set > 1) { initialize_only++; if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; move2lvalue (); GEN_POPAe; GENCODE; } ; break;} case 135: #line 1438 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) error_message (6025, "typedef"); else if (! UNSPEC_P(typeh[type_spec_count])) error_message (2017); typeh[type_spec_count]->attribute.storage_class_specifier = TYPEDEF_SC; typeh[++type_spec_count] = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)typeh[type_spec_count], sizeof(struct internal_type)); typeh[type_spec_count]->attribute.function_class = SIMPLE; typeh[type_spec_count]->attribute.type_qualifier = UNDEF_TQ; typeh[type_spec_count]->attribute.arit_class = UNUSED_AC; typeh[type_spec_count]->attribute.storage_class_specifier = UNSPEC_SC; typeh[type_spec_count - 1]->output = typeh[type_spec_count]; typeh[type_spec_count--] = NULL; ; break;} case 136: #line 1463 "ys.y" { /* * Internal types: */ if (EXTERN_P(typeh[type_spec_count])) error_message (6025, "extern"); else if (! UNSPEC_P(typeh[type_spec_count]) && ! EXPORT_P(typeh[type_spec_count])) error_message (2017); typeh[type_spec_count]->attribute.storage_class_specifier = EXTERN_SC; typeh[type_spec_count]->attribute.function_class = REMOTE_F; ; break;} case 137: #line 1478 "ys.y" { /* * Internal types: */ typeh[type_spec_count]->attribute.export_type = YES; typeh[type_spec_count]->attribute.storage_class_specifier = EXPORT_SC; typeh[type_spec_count]->attribute.function_class = REMOTE_F; ; break;} case 138: #line 1489 "ys.y" { if (STATIC_P(typeh[type_spec_count])) error_message (6025, "static"); else if (! UNSPEC_P(typeh[type_spec_count])) error_message (2017); typeh[type_spec_count]->attribute.storage_class_specifier = STATIC_SC; ; break;} case 139: #line 1498 "ys.y" { if (AUTO_P(typeh[type_spec_count])) error_message (6025, "auto"); else if (! UNSPEC_P(typeh[type_spec_count])) error_message (2017); typeh[type_spec_count]->attribute.storage_class_specifier = AUTO_SC; ; break;} case 140: #line 1507 "ys.y" { if (REGISTER_P(typeh[type_spec_count])) error_message (6025, "register"); else if (! UNSPEC_P(typeh[type_spec_count])) error_message (2017); typeh[type_spec_count]->attribute.storage_class_specifier = REGISTER_SC; ; break;} case 141: #line 1521 "ys.y" { if (! UNSPEC_P(typeh[type_spec_count])) error_message (2018, "type name"); check_spec_constr (typeh[type_spec_count], "type name"); if (!body_flag) error_message (6009); if (-1 == add_to_spec_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; ; break;} case 142: #line 1533 "ys.y" { if (! UNSPEC_P(typeh[type_spec_count])) error_message (2018, "type name"); check_spec_constr (typeh[type_spec_count], "type name"); if (!body_flag) error_message (6009); if (-1 == add_to_spec_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; ; break;} case 146: #line 1552 "ys.y" { struct internal_type *help; if (! UNSPEC_P(typeh[type_spec_count])) error_message (2018, "type name"); check_spec_constr (typeh[type_spec_count], "type name"); if (!body_flag) error_message (6009); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); help->output = typeh[type_spec_count]; typeh[type_spec_count] = help; typeh[type_spec_count]->attribute.function_class = ARRAY; if (-1 == add_to_spec_list ()) COMPILE_ONLY; count_arr = 1; typeh[type_spec_count--] = NULL; DELETE_SUBSCRIPT; ; break;} case 147: #line 1574 "ys.y" { check_spec_constr (typeh[type_spec_count], "type name"); if (!body_flag) error_message (6009); if (-1 == add_to_spec_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; ; break;} case 148: #line 1584 "ys.y" { typeh[type_spec_count]->attribute.function_class = LOCAL; check_spec_constr (typeh[type_spec_count], "type name"); if (!body_flag) error_message (6009); if (-1 == add_to_spec_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; ; break;} case 149: #line 1596 "ys.y" { check_spec_constr (typeh[type_spec_count], "type name"); if (!body_flag) error_message (6009); typeh[type_spec_count]->attribute.function_class = LOCAL; typeh[type_spec_count]->input = l_type_spec; l_type_spec = NULL; if (-1 == add_to_spec_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; ; break;} case 150: #line 1610 "ys.y" { struct internal_type *help; typeh[type_spec_count]->attribute.function_class = LOCAL; check_spec_constr (typeh[type_spec_count], "type name"); if (!body_flag) error_message (6009); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); help->output = typeh[type_spec_count]; typeh[type_spec_count] = help; typeh[type_spec_count]->attribute.function_class = ARRAY; if (-1 == add_to_spec_list ()) COMPILE_ONLY; count_arr = 1; typeh[type_spec_count--] = NULL; DELETE_SUBSCRIPT; ; break;} case 151: #line 1639 "ys.y" { if (VOID_P(typeh[type_spec_count])) error_message (1012); check_spec_constr (typeh[type_spec_count], yyvsp[0].mystring); put2table (yyvsp[0].mystring, typeh[type_spec_count]); align_memory (&kodp, sizeof(int)); SET_CODE_GENERATION_BEGINNING; body_flag = 0; lookup_tables (yyvsp[0].mystring, variable); typedef_f = 1; ; break;} case 153: #line 1653 "ys.y" { struct internal_type *help, *arch; if (VOID_P(typeh[type_spec_count])) error_message (1012); check_spec_constr (typeh[type_spec_count], yyvsp[-1].mystring); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; } help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; put2table (yyvsp[-1].mystring, typeh[type_spec_count]); count_arr = 1; SET_CODE_GENERATION_BEGINNING; body_flag = 0; lookup_tables (yyvsp[-1].mystring, variable); initialize_only = 0; typedef_f = 1; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; ; break;} case 155: #line 1690 "ys.y" { struct internal_type *type; check_spec_constr (typeh[type_spec_count], yyvsp[0].mystring); put2table (yyvsp[0].mystring, typeh[type_spec_count]); if (TYPEDEF_P(typeh[type_spec_count])) type = typeh[type_spec_count]->output; else type = typeh[type_spec_count]; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(type)) { type = type->output; } if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (type); else typeh[type_spec_count] = type; align_memory (&kodp, sizeof(int)); SET_CODE_GENERATION_BEGINNING; body_flag = 0; lookup_tables (yyvsp[0].mystring, variable); typedef_f = 1; ; break;} case 157: #line 1717 "ys.y" { struct internal_type *help, *arch; check_spec_constr (typeh[type_spec_count], yyvsp[-1].mystring); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; } help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; put2table (yyvsp[-1].mystring, typeh[type_spec_count]); count_arr = 1; SET_CODE_GENERATION_BEGINNING; body_flag = 0; lookup_tables (yyvsp[-1].mystring, variable); if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(arch)) arch = arch->output; DELETE_SUBSCRIPT; typedef_f = 1; ; break;} case 159: #line 1758 "ys.y" { struct internal_type *help, *arch; /* * Internal types: */ check_spec_constr (typeh[type_spec_count], yyvsp[-1].mystring); if (STRUCT_P(typeh[type_spec_count]) || UNION_P(typeh[type_spec_count])) error_message (6034); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; if (REMOTE_P(typeh[type_spec_count]->output->output)) typeh[type_spec_count]->output->attribute.function_class = REMOTE_F; else typeh[type_spec_count]->output->attribute.function_class = LOCAL; typeh[type_spec_count]->output->attribute.export_type = typeh[type_spec_count]->output->output->attribute.export_type; type_ac[++set] = typeh[type_spec_count]->output->output->attribute.arit_class; type_com[set] = typeh[type_spec_count]->output; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; if (REMOTE_P(typeh[type_spec_count]->output)) typeh[type_spec_count]->attribute.function_class = REMOTE_F; else typeh[type_spec_count]->attribute.function_class = LOCAL; typeh[type_spec_count]->attribute.export_type = typeh[type_spec_count]->output->attribute.export_type; type_ac[++set] = typeh[type_spec_count]->output->attribute.arit_class; type_com[set] = typeh[type_spec_count]; } body_flag = 0; put2table (yyvsp[-1].mystring, typeh[type_spec_count]); variable[set].adr = kodp; variable[set].name = yyvsp[-1].mystring; count[++proc] = -(3 * sizeof (char *)); proc_name_text[proc] = text; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; param_flag = 1; enter_scope (); func_def_s (); typedef_f = 1; ; break;} case 161: #line 1824 "ys.y" { struct internal_type *help,*arch; /* * Internal types: */ check_spec_constr (typeh[type_spec_count], yyvsp[-1].mystring); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; if (REMOTE_P(typeh[type_spec_count]->output->output)) typeh[type_spec_count]->output->attribute.function_class = REMOTE_F; else typeh[type_spec_count]->output->attribute.function_class = LOCAL; typeh[type_spec_count]->output->attribute.export_type = typeh[type_spec_count]->output->output->attribute.export_type; type_ac[++set] = typeh[type_spec_count]->output->output->attribute.arit_class; type_com[set] = typeh[type_spec_count]->output; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; if (REMOTE_P(typeh[type_spec_count]->output)) typeh[type_spec_count]->attribute.function_class = REMOTE_F; else typeh[type_spec_count]->attribute.function_class = LOCAL; typeh[type_spec_count]->attribute.export_type = typeh[type_spec_count]->output->attribute.export_type; type_ac[++set] = typeh[type_spec_count]->output->attribute.arit_class; type_com[set] = typeh[type_spec_count]; } body_flag = 0; put2table (yyvsp[-1].mystring, typeh[type_spec_count]); variable[set].adr = kodp; variable[set].name = yyvsp[-1].mystring; count[++proc] = -(3 * sizeof (char *)); proc_name_text[proc] = text; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(arch)) arch = arch->output; param_flag = 1; enter_scope (); func_def_s (); typedef_f = 1; ; break;} case 163: #line 1892 "ys.y" { if (!(ENUM_P (typeh[type_spec_count]) || UNION_P (typeh[type_spec_count]) || STRUCT_P (typeh[type_spec_count]))) { error_message (6010); error_message (6011); SET_ADDRESS; TYPE_CLEAR; } typeh[type_spec_count--] = NULL; typedef_f = 1; ; break;} case 164: #line 1908 "ys.y" { count[proc] = 0; #if 0 SET_ADDRESS; TYPE_CLEAR; #endif #if 0 free (proc_name_text[proc--]); #else proc_name_text[proc--] = NULL; #endif param_flag = 0; func_def_r (); exit_scope (); typedef_f = 1; ; break;} case 166: #line 1927 "ys.y" { count[proc] = 0; if (-1 == add_spec_to_has ()) COMPILE_ONLY; #if 0 SET_ADDRESS; TYPE_CLEAR; #endif #if 0 free (proc_name_text[proc--]); #else proc_name_text[proc--] = NULL; #endif param_flag = 0; func_def_r (); exit_scope (); typedef_f = 1; ; break;} case 168: #line 1948 "ys.y" { count[proc] = 0; if (-1 == add_spec_to_has ()) COMPILE_ONLY; if (-1 == add_ident_to_has ()) COMPILE_ONLY; clear_hash_tab_declaration (); #if 0 SET_ADDRESS; TYPE_CLEAR; #endif #if 0 free (proc_name_text[proc--]); #else proc_name_text[proc--] = NULL; #endif param_flag = 0; func_def_r (); exit_scope (); typedef_f = 1; ; break;} case 170: #line 1972 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) error_message (1036, "typedef"); else if (REGISTER_P(typeh[type_spec_count])) error_message (1036, "register"); else if (AUTO_P(typeh[type_spec_count])) error_message (1036, "auto"); if (-1 == add_spec_to_has ()) COMPILE_ONLY; if (-1 == add_ident_to_has ()) COMPILE_ONLY; FUNCTION_PROLOGUE; count[proc] = -count[proc]; count[proc] %= sizeof (double); count[proc] = -count[proc]; typeh[type_spec_count--] = NULL; param_flag = 0; typedef_f = 1; ; break;} case 171: #line 1992 "ys.y" { text = proc_name_text[proc]; fix_ret (); FUNCTION_EPILOGUE; SET_ADDRESS; TYPE_CLEAR; body_flag = 1; put2table (text, NULL); body_flag = 0; SET_CODE_GENERATION_BEGINNING; exit_scope (); #if 0 free (proc_name_text[proc--]); #else proc_name_text[proc] = NULL; count[proc--] = 0; #endif ; break;} case 172: #line 2012 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) error_message (1036, "typedef"); else if (REGISTER_P(typeh[type_spec_count])) error_message (1036, "register"); else if (AUTO_P(typeh[type_spec_count])) error_message (1036, "auto"); typeh[++type_spec_count] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)typeh[type_spec_count], sizeof(struct internal_type)); typeh[type_spec_count]->attribute.arit_class = VID; if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == add_spec_to_has ()) COMPILE_ONLY; FUNCTION_PROLOGUE; count[proc] = -count[proc]; count[proc] %= sizeof (double); count[proc] = -count[proc]; typeh[type_spec_count--] = NULL; param_flag = 0; typedef_f = 1; ; break;} case 173: #line 2038 "ys.y" { text = proc_name_text[proc]; fix_ret (); FUNCTION_EPILOGUE; SET_ADDRESS; TYPE_CLEAR; body_flag = 1; put2table (text, NULL); body_flag = 0; SET_CODE_GENERATION_BEGINNING; exit_scope (); #if 0 free (proc_name_text[proc--]); #else proc_name_text[proc] = NULL; count[proc--] = 0; #endif typeh[type_spec_count--] = NULL; typedef_f = 1; ; break;} case 174: #line 2061 "ys.y" { count[proc] = 0; #if 0 free (proc_name_text[proc--]); #else proc_name_text[proc--] = NULL; #endif param_flag = 0; typedef_f = 1; ; break;} case 176: #line 2074 "ys.y" { count[proc] = 0; if (-1 == add_spec_to_has ()) COMPILE_ONLY; #if 0 free (proc_name_text[proc--]); #else proc_name_text[proc--] = NULL; #endif typedef_f = 1; ; break;} case 178: #line 2088 "ys.y" { count[proc] = 0; if (-1 == add_spec_to_has ()) COMPILE_ONLY; if (-1 == add_ident_to_has ()) COMPILE_ONLY; clear_hash_tab_declaration (); #if 0 free (proc_name_text[proc--]); #else proc_name_text[proc--] = NULL; #endif param_flag = 0; typedef_f = 1; ; break;} case 180: #line 2106 "ys.y" { yyerrok; proc--; error_message (1004, "{"); proc++; ; break;} case 181: #line 2116 "ys.y" { if (VOID_P(typeh[type_spec_count])) error_message (1012); check_spec_constr (typeh[type_spec_count], yyvsp[0].mystring); body_flag = 1; put2table (yyvsp[0].mystring, typeh[type_spec_count]); align_memory (&kodp, sizeof(int)); SET_CODE_GENERATION_BEGINNING; body_flag = 0; lookup_tables (yyvsp[0].mystring, variable); typedef_f = 1; ; break;} case 183: #line 2131 "ys.y" { struct internal_type *help,*arch; if (VOID_P(typeh[type_spec_count])) error_message (1012); check_spec_constr (typeh[type_spec_count], yyvsp[-1].mystring); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; } help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; body_flag = 1; put2table (yyvsp[-1].mystring, typeh[type_spec_count]); count_arr = 1; SET_CODE_GENERATION_BEGINNING; body_flag = 0; lookup_tables (yyvsp[-1].mystring, variable); if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; DELETE_SUBSCRIPT; typedef_f = 1; ; break;} case 185: #line 2169 "ys.y" { struct internal_type *help, *arch; /* * Internal types: */ check_spec_constr (typeh[type_spec_count], yyvsp[-1].mystring); if (STRUCT_P(typeh[type_spec_count]) || UNION_P(typeh[type_spec_count])) error_message (6034); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { typedef_copy (typeh[type_spec_count]->output); help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; if (REMOTE_P(typeh[type_spec_count]->output->output)) typeh[type_spec_count]->output->attribute.function_class = REMOTE_F; else typeh[type_spec_count]->output->attribute.function_class = LOCAL; typeh[type_spec_count]->output->attribute.export_type = typeh[type_spec_count]->output->output->attribute.export_type; type_ac[++set] = typeh[type_spec_count]->output->output->attribute.arit_class; type_com[set] = typeh[type_spec_count]->output; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; if (REMOTE_P(typeh[type_spec_count]->output)) typeh[type_spec_count]->attribute.function_class = REMOTE_F; else typeh[type_spec_count]->attribute.function_class = LOCAL; typeh[type_spec_count]->attribute.export_type = typeh[type_spec_count]->output->attribute.export_type; type_ac[++set] = typeh[type_spec_count]->output->attribute.arit_class; type_com[set] = typeh[type_spec_count]; } body_flag = 0; put2table (yyvsp[-1].mystring, typeh[type_spec_count]); variable[set].adr = kodp; variable[set].name = yyvsp[-1].mystring; count[++proc] = -(3 * sizeof (char *)); proc_name_text[proc] = text; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; typedef_f = 1; ; break;} case 187: #line 2233 "ys.y" { struct internal_type *type; check_spec_constr (typeh[type_spec_count], yyvsp[0].mystring); body_flag = 1; put2table (yyvsp[0].mystring, typeh[type_spec_count]); if (TYPEDEF_P(typeh[type_spec_count])) type = typeh[type_spec_count]->output; else type = typeh[type_spec_count]; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(type)) type = type->output; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (type); else typeh[type_spec_count] = type; align_memory (&kodp, sizeof(int)); SET_CODE_GENERATION_BEGINNING; body_flag = 0; lookup_tables (yyvsp[0].mystring, variable); typedef_f = 1; ; break;} case 189: #line 2259 "ys.y" { struct internal_type *help,*arch; check_spec_constr (typeh[type_spec_count], yyvsp[-1].mystring); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; } help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; body_flag = 1; put2table (yyvsp[-1].mystring, typeh[type_spec_count]); count_arr = 1; SET_CODE_GENERATION_BEGINNING; body_flag = 0; lookup_tables (yyvsp[-1].mystring, variable); if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(arch)) arch = arch->output; DELETE_SUBSCRIPT; typedef_f = 1; ; break;} case 191: #line 2299 "ys.y" { struct internal_type *help, *arch; /* * Internal types: */ check_spec_constr (typeh[type_spec_count], yyvsp[-1].mystring); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; if (REMOTE_P(typeh[type_spec_count]->output->output)) typeh[type_spec_count]->output->attribute.function_class = REMOTE_F; else typeh[type_spec_count]->output->attribute.function_class = LOCAL; typeh[type_spec_count]->output->attribute.export_type = typeh[type_spec_count]->output->output->attribute.export_type; type_ac[++set] = typeh[type_spec_count]->output->output->attribute.arit_class; type_com[set] = typeh[type_spec_count]->output; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; if (REMOTE_P(typeh[type_spec_count]->output)) typeh[type_spec_count]->attribute.function_class = REMOTE_F; else typeh[type_spec_count]->attribute.function_class = LOCAL; typeh[type_spec_count]->attribute.export_type = typeh[type_spec_count]->output->attribute.export_type; type_ac[++set] = typeh[type_spec_count]->output->attribute.arit_class; type_com[set] = typeh[type_spec_count]; } body_flag = 0; put2table (yyvsp[-1].mystring, typeh[type_spec_count]); variable[set].adr = kodp; variable[set].name = yyvsp[-1].mystring; count[++proc] = -(3 * sizeof (char *)); proc_name_text[proc] = text; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(arch)) arch = arch->output; typedef_f = 1; ; break;} case 193: #line 2364 "ys.y" { typeh[type_spec_count--] = NULL; ; break;} case 194: #line 2368 "ys.y" { typeh[type_spec_count--] = NULL; ; break;} case 196: #line 2373 "ys.y" { /* The following block looks like semantic of the list_stat_0 rule. The code for the initialization of the parsed variable must be executed. */ { GEN_STOP; GENCODE; if (no_compile_only && (! handle_main || initialize_only)) { #ifndef NOT_MSWIN_AND_YES_DOS VIRTUAL_MACHINE_SUSPENDED_RESET; #endif if (0 == exec ()) return 0; #ifndef NOT_MSWIN_AND_YES_DOS VIRTUAL_MACHINE_SUSPENDED_SET; #endif } else if (! s) return 0; initialize_only ? initialize_only-- : initialize_only; RESET_CODE_GENERATION_BEGINNING; } ; break;} case 198: #line 2404 "ys.y" { if (! LOCAL_P(type_com[set]) && ! REMOTE_P(type_com[set]) && ! TYPEDEF_P(type_com[set])) { switch (type_ac[set]) { /* No breaks here. */ case INTEGER: case SIGNED_AC | INTEGER: case UNSIGNED_AC | INTEGER: case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: case LONG_AC | UNSIGNED_AC | INTEGER: case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: case SHORT_AC | UNSIGNED_AC | INTEGER: case DOUB: case LONG_AC | DOUB: case FLT: case CHR: case SIGNED_AC | CHR: case UNSIGNED_AC | CHR: GEN_POPAe; GENCODE; break; case VID: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GEN_CLRT; GENCODE; } kodp3 = NULL; is_address = 0; SET_ADDRESS; TYPE_CLEAR; DELETE_SUBSCRIPT; ; break;} case 199: #line 2447 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) error_message (1037, text); #if 0 if (! CONST_P(type_com[set])) error_message (); #endif if (SIMPLE_P(type_com[set])) { if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; move2lvalue (); } else if (ARRAY_P(type_com[set])) { DELETE_SUBSCRIPT; if (CONST_P(type_com[set])) { type_com[set - 1]->attribute.domain = type_com[set]->attribute.domain; if (! type_com[set - 1]->attribute.memory_size) type_com[set - 1]->attribute.memory_size = type_com[set]->attribute.memory_size; if (CHAR_P(type_com[set]->output)) { register int i; for (i = 0; i < type_com[set]->attribute.memory_size; i++) { GEN_PUSHAIi(i); GENCODE; GEN_MOVbv; GENCODE; } } if (! POINTER_P(type_com[set])) { GEN_POPAe; GENCODE; SET_ADDRESS; TYPE_CLEAR; } } else if (! type_com[set]->attribute.memory_size) { type_com[set]->attribute.memory_size = initialize_only * type_com[set]->output->attribute.memory_size; dim[++poc] = initialize_only; put_array_subscript (&type_com[set]); } kodp1 += type_com[set]->attribute.memory_size; align_memory (&kodp1, sizeof(int)); if (set > 1 && POINTER_P(type_com[set - 1])) { /* MOV two pointers as long ints. */ GEN_MOVli; GENCODE; SET_ADDRESS; TYPE_CLEAR; } } switch (type_ac[set]) { /* No breaks here. */ case INTEGER: case SIGNED_AC | INTEGER: case UNSIGNED_AC | INTEGER: case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: case LONG_AC | UNSIGNED_AC | INTEGER: case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: case SHORT_AC | UNSIGNED_AC | INTEGER: case DOUB: case LONG_AC | DOUB: case FLT: case CHR: case SIGNED_AC | CHR: case UNSIGNED_AC | CHR: GEN_POPAe; GENCODE; break; case VID: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return 0; } GEN_CLRT; GENCODE; kodp3 = NULL; is_address = 0; SET_ADDRESS; TYPE_CLEAR; if (handle_main) initialize_only = 1; ; break;} case 200: #line 2551 "ys.y" { fixp->if1.jmp = kodp; GEN_JMP; GENCODE; ((struct OPERAND_1_ma *)(fixp->if1.jz))->adr = kodp; ; break;} case 201: #line 2557 "ys.y" { ((struct OPERAND_1_ma *)(fixp->if1.jmp))->adr = kodp; fixp--; ; break;} case 202: #line 2563 "ys.y" { ((struct OPERAND_1_ma *)(fixp->if1.jz))->adr = kodp; fixp--; ; break;} case 204: #line 2578 "ys.y" { if (no_compile_only) has_label (yyvsp[-1].mystring); ; break;} case 206: #line 2588 "ys.y" { char *help = fixp->switch1.jmp; /* If in the previous case label was not a break */ /* state jump over the next */ /* to the . */ fixp->switch1.jmp = kodp; GEN_JMP; GENCODE; if (fixp->switch1.jz != NULL) /* If previous case label was not successful jump here. */ ((struct OPERAND_1_ma *)(fixp->switch1.jz))->adr = kodp; if (help != NULL) /* Backpatch the address for the first case label. */ ((struct OPERAND_1_ma *)help)->adr = kodp; GEN_MOVaa; GENCODE; /* Reloading top of the arithmetical */ /* stack with the same value for */ /* the purpose of comparing. */ it_is_in_case = 1; ; break;} case 207: #line 2606 "ys.y" { if ((CONST_TQ != type_com[set]->attribute.type_qualifier) || (INTEGER != type_ac[set])) error_message (1014); SET_ADDRESS; TYPE_CLEAR; GEN_EQi; GENCODE; GEN_CLRT; GENCODE; /* Clears arithmetical stack. */ /* We know that the value is */ /* still there. */ fixp->switch1.jz = kodp; GEN_JZ; GENCODE; /* Jump here if the next statements should apply. */ /* In the previous case label there was not */ /* the break statement. */ ((struct OPERAND_1_ma *)fixp->switch1.jmp)->adr = kodp; fixp->switch1.jmp = NULL; it_is_in_case = 0; ; break;} case 209: #line 2629 "ys.y" { add_default_to_fixp (); ; break;} case 212: #line 2647 "ys.y" { ERROR_P; GEN_SUBss(scope_offset_set (count[proc])); GENCODE; count[proc] = 0; ; break;} case 214: #line 2657 "ys.y" { enter_scope (); ; break;} case 215: #line 2668 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) error_message (2018, yyvsp[0].mystring); else if (EXTERN_P(typeh[type_spec_count])) error_message (2018, yyvsp[0].mystring); check_spec_constr (typeh[type_spec_count], yyvsp[0].mystring); if (!body_flag) error_message (6009); if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == has_loc (PAR, yyvsp[0].mystring)) COMPILE_ONLY; if (-1 == add_to_ident_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; typedef_f = 1; ; break;} case 216: #line 2687 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) error_message (2018, yyvsp[-1].mystring); else if (EXTERN_P(typeh[type_spec_count])) error_message (2018, yyvsp[-1].mystring); check_spec_constr (typeh[type_spec_count], yyvsp[-1].mystring); if (!body_flag) error_message (6009); if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == has_loc (PAR, yyvsp[-1].mystring)) COMPILE_ONLY; if (-1 == add_to_ident_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; typedef_f = 1; ; break;} case 218: #line 2707 "ys.y" { struct internal_type *help; if (TYPEDEF_P(typeh[type_spec_count])) error_message (2018, yyvsp[-1].mystring); else if (EXTERN_P(typeh[type_spec_count])) error_message (2018, yyvsp[-1].mystring); check_spec_constr (typeh[type_spec_count], yyvsp[-1].mystring); help = (struct internal_type *) allocate (sizeof (struct internal_type), BLOCK); init_zero ((char *)help, sizeof(struct internal_type)); help->output = typeh[type_spec_count]; help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; typeh[type_spec_count] = help; if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == has_loc (PAR, yyvsp[-1].mystring)) COMPILE_ONLY; if (-1 == add_to_ident_list ()) COMPILE_ONLY; count_arr = 1; typeh[type_spec_count--] = NULL; DELETE_SUBSCRIPT; typedef_f = 1; ; break;} case 219: #line 2734 "ys.y" { struct internal_type *help; if (TYPEDEF_P(typeh[type_spec_count])) error_message (2018, yyvsp[-2].mystring); else if (EXTERN_P(typeh[type_spec_count])) error_message (2018, yyvsp[-2].mystring); check_spec_constr (typeh[type_spec_count], yyvsp[-2].mystring); help = (struct internal_type *) allocate (sizeof (struct internal_type), BLOCK); init_zero ((char *)help, sizeof(struct internal_type)); help->output = typeh[type_spec_count]; help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; typeh[type_spec_count] = help; if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == has_loc (PAR, yyvsp[-2].mystring)) COMPILE_ONLY; while (-1 != dim[poc]) dim[poc--] = -1; if (-1 == add_to_ident_list ()) COMPILE_ONLY; count_arr = 1; typeh[type_spec_count--] = NULL; DELETE_SUBSCRIPT; typedef_f = 1; ; break;} case 221: #line 2764 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) error_message (2018, yyvsp[0].mystring); else if (EXTERN_P(typeh[type_spec_count])) error_message (2018, yyvsp[0].mystring); check_spec_constr (typeh[type_spec_count], yyvsp[0].mystring); if (!body_flag) error_message (6009); if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == has_loc (PAR, yyvsp[0].mystring)) COMPILE_ONLY; if (-1 == add_to_ident_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; typedef_f = 1; ; break;} case 222: #line 2783 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) error_message (2018, yyvsp[-1].mystring); else if (EXTERN_P(typeh[type_spec_count])) error_message (2018, yyvsp[-1].mystring); check_spec_constr (typeh[type_spec_count], yyvsp[-1].mystring); if (!body_flag) error_message (6009); if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == has_loc (PAR, yyvsp[-1].mystring)) COMPILE_ONLY; if (-1 == add_to_ident_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; typedef_f = 1; ; break;} case 224: #line 2803 "ys.y" { struct internal_type *help; if (TYPEDEF_P(typeh[type_spec_count])) error_message (2018, yyvsp[-1].mystring); else if (EXTERN_P(typeh[type_spec_count])) error_message (2018, yyvsp[-1].mystring); check_spec_constr (typeh[type_spec_count], yyvsp[-1].mystring); help = (struct internal_type *) allocate (sizeof (struct internal_type), BLOCK); init_zero ((char *)help, sizeof(struct internal_type)); help->output = typeh[type_spec_count]; help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; typeh[type_spec_count] = help; if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == has_loc (PAR, yyvsp[-1].mystring)) COMPILE_ONLY; if (-1 == add_to_ident_list ()) COMPILE_ONLY; count_arr = 1; typeh[type_spec_count--] = NULL; DELETE_SUBSCRIPT; typedef_f = 1; ; break;} case 225: #line 2830 "ys.y" { struct internal_type *help; if (TYPEDEF_P(typeh[type_spec_count])) error_message (2018, yyvsp[-2].mystring); else if (EXTERN_P(typeh[type_spec_count])) error_message (2018, yyvsp[-2].mystring); check_spec_constr (typeh[type_spec_count], yyvsp[-2].mystring); help = (struct internal_type *) allocate (sizeof (struct internal_type), BLOCK); init_zero ((char *)help, sizeof(struct internal_type)); help->output = typeh[type_spec_count]; help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; typeh[type_spec_count] = help; if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == has_loc (PAR, yyvsp[-2].mystring)) COMPILE_ONLY; while (-1 != dim[poc]) dim[poc--] = -1; if (-1 == add_to_ident_list ()) COMPILE_ONLY; count_arr = 1; typeh[type_spec_count--] = NULL; DELETE_SUBSCRIPT; typedef_f = 1; ; break;} case 227: #line 2864 "ys.y" { dim[++poc] = NOT_DEFINED; ; break;} case 228: #line 2869 "ys.y" { count_arr *= yyvsp[-1].myint; dim[++poc] = yyvsp[-1].myint; ; break;} case 229: #line 2875 "ys.y" { count_arr *= yyvsp[-1].myint; dim[++poc] = yyvsp[-1].myint; ; break;} case 231: #line 2887 "ys.y" { if (!(ENUM_P (typeh[type_spec_count]) || UNION_P (typeh[type_spec_count]) || STRUCT_P (typeh[type_spec_count]))) { error_message (6010); error_message (6011); } typeh[type_spec_count--] = NULL; ; break;} case 232: #line 2898 "ys.y" { if (!(ENUM_P (typeh[type_spec_count]) || UNION_P (typeh[type_spec_count]) || STRUCT_P (typeh[type_spec_count]))) { error_message (6010); error_message (6011); } typeh[type_spec_count--] = NULL; ; break;} case 234: #line 2913 "ys.y" { check_spec_constr (typeh[type_spec_count], yyvsp[0].mystring); if (VOID_P(typeh[type_spec_count])) error_message (1012); if (STATIC_P(typeh[type_spec_count])) { jmp1 = kodp; GEN_JMP; GENCODE; if (UNUSED_P(typeh[type_spec_count])) typeh[type_spec_count]->attribute.arit_class = INTEGER; } if (-1 == has_loc (VAR, yyvsp[0].mystring)) COMPILE_ONLY; if (STATIC_P(typeh[type_spec_count])) ((struct OPERAND_1_ma *)jmp1)->adr = kodp; lookup_tables (yyvsp[0].mystring, variable); ; break;} case 236: #line 2934 "ys.y" { struct internal_type *help, *arch; check_spec_constr (typeh[type_spec_count], yyvsp[-1].mystring); if (VOID_P(typeh[type_spec_count])) error_message (1012); help = (struct internal_type *) allocate (sizeof (struct internal_type), BLOCK); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; } help->attribute.function_class = ARRAY; if (STATIC_P(help->output)) { jmp1 = kodp; GEN_JMP; GENCODE; if (help->output->attribute.arit_class == UNUSED_AC) help->output->attribute.arit_class = INTEGER; help->attribute.storage_class_specifier = STATIC_SC; } if (-1 == has_loc (VAR, yyvsp[-1].mystring)) COMPILE_ONLY; if (STATIC_P(help->output)) ((struct OPERAND_1_ma *)jmp1)->adr = kodp; count_arr = 1; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; DELETE_SUBSCRIPT; lookup_tables (yyvsp[-1].mystring, variable); ; break;} case 238: #line 2981 "ys.y" {; break;} case 240: #line 2985 "ys.y" {; break;} case 242: #line 2989 "ys.y" {; break;} case 244: #line 2993 "ys.y" { struct internal_type *type; check_spec_constr (typeh[type_spec_count], yyvsp[0].mystring); if (STATIC_P(typeh[type_spec_count])) { jmp1 = kodp; GEN_JMP; GENCODE; if (typeh[type_spec_count]->attribute.arit_class == UNUSED_AC) typeh[type_spec_count]->attribute.arit_class = INTEGER; } if (-1 == has_loc (VAR, yyvsp[0].mystring)) COMPILE_ONLY; if (STATIC_P(typeh[type_spec_count])) ((struct OPERAND_1_ma *)jmp1)->adr = kodp; if (TYPEDEF_P(typeh[type_spec_count])) { type = typeh[type_spec_count]->output; typedef_copy (typeh[type_spec_count]->output); } else type = typeh[type_spec_count]; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(type)) type = type->output; lookup_tables (yyvsp[0].mystring, variable); ; break;} case 246: #line 3025 "ys.y" { struct internal_type *help, *arch; check_spec_constr (typeh[type_spec_count], yyvsp[-1].mystring); help = (struct internal_type *) allocate (sizeof (struct internal_type), BLOCK); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; } help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; if (STATIC_P(typeh[type_spec_count])) { jmp1 = kodp; GEN_JMP; GENCODE; if (typeh[type_spec_count]->attribute.arit_class == UNUSED_AC) typeh[type_spec_count]->attribute.arit_class = INTEGER; } if (-1 == has_loc (VAR, yyvsp[-1].mystring)) COMPILE_ONLY; if (STATIC_P(typeh[type_spec_count])) ((struct OPERAND_1_ma *)jmp1)->adr = kodp; count_arr = 1; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(typeh[type_spec_count]->output)) arch = arch->output; DELETE_SUBSCRIPT; lookup_tables (yyvsp[-1].mystring, variable); ; break;} case 248: #line 3073 "ys.y" { struct internal_type *type; check_spec_constr (typeh[type_spec_count], yyvsp[-2].mystring); if (TYPEDEF_P(typeh[type_spec_count])) type = typeh[type_spec_count]->output; else type = typeh[type_spec_count]; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(type)) type = type->output; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (type); else typeh[type_spec_count] = type; param_flag = 0; lookup_tables (yyvsp[-2].mystring, variable); ; break;} case 250: #line 3094 "ys.y" { struct internal_type *type; check_spec_constr (typeh[type_spec_count], yyvsp[-3].mystring); if (TYPEDEF_P(typeh[type_spec_count])) type = typeh[type_spec_count]->output; else type = typeh[type_spec_count]; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(type)) type = type->output; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (type); else typeh[type_spec_count] = type; param_flag = 0; lookup_tables (yyvsp[-3].mystring, variable); ; break;} case 252: #line 3115 "ys.y" { struct internal_type *type; check_spec_constr (typeh[type_spec_count], yyvsp[-3].mystring); if (TYPEDEF_P(typeh[type_spec_count])) type = typeh[type_spec_count]->output; else type = typeh[type_spec_count]; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(type)) type = type->output; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (type); else typeh[type_spec_count] = type; param_flag = 0; lookup_tables (yyvsp[-3].mystring, variable); ; break;} case 254: #line 3139 "ys.y" { typeh[type_spec_count--] = NULL; ; break;} case 255: #line 3143 "ys.y" { typeh[type_spec_count--] = NULL; ; break;} case 257: #line 3148 "ys.y" { typeh[type_spec_count--] = NULL; ; break;} case 258: #line 3152 "ys.y" { typeh[type_spec_count--] = NULL; ; break;} case 262: #line 3161 "ys.y" { if (! LOCAL_P(type_com[set]) && ! REMOTE_P(type_com[set]) && ! TYPEDEF_P(type_com[set])) { switch (type_ac[set]) { /* No breaks here. */ case INTEGER: case SIGNED_AC | INTEGER: case UNSIGNED_AC | INTEGER: case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: case LONG_AC | UNSIGNED_AC | INTEGER: case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: case SHORT_AC | UNSIGNED_AC | INTEGER: case DOUB: case LONG_AC | DOUB: case FLT: case CHR: case SIGNED_AC | CHR: case UNSIGNED_AC | CHR: GEN_POPAe; GENCODE; break; case VID: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return 0; } GEN_CLRT; GENCODE; noninitialized_loc (variable[set].name); } is_address = 0; SET_ADDRESS; TYPE_CLEAR; DELETE_SUBSCRIPT; ; break;} case 263: #line 3205 "ys.y" { if (TYPEDEF_P(typeh[type_spec_count])) error_message (1037, text); #if 0 if (! CONST_P(type_com[set])) error_message (); #endif if (SIMPLE_P(type_com[set])) { if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; move2lvalue (); } else if (ARRAY_P(type_com[set])) { DELETE_SUBSCRIPT; if (CONST_P(type_com[set])) { type_com[set - 1]->attribute.domain = type_com[set]->attribute.domain; if (! type_com[set - 1]->attribute.memory_size) type_com[set - 1]->attribute.memory_size = type_com[set]->attribute.memory_size; { register int i; for (i = 0; i < type_com[set]->attribute.memory_size; i++) { GEN_PUSHAIi(i); GENCODE; GEN_MOVbv; GENCODE; } if (! POINTER_P(type_com[set - 1])) { GEN_POPAe; GENCODE; SET_ADDRESS; TYPE_CLEAR; } if (CHAR_P(type_com[set]->output) && proc) num_args[proc]--; } } else if (! type_com[set]->attribute.memory_size) { type_com[set]->attribute.memory_size = initialize_only * type_com[set]->output->attribute.memory_size; dim[++poc] = initialize_only; put_array_subscript (&type_com[set]); } if (set > 1 && POINTER_P(type_com[set - 1])) { /* MOV two pointers as long ints. */ GEN_MOVli; GENCODE; SET_ADDRESS; TYPE_CLEAR; } } switch (type_ac[set]) { /* No breaks here. */ case INTEGER: case SIGNED_AC | INTEGER: case UNSIGNED_AC | INTEGER: case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: case LONG_AC | UNSIGNED_AC | INTEGER: case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: case SHORT_AC | UNSIGNED_AC | INTEGER: case DOUB: case LONG_AC | DOUB: case FLT: case CHR: case SIGNED_AC | CHR: case UNSIGNED_AC | CHR: GEN_POPAe; GENCODE; break; case VID: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return 0; } GEN_CLRT; GENCODE; is_address = 0; if (handle_main) initialize_only = 1; if (STATIC_P(typeh[type_spec_count])) { /* If there is a static variable in block definition or function definition, we need to initialize it only once. The virtual machine must be triggered here. The variable jmp1 holds the start of the code generated by initialization. */ pc = ((struct OPERAND_1_ma *)jmp1)->adr; GEN_STOP; GENCODE; if (no_compile_only && (! handle_main || initialize_only)) { #ifndef NOT_MSWIN_AND_YES_DOS VIRTUAL_MACHINE_SUSPENDED_RESET; #endif if (0 == exec ()) return 0; #ifndef NOT_MSWIN_AND_YES_DOS VIRTUAL_MACHINE_SUSPENDED_SET; #endif } else if (! s) return 0; initialize_only ? initialize_only-- : initialize_only; if (ARRAY_P(type_com[set])) ((struct OPERAND_1_ma *)jmp1)->adr += type_com[set]->attribute.memory_size; kodp = ((struct OPERAND_1_ma *)jmp1)->adr; } set_value (variable[set].name); SET_ADDRESS; TYPE_CLEAR; ; break;} case 265: #line 3339 "ys.y" { param_flag = 0; ; break;} case 266: #line 3347 "ys.y" { args[proc]++; if (PRINTF_P || SCANF_P) { #if 0 if (!ARRAY_P(type_com[set]) && !POINTER_P(type_com[set])) promote_type (); #endif compare_format_args (format_args[proc][args[proc]], type_com[set], type_ac[set]); format_args[proc][args[proc]] = NULL; } if (STRUCT_P(type_com[set]) || UNION_P(type_com[set])) error_message (6035); if (call_by_value) { if (ARRAY_P(type_com[set]) || (POINTER_P(type_com[set]) && PRINTF_P)) { GEN_POPAst(count[proc]); count[proc] += sizeof (char *); } else if (STRUCT_P(type_com[set]) || UNION_P(type_com[set])) { register int i; for (i = count[proc]; i < type_com[set]->attribute.memory_size; i++) { GEN_POPAb(i); GENCODE; } count[proc] += type_com[set]->attribute.memory_size; GEN_POPAe; } else { GEN_POPA(count[proc]); if (LOCAL_P(type_com[set]) || REMOTE_P(type_com[set])) count[proc] += type_com[set]->output->attribute.memory_size; else count[proc] += type_com[set]->attribute.memory_size; } if ((count[proc] % sizeof (int)) > 0) count[proc] += sizeof (int) - (count[proc] % sizeof (int)); } else if (call_by_reference) { GEN_POPAst(count[proc]); count[proc] += sizeof (char *); } GENCODE; param_flag = 0; /* * Internal types: */ if (YES == type_com[set - 1]->attribute.export_type) { GEN_PUSHAIi(type_transform (type_ac[set], type_com[set]->attribute.function_class, atom_type_flag)); GENCODE; if (call_by_value) { GEN_POPAi(count[proc]); count[proc] += sizeof (int); } else if (call_by_reference) { GEN_POPAst(count[proc]); count[proc] += sizeof (char *); } GENCODE; } atom_type_flag = 0; SET_ADDRESS; TYPE_CLEAR; is_address = 0; ; break;} case 267: #line 3436 "ys.y" { args[proc]++; if (PRINTF_P || SCANF_P) { #if 0 if (!ARRAY_P(type_com[set]) && !POINTER_P(type_com[set])) promote_type (); #endif compare_format_args (format_args[proc][args[proc]], type_com[set], type_ac[set]); format_args[proc][args[proc]] = NULL; } if (STRUCT_P(type_com[set]) || UNION_P(type_com[set])) error_message (6035); if (call_by_value) { if (ARRAY_P(type_com[set]) || (POINTER_P(type_com[set]) && PRINTF_P)) { GEN_POPAst(count[proc]); count[proc] += sizeof (char *); } else if (STRUCT_P(type_com[set]) || UNION_P(type_com[set])) { register int i; for (i = count[proc]; i < type_com[set]->attribute.memory_size; i++) { GEN_POPAb(i); GENCODE; } count[proc] += type_com[set]->attribute.memory_size; GEN_POPAe; } else { GEN_POPA(count[proc]); if (LOCAL_P(type_com[set]) || REMOTE_P(type_com[set])) count[proc] += type_com[set]->output->attribute.memory_size; else count[proc] += type_com[set]->attribute.memory_size; } if ((count[proc] % sizeof (int)) > 0) count[proc] += sizeof (int) - (count[proc] % sizeof (int)); } else if (call_by_reference) { GEN_POPAst(count[proc]); count[proc] += sizeof (char *); } GENCODE; if (YES == type_com[set-1]->attribute.export_type) { GEN_PUSHAIi(type_transform (type_ac[set], type_com[set]->attribute.function_class, atom_type_flag)); GENCODE; if (call_by_value) { GEN_POPA(count[proc]); count[proc] += sizeof (int); } else if (call_by_reference) { GEN_POPAst(count[proc]); count[proc] += sizeof (char *); } GENCODE; } atom_type_flag = 0; SET_ADDRESS; TYPE_CLEAR; is_address = 0; ; break;} case 269: #line 3533 "ys.y" { switch (type_com[set]->attribute.function_class) { case ENUM_FC: /* Fall through */ case SIMPLE: case ARRAY: case STRUCT_FC: case UNION_FC: case LOCAL: case REMOTE_F: case POINTER: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } ; break;} case 270: #line 3555 "ys.y" { GEN_PUSHAIi(yyvsp[0].myint); GENCODE; type_ac[++set] = INTEGER; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.arit_class = INTEGER; type_com[set]->attribute.memory_size = sizeof (int); if (it_is_in_case && -1 == add_constant_to_list (yyvsp[0].myint)) return (0); else type_com[set]->attribute.domain = (char *) &(((struct OPERAND_1_i *) (kodp - sizeof (struct OPERAND_1_i)))->num); ; break;} case 271: #line 3576 "ys.y" { GEN_PUSHAIui(yyvsp[0].myuint); GENCODE; type_ac[++set] = UNSIGNED_AC | INTEGER; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.arit_class = type_ac[set]; type_com[set]->attribute.memory_size = sizeof (unsigned int); if (it_is_in_case && -1 == add_constant_to_list (yyvsp[0].myuint)) return (0); else type_com[set]->attribute.domain = (char *) &(((struct OPERAND_1_ui *) (kodp - sizeof (struct OPERAND_1_ui)))->num); ; break;} case 272: #line 3598 "ys.y" { GEN_PUSHAIli(yyvsp[0].mylint); GENCODE; type_ac[++set] = LONG_AC | INTEGER; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.arit_class = type_ac[set]; type_com[set]->attribute.memory_size = sizeof (long int); if (it_is_in_case && -1 == add_constant_to_list (yyvsp[0].mylint)) return (0); else type_com[set]->attribute.domain = (char *) &(((struct OPERAND_1_li *) (kodp - sizeof (struct OPERAND_1_li)))->num); ; break;} case 273: #line 3620 "ys.y" { GEN_PUSHAIlui(yyvsp[0].myluint); GENCODE; type_ac[++set] = LONG_AC | UNSIGNED_AC | INTEGER; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.arit_class = type_ac[set]; type_com[set]->attribute.memory_size = sizeof (long unsigned int); if (it_is_in_case && -1 == add_constant_to_list (yyvsp[0].myluint)) return (0); else type_com[set]->attribute.domain = (char *) &(((struct OPERAND_1_lui *) (kodp - sizeof (struct OPERAND_1_lui)))->num); ; break;} case 274: #line 3642 "ys.y" { GEN_PUSHAId(yyvsp[0].mydouble); GENCODE; type_ac[++set] = DOUB; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.arit_class = type_ac[set]; type_com[set]->attribute.memory_size = sizeof (double); type_com[set]->attribute.domain = (char *) &(((struct OPERAND_1_id *) (kodp - sizeof (struct OPERAND_1_id)))->num); ; break;} case 275: #line 3660 "ys.y" { GEN_PUSHAIld(yyvsp[0].myldouble); GENCODE; type_ac[++set] = LONG_AC | DOUB; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.arit_class = type_ac[set]; type_com[set]->attribute.memory_size = sizeof (long double); type_com[set]->attribute.domain = (char *) &(((struct OPERAND_1_ild *) (kodp - sizeof (struct OPERAND_1_ild)))->num); ; break;} case 276: #line 3678 "ys.y" { GEN_PUSHAIf(yyvsp[0].myfloat); GENCODE; type_ac[++set] = FLT; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.arit_class = type_ac[set]; type_com[set]->attribute.memory_size = sizeof (float); type_com[set]->attribute.domain = (char *) &(((struct OPERAND_1_if *) (kodp - sizeof (struct OPERAND_1_if)))->num); ; break;} case 277: #line 3696 "ys.y" { GEN_PUSHAIst(yyvsp[0].mystring); GENCODE; type_ac[++set] = CHR; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof (struct internal_type)); type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.function_class = ARRAY; type_com[set]->output = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set]->output, sizeof (struct internal_type)); type_com[set]->output->attribute.arit_class = type_ac[set]; type_com[set]->attribute.domain = ((struct OPERAND_1_mi *) (kodp - sizeof (struct OPERAND_1_mi)))->adr; type_com[set]->attribute.memory_size = strlen (yyvsp[0].mystring) + 1; SET_ADDRESS; ; break;} case 278: #line 3720 "ys.y" { type_com[++set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof (struct internal_type)); type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.function_class = ARRAY; type_com[set]->output = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set]->output, sizeof (struct internal_type)); if (ARRAY_P(type_com[set - 1]) && INTEGER_P(type_com[set - 1]->output)) { int i, j = strlen (yyvsp[0].mystring); type_ac[set] = INTEGER; for (i = 1; i < j; i++) { GEN_MOVaa; GENCODE; GEN_PUSHAIi((i - 1) * sizeof (int)); GENCODE; GEN_MOVar; GENCODE; GEN_PUSHAIi(yyvsp[0].mystring[i]); GENCODE; move2lvalue (); GEN_POPAe; GENCODE; } type_com[set]->attribute.memory_size = j * sizeof (int); /* There is L at the beginning of the string; therefore &$1[1] */ type_com[set]->attribute.domain = &yyvsp[0].mystring[1]; } else { /* There is L at the beginning of the string; therefore &$1[1] */ GEN_PUSHAIst(&yyvsp[0].mystring[1]); GENCODE; type_ac[set] = CHR; type_com[set]->attribute.memory_size = strlen (yyvsp[0].mystring) + 1; type_com[set]->attribute.domain = ((struct OPERAND_1_mi *) (kodp - sizeof (struct OPERAND_1_mi)))->adr; } type_com[set]->output->attribute.arit_class = type_ac[set]; SET_ADDRESS; ; break;} case 279: #line 3770 "ys.y" { GEN_PUSHAIc(yyvsp[0].mychar); GENCODE; type_ac[++set] = CHR; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.arit_class = type_ac[set]; type_com[set]->attribute.memory_size = sizeof (char); type_com[set]->attribute.domain = (char *) &(((struct OPERAND_1_ic *) (kodp - sizeof (struct OPERAND_1_ic)))->num); ; break;} case 281: #line 3791 "ys.y" { lookup_tables (yyvsp[0].mystring, variable); ; break;} case 283: #line 3799 "ys.y" { if (subscript_flag[set]) /* * Flag for the first subscript */ { atom_type_flag = 1; if (1 == poc) { GEN_PUSHAIi(dim[poc]); GENCODE; GEN_MULTi; GENCODE; dim[poc--] = -1; } else if (1 < poc) { GEN_PUSHAIi(dim[poc]); GENCODE; GEN_MULTi; GENCODE; dim[poc--] = -1; } else if (! POINTER_P(type_com[set])) error_message (2000); } else { if (poc) dim[poc--] = -1; if (! ARRAY_P(type_com[set]) && ! POINTER_P(type_com[set])) error_message (2000); if (POINTER_P(type_com[set]) #if 0 && 0 < variable[set].offset #endif ) { GEN_MOVap; GENCODE; } } ; break;} case 284: #line 3839 "ys.y" { if (INTEGER != type_ac[set]) error_message (2002); else { if (subscript_flag[set - 1]) { GEN_ADDi; GENCODE; } subscript_flag[set - 1]++; } SET_ADDRESS; TYPE_CLEAR; if (! poc) { subscript_flag[set]--; GEN_PUSHAIi(type_com[set]->output->attribute.memory_size); GENCODE; GEN_MULTi; GENCODE; OFFSET_LAST_ADD_ARRAY; GEN_MOVar; GENCODE; kodp3 = kodp; type_com[set] = type_com[set]->output; if (POINTER_P(type_com[set])) type_ac[set] = LONG_AC | INTEGER; else type_ac[set] = type_com[set]->attribute.arit_class; } ; break;} case 285: #line 3871 "ys.y" {/* offset_aggregate_ident () calls find_member and this function changes the type_ac[set] accordingly. It generates appropriate instructions as well. */ int aggr_offset = 0; /* Not in subscript any more.*/ if ((STRUCT_P (type_com[set]) || UNION_P (type_com[set])) && NULL != type_com[set]->input) { type_com[set] = type_com[set]->input; aggr_offset = offset_aggregate_ident (); } else if (NULL != type_com[set]->output && (STRUCT_P (type_com[set]->output) || UNION_P (type_com[set]->output)) && NULL != type_com[set]->output->input) { if (subscript_flag[set]) { GEN_PUSHAIi(type_com[set]->output->attribute.memory_size); GENCODE; GEN_MULTi; GENCODE; } type_com[set] = type_com[set]->output->input; aggr_offset = offset_aggregate_ident (); if (ARRAY_P(type_com[set])) { array_subscript (type_com[set]->input); type_ac[set] = type_com[set]->output->attribute.arit_class; } else if (POINTER_P(type_com[set])) type_ac[set] = LONG_AC | INTEGER; } else { text = yyvsp[0].mystring; error_message (2009); } GEN_PUSHAIi(aggr_offset); GENCODE; if (struct_union_field[set]) { GEN_ADDi; GENCODE; struct_union_field[set]--; } if (subscript_flag[set]) { GEN_ADDi; GENCODE; subscript_flag[set]--; } struct_union_field[set]++; ; break;} case 286: #line 3926 "ys.y" { int aggr_offset; if (POINTER_P(type_com[set])) { /* Not in subscript any more.*/ subscript_flag[set] > 0 ? subscript_flag[set]-- : subscript_flag[set]; if ((variable[set].adr != NULL || variable[set].offset != 0) && !(SIMPLE_P(type_com[set]->output))) { if (struct_union_field[set]) { GEN_MOVar; GENCODE; struct_union_field[set]--; } GEN_MOVap; GENCODE; } if (NULL != type_com[set]->output->input) { type_com[set] = type_com[set]->output->input; type_ac[set] = type_com[set]->attribute.arit_class; aggr_offset = offset_aggregate_ident (); GEN_PUSHAIi(aggr_offset); GENCODE; if (struct_union_field[set]) { GEN_ADDi; GENCODE; struct_union_field[set]--; } struct_union_field[set]++; if (type_ac[set] == UNUSED_AC) type_ac[set] = LONG_AC | INTEGER; } else fprintfx (stderr, "FIXME:%d\n", __LINE__); } else error_message (1021); ; break;} case 287: #line 3969 "ys.y" { if (struct_union_field[set]) { OFFSET_LAST_ADD; GEN_MOVar; GENCODE; variable[set].adr = NULL; variable[set].offset = 0; } else if (POINTER_P(type_com[set])) { GEN_MOVvli; GENCODE; GEN_XCHG; GENCODE; GEN_MOVaa; GENCODE; GEN_PUSHAIli(type_com[set]->output->attribute.memory_size); GENCODE; GEN_ADDli; GENCODE; GEN_MOVli; GENCODE; GEN_POPAe; GENCODE; break; } if (! PUSHA_P && ! MOV_P) error_message (1035, "increment"); GEN_MOVv; GENCODE; GEN_XCHG; GENCODE; GEN_MOVaa; GENCODE; GEN_PUSHAI(1); GENCODE; GEN_ADD; GENCODE; GEN_MOV; GENCODE; GEN_POPAe; GENCODE; ; break;} case 288: #line 4002 "ys.y" { if (struct_union_field[set]) { OFFSET_LAST_ADD; GEN_MOVar; GENCODE; variable[set].adr = NULL; variable[set].offset = 0; } else if (POINTER_P(type_com[set])) { GEN_MOVvli; GENCODE; GEN_XCHG; GENCODE; GEN_MOVaa; GENCODE; GEN_PUSHAIli(type_com[set]->output->attribute.memory_size); GENCODE; GEN_SUBli; GENCODE; GEN_MOVli; GENCODE; GEN_POPAe; GENCODE; break; } if (! PUSHA_P && ! MOV_P) error_message (1035, "decrement"); GEN_MOVv; GENCODE; GEN_XCHG; GENCODE; GEN_MOVaa; GENCODE; GEN_PUSHAI(1); GENCODE; GEN_SUB; GENCODE; GEN_MOV; GENCODE; GEN_POPAe; GENCODE; ; break;} case 289: #line 4038 "ys.y" { struct ident_tab *help; text = proc_name_text[proc]; help = point (text); if (NULL == help) COMPILE_ONLY; if (help->body) proc_name[proc] = help->adr; if (!num_args[proc]) num_args[proc] = get_num_args (help->type); param_flag = 1; /* * Internal types: */ switch (type_com[set]->attribute.function_class) { case REMOTE_F: GEN_PUSHf; GENCODE; GEN_MOVfs; GENCODE; /* type_com[set] = help->type->output->attribute.export_type;*/ break; default: /* FIXME: */ break; } call_fix[proc] = kodp; GEN_SUBss(0); GENCODE; ; break;} case 290: #line 4066 "ys.y" { text = proc_name_text[proc]; if (num_args[proc] != 0) if (num_args[proc] > args[proc]) error_message (2010); else if (num_args[proc] < args[proc]) error_message (2011); if (-1 == point_call (text)) COMPILE_ONLY; if (LOCAL == type_com[set]->attribute.function_class) { GEN_CALL(proc_name[proc]); GENCODE; GEN_ADDss(count[proc]); GENCODE; } else { GEN_XCALL; GENCODE; GEN_MOVsf; GENCODE; GEN_POPf; GENCODE; } ((struct OPERAND_1_i *)call_fix[proc])->num = count[proc]; count[proc] = 0; #if 0 free (proc_name_text[proc--]); #else proc_name[proc] = NULL; num_args[proc] = 0; args[proc] = 0; proc_name_text[proc--] = NULL; #endif ; break;} case 291: #line 4104 "ys.y" { switch (type_com[set]->attribute.function_class) { case POINTER: case ENUM_FC: case SIMPLE: if (NULL != type_com[set]->field_name) { OFFSET_LAST_ADD; if (variable[set].offset != 0 || variable[set].adr != NULL) { GEN_MOVar; GENCODE; } kodp3 = kodp; } break; case ARRAY: if (param_flag && !subscript_flag[set]) { kodp3 = kodp; DELETE_SUBSCRIPT; } break; case STRUCT_FC: /* FIXME: */ case UNION_FC: break; case LOCAL: case REMOTE_F: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } ; break;} case 292: #line 4142 "ys.y" { if (is_address) error_message (1022); else { struct internal_type *arch; kodp3 = kodp; is_address = 1; switch (type_com[set]->attribute.function_class) { case SIMPLE: case ARRAY: case STRUCT_FC: case UNION_FC: if ((NULL != type_com[set]->field_name || ARRAY_P(type_com[set])) && variable[set].adr == NULL && variable[set].offset == 0) { GEN_ADDi; GENCODE; } if (variable[set].adr != NULL || variable[set].offset != 0) { GEN_MOVpa; GENCODE; } arch = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)arch, sizeof(struct internal_type)); arch->attribute.function_class = POINTER; arch->attribute.type_qualifier = UNDEF_TQ; arch->attribute.memory_size = POINTER_SIZE; if (ARRAY_P(type_com[set])) arch->output = type_com[set]->output; else arch->output = type_com[set]; type_com[set] = arch; type_ac[set] = INTEGER; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); break; } } ; break;} case 293: #line 4193 "ys.y" { if (POINTER_P(type_com[set])) { type_com[set] = type_com[set]->output; GEN_MOVap; GENCODE; type_ac[set] = type_com[set]->attribute.arit_class; } else if (ARRAY_P(type_com[set])) { type_com[set] = type_com[set]->output; type_ac[set] = type_com[set]->attribute.arit_class; } else error_message (1029); ; break;} case 294: #line 4210 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { type_com[set] = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = UNDEF_TQ; type_com[set]->attribute.arit_class = INTEGER; } kodp3 = kodp; GEN_NEG; GENCODE; type_ac[set] = INTEGER; ; break;} case 295: #line 4232 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (1030); if (INTEGER == type_ac[set]) { switch (type_ac[set]) { case INTEGER: kodp3 = kodp; GEN_NOT; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GENCODE; type_ac[set] = INTEGER; } else error_message (1005); ; break;} case 296: #line 4255 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (1032); ; break;} case 297: #line 4261 "ys.y" { kodp3=kodp; GEN_PUSHAI(0); GENCODE; ; break;} case 298: #line 4266 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (1031); GEN_SUB; GENCODE; ; break;} case 299: #line 4274 "ys.y" { if (POINTER_P(type_com[set])) { GEN_PUSHAIli(type_com[set]->output->attribute.memory_size); GENCODE; GEN_ADDli; } else { GEN_PUSHAI(1); GENCODE; GEN_ADD; } GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; ; break;} case 300: #line 4292 "ys.y" { if (POINTER_P(type_com[set])) { GEN_PUSHAIli(type_com[set]->output->attribute.memory_size); GENCODE; GEN_SUBli; } else { GEN_PUSHAI(1); GENCODE; GEN_SUB; } GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; ; break;} case 301: #line 4310 "ys.y" { if (NULL != kodp4) { kodp = kodp4; kodp4 = NULL; } if (type_com[set]->attribute.memory_size) { GEN_PUSHAIi(type_com[set]->attribute.memory_size); GENCODE; } else error_message (1027); type_ac[set] = INTEGER; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.memory_size = sizeof (int); ; break;} case 302: #line 4334 "ys.y" { if (typeh[type_spec_count]->attribute.memory_size) { GEN_PUSHAIi(typeh[type_spec_count]->attribute.memory_size); GENCODE; } else error_message (1027); type_ac[++set] = INTEGER; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.memory_size = sizeof (int); typeh[type_spec_count--] = NULL; ; break;} case 304: #line 4357 "ys.y" { check_spec_constr (typeh[type_spec_count], "type name"); typeh[type_spec_count]->attribute.memory_size = set_memory_size (typeh[type_spec_count]->attribute.arit_class); switch (typeh[type_spec_count]->attribute.function_class) { case SIMPLE: kodp3 = kodp; switch (typeh[type_spec_count]->attribute.arit_class) { case INTEGER: switch (type_ac[set]) { case INTEGER: break; case DOUB: GEN_CVTDI; GENCODE; break; case FLT: GEN_CVTFI; GENCODE; break; case CHR: GEN_CVTCIt; GENCODE; break; default: error_message (1005); } type_ac[set] = INTEGER; break; case DOUB: switch (type_ac[set]) { case INTEGER: GEN_CVTIDt; GENCODE; break; case DOUB: break; case FLT: GEN_CVTFDt; GENCODE; break; case CHR: GEN_CVTCDt; GENCODE; break; default: error_message (1005); } type_ac[set] = DOUB; break; case FLT: switch (type_ac[set]) { case INTEGER: GEN_CVTIFt; GENCODE; break; case DOUB: GEN_CVTDF; GENCODE; break; case FLT: break; case CHR: GEN_CVTCFt; GENCODE; break; default: error_message (1005); } type_ac[set] = FLT; break; case CHR: switch (type_ac[set]) { case INTEGER: GEN_CVTIC; GENCODE; break; case DOUB: GEN_CVTDC; GENCODE; break; case FLT: GEN_CVTFC; GENCODE; break; case CHR: break; default: error_message (1005); } type_ac[set] = CHR; break; case VID: switch (type_ac[set]) { /* Here are no breaks between. */ case INTEGER: case DOUB: case CHR: case VID: break; default: error_message (1005); } type_ac[set] = VID; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } break; case ARRAY: case STRUCT_FC: case UNION_FC: error_message (1020); break; case POINTER: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5002); abort (); } type_com[set] = typeh[type_spec_count]; typeh[type_spec_count--] = NULL; ; break;} case 306: #line 4484 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "*"); if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_MULT; GENCODE; ; break;} case 307: #line 4500 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "/"); if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_DIV; GENCODE; ; break;} case 308: #line 4516 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "%"); if (INTEGER == type_ac[set]) { switch (type_ac[--set]) { case INTEGER: kodp3 = kodp; GEN_MOD; GENCODE; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } } else error_message (1005); ; break;} case 310: #line 4543 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { GEN_PUSHAIli(type_com[set]->output->attribute.memory_size); GENCODE; GEN_MULTli; GENCODE; type_com[set - 1] = type_com[set]; } else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) { GEN_PUSHAIli(type_com[set - 1]->output->attribute.memory_size); GENCODE; GEN_MULTli; GENCODE; } if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_ADD; GENCODE; ; break;} case 311: #line 4569 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { GEN_PUSHAIli(type_com[set]->output->attribute.memory_size); GENCODE; GEN_MULTli; GENCODE; type_com[set - 1] = type_com[set]; } else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) { GEN_PUSHAIli(type_com[set - 1]->output->attribute.memory_size); GENCODE; GEN_MULTli; GENCODE; } if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_SUB; GENCODE; ; break;} case 313: #line 4598 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "<<"); ERROR_P; if (INTEGER == type_ac[set]) { switch (type_ac[--set]) { case INTEGER: kodp3 = kodp; GEN_SAL; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } } else error_message (1005); GENCODE; ; break;} case 314: #line 4625 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, ">>"); if (INTEGER == type_ac[set]) { switch (type_ac[--set]) { case INTEGER: kodp3 = kodp; GEN_SAR; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } } else error_message (1005); GENCODE; ; break;} case 316: #line 4653 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (6024, type_com[set], type_com[set - 1]); else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (6024, type_com[set - 1], type_com[set]); if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_LO; GENCODE; type_ac[set] = INTEGER; ; break;} case 317: #line 4672 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (6024, type_com[set], type_com[set - 1]); else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (6024, type_com[set - 1], type_com[set]); if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_GR; GENCODE; type_ac[set] = INTEGER; ; break;} case 318: #line 4691 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (6024, type_com[set], type_com[set - 1]); else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (6024, type_com[set - 1], type_com[set]); if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_LE; GENCODE; type_ac[set] = INTEGER; ; break;} case 319: #line 4710 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (6024, type_com[set], type_com[set - 1]); else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (6024, type_com[set - 1], type_com[set]); if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_GE; GENCODE; type_ac[set] = INTEGER; ; break;} case 321: #line 4732 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (6024, type_com[set], type_com[set - 1]); else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (6024, type_com[set - 1], type_com[set]); if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_EQ; GENCODE; type_ac[set] = INTEGER; ; break;} case 322: #line 4751 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (6024, type_com[set], type_com[set - 1]); else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (6024, type_com[set - 1], type_com[set]); if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_NE; GENCODE; type_ac[set] = INTEGER; ; break;} case 324: #line 4777 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "&"); if (INTEGER == type_ac[set]) { switch (type_ac[--set]) { case INTEGER: kodp3 = kodp; GEN_ANDB; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } } else error_message (1005); GENCODE; ; break;} case 326: #line 4805 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "^"); if (INTEGER == type_ac[set]) { switch (type_ac[--set]) { case INTEGER: kodp3 = kodp; GEN_XOR; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } } else error_message (1005); GENCODE; ; break;} case 328: #line 4833 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "|"); if (INTEGER == type_ac[set]) { switch (type_ac[--set]) { case INTEGER: kodp3 = kodp; GEN_ORB; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } } else error_message (1005); GENCODE; ; break;} case 330: #line 4861 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { type_com[set] = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = UNDEF_TQ; type_com[set]->attribute.arit_class = LONG_AC | INTEGER; } GEN_MOVaa; GENCODE; and_jmp[set] = kodp; GEN_JZ; GENCODE; ; break;} case 331: #line 4882 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { type_com[set] = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = UNDEF_TQ; type_com[set]->attribute.arit_class = LONG_AC | INTEGER; } if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_AND; GENCODE; type_ac[set] = INTEGER; ((struct OPERAND_1_ma *)and_jmp[set])->adr = kodp; ; break;} case 333: #line 4912 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { type_com[set] = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = UNDEF_TQ; type_com[set]->attribute.arit_class = LONG_AC | INTEGER; } GEN_MOVaa; GENCODE; or_jmp[set] = kodp; GEN_JNZ; GENCODE; ; break;} case 334: #line 4933 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { type_com[set] = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = UNDEF_TQ; type_com[set]->attribute.arit_class = LONG_AC | INTEGER; } if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_OR; GENCODE; type_ac[set] = INTEGER; ((struct OPERAND_1_ma *)or_jmp[set])->adr = kodp; ; break;} case 336: #line 4964 "ys.y" { SET_ADDRESS; TYPE_CLEAR; kodp3 = NULL; GEN_CLRT; GENCODE; fixp++; #ifdef DEBUG printfx ("fixp=%u\n",fixp); #endif fixp->if1.major = IF; fixp->if1.jz = kodp; GEN_JZ; GENCODE; ; break;} case 337: #line 4976 "ys.y" { fixp->if1.jmp = kodp; GEN_JMP; GENCODE; ((struct OPERAND_1_ma *)(fixp->if1.jz))->adr = kodp; SET_ADDRESS; TYPE_CLEAR; ; break;} case 338: #line 4984 "ys.y" { ((struct OPERAND_1_ma *)(fixp->if1.jmp))->adr = kodp; fixp--; ; break;} case 340: #line 4998 "ys.y" { if (POPA_P) error_message (1034); set_value (variable[set].name); switch (type_com[set]->attribute.function_class) { case SIMPLE: case ARRAY: case STRUCT_FC: case ENUM_FC: case POINTER: case UNION_FC: break; case LOCAL: case REMOTE_F: error_message (1034); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } ; break;} case 341: #line 5021 "ys.y" { if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; move2lvalue (); SET_ADDRESS; ; break;} case 343: #line 5037 "ys.y" { /* The lvalue just parsed is array, structure or union. We need the offset of the field twice. Once for lvalue and MOV instruction and once for right side value. (if there is a side effect in lvalue expression it is evaluated only once as the semantic should be (ANSI)) */ GEN_MOVaa; GENCODE; ; break;} case 344: #line 5053 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "*"); if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; GEN_MULT; GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; ; break;} case 345: #line 5070 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "/"); if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; GEN_DIV; GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; ; break;} case 346: #line 5087 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "%"); if (INTEGER == type_ac[set]) { SET_ADDRESS; TYPE_CLEAR; switch (type_ac[set]) { case INTEGER: GEN_MOD; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } else error_message (1005); ; break;} case 347: #line 5115 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { GEN_PUSHAIli(type_com[set]->output->attribute.memory_size); GENCODE; GEN_MULTli; GENCODE; type_com[set - 1] = type_com[set]; } else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) { GEN_PUSHAIli(type_com[set - 1]->output->attribute.memory_size); GENCODE; GEN_MULTli; GENCODE; type_com[set] = type_com[set - 1]; } if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; GEN_ADD; GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; ; break;} case 348: #line 5143 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { GEN_PUSHAIli(type_com[set]->output->attribute.memory_size); GENCODE; GEN_MULTli; GENCODE; type_com[set - 1] = type_com[set]; } else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) { GEN_PUSHAIli(type_com[set - 1]->output->attribute.memory_size); GENCODE; GEN_MULTli; GENCODE; type_com[set] = type_com[set - 1]; } if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; GEN_SUB; GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; ; break;} case 349: #line 5171 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "<<"); if (INTEGER == type_ac[set]) { SET_ADDRESS; TYPE_CLEAR; switch (type_ac[set]) { case INTEGER: GEN_SAL; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } else error_message (1005); ; break;} case 350: #line 5199 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, ">>"); if (INTEGER == type_ac[set]) { SET_ADDRESS; TYPE_CLEAR; switch (type_ac[set]) { case INTEGER: GEN_SAR; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } else error_message (1005); ; break;} case 351: #line 5227 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "&"); ERROR_P; if (INTEGER == type_ac[set]) { SET_ADDRESS; TYPE_CLEAR; switch (type_ac[set]) { case INTEGER: GEN_ANDB; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } else error_message (1005); ; break;} case 352: #line 5256 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "^"); ERROR_P; if (INTEGER == type_ac[set]) { SET_ADDRESS; TYPE_CLEAR; switch (type_ac[set]) { case INTEGER: GEN_XOR; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } else error_message (1005); ; break;} case 353: #line 5285 "ys.y" { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "|"); ERROR_P; if (INTEGER == type_ac[set]) { SET_ADDRESS; TYPE_CLEAR; switch (type_ac[set]) { case INTEGER: GEN_ORB; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } else error_message (1005); ; break;} case 355: #line 5318 "ys.y" { #if 0 /* Exact copy of the top level expression. Now it is left-hand operand of comma expression for warning*/ if (! LOCAL_P(type_com[set]) && ! REMOTE_P(type_com[set]) && ! MOV_P && ! POPA_P) error_message (6027); #else if (! MOV_P) error_message (6029); #endif switch (type_ac[set]) { /* No breaks here. */ case INTEGER: case SIGNED_AC | INTEGER: case UNSIGNED_AC | INTEGER: case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: case LONG_AC | UNSIGNED_AC | INTEGER: case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: case SHORT_AC | UNSIGNED_AC | INTEGER: case DOUB: case LONG_AC | DOUB: case FLT: case CHR: case SIGNED_AC | CHR: case UNSIGNED_AC | CHR: GEN_POPAe; GENCODE; break; case VID: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } kodp3 = NULL; is_address = 0; SET_ADDRESS; TYPE_CLEAR; ; break;} } /* the action file gets copied in in place of this dollarsign */ #line 543 "/usr/share/misc/bison.simple" yyvsp -= yylen; yyssp -= yylen; #ifdef YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif *++yyvsp = yyval; #ifdef YYLSP_NEEDED yylsp++; if (yylen == 0) { yylsp->first_line = yylloc.first_line; yylsp->first_column = yylloc.first_column; yylsp->last_line = (yylsp-1)->last_line; yylsp->last_column = (yylsp-1)->last_column; yylsp->text = 0; } else { yylsp->last_line = (yylsp+yylen-1)->last_line; yylsp->last_column = (yylsp+yylen-1)->last_column; } #endif /* Now "shift" the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTBASE] + *yyssp; if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; yyerrlab: /* here on detecting error */ if (! yyerrstatus) /* If not already recovering from an error, report this error. */ { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { int size = 0; char *msg; int x, count; count = 0; /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) size += strlen(yytname[x]) + 15, count++; msg = (char *) malloc(size + 15); if (msg != 0) { strcpy(msg, "parse error"); if (count < 5) { count = 0; for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) { strcat(msg, count == 0 ? ", expecting `" : " or `"); strcat(msg, yytname[x]); strcat(msg, "'"); count++; } } yyerror(msg); free(msg); } else yyerror ("parse error; also virtual memory exceeded"); } else #endif /* YYERROR_VERBOSE */ yyerror("parse error"); } goto yyerrlab1; yyerrlab1: /* here on error raised explicitly by an action */ if (yyerrstatus == 3) { /* if just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); #endif yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ goto yyerrhandle; yyerrdefault: /* current state does not do anything special for the error token. */ #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ if (yyn) goto yydefault; #endif yyerrpop: /* pop the current state because it cannot handle the error token */ if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #ifdef YYLSP_NEEDED yylsp--; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "Error: state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif yyerrhandle: yyn = yypact[yystate]; if (yyn == YYFLAG) goto yyerrdefault; yyn += YYTERROR; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) goto yyerrdefault; yyn = yytable[yyn]; if (yyn < 0) { if (yyn == YYFLAG) goto yyerrpop; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting error token, "); #endif *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; yyacceptlab: /* YYACCEPT comes here. */ if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 0; yyabortlab: /* YYABORT comes here. */ if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 1; } #line 5370 "ys.y" void dump_yacc () { #if YYDEBUG yydebug = 1; #else fprintfx (stderr, "YYDEBUG not defined\n"); #endif } clif-0.93/cast.h100444 1750 1750 5631 6507762546 12250 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * cast.h * * defines for different type cast * */ #ifndef _CAST_H #define _CAST_H #define CS *(char **) /* CONTENT OF STACK */ #define CCI *(int *) /* CONTENT OF INTEGER CELL */ #define CCUI *(unsigned int *) /* CONTENT OF UNSIGNED INTEGER CELL */ #define CCLI *(long int *) /* CONTENT OF LONG INTEGER CELL */ #define CCSI *(short int *) /* CONTENT OF SHORT INTEGER CELL */ #define CCLSI *(long signed int *) /* CONTENT OF LONG SIGNED INTEGER CELL */ #define CCLUI *(long unsigned int *) /* CONTENT OF LONG UNSIGNED INTEGER CELL */ #define CCSUI *(short unsigned int *) /* CONTENT OF SHORT UNSIGNED INTEGER CELL */ #define CCD *(double *) /* CONTENT OF DOUBLE CELL */ #define CCLD *(long double *) /* CONTENT OF LONG DOUBLE CELL */ #define CCF *(float *) /* CONTENT OF FLOAT CELL */ #define CCC *(char *) /* CONTENT OF CHAR CELL */ #define CCSC *(signed char *) /* CONTENT OF SIGNED CHAR CELL */ #define CCUC *(unsigned char *) /* CONTENT OF UNSIGNED CHAR CELL */ #define CCV * /* CONTENT OF VOID CELL */ #define CFI (int (*)()) /* FUNCTION WITH INTEGER RETURN VALUE */ #define CFUI (unsigned int (*)()) /* FUNCTION WITH UNSIGNED INTEGER RETURN VALUE */ #define CFLI (long int (*)()) /* FUNCTION WITH LONG INTEGER RETURN VALUE */ #define CFLUI (long unsigned int (*)()) /* FUNCTION WITH LONG UNSIGNED INTEGER RETURN VALUE */ #define CFSI (short int (*)()) /* FUNCTION WITH SHORT INTEGER RETURN VALUE */ #define CFSUI (short unsigned int (*)()) /* FUNCTION WITH SHORT UNSIGNED INTEGER RETURN VALUE */ #define CFD (double (*)()) /* FUNCTION WITH DOUBLE RETURN VALUE */ #define CFLD (long double (*)()) /* FUNCTION WITH LONG DOUBLE RETURN VALUE */ #define CFF (float (*)()) /* FUNCTION WITH FLOAT RETURN VALUE */ #define CFC (char (*)()) /* FUNCTION WITH CHAR RETURN VALUE */ #define CFSC (signed char (*)()) /* FUNCTION WITH SIGNED CHAR RETURN VALUE */ #define CFUC (unsigned char (*)()) /* FUNCTION WITH UNSIGNED CHAR RETURN VALUE */ #define CFV (void (*)()) /* FUNCTION WITH VOID RETURN VALUE */ #endif /* _CAST_H */ clif-0.93/ch-lex.c100644 1750 1750 62423 6314767764 12520 0ustar korenkoren#include # define U_channel(x) x # define NLSTATE_channel yy_channelprevious=YY_channelNEWLINE # define BEGIN_channel yy_channelbgin = yy_channelsvec + 1 + # define INITIAL_channel 0 # define YY_channelLERR yy_channelsvec # define YY_channelSTATE (yy_channelestate-yy_channelsvec-1) # define YY_channelOPTIM 1 # define YY_channelLMAX BUFSIZ #ifndef __cplusplus # define output_channel(c) (void)putc(c,yy_channelout) #else # define lex_output_channel(c) (void)putc(c,yy_channelout) #endif #if defined(__cplusplus) || defined(__STDC__) #if defined(__cplusplus) && defined(__EXTERN_C__) extern "C" { #endif int yy_channelback(int *, int); int yy_channelinput_channel(void); int yy_channellook(void); void yy_channeloutput_channel(int); int yy_channelracc(int); int yy_channelreject(void); void yy_channelunput_channel(int); int yy_channellex(void); #ifdef YY_channelLEX_E void yy_channelwoutput_channel(wchar_t); wchar_t yy_channelwinput_channel(void); #endif #ifndef yy_channelless int yy_channelless(int); #endif #ifndef yy_channelwrap int yy_channelwrap(void); #endif #ifdef LEXDEBUG void allprint(char); void sprint(char *); #endif #if defined(__cplusplus) && defined(__EXTERN_C__) } #endif #ifdef __cplusplus extern "C" { #endif void exit(int); #ifdef __cplusplus } #endif #endif # define unput_channel(c) {yy_channeltchar= (c);if(yy_channeltchar=='\n')yy_channellineno--;*yy_channelsptr++=yy_channeltchar;} # define yy_channelmore() (yy_channelmorfg=1) #ifndef __cplusplus # define input_channel() (((yy_channeltchar=yy_channelsptr>yy_channelsbuf?U_channel(*--yy_channelsptr):getc(yy_channelin))==10?(yy_channellineno++,yy_channeltchar):yy_channeltchar)==EOF?0:yy_channeltchar) #else # define lex_input_channel() (((yy_channeltchar=yy_channelsptr>yy_channelsbuf?U_channel(*--yy_channelsptr):getc(yy_channelin))==10?(yy_channellineno++,yy_channeltchar):yy_channeltchar)==EOF?0:yy_channeltchar) #endif #define ECHO_channel fprintf(yy_channelout, "%s",yy_channeltext) # define REJECT_channel { nstr_channel = yy_channelreject(); goto yy_channelfussy;} int yy_channelleng; char yy_channeltext[YY_channelLMAX]; int yy_channelmorfg; extern char *yy_channelsptr, yy_channelsbuf[]; int yy_channeltchar; FILE *yy_channelin = {stdin}, *yy_channelout = {stdout}; extern int yy_channellineno; struct yy_channelsvf { struct yy_channelwork *yy_channelstoff; struct yy_channelsvf *yy_channelother; int *yy_channelstops;}; struct yy_channelsvf *yy_channelestate; extern struct yy_channelsvf yy_channelsvec[], *yy_channelbgin; # line 3 "channel.l" /* * channel.l * * lex source for channels * used as compiler for graphical interface * */ #include #ifdef input_channel #undef input_channel #undef yy_channelwrap #endif #include"mystdio.h" #include"buf.h" #include"ch-parser.h" #include"init_ch.c" #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif #if 0 extern char *callocx PROTO((unsigned, unsigned)); #endif extern char *string PROTO((char *)); extern void error_message PROTO((int)); # define YY_channelNEWLINE 10 yy_channellex(){ int nstr_channel; extern int yy_channelprevious; #ifdef __cplusplus /* to avoid CC and lint complaining yy_channelfussy not being used ...*/ static int __lex_hack = 0; if (__lex_hack) goto yy_channelfussy; #endif while((nstr_channel = yy_channellook()) >= 0) yy_channelfussy: switch(nstr_channel){ case 0: if(yy_channelwrap()) return(0); break; case 1: # line 43 "channel.l" {} break; case 2: # line 44 "channel.l" {;} break; case 3: # line 45 "channel.l" {return (FIELDS); /* * Number of records per channel */} break; case 4: # line 49 "channel.l" {return (TYPE); /* * Channel type (graphic) * now implemented only graphic channel */} break; case 5: # line 54 "channel.l" {return (PRINT_FORMAT); /* * point * line */} break; case 6: # line 59 "channel.l" {return (DIRECTION); /* * input_channel or output_channel * graphic channel implemented only as output_channel channel */} break; case 7: # line 64 "channel.l" {return (START_TIME);} break; case 8: # line 65 "channel.l" {return (DURATION_TIME); /* * Length of the window in number of records */} break; case 9: # line 69 "channel.l" {return (W_RESOLUTION); /* * Size of the windows */} break; case 10: # line 73 "channel.l" {return (LOWER); /* * Lower bound of the window */} break; case 11: # line 77 "channel.l" {return (UPPER); /* * Upper bound of the window */} break; case 12: # line 81 "channel.l" {return (STYLE); /* * Line type * now implemented as color setting */} break; case 13: # line 86 "channel.l" {return (ON_LEAVE_WINDOW); /* * Suspend output_channel tto the window temporarily * To continue press any key */} break; case 14: # line 91 "channel.l" {return (AUTOMATIC); /* * automatic for duration_time and start_time */} break; case 15: # line 95 "channel.l" {sscanf (yy_channeltext, "%d", &yy_channellval.myint); return (NUMBERI); /* * Integer number */} break; case 16: # line 99 "channel.l" {sscanf (yy_channeltext, "%lf", &yy_channellval.mydouble); return (NUMBERD); /* * Double number */} break; case 17: # line 103 "channel.l" {yy_channellval.mystring = string (yy_channeltext); return(STRING); /* * String */} break; case 18: # line 108 "channel.l" {return(*yy_channeltext);} break; case -1: break; default: (void)fprintf(yy_channelout,"bad switch yy_channellook %d",nstr_channel); } return(0); } /* end of yy_channellex */ int yy_channelvstop[] = { 0, 18, 0, 1, 18, 0, 2, 0, 18, 0, 18, 0, 15, 17, 18, 0, 17, 18, 0, 17, 18, 0, 17, 18, 0, 17, 18, 0, 17, 18, 0, 17, 18, 0, 17, 18, 0, 17, 18, 0, 17, 18, 0, 17, 18, 0, 17, 18, 0, 15, 0, 16, 0, 16, 0, 15, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 16, 0, 16, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 16, 0, 16, 0, 16, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 4, 17, 0, 17, 0, 17, 0, 16, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 10, 17, 0, 17, 0, 17, 0, 12, 17, 0, 11, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 3, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 13, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 14, 17, 0, 6, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 7, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 17, 0, 5, 17, 0, 9, 17, 0, 8, 17, 0, 0}; # define YY_channelTYPE unsigned char struct yy_channelwork { YY_channelTYPE verify, advance; } yy_channelcrank[] = { 0,0, 0,0, 1,3, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,4, 1,5, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,6, 0,0, 0,0, 1,7, 6,20, 1,8, 6,21, 6,21, 6,21, 6,21, 6,21, 6,21, 6,21, 6,21, 6,21, 6,21, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,9, 0,0, 0,0, 0,0, 1,9, 2,7, 0,0, 0,0, 0,0, 0,0, 21,23, 0,0, 22,39, 0,0, 1,10, 7,22, 7,22, 7,22, 7,22, 7,22, 7,22, 7,22, 7,22, 7,22, 7,22, 27,44, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,11, 21,38, 0,0, 1,12, 0,0, 1,13, 2,10, 19,37, 47,65, 62,76, 64,78, 1,14, 22,39, 31,48, 44,62, 1,15, 13,31, 33,50, 1,16, 1,17, 1,18, 10,27, 1,19, 14,32, 2,11, 12,29, 15,33, 2,12, 11,28, 2,13, 16,34, 17,35, 18,36, 21,38, 28,45, 2,14, 29,46, 12,30, 30,47, 2,15, 32,49, 35,53, 2,16, 2,17, 2,18, 8,23, 2,19, 8,24, 8,24, 8,24, 8,24, 8,24, 8,24, 8,24, 8,24, 8,24, 8,24, 36,54, 37,55, 40,59, 45,63, 46,64, 48,66, 49,67, 8,25, 8,25, 8,25, 8,25, 8,26, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 50,68, 40,59, 51,69, 52,70, 8,25, 53,71, 8,25, 8,25, 8,25, 8,25, 8,26, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 8,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 54,72, 55,73, 63,77, 65,79, 66,80, 67,81, 68,82, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 69,83, 70,84, 72,85, 73,86, 9,25, 76,87, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 9,25, 23,40, 23,40, 23,40, 23,40, 23,40, 23,40, 23,40, 23,40, 23,40, 23,40, 34,51, 77,88, 78,89, 79,90, 80,91, 82,92, 83,93, 26,42, 86,94, 26,42, 87,95, 23,41, 26,43, 26,43, 26,43, 26,43, 26,43, 26,43, 26,43, 26,43, 26,43, 26,43, 88,96, 38,42, 34,52, 38,42, 89,97, 90,98, 38,56, 38,56, 38,56, 38,56, 38,56, 38,56, 38,56, 38,56, 38,56, 38,56, 92,99, 39,57, 93,100, 39,57, 94,101, 23,41, 39,58, 39,58, 39,58, 39,58, 39,58, 39,58, 39,58, 39,58, 39,58, 39,58, 41,60, 95,102, 41,60, 96,103, 97,104, 41,61, 41,61, 41,61, 41,61, 41,61, 41,61, 41,61, 41,61, 41,61, 41,61, 42,56, 42,56, 42,56, 42,56, 42,56, 42,56, 42,56, 42,56, 42,56, 42,56, 43,43, 43,43, 43,43, 43,43, 43,43, 43,43, 43,43, 43,43, 43,43, 43,43, 57,58, 57,58, 57,58, 57,58, 57,58, 57,58, 57,58, 57,58, 57,58, 57,58, 59,74, 98,105, 59,74, 99,106, 100,107, 59,75, 59,75, 59,75, 59,75, 59,75, 59,75, 59,75, 59,75, 59,75, 59,75, 60,61, 60,61, 60,61, 60,61, 60,61, 60,61, 60,61, 60,61, 60,61, 60,61, 74,75, 74,75, 74,75, 74,75, 74,75, 74,75, 74,75, 74,75, 74,75, 74,75, 101,108, 103,109, 104,110, 105,111, 106,112, 107,113, 108,114, 111,115, 112,116, 113,117, 114,118, 115,119, 116,120, 118,121, 119,122, 120,123, 121,124, 122,125, 0,0, 0,0, 0,0, 0,0}; struct yy_channelsvf yy_channelsvec[] = { 0, 0, 0, yy_channelcrank+-1, 0, 0, yy_channelcrank+-25, yy_channelsvec+1, 0, yy_channelcrank+0, 0, yy_channelvstop+1, yy_channelcrank+0, 0, yy_channelvstop+3, yy_channelcrank+0, 0, yy_channelvstop+6, yy_channelcrank+2, 0, yy_channelvstop+8, yy_channelcrank+33, 0, yy_channelvstop+10, yy_channelcrank+97, 0, yy_channelvstop+12, yy_channelcrank+172, 0, yy_channelvstop+16, yy_channelcrank+9, yy_channelsvec+9, yy_channelvstop+19, yy_channelcrank+9, yy_channelsvec+9, yy_channelvstop+22, yy_channelcrank+18, yy_channelsvec+9, yy_channelvstop+25, yy_channelcrank+9, yy_channelsvec+9, yy_channelvstop+28, yy_channelcrank+10, yy_channelsvec+9, yy_channelvstop+31, yy_channelcrank+10, yy_channelsvec+9, yy_channelvstop+34, yy_channelcrank+12, yy_channelsvec+9, yy_channelvstop+37, yy_channelcrank+8, yy_channelsvec+9, yy_channelvstop+40, yy_channelcrank+18, yy_channelsvec+9, yy_channelvstop+43, yy_channelcrank+10, yy_channelsvec+9, yy_channelvstop+46, yy_channelcrank+0, yy_channelsvec+7, 0, yy_channelcrank+30, yy_channelsvec+6, yy_channelvstop+49, yy_channelcrank+9, yy_channelsvec+7, yy_channelvstop+51, yy_channelcrank+247, 0, yy_channelvstop+53, yy_channelcrank+0, yy_channelsvec+8, yy_channelvstop+55, yy_channelcrank+0, yy_channelsvec+9, yy_channelvstop+58, yy_channelcrank+269, yy_channelsvec+9, yy_channelvstop+60, yy_channelcrank+15, yy_channelsvec+9, yy_channelvstop+62, yy_channelcrank+16, yy_channelsvec+9, yy_channelvstop+64, yy_channelcrank+20, yy_channelsvec+9, yy_channelvstop+66, yy_channelcrank+22, yy_channelsvec+9, yy_channelvstop+68, yy_channelcrank+10, yy_channelsvec+9, yy_channelvstop+70, yy_channelcrank+19, yy_channelsvec+9, yy_channelvstop+72, yy_channelcrank+10, yy_channelsvec+9, yy_channelvstop+74, yy_channelcrank+208, yy_channelsvec+9, yy_channelvstop+76, yy_channelcrank+27, yy_channelsvec+9, yy_channelvstop+78, yy_channelcrank+43, yy_channelsvec+9, yy_channelvstop+80, yy_channelcrank+42, yy_channelsvec+9, yy_channelvstop+82, yy_channelcrank+285, 0, 0, yy_channelcrank+301, 0, 0, yy_channelcrank+88, yy_channelsvec+23, yy_channelvstop+84, yy_channelcrank+316, 0, 0, yy_channelcrank+326, 0, 0, yy_channelcrank+336, yy_channelsvec+9, yy_channelvstop+86, yy_channelcrank+11, yy_channelsvec+9, yy_channelvstop+89, yy_channelcrank+47, yy_channelsvec+9, yy_channelvstop+91, yy_channelcrank+58, yy_channelsvec+9, yy_channelvstop+93, yy_channelcrank+9, yy_channelsvec+9, yy_channelvstop+95, yy_channelcrank+52, yy_channelsvec+9, yy_channelvstop+97, yy_channelcrank+60, yy_channelsvec+9, yy_channelvstop+99, yy_channelcrank+78, yy_channelsvec+9, yy_channelvstop+101, yy_channelcrank+76, yy_channelsvec+9, yy_channelvstop+103, yy_channelcrank+83, yy_channelsvec+9, yy_channelvstop+105, yy_channelcrank+92, yy_channelsvec+9, yy_channelvstop+107, yy_channelcrank+129, yy_channelsvec+9, yy_channelvstop+109, yy_channelcrank+130, yy_channelsvec+9, yy_channelvstop+111, yy_channelcrank+0, yy_channelsvec+42, yy_channelvstop+113, yy_channelcrank+346, 0, 0, yy_channelcrank+0, yy_channelsvec+57, yy_channelvstop+115, yy_channelcrank+361, 0, 0, yy_channelcrank+371, 0, 0, yy_channelcrank+0, yy_channelsvec+60, yy_channelvstop+117, yy_channelcrank+10, yy_channelsvec+9, yy_channelvstop+119, yy_channelcrank+123, yy_channelsvec+9, yy_channelvstop+121, yy_channelcrank+9, yy_channelsvec+9, yy_channelvstop+123, yy_channelcrank+117, yy_channelsvec+9, yy_channelvstop+125, yy_channelcrank+134, yy_channelsvec+9, yy_channelvstop+127, yy_channelcrank+121, yy_channelsvec+9, yy_channelvstop+129, yy_channelcrank+120, yy_channelsvec+9, yy_channelvstop+131, yy_channelcrank+147, yy_channelsvec+9, yy_channelvstop+133, yy_channelcrank+163, yy_channelsvec+9, yy_channelvstop+135, yy_channelcrank+0, yy_channelsvec+9, yy_channelvstop+137, yy_channelcrank+151, yy_channelsvec+9, yy_channelvstop+140, yy_channelcrank+151, yy_channelsvec+9, yy_channelvstop+142, yy_channelcrank+381, 0, 0, yy_channelcrank+0, yy_channelsvec+74, yy_channelvstop+144, yy_channelcrank+150, yy_channelsvec+9, yy_channelvstop+146, yy_channelcrank+209, yy_channelsvec+9, yy_channelvstop+148, yy_channelcrank+191, yy_channelsvec+9, yy_channelvstop+150, yy_channelcrank+203, yy_channelsvec+9, yy_channelvstop+152, yy_channelcrank+194, yy_channelsvec+9, yy_channelvstop+154, yy_channelcrank+0, yy_channelsvec+9, yy_channelvstop+156, yy_channelcrank+215, yy_channelsvec+9, yy_channelvstop+159, yy_channelcrank+216, yy_channelsvec+9, yy_channelvstop+161, yy_channelcrank+0, yy_channelsvec+9, yy_channelvstop+163, yy_channelcrank+0, yy_channelsvec+9, yy_channelvstop+166, yy_channelcrank+202, yy_channelsvec+9, yy_channelvstop+169, yy_channelcrank+214, yy_channelsvec+9, yy_channelvstop+171, yy_channelcrank+211, yy_channelsvec+9, yy_channelvstop+173, yy_channelcrank+226, yy_channelsvec+9, yy_channelvstop+175, yy_channelcrank+221, yy_channelsvec+9, yy_channelvstop+177, yy_channelcrank+0, yy_channelsvec+9, yy_channelvstop+179, yy_channelcrank+241, yy_channelsvec+9, yy_channelvstop+182, yy_channelcrank+229, yy_channelsvec+9, yy_channelvstop+184, yy_channelcrank+239, yy_channelsvec+9, yy_channelvstop+186, yy_channelcrank+273, yy_channelsvec+9, yy_channelvstop+188, yy_channelcrank+257, yy_channelsvec+9, yy_channelvstop+190, yy_channelcrank+252, yy_channelsvec+9, yy_channelvstop+192, yy_channelcrank+295, yy_channelsvec+9, yy_channelvstop+194, yy_channelcrank+296, yy_channelsvec+9, yy_channelvstop+196, yy_channelcrank+303, yy_channelsvec+9, yy_channelvstop+198, yy_channelcrank+322, yy_channelsvec+9, yy_channelvstop+200, yy_channelcrank+0, yy_channelsvec+9, yy_channelvstop+202, yy_channelcrank+341, yy_channelsvec+9, yy_channelvstop+205, yy_channelcrank+331, yy_channelsvec+9, yy_channelvstop+207, yy_channelcrank+347, yy_channelsvec+9, yy_channelvstop+209, yy_channelcrank+329, yy_channelsvec+9, yy_channelvstop+211, yy_channelcrank+335, yy_channelsvec+9, yy_channelvstop+213, yy_channelcrank+329, yy_channelsvec+9, yy_channelvstop+215, yy_channelcrank+0, yy_channelsvec+9, yy_channelvstop+217, yy_channelcrank+0, yy_channelsvec+9, yy_channelvstop+220, yy_channelcrank+330, yy_channelsvec+9, yy_channelvstop+223, yy_channelcrank+338, yy_channelsvec+9, yy_channelvstop+225, yy_channelcrank+347, yy_channelsvec+9, yy_channelvstop+227, yy_channelcrank+344, yy_channelsvec+9, yy_channelvstop+229, yy_channelcrank+345, yy_channelsvec+9, yy_channelvstop+231, yy_channelcrank+354, yy_channelsvec+9, yy_channelvstop+233, yy_channelcrank+0, yy_channelsvec+9, yy_channelvstop+235, yy_channelcrank+341, yy_channelsvec+9, yy_channelvstop+238, yy_channelcrank+344, yy_channelsvec+9, yy_channelvstop+240, yy_channelcrank+338, yy_channelsvec+9, yy_channelvstop+242, yy_channelcrank+345, yy_channelsvec+9, yy_channelvstop+244, yy_channelcrank+355, yy_channelsvec+9, yy_channelvstop+246, yy_channelcrank+0, yy_channelsvec+9, yy_channelvstop+248, yy_channelcrank+0, yy_channelsvec+9, yy_channelvstop+251, yy_channelcrank+0, yy_channelsvec+9, yy_channelvstop+254, 0, 0, 0}; struct yy_channelwork *yy_channeltop = yy_channelcrank+456; struct yy_channelsvf *yy_channelbgin = yy_channelsvec+1; char yy_channelmatch[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 9, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 43, 1, 43, 1, 1, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 1, 1, 1, 1, 1, 1, 1, 65, 65, 65, 65, 69, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 1, 1, 1, 1, 65, 1, 65, 65, 65, 65, 69, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}; char yy_channelextra[] = { 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0}; /* Copyright (c) 1989 AT&T */ /* All Rights Reserved */ /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */ /* The copyright notice above does not evidence any */ /* actual or intended publication of such source code. */ #pragma ident "@(#)ncform 6.8 95/02/11 SMI" int yy_channellineno =1; # define YY_channelU_channel(x) x # define NLSTATE_channel yy_channelprevious=YY_channelNEWLINE struct yy_channelsvf *yy_channellstate [YY_channelLMAX], **yy_channellsp, **yy_channelolsp; char yy_channelsbuf[YY_channelLMAX]; char *yy_channelsptr = yy_channelsbuf; int *yy_channelfnd; extern struct yy_channelsvf *yy_channelestate; int yy_channelprevious = YY_channelNEWLINE; #if defined(__cplusplus) || defined(__STDC__) int yy_channellook(void) #else yy_channellook() #endif { register struct yy_channelsvf *yy_channelstate, **lsp; register struct yy_channelwork *yy_channelt; struct yy_channelsvf *yy_channelz; int yy_channelch, yy_channelfirst; struct yy_channelwork *yy_channelr; # ifdef LEXDEBUG int debug; # endif char *yy_channellastch; /* start off machines */ # ifdef LEXDEBUG debug = 0; # endif yy_channelfirst=1; if (!yy_channelmorfg) yy_channellastch = yy_channeltext; else { yy_channelmorfg=0; yy_channellastch = yy_channeltext+yy_channelleng; } for(;;){ lsp = yy_channellstate; yy_channelestate = yy_channelstate = yy_channelbgin; if (yy_channelprevious==YY_channelNEWLINE) yy_channelstate++; for (;;){ # ifdef LEXDEBUG if(debug)fprintf(yy_channelout,"state %d\n",yy_channelstate-yy_channelsvec-1); # endif yy_channelt = yy_channelstate->yy_channelstoff; if(yy_channelt == yy_channelcrank && !yy_channelfirst){ /* may not be any transitions */ yy_channelz = yy_channelstate->yy_channelother; if(yy_channelz == 0)break; if(yy_channelz->yy_channelstoff == yy_channelcrank)break; } #ifndef __cplusplus *yy_channellastch++ = yy_channelch = input_channel(); #else *yy_channellastch++ = yy_channelch = lex_input_channel(); #endif if(yy_channellastch > &yy_channeltext[YY_channelLMAX]) { fprintf(yy_channelout,"Input string too long, limit %d\n",YY_channelLMAX); exit(1); } yy_channelfirst=0; tryagain: # ifdef LEXDEBUG if(debug){ fprintf(yy_channelout,"char "); allprint(yy_channelch); putchar('\n'); } # endif yy_channelr = yy_channelt; if ( (int)yy_channelt > (int)yy_channelcrank){ yy_channelt = yy_channelr + yy_channelch; if (yy_channelt <= yy_channeltop && yy_channelt->verify+yy_channelsvec == yy_channelstate){ if(yy_channelt->advance+yy_channelsvec == YY_channelLERR) /* error transitions */ {unput_channel(*--yy_channellastch);break;} *lsp++ = yy_channelstate = yy_channelt->advance+yy_channelsvec; if(lsp > &yy_channellstate[YY_channelLMAX]) { fprintf(yy_channelout,"Input string too long, limit %d\n",YY_channelLMAX); exit(1); } goto contin; } } # ifdef YY_channelOPTIM else if((int)yy_channelt < (int)yy_channelcrank) { /* r < yy_channelcrank */ yy_channelt = yy_channelr = yy_channelcrank+(yy_channelcrank-yy_channelt); # ifdef LEXDEBUG if(debug)fprintf(yy_channelout,"compressed state\n"); # endif yy_channelt = yy_channelt + yy_channelch; if(yy_channelt <= yy_channeltop && yy_channelt->verify+yy_channelsvec == yy_channelstate){ if(yy_channelt->advance+yy_channelsvec == YY_channelLERR) /* error transitions */ {unput_channel(*--yy_channellastch);break;} *lsp++ = yy_channelstate = yy_channelt->advance+yy_channelsvec; if(lsp > &yy_channellstate[YY_channelLMAX]) { fprintf(yy_channelout,"Input string too long, limit %d\n",YY_channelLMAX); exit(1); } goto contin; } yy_channelt = yy_channelr + YY_channelU_channel(yy_channelmatch[yy_channelch]); # ifdef LEXDEBUG if(debug){ fprintf(yy_channelout,"try fall back character "); allprint(YY_channelU_channel(yy_channelmatch[yy_channelch])); putchar('\n'); } # endif if(yy_channelt <= yy_channeltop && yy_channelt->verify+yy_channelsvec == yy_channelstate){ if(yy_channelt->advance+yy_channelsvec == YY_channelLERR) /* error transition */ {unput_channel(*--yy_channellastch);break;} *lsp++ = yy_channelstate = yy_channelt->advance+yy_channelsvec; if(lsp > &yy_channellstate[YY_channelLMAX]) { fprintf(yy_channelout,"Input string too long, limit %d\n",YY_channelLMAX); exit(1); } goto contin; } } if ((yy_channelstate = yy_channelstate->yy_channelother) && (yy_channelt= yy_channelstate->yy_channelstoff) != yy_channelcrank){ # ifdef LEXDEBUG if(debug)fprintf(yy_channelout,"fall back to state %d\n",yy_channelstate-yy_channelsvec-1); # endif goto tryagain; } # endif else {unput_channel(*--yy_channellastch);break;} contin: # ifdef LEXDEBUG if(debug){ fprintf(yy_channelout,"state %d char ",yy_channelstate-yy_channelsvec-1); allprint(yy_channelch); putchar('\n'); } # endif ; } # ifdef LEXDEBUG if(debug){ fprintf(yy_channelout,"stopped at %d with ",*(lsp-1)-yy_channelsvec-1); allprint(yy_channelch); putchar('\n'); } # endif while (lsp-- > yy_channellstate){ *yy_channellastch-- = 0; if (*lsp != 0 && (yy_channelfnd= (*lsp)->yy_channelstops) && *yy_channelfnd > 0){ yy_channelolsp = lsp; if(yy_channelextra[*yy_channelfnd]){ /* must backup */ while(yy_channelback((*lsp)->yy_channelstops,-*yy_channelfnd) != 1 && lsp > yy_channellstate){ lsp--; unput_channel(*yy_channellastch--); } } yy_channelprevious = YY_channelU_channel(*yy_channellastch); yy_channellsp = lsp; yy_channelleng = yy_channellastch-yy_channeltext+1; yy_channeltext[yy_channelleng] = 0; # ifdef LEXDEBUG if(debug){ fprintf(yy_channelout,"\nmatch "); sprint(yy_channeltext); fprintf(yy_channelout," action %d\n",*yy_channelfnd); } # endif return(*yy_channelfnd++); } unput_channel(*yy_channellastch); } if (yy_channeltext[0] == 0 /* && feof(yy_channelin) */) { yy_channelsptr=yy_channelsbuf; return(0); } #ifndef __cplusplus yy_channelprevious = yy_channeltext[0] = input_channel(); if (yy_channelprevious>0) output_channel(yy_channelprevious); #else yy_channelprevious = yy_channeltext[0] = lex_input_channel(); if (yy_channelprevious>0) lex_output_channel(yy_channelprevious); #endif yy_channellastch=yy_channeltext; # ifdef LEXDEBUG if(debug)putchar('\n'); # endif } } #if defined(__cplusplus) || defined(__STDC__) int yy_channelback(int *p, int m) #else yy_channelback(p, m) int *p; #endif { if (p==0) return(0); while (*p) { if (*p++ == m) return(1); } return(0); } /* the following are only used in the lex library */ #if defined(__cplusplus) || defined(__STDC__) int yy_channelinput_channel(void) #else yy_channelinput_channel() #endif { #ifndef __cplusplus return(input_channel()); #else return(lex_input_channel()); #endif } #if defined(__cplusplus) || defined(__STDC__) void yy_channeloutput_channel(int c) #else yy_channeloutput_channel(c) int c; #endif { #ifndef __cplusplus output_channel(c); #else lex_output_channel(c); #endif } #if defined(__cplusplus) || defined(__STDC__) void yy_channelunput_channel(int c) #else yy_channelunput_channel(c) int c; #endif { unput_channel(c); } clif-0.93/ch-parser.c100644 1750 1750 74443 6344321324 13206 0ustar korenkoren /* A Bison parser, made from channel.y with Bison version GNU Bison version 1.22 */ #define YY_channelBISON 1 /* Identify Bison output_channel. */ #define NUMBERI 258 #define NUMBERD 259 #define STRING 260 #define FIELDS 261 #define TYPE 262 #define PRINT_FORMAT 263 #define DIRECTION 264 #define START_TIME 265 #define DURATION_TIME 266 #define W_RESOLUTION 267 #define LOWER 268 #define UPPER 269 #define STYLE 270 #define AUTOMATIC 271 #define ON_LEAVE_WINDOW 272 #line 26 "channel.y" typedef union { int myint; double mydouble; char *mystring; } YY_channelSTYPE; #line 40 "channel.y" #include "global.h" #include "mystdio.h" #include "channel_maint.h" #include "allocx.h" #include "printfx.h" int yy_channellex PROTO((void)); char *string PROTO((char *)); int yy_channelerror PROTO((char *)); int yy_channelerror(s) char *s; { return(0);; } #ifndef YY_channelLTYPE typedef struct yy_channelltype { int timestamp; int first_line; int first_column; int last_line; int last_column; char *text; } yy_channelltype; #define YY_channelLTYPE yy_channelltype #endif #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YY_channelFINAL 52 #define YY_channelFLAG -32768 #define YY_channelNTBASE 21 #define YY_channelTRANSLATE(x) ((unsigned)(x) <= 272 ? yy_channeltranslate[x] : 25) static const char yy_channeltranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 19, 20, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; #if YY_channelDEBUG != 0 static const short yy_channelprhs[] = { 0, 0, 3, 4, 8, 12, 16, 20, 24, 28, 32, 37, 44, 51, 58, 60, 62, 64, 66 }; static const short yy_channelrhs[] = { 21, 22, 0, 0, 6, 18, 3, 0, 7, 18, 5, 0, 8, 18, 5, 0, 17, 18, 5, 0, 9, 18, 5, 0, 10, 18, 24, 0, 11, 18, 23, 0, 12, 18, 3, 3, 0, 13, 19, 3, 20, 18, 4, 0, 14, 19, 3, 20, 18, 4, 0, 15, 19, 3, 20, 18, 3, 0, 1, 0, 4, 0, 16, 0, 4, 0, 16, 0 }; #endif #if YY_channelDEBUG != 0 static const short yy_channelrline[] = { 0, 59, 61, 64, 98, 105, 112, 119, 133, 135, 137, 140, 149, 158, 167, 172, 175, 180, 183 }; static const char * const yy_channeltname[] = { "$","error","$illegal.","NUMBERI", "NUMBERD","STRING","FIELDS","TYPE","PRINT_FORMAT","DIRECTION","START_TIME","DURATION_TIME", "W_RESOLUTION","LOWER","UPPER","STYLE","AUTOMATIC","ON_LEAVE_WINDOW","'='","'('", "')'","list_stat_0","stat_0","d_time","s_time","" }; #endif static const short yy_channelr1[] = { 0, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 24, 24 }; static const short yy_channelr2[] = { 0, 2, 0, 3, 3, 3, 3, 3, 3, 3, 4, 6, 6, 6, 1, 1, 1, 1, 1 }; static const short yy_channeldefact[] = { 2, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5, 7, 17, 18, 8, 15, 16, 9, 0, 0, 0, 0, 6, 10, 0, 0, 0, 0, 0, 0, 11, 12, 13, 0, 0 }; static const short yy_channeldefgoto[] = { 1, 14, 35, 32 }; static const short yy_channelpact[] = {-32768, 0,-32768, -16, -15, -14, -13, 1, 2, 3, 4, 5, 6, 8,-32768, 19, 22, 24, 26, 12, 14, 29, 30, 31, 32, 33,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768, 34, 16, 20, 21,-32768, -32768, 25, 27, 28, 35, 38, 41,-32768,-32768,-32768, 47,-32768 }; static const short yy_channelpgoto[] = {-32768, -32768,-32768,-32768 }; #define YY_channelLAST 47 static const short yy_channeltable[] = { 51, 2, 15, 16, 17, 18, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 30, 13, 33, 19, 20, 21, 26, 22, 23, 24, 25, 27, 31, 28, 34, 29, 36, 37, 38, 39, 42, 41, 40, 48, 43, 44, 49, 45, 50, 46, 47, 52 }; static const short yy_channelcheck[] = { 0, 1, 18, 18, 18, 18, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 4, 17, 4, 18, 18, 18, 3, 19, 19, 19, 18, 5, 16, 5, 16, 5, 3, 3, 3, 3, 20, 3, 5, 4, 20, 20, 4, 18, 3, 18, 18, 0 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/local/gnu/lib/bison.simple" /* Skeleton output_channel parser for bison, Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef alloca #ifdef __GNUC__ #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) #include #else /* not sparc */ #if defined (MSDOS) && !defined (__TURBOC__) #include #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) #include #pragma alloca #else /* not MSDOS, __TURBOC__, or _AIX */ #ifdef __hpux #ifdef __cplusplus extern "C" { void *alloca (unsigned int); }; #else /* not __cplusplus */ void *alloca (); #endif /* not __cplusplus */ #endif /* __hpux */ #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc. */ #endif /* not GNU C. */ #endif /* alloca not defined. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the switch. */ #define yy_channelerrok (yy_channelerrstatus = 0) #define yy_channelclearin (yy_channelchar = YY_channelEMPTY) #define YY_channelEMPTY -2 #define YY_channelEOF 0 #define YY_channelACCEPT return(0) #define YY_channelABORT return(1) #define YY_channelERROR goto yy_channelerrlab1 /* Like YY_channelERROR except do call yy_channelerror. This remains here temporarily to ease the transition to the new meaning of YY_channelERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YY_channelFAIL goto yy_channelerrlab #define YY_channelRECOVERING() (!!yy_channelerrstatus) #define YY_channelBACKUP(token, value) \ do \ if (yy_channelchar == YY_channelEMPTY && yy_channellen == 1) \ { yy_channelchar = (token), yy_channellval = (value); \ yy_channelchar1 = YY_channelTRANSLATE (yy_channelchar); \ YY_channelPOPSTACK; \ goto yy_channelbackup; \ } \ else \ { yy_channelerror ("syntax error: cannot back up"); YY_channelERROR; } \ while (0) #define YY_channelTERROR 1 #define YY_channelERRCODE 256 #ifndef YY_channelPURE #define YY_channelLEX yy_channellex() #endif #ifdef YY_channelPURE #ifdef YY_channelLSP_NEEDED #define YY_channelLEX yy_channellex(&yy_channellval, &yy_channellloc) #else #define YY_channelLEX yy_channellex(&yy_channellval) #endif #endif /* If nonreentrant, generate the variables here */ #ifndef YY_channelPURE int yy_channelchar; /* the lookahead symbol */ YY_channelSTYPE yy_channellval; /* the semantic value of the */ /* lookahead symbol */ #ifdef YY_channelLSP_NEEDED YY_channelLTYPE yy_channellloc; /* location data for the lookahead */ /* symbol */ #endif int yy_channelnerrs; /* number of parse errors so far */ #endif /* not YY_channelPURE */ #if YY_channelDEBUG != 0 int yy_channeldebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* YY_channelINITDEPTH indicates the initial size of the parser's stacks */ #ifndef YY_channelINITDEPTH #define YY_channelINITDEPTH 200 #endif /* YY_channelMAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ #if YY_channelMAXDEPTH == 0 #undef YY_channelMAXDEPTH #endif #ifndef YY_channelMAXDEPTH #define YY_channelMAXDEPTH 10000 #endif /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ int yy_channelparse (void); #endif #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_channel_bcopy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_channel_bcopy (from, to, count) char *from; char *to; int count; { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_channel_bcopy (char *from, char *to, int count) { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif #line 184 "/usr/local/gnu/lib/bison.simple" int yy_channelparse() { register int yy_channelstate; register int yy_channeln; register short *yy_channelssp; register YY_channelSTYPE *yy_channelvsp; int yy_channelerrstatus; /* number of tokens to shift before error messages enabled */ int yy_channelchar1 = 0; /* lookahead token as an internal (translated) token number */ short yy_channelssa[YY_channelINITDEPTH]; /* the state stack */ YY_channelSTYPE yy_channelvsa[YY_channelINITDEPTH]; /* the semantic value stack */ short *yy_channelss = yy_channelssa; /* refer to the stacks thru separate pointers */ YY_channelSTYPE *yy_channelvs = yy_channelvsa; /* to allow yy_channeloverflow to reallocate them elsewhere */ #ifdef YY_channelLSP_NEEDED YY_channelLTYPE yy_channellsa[YY_channelINITDEPTH]; /* the location stack */ YY_channelLTYPE *yy_channells = yy_channellsa; YY_channelLTYPE *yy_channellsp; #define YY_channelPOPSTACK (yy_channelvsp--, yy_channelssp--, yy_channellsp--) #else #define YY_channelPOPSTACK (yy_channelvsp--, yy_channelssp--) #endif int yy_channelstacksize = YY_channelINITDEPTH; #ifdef YY_channelPURE int yy_channelchar; YY_channelSTYPE yy_channellval; int yy_channelnerrs; #ifdef YY_channelLSP_NEEDED YY_channelLTYPE yy_channellloc; #endif #endif YY_channelSTYPE yy_channelval; /* the variable used to return */ /* semantic values from the action */ /* routines */ int yy_channellen; #if YY_channelDEBUG != 0 if (yy_channeldebug) fprintf(stderr, "Starting parse\n"); #endif yy_channelstate = 0; yy_channelerrstatus = 0; yy_channelnerrs = 0; yy_channelchar = YY_channelEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yy_channelssp = yy_channelss - 1; yy_channelvsp = yy_channelvs; #ifdef YY_channelLSP_NEEDED yy_channellsp = yy_channells; #endif /* Push a new state, which is found in yy_channelstate . */ /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yy_channelnewstate: *++yy_channelssp = yy_channelstate; if (yy_channelssp >= yy_channelss + yy_channelstacksize - 1) { /* Give user a chance to reallocate the stack */ /* Use copies of these so that the &'s don't force the real ones into memory. */ YY_channelSTYPE *yy_channelvs1 = yy_channelvs; short *yy_channelss1 = yy_channelss; #ifdef YY_channelLSP_NEEDED YY_channelLTYPE *yy_channells1 = yy_channells; #endif /* Get the current used size of the three stacks, in elements. */ int size = yy_channelssp - yy_channelss + 1; #ifdef yy_channeloverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ #ifdef YY_channelLSP_NEEDED /* This used to be a conditional around just the two extra args, but that might be undefined if yy_channeloverflow is a macro. */ yy_channeloverflow("parser stack overflow", &yy_channelss1, size * sizeof (*yy_channelssp), &yy_channelvs1, size * sizeof (*yy_channelvsp), &yy_channells1, size * sizeof (*yy_channellsp), &yy_channelstacksize); #else yy_channeloverflow("parser stack overflow", &yy_channelss1, size * sizeof (*yy_channelssp), &yy_channelvs1, size * sizeof (*yy_channelvsp), &yy_channelstacksize); #endif yy_channelss = yy_channelss1; yy_channelvs = yy_channelvs1; #ifdef YY_channelLSP_NEEDED yy_channells = yy_channells1; #endif #else /* no yy_channeloverflow */ /* Extend the stack our own way. */ if (yy_channelstacksize >= YY_channelMAXDEPTH) { yy_channelerror("parser stack overflow"); return 2; } yy_channelstacksize *= 2; if (yy_channelstacksize > YY_channelMAXDEPTH) yy_channelstacksize = YY_channelMAXDEPTH; yy_channelss = (short *) alloca (yy_channelstacksize * sizeof (*yy_channelssp)); __yy_channel_bcopy ((char *)yy_channelss1, (char *)yy_channelss, size * sizeof (*yy_channelssp)); yy_channelvs = (YY_channelSTYPE *) alloca (yy_channelstacksize * sizeof (*yy_channelvsp)); __yy_channel_bcopy ((char *)yy_channelvs1, (char *)yy_channelvs, size * sizeof (*yy_channelvsp)); #ifdef YY_channelLSP_NEEDED yy_channells = (YY_channelLTYPE *) alloca (yy_channelstacksize * sizeof (*yy_channellsp)); __yy_channel_bcopy ((char *)yy_channells1, (char *)yy_channells, size * sizeof (*yy_channellsp)); #endif #endif /* no yy_channeloverflow */ yy_channelssp = yy_channelss + size - 1; yy_channelvsp = yy_channelvs + size - 1; #ifdef YY_channelLSP_NEEDED yy_channellsp = yy_channells + size - 1; #endif #if YY_channelDEBUG != 0 if (yy_channeldebug) fprintf(stderr, "Stack size increased to %d\n", yy_channelstacksize); #endif if (yy_channelssp >= yy_channelss + yy_channelstacksize - 1) YY_channelABORT; } #if YY_channelDEBUG != 0 if (yy_channeldebug) fprintf(stderr, "Entering state %d\n", yy_channelstate); #endif goto yy_channelbackup; yy_channelbackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yy_channelresume: */ /* First try to decide what to do without reference to lookahead token. */ yy_channeln = yy_channelpact[yy_channelstate]; if (yy_channeln == YY_channelFLAG) goto yy_channeldefault; /* Not known => get a lookahead token if don't already have one. */ /* yy_channelchar is either YY_channelEMPTY or YY_channelEOF or a valid token in external form. */ if (yy_channelchar == YY_channelEMPTY) { #if YY_channelDEBUG != 0 if (yy_channeldebug) fprintf(stderr, "Reading a token: "); #endif yy_channelchar = YY_channelLEX; } /* Convert token to internal form (in yy_channelchar1) for indexing tables with */ if (yy_channelchar <= 0) /* This means end of input_channel. */ { yy_channelchar1 = 0; yy_channelchar = YY_channelEOF; /* Don't call YY_channelLEX any more */ #if YY_channelDEBUG != 0 if (yy_channeldebug) fprintf(stderr, "Now at end of input_channel.\n"); #endif } else { yy_channelchar1 = YY_channelTRANSLATE(yy_channelchar); #if YY_channelDEBUG != 0 if (yy_channeldebug) { fprintf (stderr, "Next token is %d (%s", yy_channelchar, yy_channeltname[yy_channelchar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ #ifdef YY_channelPRINT YY_channelPRINT (stderr, yy_channelchar, yy_channellval); #endif fprintf (stderr, ")\n"); } #endif } yy_channeln += yy_channelchar1; if (yy_channeln < 0 || yy_channeln > YY_channelLAST || yy_channelcheck[yy_channeln] != yy_channelchar1) goto yy_channeldefault; yy_channeln = yy_channeltable[yy_channeln]; /* yy_channeln is what to do for this token type in this state. Negative => reduce, -yy_channeln is rule number. Positive => shift, yy_channeln is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yy_channeln < 0) { if (yy_channeln == YY_channelFLAG) goto yy_channelerrlab; yy_channeln = -yy_channeln; goto yy_channelreduce; } else if (yy_channeln == 0) goto yy_channelerrlab; if (yy_channeln == YY_channelFINAL) YY_channelACCEPT; /* Shift the lookahead token. */ #if YY_channelDEBUG != 0 if (yy_channeldebug) fprintf(stderr, "Shifting token %d (%s), ", yy_channelchar, yy_channeltname[yy_channelchar1]); #endif /* Discard the token being shifted unless it is eof. */ if (yy_channelchar != YY_channelEOF) yy_channelchar = YY_channelEMPTY; *++yy_channelvsp = yy_channellval; #ifdef YY_channelLSP_NEEDED *++yy_channellsp = yy_channellloc; #endif /* count tokens shifted since error; after three, turn off error status. */ if (yy_channelerrstatus) yy_channelerrstatus--; yy_channelstate = yy_channeln; goto yy_channelnewstate; /* Do the default action for the current state. */ yy_channeldefault: yy_channeln = yy_channeldefact[yy_channelstate]; if (yy_channeln == 0) goto yy_channelerrlab; /* Do a reduction. yy_channeln is the number of a rule to reduce with. */ yy_channelreduce: yy_channellen = yy_channelr2[yy_channeln]; if (yy_channellen > 0) yy_channelval = yy_channelvsp[1-yy_channellen]; /* implement default value of the action */ #if YY_channelDEBUG != 0 if (yy_channeldebug) { int i; fprintf (stderr, "Reducing via rule %d (line %d), ", yy_channeln, yy_channelrline[yy_channeln]); /* Print the symbols being reduced, and their result. */ for (i = yy_channelprhs[yy_channeln]; yy_channelrhs[i] > 0; i++) fprintf (stderr, "%s ", yy_channeltname[yy_channelrhs[i]]); fprintf (stderr, " -> %s\n", yy_channeltname[yy_channelr1[yy_channeln]]); } #endif switch (yy_channeln) { case 3: #line 65 "channel.y" {int cnt; /* * Defaults filling * FIELDS must be specified */ channel[channel_handle].fields = yy_channelvsp[0].myint; if (channel[channel_handle].fields > 0) { channel[channel_handle].cnt = 0; channel[channel_handle].global_cnt = 0; channel[channel_handle].w_resolution[0] = 256; channel[channel_handle].w_resolution[1] = 256; channel[channel_handle].start_time = 0.; channel[channel_handle].s_time = 0; channel[channel_handle].duration_time = 1000.; channel[channel_handle].d_time = 0.; channel[channel_handle].print_format = string ("line"); channel[channel_handle].type = string ("graphic"); channel[channel_handle].on_leave_w = string ("noevent"); channel[channel_handle].list = (struct LIST *)allocate (sizeof (struct LIST), PERM); channel[channel_handle].list_tmp = (struct LIST *)allocate (sizeof (struct LIST), PERM); channel[channel_handle].member = (struct FIELD *)allocate (channel[channel_handle].fields * sizeof (struct FIELD), PERM); for (cnt = 0; cnt < channel[channel_handle].fields; cnt++) { channel[channel_handle].member[cnt].style = 0xffffffL; channel[channel_handle].member[cnt].upper = 1; channel[channel_handle].member[cnt].lower = -1; }}; break;} case 4: #line 99 "channel.y" { #if 0 free (channel[channel_handle].type); #endif channel[channel_handle].type = yy_channelvsp[0].mystring;; break;} case 5: #line 106 "channel.y" { #if 0 free (channel[channel_handle].print_format); #endif channel[channel_handle].print_format = yy_channelvsp[0].mystring;; break;} case 6: #line 113 "channel.y" { #if 0 free (channel[channel_handle].on_leave_w); #endif channel[channel_handle].on_leave_w = yy_channelvsp[0].mystring;; break;} case 7: #line 120 "channel.y" {if (0 == (strcmp (yy_channelvsp[0].mystring, "input_channel"))) channel[channel_handle].direction = 0; else { if (0 == (strcmp (yy_channelvsp[0].mystring, "output_channel"))) channel[channel_handle].direction = 1; else { fprintfx (stderr, "bad direction\n"); exit (0); } }; break;} case 10: #line 138 "channel.y" {channel[channel_handle].w_resolution[0] = yy_channelvsp[-1].myint; channel[channel_handle].w_resolution[1] = yy_channelvsp[0].myint;; break;} case 11: #line 141 "channel.y" {if (channel[channel_handle].fields > yy_channelvsp[-3].myint) channel[channel_handle].member[yy_channelvsp[-3].myint].lower = yy_channelvsp[0].mydouble; else { fprintfx (stderr, "invalid subscript\n"); exit (0); }; break;} case 12: #line 150 "channel.y" {if (channel[channel_handle].fields > yy_channelvsp[-3].myint) channel[channel_handle].member[yy_channelvsp[-3].myint].upper = yy_channelvsp[0].mydouble; else { fprintfx (stderr, "invalid subscript\n"); exit (0); }; break;} case 13: #line 159 "channel.y" {if (channel[channel_handle].fields > yy_channelvsp[-3].myint) channel[channel_handle].member[yy_channelvsp[-3].myint].style=(unsigned long)yy_channelvsp[0].myint; else { fprintfx (stderr,"invalid subscript\n"); exit (0); }; break;} case 14: #line 168 "channel.y" {fprintfx (stderr,"error in opening channel\n"); return (-2);; break;} case 15: #line 173 "channel.y" {channel[channel_handle].duration_time = yy_channelvsp[0].mydouble; channel[channel_handle].d_time = 0.;; break;} case 16: #line 176 "channel.y" {channel[channel_handle].duration_time = 16.; channel[channel_handle].d_time = 1.;; break;} case 17: #line 181 "channel.y" {channel[channel_handle].start_time = yy_channelvsp[0].mydouble; channel[channel_handle].s_time = 0;; break;} case 18: #line 184 "channel.y" {channel[channel_handle].s_time = 1;; break;} } /* the action file gets copied in in place of this dollarsign */ #line 465 "/usr/local/gnu/lib/bison.simple" yy_channelvsp -= yy_channellen; yy_channelssp -= yy_channellen; #ifdef YY_channelLSP_NEEDED yy_channellsp -= yy_channellen; #endif #if YY_channelDEBUG != 0 if (yy_channeldebug) { short *ssp1 = yy_channelss - 1; fprintf (stderr, "state stack now"); while (ssp1 != yy_channelssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif *++yy_channelvsp = yy_channelval; #ifdef YY_channelLSP_NEEDED yy_channellsp++; if (yy_channellen == 0) { yy_channellsp->first_line = yy_channellloc.first_line; yy_channellsp->first_column = yy_channellloc.first_column; yy_channellsp->last_line = (yy_channellsp-1)->last_line; yy_channellsp->last_column = (yy_channellsp-1)->last_column; yy_channellsp->text = 0; } else { yy_channellsp->last_line = (yy_channellsp+yy_channellen-1)->last_line; yy_channellsp->last_column = (yy_channellsp+yy_channellen-1)->last_column; } #endif /* Now "shift" the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yy_channeln = yy_channelr1[yy_channeln]; yy_channelstate = yy_channelpgoto[yy_channeln - YY_channelNTBASE] + *yy_channelssp; if (yy_channelstate >= 0 && yy_channelstate <= YY_channelLAST && yy_channelcheck[yy_channelstate] == *yy_channelssp) yy_channelstate = yy_channeltable[yy_channelstate]; else yy_channelstate = yy_channeldefgoto[yy_channeln - YY_channelNTBASE]; goto yy_channelnewstate; yy_channelerrlab: /* here on detecting error */ if (! yy_channelerrstatus) /* If not already recovering from an error, report this error. */ { ++yy_channelnerrs; #ifdef YY_channelERROR_VERBOSE yy_channeln = yy_channelpact[yy_channelstate]; if (yy_channeln > YY_channelFLAG && yy_channeln < YY_channelLAST) { int size = 0; char *msg; int x, count; count = 0; /* Start X at -yy_channeln if nec to avoid negative indexes in yy_channelcheck. */ for (x = (yy_channeln < 0 ? -yy_channeln : 0); x < (sizeof(yy_channeltname) / sizeof(char *)); x++) if (yy_channelcheck[x + yy_channeln] == x) size += strlen(yy_channeltname[x]) + 15, count++; msg = (char *) malloc(size + 15); if (msg != 0) { strcpy(msg, "parse error"); if (count < 5) { count = 0; for (x = (yy_channeln < 0 ? -yy_channeln : 0); x < (sizeof(yy_channeltname) / sizeof(char *)); x++) if (yy_channelcheck[x + yy_channeln] == x) { strcat(msg, count == 0 ? ", expecting `" : " or `"); strcat(msg, yy_channeltname[x]); strcat(msg, "'"); count++; } } yy_channelerror(msg); free(msg); } else yy_channelerror ("parse error; also virtual memory exceeded"); } else #endif /* YY_channelERROR_VERBOSE */ yy_channelerror("parse error"); } goto yy_channelerrlab1; yy_channelerrlab1: /* here on error raised explicitly by an action */ if (yy_channelerrstatus == 3) { /* if just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input_channel */ if (yy_channelchar == YY_channelEOF) YY_channelABORT; #if YY_channelDEBUG != 0 if (yy_channeldebug) fprintf(stderr, "Discarding token %d (%s).\n", yy_channelchar, yy_channeltname[yy_channelchar1]); #endif yy_channelchar = YY_channelEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yy_channelerrstatus = 3; /* Each real token shifted decrements this */ goto yy_channelerrhandle; yy_channelerrdefault: /* current state does not do anything special for the error token. */ #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ yy_channeln = yy_channeldefact[yy_channelstate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ if (yy_channeln) goto yy_channeldefault; #endif yy_channelerrpop: /* pop the current state because it cannot handle the error token */ if (yy_channelssp == yy_channelss) YY_channelABORT; yy_channelvsp--; yy_channelstate = *--yy_channelssp; #ifdef YY_channelLSP_NEEDED yy_channellsp--; #endif #if YY_channelDEBUG != 0 if (yy_channeldebug) { short *ssp1 = yy_channelss - 1; fprintf (stderr, "Error: state stack now"); while (ssp1 != yy_channelssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif yy_channelerrhandle: yy_channeln = yy_channelpact[yy_channelstate]; if (yy_channeln == YY_channelFLAG) goto yy_channelerrdefault; yy_channeln += YY_channelTERROR; if (yy_channeln < 0 || yy_channeln > YY_channelLAST || yy_channelcheck[yy_channeln] != YY_channelTERROR) goto yy_channelerrdefault; yy_channeln = yy_channeltable[yy_channeln]; if (yy_channeln < 0) { if (yy_channeln == YY_channelFLAG) goto yy_channelerrpop; yy_channeln = -yy_channeln; goto yy_channelreduce; } else if (yy_channeln == 0) goto yy_channelerrpop; if (yy_channeln == YY_channelFINAL) YY_channelACCEPT; #if YY_channelDEBUG != 0 if (yy_channeldebug) fprintf(stderr, "Shifting error token, "); #endif *++yy_channelvsp = yy_channellval; #ifdef YY_channelLSP_NEEDED *++yy_channellsp = yy_channellloc; #endif yy_channelstate = yy_channeln; goto yy_channelnewstate; } #line 188 "channel.y" clif-0.93/ch-parser.h100644 1750 1750 674 6344321324 13146 0ustar korenkorentypedef union { int myint; double mydouble; char *mystring; } YY_channelSTYPE; #define NUMBERI 258 #define NUMBERD 259 #define STRING 260 #define FIELDS 261 #define TYPE 262 #define PRINT_FORMAT 263 #define DIRECTION 264 #define START_TIME 265 #define DURATION_TIME 266 #define W_RESOLUTION 267 #define LOWER 268 #define UPPER 269 #define STYLE 270 #define AUTOMATIC 271 #define ON_LEAVE_WINDOW 272 extern YY_channelSTYPE yy_channellval; clif-0.93/channel.l100444 1750 1750 4215 6306513320 12704 0ustar korenkoren%{ /* * channel.l * * lex source for channels * used as compiler for graphical interface * */ #include #ifdef input #undef input #undef yywrap #endif #include"mystdio.h" #include"buf.h" #include"ch-parser.h" #include"init_ch.c" #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif #if 0 extern char *callocx PROTO((unsigned, unsigned)); #endif extern char *string PROTO((char *)); extern void error_message PROTO((int)); %} mes ["] newline [\n] tab [ \t] cifra [0-9] exp [Ee][-+]?{cifra}+ alfach [A-Z_a-z0-9]+ numberi [+-]?{cifra}+ numberd ([+-]?{cifra}*"."{cifra}+({exp})?)|([+-]?{cifra}+"."{cifra}*({exp})?)|([+-]?{cifra}+{exp}) %% {tab} {} {newline} {;} fields {return (FIELDS); /* * Number of records per channel */} type {return (TYPE); /* * Channel type (graphic) * now implemented only graphic channel */} print_format {return (PRINT_FORMAT); /* * point * line */} direction {return (DIRECTION); /* * input or output * graphic channel implemented only as output channel */} start_time {return (START_TIME);} duration_time {return (DURATION_TIME); /* * Length of the window in number of records */} w_resolution {return (W_RESOLUTION); /* * Size of the windows */} lower {return (LOWER); /* * Lower bound of the window */} upper {return (UPPER); /* * Upper bound of the window */} style {return (STYLE); /* * Line type * now implemented as color setting */} OnLeaveW {return (ON_LEAVE_WINDOW); /* * Suspend output tto the window temporarily * To continue press any key */} automatic {return (AUTOMATIC); /* * automatic for duration_time and start_time */} {numberi} {sscanf (yytext, "%d", &yylval.myint); return (NUMBERI); /* * Integer number */} {numberd} {sscanf (yytext, "%lf", &yylval.mydouble); return (NUMBERD); /* * Double number */} {alfach} {yylval.mystring = string (yytext); return(STRING); /* * String */} . {return(*yytext);} %% clif-0.93/channel.y100444 1750 1750 11605 6344321324 12745 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * channel_y * * grammar for channel compiler */ %union { int myint; double mydouble; char *mystring; } %token NUMBERI /* integer constant */ %token NUMBERD /* double constant */ %token STRING %token FIELDS TYPE PRINT_FORMAT DIRECTION START_TIME DURATION_TIME %token W_RESOLUTION LOWER UPPER STYLE AUTOMATIC ON_LEAVE_WINDOW %start list_stat_0 /* precedence information about the operators */ %right '=' %{ #include "global.h" #include "mystdio.h" #include "channel_maint.h" #include "allocx.h" #include "printfx.h" int yylex PROTO((void)); char *string PROTO((char *)); int yyerror PROTO((char *)); int yyerror(s) char *s; { return(0);; } %} %% /* beginnig of rules section */ list_stat_0 : list_stat_0 stat_0 | ; stat_0 : FIELDS '=' NUMBERI {int cnt; /* * Defaults filling * FIELDS must be specified */ channel[channel_handle].fields = $3; if (channel[channel_handle].fields > 0) { channel[channel_handle].cnt = 0; channel[channel_handle].global_cnt = 0; channel[channel_handle].w_resolution[0] = 256; channel[channel_handle].w_resolution[1] = 256; channel[channel_handle].start_time = 0.; channel[channel_handle].s_time = 0; channel[channel_handle].duration_time = 1000.; channel[channel_handle].d_time = 0.; channel[channel_handle].print_format = string ("line"); channel[channel_handle].type = string ("graphic"); channel[channel_handle].on_leave_w = string ("noevent"); channel[channel_handle].list = (struct LIST *)allocate (sizeof (struct LIST), PERM); channel[channel_handle].list_tmp = (struct LIST *)allocate (sizeof (struct LIST), PERM); channel[channel_handle].member = (struct FIELD *)allocate (channel[channel_handle].fields * sizeof (struct FIELD), PERM); for (cnt = 0; cnt < channel[channel_handle].fields; cnt++) { channel[channel_handle].member[cnt].style = 0xffffffL; channel[channel_handle].member[cnt].upper = 1; channel[channel_handle].member[cnt].lower = -1; }}} | TYPE '=' STRING { #if 0 free (channel[channel_handle].type); #endif channel[channel_handle].type = $3;} | PRINT_FORMAT '=' STRING { #if 0 free (channel[channel_handle].print_format); #endif channel[channel_handle].print_format = $3;} | ON_LEAVE_WINDOW '=' STRING { #if 0 free (channel[channel_handle].on_leave_w); #endif channel[channel_handle].on_leave_w = $3;} | DIRECTION '=' STRING {if (0 == (strcmp ($3, "input"))) channel[channel_handle].direction = 0; else { if (0 == (strcmp ($3, "output"))) channel[channel_handle].direction = 1; else { fprintfx (stderr, "bad direction\n"); exit (0); } }} | START_TIME '=' s_time | DURATION_TIME '=' d_time | W_RESOLUTION '=' NUMBERI NUMBERI {channel[channel_handle].w_resolution[0] = $3; channel[channel_handle].w_resolution[1] = $4;} | LOWER '(' NUMBERI ')' '=' NUMBERD {if (channel[channel_handle].fields > $3) channel[channel_handle].member[$3].lower = $6; else { fprintfx (stderr, "invalid subscript\n"); exit (0); }} | UPPER '(' NUMBERI ')' '=' NUMBERD {if (channel[channel_handle].fields > $3) channel[channel_handle].member[$3].upper = $6; else { fprintfx (stderr, "invalid subscript\n"); exit (0); }} | STYLE '(' NUMBERI ')' '=' NUMBERI {if (channel[channel_handle].fields > $3) channel[channel_handle].member[$3].style=(unsigned long)$6; else { fprintfx (stderr,"invalid subscript\n"); exit (0); }} | error {fprintfx (stderr,"error in opening channel\n"); return (-2);} ; d_time : NUMBERD {channel[channel_handle].duration_time = $1; channel[channel_handle].d_time = 0.;} | AUTOMATIC {channel[channel_handle].duration_time = 16.; channel[channel_handle].d_time = 1.;} ; s_time : NUMBERD {channel[channel_handle].start_time = $1; channel[channel_handle].s_time = 0;} | AUTOMATIC {channel[channel_handle].s_time = 1;} ; %% clif-0.93/channel_maint.c100444 1750 1750 23250 6354735270 14120 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * channel_maint.c */ #include "channel_maint.h" #include "mystdio.h" #include "allocx.h" #include #include #include #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif extern int yy_channelparse PROTO((void)); extern void init_ch PROTO((char *)); extern char *allocate PROTO((unsigned, unsigned)); int channel_handle = 0; char window_name_init[30] = "clif_channel_handle_"; char window_name_cur[30] = "clif_channel_handle_"; char window_name_wr_init[30] = "clif_alpha_channel_handle_"; char window_name_wr_cur[30] = "clif_alpha_channel_handle_"; char window_name_tmp[5]; struct CHANNEL channel[NUMBER_OF_CHANNELS]; #ifdef XWIN XEvent event; GC default_gc, set_gc_write; Display *disp; #include "xwin.c" #include "wind.c" #include "wind_w.c" #endif #ifdef MSWIN #include "mswin.c" #include "mswind.c" #include "mswind_w.c" #endif void chwrite PROTO((char **)); void chclose PROTO((char **)); void chflush PROTO((void)); static void append PROTO((struct LIST **, struct LIST **)); static int append_record PROTO((struct LIST **, double)); static void redraw_dur_aut PROTO((int)); static void reset_start_aut PROTO((int, double)); static void free_list PROTO((struct RECORD **)); static int fill_write PROTO((int)); int chopen PROTO((char **)); /* * Writing to a channel */ void chwrite (a) char **a; { int *handle; double *x; int n; handle = (int *)a[0]; x = (double *)a[1]; append_record(&channel[*handle].list_tmp,*x); /* * Creating a list from data written into the channel * Sampling of data to fill a record */ channel[*handle].cnt++; if(channel[*handle].fields == channel[*handle].cnt) /* * checking if record is full */ { channel[*handle].global_cnt++; if ((channel[*handle].global_cnt > (LINEAR_WINDOW_CONSTANT * (channel[*handle].start_time + pow (channel[*handle].duration_time + channel[*handle].d_time, 2.)))) && (channel[*handle].d_time > 0)) /* * Redrawing for DURATION_TIME = automatic */ { d_flush (); if (!strcmp (channel[*handle].on_leave_w, "suspend")) d_pause (*handle); d_clear (*handle); redraw_dur_aut (*handle); } if ((channel[*handle].global_cnt > (channel[*handle].start_time + channel[*handle].duration_time)) && (channel[*handle].s_time > 0)) /* * Redrawing for START_TIME = automatic */ { reset_start_aut (*handle, *x); d_flush (); if (!strcmp (channel[*handle].on_leave_w, "suspend")) d_pause (*handle); d_clear (*handle); } if (!strcmp (channel[*handle].type, "alpha")) /* * Checking if alphanumerical window were specified * if yes it is filled with appropriate data */ fill_write (*handle); for (n = 0; n < channel[*handle].fields; n++) { if(!strcmp (channel[*handle].print_format, "line")) /* * Drawing the line */ { if (channel[*handle].global_cnt == 1) { channel[*handle].member[n].x_cur = channel[*handle].global_cnt; channel[*handle].member[n].y_cur = *x; } else { move (*handle, n, channel[*handle].member[n].x_cur, channel[*handle].member[n].y_cur); draw (*handle, n, channel[*handle].global_cnt, *x); channel[*handle].member[n].x_cur = channel[*handle].global_cnt; channel[*handle].member[n].y_cur = *x; } } else /* * Drawing the points */ draw_point (*handle, n, channel[*handle].global_cnt, *x); } append (&channel[*handle].list, &channel[*handle].list_tmp); /* * Creating a global list of records written to the channel * The data are writen into the list because we support * redrawing of the window by DURATION_TIME or START_TIME * specified as automatic */ channel[*handle].cnt = 0; } } /* * Closing the window with handle a */ void chclose (a) char **a; { int *handle; handle = (int *)a[0]; d_destroy_window (*handle); if (!strcmp (channel[*handle].type, "alpha")) /* If it exists alphanumerical window it is destroyed as well */ d_destroy_window_write (*handle); } /* * Flush of buffers */ void chflush () { d_flush (); } /* * Appending to the global list */ static void append (z1, z2) struct LIST **z1, **z2; { if((*z1)->tail == NULL) { (*z1)->head = (*z2)->head; (*z2)->head = NULL; (*z1)->tail = (*z2)->tail; (*z2)->tail = NULL; } else { (*z1)->tail->next = (*z2)->head; (*z2)->head = NULL; (*z1)->tail = (*z2)->tail; (*z2)->tail = NULL; } } /* * Appending to the record's list */ static int append_record (z2, x) struct LIST **z2; double x; { if((*z2)->tail == NULL) { (*z2)->head = (struct RECORD *) allocate (sizeof(struct RECORD), PERM); (*z2)->head->x = x; (*z2)->head->next = NULL; (*z2)->tail = (*z2)->head; } else { (*z2)->tail->next = (struct RECORD *) allocate (sizeof(struct RECORD), PERM); (*z2)->tail->next->x = x; (*z2)->tail->next->next = NULL; (*z2)->tail = (*z2)->tail->next; } return (0); } /* * Redrawing by DURATION_TIME = automatic */ static void redraw_dur_aut (handle) int handle; { struct RECORD *scan; double global_cnt; int n; channel[handle].d_time++; for (n = 0; n < channel[handle].fields; n++) window (handle, n, channel[handle].start_time, channel[handle].member[n].lower, LINEAR_WINDOW_CONSTANT * (channel[handle].start_time + pow(channel[handle].duration_time + channel[handle].d_time,2.)), channel[handle].member[n].upper); /* * Changes world coordinates of the window */ scan = channel[handle].list->head; global_cnt = 0; while (scan != NULL) { global_cnt++; for (n = 0; n < channel[handle].fields; n++) { if (!strcmp (channel[handle].print_format, "line")) { if (scan == channel[handle].list->head) { channel[handle].member[n].x_cur = global_cnt; channel[handle].member[n].y_cur = scan->x; } else { move (handle, n, channel[handle].member[n].x_cur, channel[handle].member[n].y_cur); draw (handle, n, global_cnt, scan->x); channel[handle].member[n].x_cur = global_cnt; channel[handle].member[n].y_cur = scan->x; } } else draw_point (handle, n, global_cnt, scan->x); scan = scan->next; } } } /* * Resetting of new begin by START_TIME = automatic */ static void reset_start_aut (handle,x) int handle; double x; { struct RECORD *scan; int n; scan = channel[handle].list->head; while (NULL != scan->next) { channel[handle].list->head = scan->next; free_list (&scan); scan = channel[handle].list->head; } channel[handle].start_time += channel[handle].duration_time; for (n = 0; n < channel[handle].fields; n++) window (handle, n, channel[handle].start_time, channel[handle].member[n].lower, channel[handle].start_time + channel[handle].duration_time, channel[handle].member[n].upper); for (n = 0; n < channel[handle].fields; n++) { channel[handle].member[n].x_cur = channel[handle].global_cnt; channel[handle].member[n].y_cur = scan->x; } } static void free_list (z3) struct RECORD **z3; { #if 0 free (*z3); #endif } /* * Writing to the text (alphanumerical) window */ static int fill_write (handle) int handle; { int cnt; char str[RECORD_WIDTH]; char str_tmp[RECORD_WIDTH]; struct RECORD *z3; int y = 9; z3 = channel[handle].list_tmp->head; d_clear_text( handle); while(NULL != z3) { str[0] = '\0'; for (cnt = 0; cnt < 5; cnt++) { sprintf (str_tmp, "%g", z3->x); strcat (str, str_tmp); strcat (str, " "); z3 = z3->next; if (z3 == NULL) break; } #ifdef XWIN channel[handle].item.chars = str; channel[handle].item.nchars = strlen (channel[handle].item.chars); /* nemusi byt strlen +1 lebo chcem pocet znakov iba a nie alloc pamate */ d_draw_text (handle, 0, y); y += 15; channel[handle].item.chars = NULL; #endif #ifdef MSWIN channel[handle].item = allocate (strlen (str) + 1, PERM); strcpy (channel[handle].item,str); d_draw_text (handle,0,y); y += 15; #if 0 free (channel[handle].item); #endif channel[handle].item = NULL; #endif } return (0); } /* * Opening of the channel * It starts the compiler for parsing of the input string */ int chopen (input_buffer) char **input_buffer; { int handle = 0; init_ch (*input_buffer); /* * Initialization of the input */ if (yy_channelparse () == -2) return(-2); /* Syntax error */ handle = wind (); if ((!strcmp (channel[channel_handle].type, "alpha")) /* * Checking if alphanumerical window was specified as well */ && (wind_w () == -1)) return (-1); /* Return if the window was not opened */ channel_handle++; return (handle); } clif-0.93/channel_maint.h100444 1750 1750 4465 6354737074 14120 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * channel_maint.h * * variables and structures for graphics channel * */ #ifndef _CHANNEL_MAINT_H #define _CHANNEL_MAINT_H #ifdef XWIN #include #include #endif #ifdef MSWIN #include #endif #define NUMBER_OF_CHANNELS 100 #define RECORD_WIDTH 100 #define DIMENSION 2 #define LINEAR_WINDOW_CONSTANT 2. struct RECORD { double x; struct RECORD *next; }; struct LIST { struct RECORD *head; struct RECORD *tail; }; struct FIELD { double lower; double upper; double ax; double ay; double x_cur; double y_cur; unsigned long style; #ifdef XWIN GC set_gc; #endif #ifdef MSWIN HPEN hpen, hpenp; #endif }; struct CHANNEL { int fields; int cnt; double global_cnt; char *type; char *print_format; int direction; double start_time; int s_time; double duration_time; double d_time; int w_resolution[DIMENSION]; char *on_leave_w; struct LIST *list; struct LIST *list_tmp; struct FIELD *member; #ifdef XWIN Window mywin, mywin_write; #ifdef FORK_YES Pixmap mypix, mypix_write; #endif XTextItem item; XFontStruct *myfont; int ch_pid, ch_pid_write; #endif #ifdef MSWIN HWND mywin,mywin_write; HDC mywinDC, mypixDC, mywin_writeDC, mypix_writeDC; char *item; #endif }; extern int channel_handle; extern char window_name_init[]; extern char window_name_cur[]; extern char window_name_wr_init[]; extern char window_name_wr_cur[]; extern char window_name_tmp[]; extern struct CHANNEL channel[]; #endif /* _CHANNEL_MAINT_H */ clif-0.93/clif.c100444 1750 1750 2551 6514200275 12204 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * clif.c * * System dependent main function */ #include "global.h" /* CONTROL macro is in the following header. */ #include "config.h" extern void term_restore PROTO((void)); extern void interrupt_register PROTO((void)); extern void clif PROTO((int, char *[])); int main PROTO((int, char*[])); int main (argc, argv) int argc; char *argv[]; { #if !(defined (MSDOS) || !defined (CONTROL)) interrupt_register (); #endif clif (argc, argv); #if !(defined (MSDOS) || !defined (CONTROL)) term_restore (); #endif return 0; } clif-0.93/clif.ini100644 1750 1750 14 6305505150 12471 0ustar korenkoren-Wall io.ci clif-0.93/comp_maint.c100444 1750 1750 343061 7130575724 13472 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998, 1999, 2000 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * comp_maint.c * * all maintenance functions for compiler called from ys */ #include #include #include #include #include "global.h" /* Header of global variables */ #include "define.h" /* Clif's memory regions */ #include "control.h" /* Header of fixative structures */ #include "type.h" /* Header of internal representation of types */ #include "struct.h" /* Header of globally used structures */ #include "mystdio.h" /* Redefining NULL */ #include "instr.h" /* Header od structures. Defines size of virtual machine instructions. */ #include "token.h" /* Header of tokens */ #include "config.h" #include "geninstr.h" /* Header of macros. Defines instruction set of the virtual machine. */ #include "comp_maint.h" /* Declarations of functions and variables from this file. */ #include "version.h" #include "allocx.h" #include "ys.h" #include "run_str.h" #include "ls.h" #include "tables.h" #include "input.h" #include "printfx.h" #include "s-conv.h" #include "flags.h" #include "virtual_machine.h" /* * Prints file name in which an error occurs. */ static void print_file_name PROTO((void)); /* Prints source line in which an */ /* error occurs. */ static void print_source_line PROTO((void)); static void print_error_number PROTO((int)); static void print_line_number PROTO((int)); static char *type2string PROTO((struct internal_type *)); static void info PROTO((void)); /* Main compiler initialization. */ static int init PROTO((void)); /* Returns if it is possible to make */ /* implicit cast. */ static int hierarchy PROTO((int)); /* Checks if lvalue and expression are assignable in pointer arithmetic. */ static int pointer_cast PROTO((void)); /* Adding information about arrays to */ /* the list of pecifiers. */ static int add_subs_to_spec_list PROTO((struct internal_type **)); /* The value is one when the definition of function formal parameters are parsed. The value is zero otherwise. */ static int func_def_f = 0; static void mov2lvalue PROTO((struct internal_type *, enum intern_arit_class)); /* Copy internal type. Used in function declaration or definition. */ static struct internal_type * copy_type PROTO((struct internal_type *)); /* Compare if pointers to 2 types are comaptible. */ static int type_compare PROTO((struct internal_type *, struct internal_type *)); /* Find cycles in pointer definitions and declarations. */ static struct internal_type *cyclic_def PROTO((struct internal_type *, struct internal_type *)); /* Arrange all things for starting main */ static int start_main PROTO((void)); /* Source line number. Detecting if */ /* the current line was already */ /* printed. Using in error messages. */ int source_line_number = 0; /* Line number where the error was. */ int error_line_number = 0; /* Count of errors. */ int error_count; /* Flag if warnings should be */ /* printed. Default no. */ int warning_yes = 0; /* Warn if a comment beginning is in comment. */ int warning_comment; /* Warn if it is something wrong in scanf, printf etc. formats. */ int warning_format; /* Don't print warning messages. */ int warning_inhibit; /* Warn if functions or parameters are implicit defined. */ int warning_implicit; /* Nonzero means warn about function definitions that default the return type or that use a null return and have a return-type other than void. */ int warning_return_type; /* If set, warn about trigraphs. */ int warning_trigraphs; /* Warn about unused locals. */ int warning_unused; /* Warn if a variable is used before it is initialized. */ int warning_uninitialized; /* Print various extra warnings. */ int warning_extra; /* Warn if a function returns an aggregate. */ int warning_aggregate_return; /* Warnings are errors. */ int warnings_are_errors; /* Flag in the case of errors or */ /* compile only. Default compile and */ /* execute. */ int no_compile_only = 1; /* If nonzero compile everything and than call main function. Simulate compiler beahvior. */ int handle_main; /* Nonzero means call by value should be used. Default. */ int call_by_value; /* Nonzero means call by reference. */ int call_by_reference = 1; /* If nonzero, generate additional debugging information. */ int dbg_symbols; /* Type table of hierarchy. The size is determined by combination of all possible type specifiers. */ static int pri[2 * LAST_AND_UNUSED_ARIT_CLASS]; struct internal_type *l_type_spec; /* List of type specifiers in function declaration. */ struct ident_list_str *ident_list; /* List of formal parameters. */ FILEATTR pf, spf[100]; /* Max number of opened files is 100. */ FILE *cop; /* cop is defined for producing * virtual machine instruction file. * If you want to use it compile with * -DCODE */ #ifdef CODE static char file[] = "code"; #endif int bc = BC; /* Defining of size of framework memory. */ #define EMAIL "koren@vm.stuba.sk" /* Structures for finding duplicate */ /* labels in a switch statement. They */ /* are needed for the proper error */ /* message. */ static struct list_const1 *tmp_m, *tmp_c; int scope_level = 0; int verbose = 0; char *_clif_debug; /* Special variable for debugging purposes. * It is only used during execution of * debugging (dbx) It is no used yet. */ jmp_buf jmpbuf; /* Used in setjmp and longjmp. */ extern void fatal_handler_register PROTO((void)); /* * Gives a short info at the beginning of the Clif's session. */ static void info () { fprintfx (stderr, "\t\t\tC-like Interpreter Framework Clif\n"); /* fprintfx (stderr, "\t\t\tLanguage for Optimal Control Theory\n");*/ fprintfx (stderr, "\t\t\tVersion %s\n", version); fprintfx (stderr, "\t\t\tFor help run with parameter -help\n"); fprintfx (stderr, "\t\t\tCopyright (c) 1992 - 1998\n"); fprintfx (stderr, "\t\t\tHruz Tomas and Koren Ludovit\n"); fprintfx (stderr, "\t\t\tClif comes with ABSOLUTELY NO WARRANTY;\n"); fprintfx (stderr, "\t\t\tfor details type clif -w .\n"); fprintfx (stderr, "\t\t\tThis is free software, and you are welcome\n"); fprintfx (stderr, "\t\t\tto redistribute it under certain conditions;\n"); fprintfx (stderr, "\t\t\ttype clif -c for details.\n\n"); } void clif (argc, argv) /* ------>> Main function. <<------ */ int argc; char *argv[]; { /* * Parsing of the command-line arguments. */ init_rs (argc, argv); if (-1 == yy_rs_parse ()) return; if (verbose) { info (); printfx ("\nThis is interpreter Clif \n\n"); } /* * Initialization of the Clif compiler. */ if (0 == init ()) return; if (-1 == init_input (++argc_counter, argvv)) /* Initialization of the input. */ return; if (1 == call_by_reference && 1 == call_by_value) error_message (7002); fatal_handler_register (); /* If fatal errors occured, return. */ if (setjmp (jmpbuf)) return; /* * Parsing */ yyparse (); if (handle_main && no_compile_only) { if (start_main ()) return; #ifndef NOT_MSWIN_AND_YES_DOS VIRTUAL_MACHINE_SUSPENDED_RESET; #endif exec (); } } /* * char *say(spr) Message saving (obsolete). */ /* * char *spr; { int i; char *a; char *callocx(); * a=callocx(1,strlen(message)+1); return(strcpy(a,spr)); } */ /* * If break occurred it saves the backpatch address of the JMP instruction. */ int brfix () { union fix *fixp_arch; fixp_arch = fixp; /* The current value of the fixative */ /* pointer is stored for the next */ /* usage. (If in the nested if break */ /* is used.) */ while (IF == fixp->if1.major) fixp--; if (fixp == (union fix *) fixst) { error_message (3000); fixp = fixp_arch; return (-1); } if (WHILE == fixp->while1.major) { struct break1 *bp; if (NULL == fixp->while1.bnext) { #ifdef DEBUG printfx ("break in while fixed\n"); #endif fixp->while1.bnext = (struct break1 *) allocate (sizeof (struct break1), BLOCK); fixp->while1.bnext->adr = kodp; fixp->while1.bnext->next = NULL; } else { bp = fixp->while1.bnext; while (NULL != bp->next) bp = bp->next; #ifdef DEBUG printfx ("break in while fixed\n"); #endif bp->next = (struct break1 *) allocate (sizeof (struct break1), BLOCK); bp->next->adr = kodp; bp->next->next = NULL; } } if (FOR == fixp->for1.major) { struct break1 *bp; if (NULL == fixp->for1.bnext) { #ifdef DEBUG printfx ("break in for fixed\n"); #endif fixp->for1.bnext = (struct break1 *) allocate (sizeof (struct break1), BLOCK); fixp->for1.bnext->adr = kodp; fixp->for1.bnext->next = NULL; } else { bp = fixp->for1.bnext; while (NULL != bp->next) bp = bp->next; #ifdef DEBUG printfx ("break in for fixed\n"); #endif bp->next = (struct break1 *) allocate (sizeof (struct break1), BLOCK); bp->next->adr = kodp; bp->next->next = NULL; } } if (SWITCH == fixp->switch1.major) { struct break1 *bp; if (NULL == fixp->switch1.bnext) { #ifdef DEBUG printfx ("break in switch fixed\n"); #endif fixp->switch1.bnext = (struct break1 *) allocate (sizeof (struct break1), BLOCK); fixp->switch1.bnext->adr = kodp; fixp->switch1.bnext->next = NULL; } else { bp = fixp->switch1.bnext; while (NULL != bp->next) bp = bp->next; #ifdef DEBUG printfx ("break in switch fixed\n"); #endif bp->next = (struct break1 *) allocate (sizeof (struct break1), BLOCK); bp->next->adr = kodp; bp->next->next = NULL; } } fixp = fixp_arch; return (0); } /* * If continue occurred it saves the backpatch address of the JMP * instruction. */ int cofix () { union fix *fixp_arch; fixp_arch = fixp; while (IF == fixp->if1.major) fixp--; if (fixp == (union fix *) fixst) { error_message (3001); return (-1); } if (WHILE == fixp->while1.major) { struct cont1 *cp; if (NULL == fixp->while1.cnext) { #ifdef DEBUG printfx ("continue in while fixed\n"); #endif fixp->while1.cnext = (struct cont1 *) allocate (sizeof (struct cont1), BLOCK); fixp->while1.cnext->adr = kodp; fixp->while1.cnext->next = NULL; } else { cp = fixp->while1.cnext; while (NULL != cp->next) cp = cp->next; #ifdef DEBUG printfx ("continue in while fixed\n"); #endif cp->next = (struct cont1 *) allocate (sizeof (struct cont1), BLOCK); cp->next->adr = kodp; cp->next->next = NULL; } } if (FOR == fixp->for1.major) { struct cont1 *cp; if (NULL == fixp->for1.cnext) { #ifdef DEBUG printfx ("continue in for fixed\n"); #endif fixp->for1.cnext = (struct cont1 *) allocate (sizeof (struct cont1), BLOCK); fixp->for1.cnext->adr = kodp; fixp->for1.cnext->next = NULL; } else { cp = fixp->for1.cnext; while (NULL != cp->next) cp = cp->next; #ifdef DEBUG printfx ("continue in for fixed\n"); #endif cp->next = (struct cont1 *) allocate (sizeof (struct cont1), BLOCK); cp->next->adr = kodp; cp->next->next = NULL; } } fixp = fixp_arch; return (0); } /* * If return occurred it saves the backpatch address of the JMP instruction. */ void retfix () { struct return1 *arch, *arch1; arch = rp; if (NULL == rp) { #ifdef DEBUG printfx ("return fixed\n"); #endif rp = (struct return1 *) allocate (sizeof (struct return1), BLOCK); rp->adr = kodp; rp->next = NULL; } else { while (NULL != rp) { arch1 = rp; rp = rp->next; } #ifdef DEBUG printfx ("return fixed\n"); #endif rp = (struct return1 *) allocate (sizeof (struct return1), BLOCK); rp->adr = kodp; arch1->next = rp; rp->next = NULL; rp = arch; } } /* * Backpatches the address of continue in while loop. */ void fix_cont_w () { while (NULL != fixp->while1.cnext) { #if 0 struct cont1 *tmp = fixp->while1.cnext; #endif ((struct OPERAND_1_ma *) (fixp->while1.cnext->adr))->adr = fixp->while1.jmp; fixp->while1.cnext = fixp->while1.cnext->next; #if 0 free (tmp); #endif } } /* * Backpatches the address of continue in for loop. */ void fix_cont_f () { while (NULL != fixp->for1.cnext) { #if 0 struct cont1 *tmp = fixp->for1.cnext; #endif ((struct OPERAND_1_ma *) (fixp->for1.cnext->adr))->adr = fixp->for1.jmp3; fixp->for1.cnext = fixp->for1.cnext->next; #if 0 free (tmp); #endif } } /* * Backpatches the address of break in while loop. */ void fix_break_w () { while (NULL != fixp->while1.bnext) { #if 0 struct break1 *tmp = fixp->while1.bnext; #endif ((struct OPERAND_1_ma *) (fixp->while1.bnext->adr))->adr = kodp; fixp->while1.bnext = fixp->while1.bnext->next; #if 0 free (tmp); #endif #ifdef DEBUG printfx ("JMP fixed =%u\n", kodp); #endif } } /* * Backpatches the address of break in for loop. */ void fix_break_f () { while (NULL != fixp->for1.bnext) { #if 0 struct break1 *tmp = fixp->for1.bnext; #endif ((struct OPERAND_1_ma *) (fixp->for1.bnext->adr))->adr = kodp; fixp->for1.bnext = fixp->for1.bnext->next; #if 0 free (tmp); #endif } } /* * Backpatches the address of a return statement. */ void fix_ret () { if (NULL == rp && ! VOID_P(type_com[set]->output)) { error_message (6028); return; } while (NULL != rp) { ((struct OPERAND_1_ma *) (rp->adr))->adr = kodp; rp = rp->next; #if 0 free (tmp); #endif } } /* * Backpatches the address of break in for loop. */ void fix_break_s () { while (NULL != fixp->switch1.bnext) { #if 0 struct break1 *tmp = fixp->switch1.bnext; #endif ((struct OPERAND_1_ma *) (fixp->switch1.bnext->adr))->adr = kodp; fixp->switch1.bnext = fixp->switch1.bnext->next; #if 0 free (tmp); #endif } } /* * Initialization of framework environment. */ static int init () { mem_start = (char *) callocx (bc * SIZE_SPACE, PAGE); if (NULL == mem_start) { error_message (4000); return (0); } stack = mem_start + bc * SIZE_SPACE * PAGE; bp = stack; frame = stack; pc = mem_start; kodp = mem_start; kodp1 = kodp; kodp2 = kodp; current_instr = kodp; #ifdef DEBUG printfx ("Memory allocated\n\n"); #endif if (!hastab_init ()) return 0; if (!identtab_init ()) return 0; hastab_remote = (struct remote_has_tab *) callocx (SIZE_REMOTE, sizeof (struct remote_has_tab)); if (NULL == hastab_remote) { error_message (4000); return (0); } #ifdef DEBUG printfx ("Hash table for remote procedures allocated\n\n"); #endif ast = (char **) callocx (bc * SIZE_ARIT_STACK, PAGE * sizeof (char *)); if (NULL == ast) { error_message (4000); return (0); } ast += bc * SIZE_ARIT_STACK * PAGE; #ifdef DEBUG printfx ("Arithmetic stack allocated \n\n"); #endif tmp = (char *) callocx (bc * SIZE_TMP_STACK, PAGE); if (NULL == tmp) { error_message (4000); return (0); } tmp += bc * SIZE_TMP_STACK * PAGE; tmp_start = tmp; tmph = tmp; #ifdef DEBUG printfx ("Temporary stack allocated \n\n"); #endif pri[VID] = 12; pri[CHR] = pri[SIGNED_AC | CHR] = 11; pri[UNSIGNED_AC | CHR] = 10; pri[SHORT_AC | INTEGER] = pri[SHORT_AC | SIGNED_AC | INTEGER] = 9; pri[SHORT_AC | UNSIGNED_AC | INTEGER] = 8; pri[INTEGER] = pri[SIGNED_AC | INTEGER] = 7; pri[UNSIGNED_AC | INTEGER] = 6; pri[LONG_AC | INTEGER] = pri[LONG_AC | SIGNED_AC | INTEGER] = 5; pri[LONG_AC | UNSIGNED_AC | INTEGER] = 4; pri[FLT] = 3; pri[DOUB] = 2; pri[LONG_AC | DOUB] = 1; #ifdef DEBUG printfx ("Priority table defined\n\n"); #endif dim[0] = -1; fixst = callocx (SIZE_STRUCT_FIX, sizeof (union fix)); if (NULL == fixst) { error_message (4000); return (0); } fixp = (union fix *) fixst; #ifdef DEBUG printfx ("Fix stack allocated\n\n"); printfx ("BEGIN\n\n"); #endif if (!hastab_goto_init ()) return (0); #ifdef CODE cop = fopen (file, "w"); if (NULL == cop) { perror (""); spf[s].name = file; error_message (7001); return (0); } fprintfx (cop, "\n\nIn this file is stored generated code:\n"); fclose (cop); cop = fopen (file, "a"); if (NULL == cop) { perror (""); spf[s].name = file; error_message (7001); return (0); } #endif return (1); } /* * Yacc internal error message function. */ /* It has to have an parameter for the */ /* sake of internal usage in yyparse */ /* (yacc). */ int yyerror (s) char *s; { #if DEBUG fprintfx (stderr, "%s\n", s); #endif return (0); } /* * Type table of hierarchy. */ static int hierarchy (t) int t; { return (pri[t]); } /* * Process implicit cast in expressions. */ int implicit_cast () { if (type_com[set]->attribute.type_qualifier != type_com[set - 1]->attribute.type_qualifier) { switch (type_com[set - 1]->attribute.type_qualifier) { case CONST: type_com[set - 1] = type_com[set]; break; default: break; } } if (hierarchy (type_ac[set]) < hierarchy (type_ac[set - 1])) { switch (type_ac[set]) { case LONG_AC | DOUB: switch (type_ac[set - 1]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTILDb; break; case UNSIGNED_AC | INTEGER: GEN_CVTUILDb; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLILDb; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSILDb; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUILDb; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUILDb; break; case DOUB: GEN_CVTDLDb; break; case FLT: GEN_CVTFLDb; break; case CHR: GEN_CVTCLDb; break; case SIGNED_AC | CHR: GEN_CVTSCLDb; break; case UNSIGNED_AC | CHR: GEN_CVTUCLDb; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } type_ac[set - 1] = LONG_AC | DOUB; GENCODE; return 1; case DOUB: switch (type_ac[set - 1]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTIDb; break; case UNSIGNED_AC | INTEGER: GEN_CVTUIDb; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLIDb; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSIDb; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUIDb; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUIDb; break; case FLT: GEN_CVTFDb; break; case CHR: GEN_CVTCDb; break; case SIGNED_AC | CHR: GEN_CVTSCDb; break; case UNSIGNED_AC | CHR: GEN_CVTUCDb; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } type_ac[set - 1] = DOUB; GENCODE; return 1; case FLT: switch (type_ac[set - 1]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTIFb; break; case UNSIGNED_AC | INTEGER: GEN_CVTUIFb; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLIFb; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSIFb; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUIFb; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUIFb; break; case CHR: GEN_CVTCFb; break; case SIGNED_AC | CHR: GEN_CVTSCFb; break; case UNSIGNED_AC | CHR: GEN_CVTUCFb; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } type_ac[set - 1] = FLT; GENCODE; return 1; case LONG_AC | UNSIGNED_AC | INTEGER: switch (type_ac[set - 1]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTILUIb; break; case UNSIGNED_AC | INTEGER: GEN_CVTUILUIb; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLILUIb; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSILUIb; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUILUIb; break; case CHR: GEN_CVTCLUIb; break; case SIGNED_AC | CHR: GEN_CVTSCLUIb; break; case UNSIGNED_AC | CHR: GEN_CVTUCLUIb; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } type_ac[set - 1] = LONG_AC | UNSIGNED_AC | INTEGER; GENCODE; return 1; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: switch (type_ac[set - 1]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTILIb; break; case UNSIGNED_AC | INTEGER: /* If one operand has type long int and the other operand has type unsigned int, if a long int can represent all values of an unsigned int, the operand of type unsigned int is converted to long int; if a long int cannot represent all the values of an unsigned int, both operands are converted to unsigned long int. */ #ifdef LONG_CAN_UINT GEN_CVTUILIb; #else GEN_CVTUILUIb; #endif break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSILIb; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUILIb; break; case CHR: GEN_CVTCLIb; break; case SIGNED_AC | CHR: GEN_CVTSCLIb; break; case UNSIGNED_AC | CHR: GEN_CVTUCLIb; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } type_ac[set - 1] = LONG_AC | INTEGER; GENCODE; return 1; case UNSIGNED_AC | INTEGER: switch (type_ac[set - 1]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTIUIb; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSIUIb; break; case CHR: GEN_CVTCUIb; break; case SIGNED_AC | CHR: GEN_CVTSCUIb; break; case UNSIGNED_AC | CHR: GEN_CVTUCUIb; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } type_ac[set - 1] = UNSIGNED_AC | INTEGER; GENCODE; return 1; case INTEGER: case SIGNED_AC | INTEGER: switch (type_ac[set - 1]) { case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSIIb; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUIIb; break; case CHR: GEN_CVTCIb; break; case SIGNED_AC | CHR: GEN_CVTSCIb; break; case UNSIGNED_AC | CHR: GEN_CVTUCIb; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } type_ac[set - 1] = INTEGER; GENCODE; return 1; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: switch (type_ac[set - 1]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTSIIt; type_ac[set] = INTEGER; break; case UNSIGNED_AC | INTEGER: GEN_CVTSIUIt; type_ac[set] = UNSIGNED_AC | INTEGER; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTSILIt; type_ac[set] = LONG_AC | INTEGER; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSIIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTSIIb; type_ac[set - 1] = INTEGER; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTSILUIt; type_ac[set] = LONG_AC | UNSIGNED_AC | INTEGER; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSIIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTSUIIb; type_ac[set - 1] = INTEGER; break; case DOUB: GEN_CVTSIDt; type_ac[set] = DOUB; break; case LONG_AC | DOUB: GEN_CVTSILDt; type_ac[set] = LONG_AC | DOUB; break; case FLT: GEN_CVTSIFt; type_ac[set] = FLT; break; case CHR: GEN_CVTSIIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTCIb; type_ac[set - 1] = INTEGER; break; case SIGNED_AC | CHR: GEN_CVTSIIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTSCIb; type_ac[set - 1] = INTEGER; break; case UNSIGNED_AC | CHR: GEN_CVTSIIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTUCIb; type_ac[set - 1] = INTEGER; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case SHORT_AC | UNSIGNED_AC | INTEGER: switch (type_ac[set - 1]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTSUIIt; type_ac[set] = INTEGER; break; case UNSIGNED_AC | INTEGER: GEN_CVTSUIUIt; type_ac[set] = UNSIGNED_AC | INTEGER; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTSUILIt; type_ac[set] = LONG_AC | INTEGER; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSUIIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTSIIb; type_ac[set - 1] = INTEGER; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUILUIt; type_ac[set] = LONG_AC | UNSIGNED_AC | INTEGER; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUIIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTSUIIb; type_ac[set - 1] = INTEGER; break; case DOUB: GEN_CVTSUIDt; type_ac[set] = DOUB; break; case LONG_AC | DOUB: GEN_CVTSUILDt; type_ac[set] = LONG_AC | DOUB; break; case FLT: GEN_CVTSUIFt; type_ac[set] = FLT; break; case CHR: GEN_CVTSUIIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTCIb; type_ac[set - 1] = INTEGER; break; case SIGNED_AC | CHR: GEN_CVTSIIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTSCIb; type_ac[set - 1] = INTEGER; break; case UNSIGNED_AC | CHR: GEN_CVTSUIIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTUCIb; type_ac[set - 1] = INTEGER; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case CHR: switch (type_ac[set - 1]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTCIt; type_ac[set] = INTEGER; break; case UNSIGNED_AC | INTEGER: GEN_CVTCUIt; type_ac[set] = UNSIGNED_AC | INTEGER; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTCLIt; type_ac[set] = LONG_AC | INTEGER; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTCIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTSIIb; type_ac[set - 1] = INTEGER; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTCLUIt; type_ac[set] = LONG_AC | UNSIGNED_AC | INTEGER; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTCIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTSUIIb; type_ac[set - 1] = INTEGER; break; case DOUB: GEN_CVTCDt; type_ac[set] = DOUB; break; case LONG_AC | DOUB: GEN_CVTCLDt; type_ac[set] = LONG_AC | DOUB; break; case FLT: GEN_CVTCFt; type_ac[set] = FLT; break; case CHR: GEN_CVTCIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTCIb; type_ac[set - 1] = INTEGER; break; case SIGNED_AC | CHR: GEN_CVTCIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTSCIb; type_ac[set - 1] = INTEGER; break; case UNSIGNED_AC | CHR: GEN_CVTCIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTUCIb; type_ac[set - 1] = INTEGER; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case SIGNED_AC | CHR: switch (type_ac[set - 1]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTSCIt; type_ac[set] = INTEGER; break; case UNSIGNED_AC | INTEGER: GEN_CVTSCUIt; type_ac[set] = UNSIGNED_AC | INTEGER; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTSCLIt; type_ac[set] = LONG_AC | INTEGER; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSCIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTSIIb; type_ac[set - 1] = INTEGER; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTSCLUIt; type_ac[set] = LONG_AC | UNSIGNED_AC | INTEGER; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSCIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTSUIIb; type_ac[set - 1] = INTEGER; break; case DOUB: GEN_CVTSCDt; type_ac[set] = DOUB; break; case LONG_AC | DOUB: GEN_CVTSCLDt; type_ac[set] = LONG_AC | DOUB; break; case FLT: GEN_CVTSCFt; type_ac[set] = FLT; break; case CHR: GEN_CVTSCIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTCIb; type_ac[set - 1] = INTEGER; break; case SIGNED_AC | CHR: GEN_CVTSCIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTSCIb; type_ac[set - 1] = INTEGER; break; case UNSIGNED_AC | CHR: GEN_CVTSCIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTUCIb; type_ac[set - 1] = INTEGER; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case UNSIGNED_AC | CHR: switch (type_ac[set - 1]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTUCIt; type_ac[set] = INTEGER; break; case UNSIGNED_AC | INTEGER: GEN_CVTUCUIt; type_ac[set] = UNSIGNED_AC | INTEGER; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTUCLIt; type_ac[set] = LONG_AC | INTEGER; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTUCIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTSIIb; type_ac[set - 1] = INTEGER; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTUCLUIt; type_ac[set] = LONG_AC | UNSIGNED_AC | INTEGER; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTUCIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTSUIIb; type_ac[set - 1] = INTEGER; break; case DOUB: GEN_CVTUCDt; type_ac[set] = DOUB; break; case LONG_AC | DOUB: GEN_CVTUCLDt; type_ac[set] = LONG_AC | DOUB; break; case FLT: GEN_CVTUCFt; type_ac[set] = FLT; break; case CHR: GEN_CVTUCIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTCIb; type_ac[set - 1] = INTEGER; break; case SIGNED_AC | CHR: GEN_CVTUCIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTSCIb; type_ac[set - 1] = INTEGER; break; case UNSIGNED_AC | CHR: GEN_CVTUCIt; GENCODE; type_ac[set] = INTEGER; GEN_CVTUCIb; type_ac[set - 1] = INTEGER; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } } else if (hierarchy (type_ac[set]) > hierarchy (type_ac[set - 1])) { switch (type_ac[set - 1]) { case LONG_AC | DOUB: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTILDt; break; case UNSIGNED_AC | INTEGER: GEN_CVTUILDt; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLILDt; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSILDt; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUILDt; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUILDt; break; case DOUB: GEN_CVTDLDt; break; case FLT: GEN_CVTFLDt; break; case CHR: GEN_CVTCLDt; break; case SIGNED_AC | CHR: GEN_CVTSCLDt; break; case UNSIGNED_AC | CHR: GEN_CVTUCLDt; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case DOUB: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTIDt; break; case UNSIGNED_AC | INTEGER: GEN_CVTUIDt; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLIDt; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSIDt; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUIDt; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUIDt; break; case FLT: GEN_CVTFDt; break; case CHR: GEN_CVTCDt; break; case SIGNED_AC | CHR: GEN_CVTSCDt; break; case UNSIGNED_AC | CHR: GEN_CVTUCDt; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return (1); case FLT: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTIFt; break; case UNSIGNED_AC | INTEGER: GEN_CVTUIFt; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLIFt; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSIFt; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUIFt; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUIFt; break; case CHR: GEN_CVTCFt; break; case SIGNED_AC | CHR: GEN_CVTSCFt; break; case UNSIGNED_AC | CHR: GEN_CVTUCFt; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case LONG_AC | UNSIGNED_AC | INTEGER: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTILUIt; break; case UNSIGNED_AC | INTEGER: GEN_CVTUILUIt; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLILUIt; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSILUIt; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUILUIt; break; case CHR: GEN_CVTCLUIt; break; case SIGNED_AC | CHR: GEN_CVTSCLUIt; break; case UNSIGNED_AC | CHR: GEN_CVTUCLUIt; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case LONG_AC | INTEGER: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTILIt; break; case UNSIGNED_AC | INTEGER: /* If one operand has type long int and the other operand has type unsigned int, if a long int can represent all values of an unsigned int, the operand of type unsigned int is converted to long int; if a long int cannot represent all the values of an unsigned int, both operands are converted to unsigned long int. */ #ifdef LONG_CAN_UINT GEN_CVTUILIt; #else GEN_CVTUILUIt; #endif break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSILIt; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUILIt; break; case CHR: GEN_CVTCLIt; break; case SIGNED_AC | CHR: GEN_CVTSCLIt; break; case UNSIGNED_AC | CHR: GEN_CVTUCLIt; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case UNSIGNED_AC | INTEGER: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTIUIt; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSIUIt; break; case CHR: GEN_CVTCUIt; break; case SIGNED_AC | CHR: GEN_CVTSCUIt; break; case UNSIGNED_AC | CHR: GEN_CVTUCUIt; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case INTEGER: switch (type_ac[set]) { case CHR: GEN_CVTCIt; break; case SIGNED_AC | CHR: GEN_CVTSCIt; break; case UNSIGNED_AC | CHR: GEN_CVTUCIt; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return (1); case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTSIIb; type_ac[set - 1] = INTEGER; break; case UNSIGNED_AC | INTEGER: GEN_CVTSIUIb; type_ac[set - 1] = UNSIGNED_AC | INTEGER; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTSILIb; type_ac[set - 1] = LONG_AC | INTEGER; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSIIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTSIIt; type_ac[set] = INTEGER; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTSILUIb; type_ac[set - 1] = LONG_AC | UNSIGNED_AC | INTEGER; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSIIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTSUIIt; type_ac[set] = INTEGER; break; case DOUB: GEN_CVTSIDb; type_ac[set - 1] = DOUB; break; case LONG_AC | DOUB: GEN_CVTSILDb; type_ac[set - 1] = LONG_AC | DOUB; break; case FLT: GEN_CVTSIFb; type_ac[set - 1] = FLT; break; case CHR: GEN_CVTSIIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTCIt; type_ac[set] = INTEGER; break; case SIGNED_AC | CHR: GEN_CVTSIIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTSCIt; type_ac[set] = INTEGER; break; case UNSIGNED_AC | CHR: GEN_CVTSIIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTUCIt; type_ac[set] = INTEGER; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case SHORT_AC | UNSIGNED_AC | INTEGER: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTSUIIb; type_ac[set - 1] = INTEGER; break; case UNSIGNED_AC | INTEGER: GEN_CVTSUIUIb; type_ac[set - 1] = UNSIGNED_AC | INTEGER; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTSUILIb; type_ac[set - 1] = LONG_AC | INTEGER; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSUIIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTSIIt; type_ac[set] = INTEGER; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUILUIb; type_ac[set - 1] = LONG_AC | UNSIGNED_AC | INTEGER; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUIIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTSUIIt; type_ac[set] = INTEGER; break; case DOUB: GEN_CVTSUIDb; type_ac[set - 1] = DOUB; break; case LONG_AC | DOUB: GEN_CVTSUILDb; type_ac[set - 1] = LONG_AC | DOUB; break; case FLT: GEN_CVTSUIFb; type_ac[set - 1] = FLT; break; case CHR: GEN_CVTSUIIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTCIt; type_ac[set] = INTEGER; break; case SIGNED_AC | CHR: GEN_CVTSIIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTSCIt; type_ac[set] = INTEGER; break; case UNSIGNED_AC | CHR: GEN_CVTSUIIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTUCIt; type_ac[set] = INTEGER; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case CHR: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTCIb; type_ac[set - 1] = INTEGER; break; case UNSIGNED_AC | INTEGER: GEN_CVTCUIb; type_ac[set - 1] = UNSIGNED_AC | INTEGER; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTCLIb; type_ac[set - 1] = LONG_AC | INTEGER; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTCIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTSIIt; type_ac[set] = INTEGER; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTCLUIb; type_ac[set - 1] = LONG_AC | UNSIGNED_AC | INTEGER; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTCIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTSUIIt; type_ac[set] = INTEGER; break; case DOUB: GEN_CVTCDb; type_ac[set - 1] = DOUB; break; case LONG_AC | DOUB: GEN_CVTCLDb; type_ac[set - 1] = LONG_AC | DOUB; break; case FLT: GEN_CVTCFb; type_ac[set - 1] = FLT; break; case CHR: GEN_CVTCIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTCIt; type_ac[set] = INTEGER; break; case SIGNED_AC | CHR: GEN_CVTCIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTSCIt; type_ac[set] = INTEGER; break; case UNSIGNED_AC | CHR: GEN_CVTCIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTUCIt; type_ac[set] = INTEGER; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case SIGNED_AC | CHR: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTSCIb; type_ac[set - 1] = INTEGER; break; case UNSIGNED_AC | INTEGER: GEN_CVTSCUIb; type_ac[set - 1] = UNSIGNED_AC | INTEGER; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTSCLIb; type_ac[set - 1] = LONG_AC | INTEGER; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSCIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTSIIt; type_ac[set] = INTEGER; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTSCLUIb; type_ac[set - 1] = LONG_AC | UNSIGNED_AC | INTEGER; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSCIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTSUIIt; type_ac[set] = INTEGER; break; case DOUB: GEN_CVTSCDb; type_ac[set - 1] = DOUB; break; case LONG_AC | DOUB: GEN_CVTSCLDb; type_ac[set - 1] = LONG_AC | DOUB; break; case FLT: GEN_CVTSCFb; type_ac[set - 1] = FLT; break; case CHR: GEN_CVTSCIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTCIt; type_ac[set] = INTEGER; break; case SIGNED_AC | CHR: GEN_CVTSCIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTSCIt; type_ac[set] = INTEGER; break; case UNSIGNED_AC | CHR: GEN_CVTSCIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTUCIt; type_ac[set] = INTEGER; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case UNSIGNED_AC | CHR: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTUCIb; type_ac[set - 1] = INTEGER; break; case UNSIGNED_AC | INTEGER: GEN_CVTUCUIb; type_ac[set - 1] = UNSIGNED_AC | INTEGER; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTUCLIb; type_ac[set - 1] = LONG_AC | INTEGER; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTUCIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTSIIt; type_ac[set] = INTEGER; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTUCLUIb; type_ac[set - 1] = LONG_AC | UNSIGNED_AC | INTEGER; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTUCIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTSUIIt; type_ac[set] = INTEGER; break; case DOUB: GEN_CVTUCDb; type_ac[set - 1] = DOUB; break; case LONG_AC | DOUB: GEN_CVTUCLDb; type_ac[set - 1] = LONG_AC | DOUB; break; case FLT: GEN_CVTUCFb; type_ac[set - 1] = FLT; break; case CHR: GEN_CVTUCIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTCIt; type_ac[set] = INTEGER; break; case SIGNED_AC | CHR: GEN_CVTUCIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTSCIt; type_ac[set] = INTEGER; break; case UNSIGNED_AC | CHR: GEN_CVTUCIb; GENCODE; type_ac[set - 1] = INTEGER; GEN_CVTUCIt; type_ac[set] = INTEGER; break; case VID: error_message (1009); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } } else { if (CHR == type_ac[set]) { GEN_CVTCIt; GENCODE; GEN_CVTCIb; GENCODE; type_ac[set] = type_ac[set - 1] = INTEGER; } else if ((SIGNED_AC | CHR) == type_ac[set]) { GEN_CVTSCIt; GENCODE; GEN_CVTSCIb; GENCODE; type_ac[set] = type_ac[set - 1] = INTEGER; } else if ((UNSIGNED_AC | CHR) == type_ac[set]) { GEN_CVTUCIt; GENCODE; GEN_CVTUCIb; GENCODE; type_ac[set] = type_ac[set - 1] = INTEGER; } else if ((SHORT_AC | INTEGER) == type_ac[set] || (SHORT_AC | SIGNED_AC | INTEGER) == type_ac[set]) { GEN_CVTSIIt; GENCODE; GEN_CVTSIIb; GENCODE; type_ac[set] = type_ac[set - 1] = INTEGER; } else if ((SHORT_AC | UNSIGNED_AC | INTEGER) == type_ac[set]) { #ifdef SHORT_EQ_INT GEN_CVTSUIUIt; GENCODE; GEN_CVTSUIUIb; GENCODE; type_ac[set] = type_ac[set - 1] = UNSIGNED_AC | INTEGER; #else GEN_CVTSUIIt; GENCODE; GEN_CVTSUIIb; GENCODE; type_ac[set] = type_ac[set - 1] = INTEGER; #endif } return 1; } } /* * Process cast to l_value of an expresion. */ int l_value_cast () { if (pointer_cast ()) return 1; if (CONST_P(type_com[set]) && CHAR_P(type_com[set - 1])) { #ifdef UCHAR_MAX if (INTEGER_P(type_com[set]) && *(int *)type_com[set]->attribute.domain > UCHAR_MAX) error_message (6026); #endif } if (hierarchy (type_ac[set]) != hierarchy (type_ac[set - 1])) { switch (type_ac[set - 1]) { case INTEGER: case SIGNED_AC | INTEGER: switch (type_ac[set]) { case UNSIGNED_AC | INTEGER: GEN_CVTUII; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLII; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSIIt; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUII; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUIIt; break; case DOUB: GEN_CVTDI; break; case LONG_AC | DOUB: GEN_CVTLDI; break; case FLT: GEN_CVTFI; break; case CHR: GEN_CVTCIt; break; case SIGNED_AC | CHR: GEN_CVTSCIt; break; case UNSIGNED_AC | CHR: GEN_CVTUCIt; break; case VID: error_message (1010); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case UNSIGNED_AC | INTEGER: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTIUIt; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLIUI; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSIUIt; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUIUI; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUIUIt; break; case DOUB: GEN_CVTDUI; break; case LONG_AC | DOUB: GEN_CVTLDUI; break; case FLT: GEN_CVTFUI; break; case CHR: GEN_CVTCUIt; break; case SIGNED_AC | CHR: GEN_CVTSCUIt; break; case UNSIGNED_AC | CHR: GEN_CVTUCUIt; break; case VID: error_message (1010); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTILIt; break; case UNSIGNED_AC | INTEGER: GEN_CVTUILIt; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSILIt; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUILI; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUILIt; break; case DOUB: GEN_CVTDLI; break; case LONG_AC | DOUB: GEN_CVTLDLI; break; case FLT: GEN_CVTFLI; break; case CHR: GEN_CVTCLIt; break; case SIGNED_AC | CHR: GEN_CVTSCLIt; break; case UNSIGNED_AC | CHR: GEN_CVTUCLIt; break; case VID: error_message (1010); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTISI; break; case UNSIGNED_AC | INTEGER: GEN_CVTUISI; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLISI; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUISI; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUISI; break; case DOUB: GEN_CVTDSI; break; case LONG_AC | DOUB: GEN_CVTLDSI; break; case FLT: GEN_CVTFSI; break; case CHR: GEN_CVTCSI; break; case SIGNED_AC | CHR: GEN_CVTSCSI; break; case UNSIGNED_AC | CHR: GEN_CVTUCSI; break; case VID: error_message (1010); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case LONG_AC | UNSIGNED_AC | INTEGER: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTILUIt; break; case UNSIGNED_AC | INTEGER: GEN_CVTUILUIt; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSILUIt; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLILUIt; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUILUIt; break; case DOUB: GEN_CVTDLUI; break; case LONG_AC | DOUB: GEN_CVTLDLUI; break; case FLT: GEN_CVTFLUI; break; case CHR: GEN_CVTCLUIt; break; case SIGNED_AC | CHR: GEN_CVTSCLUIt; break; case UNSIGNED_AC | CHR: GEN_CVTUCLUIt; break; case VID: error_message (1010); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case SHORT_AC | UNSIGNED_AC | INTEGER: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTISUI; break; case UNSIGNED_AC | INTEGER: GEN_CVTUISUI; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSISUI; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLISUI; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUISUI; break; case DOUB: GEN_CVTDSUI; break; case LONG_AC | DOUB: GEN_CVTLDSUI; break; case FLT: GEN_CVTFSUI; break; case CHR: GEN_CVTCSUI; break; case SIGNED_AC | CHR: GEN_CVTSCSUI; break; case UNSIGNED_AC | CHR: GEN_CVTUCSUI; break; case VID: error_message (1010); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case DOUB: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTIDt; break; case UNSIGNED_AC | INTEGER: GEN_CVTUIDt; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLIDt; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSIDt; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUIDt; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUIDt; break; case LONG_AC | DOUB: GEN_CVTLDD; break; case FLT: GEN_CVTFDt; break; case CHR: GEN_CVTCDt; break; case SIGNED_AC | CHR: GEN_CVTSCDt; break; case UNSIGNED_AC | CHR: GEN_CVTUCDt; break; case VID: error_message (1010); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case LONG_AC | DOUB: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTILDt; break; case UNSIGNED_AC | INTEGER: GEN_CVTUILDt; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLILDt; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSILDt; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUILDt; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUILDt; break; case DOUB: GEN_CVTDLDt; break; case FLT: GEN_CVTFLDt; break; case CHR: GEN_CVTCLDt; break; case SIGNED_AC | CHR: GEN_CVTSCLDt; break; case UNSIGNED_AC | CHR: GEN_CVTUCLDt; break; case VID: error_message (1010); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case FLT: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTIFt; break; case UNSIGNED_AC | INTEGER: GEN_CVTUIFt; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLIFt; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSIFt; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUIFt; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUIFt; break; case DOUB: GEN_CVTDF; break; case LONG_AC | DOUB: GEN_CVTLDF; break; case CHR: GEN_CVTCFt; break; case SIGNED_AC | CHR: GEN_CVTSCFt; break; case UNSIGNED_AC | CHR: GEN_CVTUCFt; break; case VID: error_message (1010); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case CHR: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTIC; break; case UNSIGNED_AC | INTEGER: GEN_CVTUIC; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLIC; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSIC; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUIC; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUIC; break; case DOUB: GEN_CVTDC; break; case LONG_AC | DOUB: GEN_CVTLDC; break; case FLT: GEN_CVTFC; break; case SIGNED_AC | CHR: GEN_CVTSCC; break; case UNSIGNED_AC | CHR: GEN_CVTUCC; break; case VID: error_message (1010); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case SIGNED_AC | CHR: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTISC; break; case UNSIGNED_AC | INTEGER: GEN_CVTUISC; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLISC; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSISC; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUISC; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUISC; break; case DOUB: GEN_CVTDSC; break; case LONG_AC | DOUB: GEN_CVTLDSC; break; case FLT: GEN_CVTFSC; break; case CHR: GEN_CVTCSC; break; case UNSIGNED_AC | CHR: GEN_CVTUCSC; break; case VID: error_message (1010); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case UNSIGNED_AC | CHR: switch (type_ac[set]) { case INTEGER: case SIGNED_AC | INTEGER: GEN_CVTIUC; break; case UNSIGNED_AC | INTEGER: GEN_CVTUIUC; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_CVTLIUC; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_CVTSIUC; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_CVTLUIUC; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_CVTSUIUC; break; case DOUB: GEN_CVTDUC; break; case LONG_AC | DOUB: GEN_CVTLDUC; break; case FLT: GEN_CVTFUC; break; case CHR: GEN_CVTCUC; break; case SIGNED_AC | CHR: GEN_CVTSCUC; break; case VID: error_message (1010); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; return 1; case VID: fprintfx (stderr, "void conversion not supported yet\n"); return 1; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } } else return 1; } /* Checks if lvalue and expression are assignable in pointer arithmetic. */ static int pointer_cast () { struct internal_type *lval_type = type_com[set - 1], *rval_type = type_com[set]; if (LOCAL_P(lval_type) || REMOTE_P(lval_type)) lval_type = lval_type->output; if (LOCAL_P(rval_type) || REMOTE_P(rval_type)) rval_type = rval_type->output; if (POINTER_P(lval_type) && (POINTER_P(rval_type) || ARRAY_P(rval_type))) { if (type_compare (rval_type, lval_type)) error_message (6013); } else if (POINTER_P(lval_type) && (STRUCT_P(rval_type) || UNION_P(rval_type))) error_message (1028); else if (POINTER_P(rval_type)) error_message (6012); else if (POINTER_P(lval_type)) error_message (6012); #if 0 else if (ARRAY_P(lval_type)) error_message (1028); #endif else if ((STRUCT_P(lval_type) && STRUCT_P(rval_type)) || (UNION_P(lval_type) && UNION_P(rval_type))) { if (lval_type != rval_type) error_message (1028); else return 0; } else if ((STRUCT_P(rval_type) && !STRUCT_P(lval_type)) || (!STRUCT_P(rval_type) && STRUCT_P(lval_type)) || (UNION_P(rval_type) && !UNION_P(lval_type)) || (!UNION_P(rval_type) && UNION_P(lval_type))) error_message (1028); else return 0; return 1; } /* * Map function for array subscripts. */ void array_subscript (pom) struct internal_type *pom; { dim[++poc] = ((struct range *) pom->attribute.domain)->upper; pom = pom->arity; while (NULL != pom) { dim[++poc] = ((struct range *) pom->attribute.domain)->upper; pom = pom->arity; } } /* * Saves dimensions of arrays in the hash table. */ void put_array_subscript (identtab_type) struct internal_type **identtab_type; { /* During initialization an array may be without dimensions. */ if (! poc) return; (*identtab_type)->input = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); (*identtab_type)->input->attribute.arit_class = INTEGER; (*identtab_type)->input->attribute.domain = (char *) allocate (sizeof (struct range), PERM); ((struct range *) (*identtab_type)->input->attribute.domain)->lower = 0; ((struct range *) (*identtab_type)->input->attribute.domain)->upper = dim[poc]; dim[poc--] = -1; if (-1 != dim[poc]) { struct internal_type *pom; pom = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); pom->attribute.arit_class = INTEGER; pom->attribute.domain = (char *) allocate (sizeof (struct range), PERM); ((struct range *) pom->attribute.domain)->lower = 0; ((struct range *) pom->attribute.domain)->upper = dim[poc]; dim[poc--] = -1; (*identtab_type)->input->arity = pom; /* -1 means not an subscript anymore. -2 means not defined subscript (e.g. a[][1] (the flag is NOT_DEFINED)). */ while (-1 != dim[poc]) { pom->arity = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); pom->arity->attribute.arit_class = INTEGER; pom->arity->attribute.domain = (char *) allocate (sizeof (struct range), PERM); pom = pom->arity; ((struct range *) pom->attribute.domain)->lower = 0; ((struct range *) pom->attribute.domain)->upper = dim[poc]; dim[poc--] = -1; } } } #define ERR_NO_INFO print_error_number (err_no); #define ERROR_INFO print_file_name (); ERR_NO_INFO #define ERROR_FULL_INFO(line_no) print_file_name (); \ print_line_number (line_no); \ print_error_number (err_no); /* * Prints compiling and run-time error messages. */ void error_message VPROTO((int err_no, ...)) { #ifndef __STDC__ int err_no; #endif static int last_error_line; va_list point; VA_START (point, err_no); #ifndef __STDC__ err_no = va_arg (point, int); #endif if (warning_inhibit && err_no >= 6000 && err_no < 7000) goto end; if (err_no < 6000 || err_no >= 7000) { error_count++; last_error_line = spf[s].line_counter; } else if (warnings_are_errors) error_count++; /* Do not print warnings, when error was printed on the same line. */ if (last_error_line == spf[s].line_counter && err_no >= 6000 && err_no < 7000) goto end; switch (err_no) { /* \verbatim{comp_maint_c_errors_1.tex} */ case 1000: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "variable `%s' isn't declared\n", text); break; case 1001: ERROR_FULL_INFO(spf[s].line_counter); #ifdef OLD_SYNTAX fprintfx (stderr, "variable `%s' was already declared\n", text); #else fprintfx (stderr, "`%s' redeclared as different kind of symbol\n", text); ERROR_FULL_INFO(get_declaration_line (text)); fprintfx (stderr, "previous declaration of `%s'\n", text); #endif break; case 1002: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "remote procedure %s is not declared\n", proc_name_text[proc]); break; case 1003: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "local variable `%s' was already declared\n", text); break; case 1004: #ifdef OLD_SYNTAX_ERROR print_source_line (); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "at the %d-th char, near the `%s'\n", char_counter, yytext); #else { char *text = va_arg(point, char *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "parse error before `%s'\n", text); } #endif break; case 1005: print_source_line (); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "invalid type of the operand, %d-th character\n", char_counter); break; case 1006: ERROR_INFO; fprintfx (stderr, "remote function `%s' already declared\n", text); break; case 1007: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "remote function isn't declared\n"); break; case 1008: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "remote functions are not in the load table\n"); break; case 1009: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "`void' type in expression\n"); break; case 1010: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "`void' type assigned to l_value\n"); break; case 1011: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "load can't open file `%s'\n", yytext); break; case 1012: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "variable or field `%s' declared void\n", text); break; case 1013: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "switch quantity not an integer\n"); break; case 1014: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "case label does not reduce to an integer constant\n"); break; case 1015: ERROR_FULL_INFO(tmp_c->line_number); fprintfx (stderr, "duplicate case value\n"); ERROR_FULL_INFO(tmp_m->line_number); fprintfx (stderr, "this is the first entry for that value\n"); break; case 1016: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "case label not within a switch statement\n"); break; case 1017: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "redefinition of `struct %s'\n", text); break; case 1018: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "redefinition of `union %s'\n", text); break; case 1019: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "redefinition of `enum %s'\n", text); break; case 1020: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "conversion to non-scalar type requested\n"); break; case 1021: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "invalid type argument of `->'\n"); break; case 1022: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "invalid lvalue in unary `&'\n"); break; case 1023: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "storage size of `%s' isn't known\n", text); break; case 1024: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "parameter `%s' has incomplete type\n", text); break; case 1025: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "field `%s' has incomplete type\n", text); break; case 1026: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "`%s' defined as wrong kind of tag\n", text); break; case 1027: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "sizeof applied to an incomplete type\n"); break; case 1028: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "incompatible types in assignment\n"); break; case 1029: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "invalid type argument of `unary *'\n"); break; case 1030: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "wrong type argument to bit-complement\n"); break; case 1031: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "wrong type argument to unary minus\n"); break; case 1032: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "wrong type argument to unary plus\n"); break; case 1033: { char *arg = va_arg (point, char *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "invalid operands to binary %s\n", arg); } break; case 1034: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "invalid lvalue in assignment\n"); break; case 1035: { char *arg = va_arg (point, char *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "invalid lvalue in %s\n", arg); } break; case 1036: { char *arg = va_arg (point, char *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "function definition declared `%s'\n", arg); } break; case 1037: { char *arg = va_arg (point, char *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "typedef `%s' is initialized\n", arg); } break; case 1038: { char *arg = va_arg (point, char *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "`%s' undeclared here (not in a function)\n", arg); } break; case 1039: { char *arg = va_arg (point, char *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "parse error before %s constant\n", arg); } break; case 1040: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "invalid initializer\n"); break; /* \verbatim */ /* \verbatim{comp_maint_c_errors_2.tex} */ case 2000: ERROR_FULL_INFO(spf[s].line_counter); #ifdef OLD_SYNTAX fprintfx (stderr, "`%s' is not an array variable\n", text); #else fprintfx (stderr, "subscripted value is neither array nor pointer\n"); #endif break; case 2002: print_source_line (); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "invalid type of array subscript\n"); break; case 2003: print_source_line (); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "type of formal parameter does not match previous declaration\n"); break; case 2004: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "number of formal parameters does not match previous declaration\n"); break; case 2005: print_source_line (); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "name of formal paramter does not match previous declaration\n"); break; case 2006: print_source_line (); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "size of array subscript of formal parameter does not match previous declaration\n"); break; case 2007: print_source_line (); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "number of array subscripts of formal parameter does not match previous declaration\n"); break; case 2008 : ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "structure has no member named `%s'\n", text); break; case 2009: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "request for member `%s' in something not a structure or union\n", text); break; case 2010: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "too few arguments to function `%s'\n", text); break; case 2011: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "too many arguments to function `%s'\n", text); break; case 2012: { char *name = va_arg(point, char *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "long, short, signed or unsigned invalid for `%s'\n", name); } break; case 2013: { char *name = va_arg(point, char *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "long or short specified with char for `%s'\n", name); } break; case 2014: { char *name = va_arg(point, char *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "short, signed or unsigned invalid for `%s'\n", name); } break; case 2015: { char *name = va_arg(point, char *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "signed and unsigned given together for `%s'\n", name); } break; case 2016: { char *name = va_arg(point, char *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "long and short specified together for `%s'\n", name); } break; case 2017: { #if 0 char *name = va_arg(point, char *); #endif ERROR_FULL_INFO(spf[s].line_counter); #if 0 fprintfx (stderr, "multiple storage classes in declaration of `%s'\n", name); #else fprintfx (stderr, "multiple storage classes in declaration\n"); #endif } break; case 2018: { char *name = va_arg(point, char *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "storage class specified for parameter `%s'\n", name); } break; /* \verbatim */ /* \verbatim{comp_maint_c_errors_3.tex} */ case 3000: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "`break' outside loop or switch\n"); break; case 3001: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "bad used `continue'\n"); break; case 3002: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "default label not within a switch statement\n"); break; case 3003: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "multiple default labels in one switch\n"); ERROR_FULL_INFO(fixp->switch1.def_use.line_number); fprintfx (stderr, "this is the first default label\n"); break; case 3004: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "duplicate label `%s'\n", text); break; case 3005: ERROR_FULL_INFO(error_line_number); fprintfx (stderr, "label `%s' used but not defined\n", text); break; /* \verbatim */ /* \verbatim{comp_maint_c_errors_4.tex} */ case 4000: ERR_NO_INFO; fprintfx (stderr, "interpreter: full memory\n"); break; case 4001: ERR_NO_INFO; fprintfx (stderr, "interpreter: stack overflow\n"); break; case 4002: ERR_NO_INFO; fprintfx (stderr, "operating system out of memory\n"); break; case 4003: ERR_NO_INFO; fprintfx (stderr, "interpreter: Undefined symbol `main'\n"); break; case 4004: ERR_NO_INFO; fprintfx (stderr, "cannot set signals\n"); break; /* \verbatim */ /* \verbatim{comp_maint_c_errors_5.tex} */ case 5000: fprintfx (stderr, "Compile Fatal "); ERR_NO_INFO; fprintfx (stderr, "Interpreter Internal Error (unknown operand type) in line %d e-mail: %s\n", spf[s].line_counter, EMAIL); print_source_line (); fprintfx (stderr, "\n"); break; case 5001: fprintfx (stderr, "Run-time Fatal "); ERR_NO_INFO; fprintfx (stderr, " Internal Interpreter Error (unknown instruction) e-mail: %s\n", EMAIL); print_source_line (); fprintfx (stderr, "\n"); break; case 5002: fprintfx (stderr, "Compile Fatal "); ERR_NO_INFO; fprintfx (stderr, " Interpreter Internal Error (error in book-keeping) in line %d e-mail: %s\n", spf[s].line_counter, EMAIL); print_source_line (); fprintfx (stderr, "\n"); break; case 5003: fprintfx (stderr, "Compile Fatal "); ERR_NO_INFO; fprintfx (stderr, " Internal Interpreter Error (error in operand type) in line %d e-mail: %s\n", spf[s].line_counter, EMAIL); print_source_line (); fprintfx (stderr, "\n"); break; /* \verbatim */ /* \verbatim{comp_maint_c_errors_6.tex} */ case 6000: if (warning_yes) { ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "remote function %s already declared\n", text); } goto end; case 6001: if (warning_yes || warning_return_type) { ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "`return' with no value, in function returning non-void\n"); } goto end; case 6002: if (warning_yes || warning_return_type) { ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "`return' with a value, in function returning void\n"); } goto end; case 6003: if (warning_extra || warning_unused) { if (proc_name_text[proc]) { ERROR_INFO; fprintfx (stderr, "unused variable `%s'\n", text); } else { print_file_name (); fprintfx (stderr, " In block finishing at line %d:\n", spf[s].line_counter); ERROR_INFO; fprintfx (stderr, "unused variable `%s'\n", text); } } goto end; case 6004: if (warning_yes || warning_unused) { ERROR_FULL_INFO(error_line_number); fprintfx (stderr, "label `%s' defined but not used\n", text); } goto end; case 6005: if (warning_yes || warning_comment) { ERROR_INFO; fprintfx (stderr, " `/*' within comment\n"); /* Comment within comment. */ } goto end; case 6006: if (warning_yes || warning_uninitialized) { if (proc_name_text[proc]) { ERROR_INFO; fprintfx (stderr, "`%s' might be used uninitialized in this function\n", text); } else { print_file_name (); fprintfx (stderr, " In block finishing at line %d:\n", spf[s].line_counter); ERROR_INFO; fprintfx (stderr, "`%s' might be used uninitialized in the block\n", text); } } goto end; case 6007: if (warning_extra) { ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "number of locals is greater than the ANSI allows\n"); } goto end; case 6008: if (warning_extra) { ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "number of params is greater than the ANSI allows\n"); } goto end; case 6009: if (warning_yes || warning_implicit) { /* Rather silly approach of finding anonymous declarations inside parameter lists. */ char *tmp_line, *beg, *end, *com; int n, n_tmp_line = strlen(line_buf); tmp_line = malloc(n_tmp_line + 1); if (NULL == tmp_line) { perror (""); abort (); } strcpy (tmp_line, line_buf); beg = strrchr (tmp_line, '('); if (NULL == beg) beg = tmp_line; else beg++; n = strlen (beg); if (',' == beg[n - 1]) beg[n - 1] = '\0'; com = strrchr (beg, ','); if (NULL != com) beg = com + 1; for (; *beg == ' ' || *beg == '\t'; beg++); end = strrchr (beg, ' '); com = strchr (beg, ' '); if (end != com) *end = '\0'; else tmp_line[n_tmp_line - 1] = '\0'; n = strlen(beg); if (beg[n - 1] == ' ') beg[n - 1] = '\0'; com = strchr (beg, ' '); ERROR_FULL_INFO(spf[s].line_counter); if (beg[0] == '\0') abort (); if (NULL == com) fprintfx (stderr, "anonymous %s declared inside parameter list\n", beg); else fprintfx (stderr, "`%s' declared inside parameter list\n", beg); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "its scope is only this definition or declaration,\n"); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "which is probably not what you want.\n"); free (tmp_line); } goto end; case 6010: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "useless keyword or type name in empty declaration\n"); goto end; case 6011: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "empty declaration\n"); goto end; case 6012: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "assignment makes %s from %s without a cast\n", POINTER_P(type_com[set - 1])? "pointer": type2string (type_com[set - 1]), POINTER_P(type_com[set])? "pointer": type2string (type_com[set])); goto end; case 6013: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "assignment from incompatible pointer type\n"); goto end; case 6014: if (warning_yes || warning_format) { char buf[2]; buf[0] = va_arg(point, char); buf[1] = va_arg(point, char); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "use of `%c' length character with `%c' type character\n", buf[0], buf[1]); } goto end; case 6015: if (warning_yes || warning_format) { int arg = va_arg(point, int); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "long long int format, different type arg (arg %d)\n", arg); } goto end; case 6016: if (warning_yes || warning_format) { int arg = va_arg(point, int); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "long long unsigned int format, different type arg (arg %d)\n", arg); } goto end; case 6017: if (warning_yes || warning_format) { struct internal_type *type = va_arg(point, struct internal_type *); int arg = va_arg(point, int); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "%s format, different type arg (arg %d)\n", type2string (type), arg); } goto end; case 6018: if (warning_yes || warning_format) { ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "spurious trailing `%%' in format\n"); } goto end; case 6019: if (warning_yes || warning_format) { ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "conversion lacks type at end of format\n"); } goto end; case 6020: if (warning_yes || warning_format) { ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "repeated ` ' flag in format\n"); } goto end; case 6021: if (warning_yes || warning_format) { ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "too few arguments for format\n"); } goto end; case 6022: if (warning_yes || warning_format) { ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "too many arguments for format\n"); } goto end; case 6023: if (warning_yes || warning_format) { ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "embedded `\\0' in format\n"); } goto end; case 6024: if (warning_yes) { struct internal_type *type1 = va_arg (point, struct internal_type *), *type2 = va_arg (point, struct internal_type *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "comparison between %s and %s\n", type2string (type1), type2string (type2)); } goto end; case 6025: { char *type = va_arg(point, char *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "duplicate `%s'\n", type); } goto end; case 6026: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "overflow in implicit constant conversion\n"); goto end; case 6027: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "statement with no effect\n"); goto end; case 6028: if (warning_yes && strcmp (text, "main")) { ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "control reaches end of non-void function\n"); } goto end; case 6029: if (warning_yes) { ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "left-hand operand of comma expression has no effect\n"); } goto end; case 6030: if (warning_yes) { char *name = va_arg(point, char *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "missing braces around initializer for `%s'\n", name); } goto end; case 6031: if (warning_yes || warning_format) { struct internal_type *type = va_arg(point, struct internal_type *); int arg = va_arg(point, int); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "%s format, pointer arg (arg %d)\n", type2string (type), arg); } goto end; case 6032: if (warning_yes || warning_trigraphs) { static int no_trig; no_trig++; ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "trigraph encountered\n"); } goto end; case 6033: { char *name = va_arg(point, char *); ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "unknown escape sequence `\\%s'\n", name); } goto end; case 6034: if (warning_aggregate_return) { ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "function returns an aggregate\n"); } goto end; case 6035: if (warning_aggregate_return) { ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "function call has aggregate value\n"); } goto end; /* \verbatim */ /* \verbatim{comp_maint_c_errors_7.tex} */ case 7000: print_error_number (err_no); fprintfx (stderr, "in run-string and/or in `clif.ini' file\n"); break; case 7001: print_error_number (err_no); fprintfx (stderr, "interpreter: can't open file %s\n", spf[s].name); break; case 7002: print_error_number (err_no); fprintfx (stderr, "`-fcall-by-value' and `-fcall-by-reference' are conflicting options. `-fcall-by-reference' ignored.\n"); break; case 7003: ERROR_FULL_INFO(spf[s].line_counter); fprintfx (stderr, "`-fhandle-main' option and syntax on this line are conflicting.\n"); break; default: fprintfx (stderr, "Fatal error invalid error number (%d) e-mail: %s\n", err_no, EMAIL); break; /* \verbatim */ } COMPILE_ONLY; end: if (error_count > 10) { fprintfx (stderr, "too many errors giving up\n"); exit (1); } va_end(point); return; } static void print_file_name () { static char *function_name; fprintfx (stderr, "%s:", spf[s].name); if (proc && ! func_def_f && function_name != proc_name_text[proc] && proc_name[proc] == NULL) { fprintfx (stderr, " In function `%s':\n", proc_name_text[proc]); function_name = proc_name_text[proc]; fprintfx (stderr, "%s:", spf[s].name); } else if (proc > 1 && function_name != proc_name_text[1] && proc_name[1] == NULL) { fprintfx (stderr, " In function `%s':\n", proc_name_text[1]); function_name = proc_name_text[1]; fprintfx (stderr, "%s:", spf[s].name); } return; } static void print_source_line () { if (source_line_number != spf[s].line_counter) { fprintfx (stderr, "\nSource line: %s\n", line_buf); fprintfx (stderr, " %*s^", char_counter, " "); fprintfx (stderr, "\n"); source_line_number = spf[s].line_counter; } return; } static void print_error_number (err_no) int err_no; { #ifdef LONG_ERROR if (6000 > err_no && 7000 <= err_no) fprintfx (stderr, " Error %d:", err_no); else fprintfx (stderr, " Warning %d:", err_no); #else if (6000 <= err_no && 7000 > err_no) fprintfx (stderr, " warning: ", err_no); else fprintfx (stderr, " "); #endif } static void print_line_number (line_no) int line_no; { #ifdef LONG_ERROR fprintfx (stderr, "line %d:", line_no); #else fprintfx (stderr, "%d:", line_no); #endif } static char * type2string (type) struct internal_type *type; { if (POINTER_P(type) || ARRAY_P(type)) return "pointer"; switch (type->attribute.arit_class) { case UNSIGNED_AC | CHR: case INTEGER: return "integer"; case DOUB: return "double"; case FLT: return "float"; case CHR: return "char"; case VID: return "void"; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } } /* * Transformation of type to global type. Used in calling of remote functions * with export type. */ int type_transform (type, typec, flag) enum intern_arit_class type; enum intern_func_class typec; int flag; { if (flag) { switch (typec) { case REMOTE_F : /* Fall through. */ case LOCAL : case SIMPLE: case ARRAY: case ENUM_FC: switch (type) { case SIGNED_AC | CHR: return (SCHRS); case UNSIGNED_AC | CHR: return (UCHRS); case CHR: return (CHRS); case INTEGER: case SIGNED_AC | INTEGER: return (INTEGERS); case UNSIGNED_AC | INTEGER: return (UINTEGERS); case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: return (LINTEGERS); case LONG_AC | UNSIGNED_AC | INTEGER: return (LUINTEGERS); case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: return (SINTEGERS); case SHORT_AC | UNSIGNED_AC | INTEGER: return (SUINTEGERS); case DOUB: return (DOUBS); case LONG_AC | DOUB: return (LDOUBS); case FLT: return (FLTS); default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } break; #if 0 case ARRAY: switch (type) { case CHR: return (CHRS); case INTEGER: return (INTEGERS); case DOUB: return (DOUBS); case FLT: return (FLTS); default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } #endif default : fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } } else { switch (typec) { case REMOTE_F: /* Fall through. */ case LOCAL: case ENUM_FC: case POINTER: case SIMPLE: switch (type) { case SIGNED_AC | CHR: return (SCHRS); case UNSIGNED_AC | CHR: return (UCHRS); case CHR: return (CHRS); case INTEGER: case SIGNED_AC | INTEGER: return (INTEGERS); case UNSIGNED_AC | INTEGER: return (UINTEGERS); case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: return (LINTEGERS); case LONG_AC | UNSIGNED_AC | INTEGER: return (LUINTEGERS); case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: return (SINTEGERS); case SHORT_AC | UNSIGNED_AC | INTEGER: return (SUINTEGERS); case DOUB: return (DOUBS); case LONG_AC | DOUB: return (LDOUBS); case FLT: return (FLTS); default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } break; case ARRAY: switch (type) { case CHR: return (CHRAR); case INTEGER: return (INTEGERAR); case DOUB: return (DOUBAR); case FLT: return (FLTAR); default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } default : fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } } return (-1); } /* * Functions for control of type specifiers and formal parameter names in * function declarations. */ /* * There is only a list of specifiers. */ int add_to_spec_list () { struct internal_type *tmp_l; if (NULL == l_type_spec) { l_type_spec = copy_type (typeh[type_spec_count]); if (ARRAY_P(typeh[type_spec_count]) && -1 == add_subs_to_spec_list (&l_type_spec) && -1 == add_subs_to_spec_list (&(typeh[type_spec_count]))) return (-1); } else { tmp_l = l_type_spec; while (NULL != tmp_l->arity) tmp_l = tmp_l->arity; tmp_l->arity = copy_type (typeh[type_spec_count]); if (ARRAY_P(typeh[type_spec_count]) && -1 == add_subs_to_spec_list (&tmp_l->arity) && -1 == add_subs_to_spec_list (&(typeh[type_spec_count]))) return (-1); } return (0); } /* There are identifiers as well. */ int add_to_ident_list () { struct ident_list_str *tmp_l; if (NULL == ident_list) { ident_list = (struct ident_list_str *) allocate (sizeof (struct ident_list_str), PERM); ident_list->ident = text; ident_list->next = NULL; } else { tmp_l = ident_list; while (NULL != tmp_l->next) tmp_l = tmp_l->next; tmp_l->next = (struct ident_list_str *) allocate (sizeof (struct ident_list_str), PERM); tmp_l->next->ident = text; tmp_l->next->next = NULL; } return (0); } /* Compares if 2 trees are */ /* equivalent. It is needed in */ /* comparing specification in */ /* declaration and definition. */ int compare2trees (table, def) struct internal_type *table, *def; { /* If there is a function pointer in the function declaration just update the structure with with more specific information; i.e. int f(int (*)(), double (*)[3]); int f(int (*)(char *), double (*)[]); will be internally: int f(int (*)(char *), double (*)[3]); */ if (table->attribute.function_class == LOCAL && def->attribute.function_class == LOCAL) { if (table->input == NULL && def->input != NULL) table->input = copy_type (def->input); else if (table->input != NULL && def->input == NULL) def->input = copy_type (table->input); } /* Comparing if the trees have the */ /* same structure. */ if (((NULL != table->input) && (NULL == def->input)) || ((NULL == table->input) && (NULL != def->input))) { error_message (2003); return (-1); } if (((NULL != table->output) && (NULL == def->output)) || ((NULL == table->output) && (NULL != def->output))) { error_message (2003); return (-1); } if (((NULL != table->arity) && (NULL == def->arity)) || ((NULL == table->arity) && (NULL != def->arity))) { /* If a tree has domain and another */ /* not, number of subscripts does not */ /* match. */ if (((NULL != table->attribute.domain) && (NULL == def->attribute.domain)) || ((NULL == table->attribute.domain) && (NULL != def->attribute.domain))) { error_message (2007); return (-1); } else if ((NULL == table->attribute.domain) && (NULL == def->attribute.domain)) { error_message (2004); return (-1); } else { error_message (2007); return (-1); } } /* If a tree has domain and another */ /* not, number of subscripts does not */ /* match. */ if (((NULL != table->attribute.domain) && (NULL == def->attribute.domain)) || ((NULL == table->attribute.domain) && (NULL != def->attribute.domain))) { error_message (2007); return (-1); } if ((NULL != table->attribute.domain) && (NULL != def->attribute.domain)) { if (NOT_DEFINED == ((struct range *) table->attribute.domain)->upper) { ((struct range *) table->attribute.domain)->upper = ((struct range *) def->attribute.domain)->upper; } /* The same subscript has to have the */ /* same range. */ /* NOT_DEFINED is [] in the declaration of the */ /* first subscript. */ if (NOT_DEFINED != ((struct range *) def->attribute.domain)->upper && ((((struct range *) table->attribute.domain)->lower != ((struct range *) def->attribute.domain)->lower) || (((struct range *) table->attribute.domain)->upper != ((struct range *) def->attribute.domain)->upper))) { error_message (2006); return (-1); } } /* Comparing two structure contents. */ if ((table->attribute.function_class != def->attribute.function_class) || (table->attribute.export_type != def->attribute.export_type) || (table->attribute.memory_size != def->attribute.memory_size)) { error_message (2003); return (-1); } /* Comparing attribute aritmetical */ /* class. */ if (table->attribute.arit_class != def->attribute.arit_class) { error_message (2003); return (-1); } /* Compare structure recursively. */ if ((NULL != table->input) && (NULL != def->input) && (-1 == compare2trees (table->input, def->input))) /* Error propagation. */ return (-1); if ((NULL != table->arity) && (NULL != def->arity) && (-1 == compare2trees (table->arity, def->arity))) /* Error propagation. */ return (-1); if ((NULL != table->output) && (NULL != def->output) && (-1 == compare2trees (table->output, def->output))) /* Error propagation. */ return (-1); /* Free the comparing structure again. */ #if 0 free (def); #endif return (0); } /* Copy internal type. Used in function declaration or definition. */ static struct internal_type * copy_type (type) struct internal_type *type; { struct internal_type *new_type; if (NULL == type) return NULL; new_type = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); new_type->input = type->input; new_type->arity = type->arity; new_type->field_name = type->field_name; new_type->offset = type->offset; new_type->attribute.function_class = type->attribute.function_class; new_type->attribute.export_type = type->attribute.export_type; new_type->attribute.type_qualifier = type->attribute.type_qualifier; new_type->attribute.storage_class_specifier = type->attribute.storage_class_specifier; new_type->attribute.arit_class = type->attribute.arit_class; new_type->attribute.memory_size = type->attribute.memory_size; new_type->attribute.domain = type->attribute.domain; new_type->output = type->output; return new_type; } /* * Adding information about arrays to the list of specifiers. */ static int add_subs_to_spec_list (type) struct internal_type **type; { int count_tmp; count_tmp = poc; (*type)->input = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); (*type)->input->attribute.arit_class = INTEGER; (*type)->input->attribute.domain = (char *) allocate (sizeof (struct range), PERM); ((struct range *) (*type)->input->attribute.domain)->lower = 0; ((struct range *) (*type)->input->attribute.domain)->upper = dim[count_tmp--]; if (-1 != dim[count_tmp]) { struct internal_type *walk; walk = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); walk->attribute.arit_class = INTEGER; walk->attribute.domain = (char *) allocate (sizeof (struct range), PERM); ((struct range *) walk->attribute.domain)->lower = 0; ((struct range *) walk->attribute.domain)->upper = dim[count_tmp--]; (*type)->input->arity = walk; while (-1 != dim[count_tmp]) { walk->arity = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); walk = walk->arity; walk->attribute.arit_class = INTEGER; walk->attribute.domain = (char *) allocate (sizeof (struct range), PERM); ((struct range *) walk->attribute.domain)->lower = 0; ((struct range *) walk->attribute.domain)->upper = dim[count_tmp--]; } } return (0); } void clear_internal_type (def) struct internal_type *def; { struct internal_type *cyclic_pointer; if (POINTER_P(def) && NULL != (cyclic_pointer = cyclic_def (def, def->output))) cyclic_pointer->output = NULL; if (NULL != def->input) clear_internal_type (def->input); if (NULL != def->arity) clear_internal_type (def->arity); if (NULL != def->output) clear_internal_type (def->output); if (NULL != def->attribute.domain) { #if 0 free (def->attribute.domain); #endif return; } #if 0 free (def); #endif return; } void search_duplicate_labels () { int counter = 1, i; if ((SWITCH == fixp->switch1.major) && (NULL != fixp->switch1.next)) { tmp_c = fixp->switch1.next; while (NULL != tmp_c->next) { tmp_c = tmp_c->next; tmp_m = fixp->switch1.next; counter++; /* Finding duplicate labels in the */ /* list. (a little bit awkward) */ for (i = 1; i < counter; i++) { if (tmp_m->constant == tmp_c->constant) { error_message (1015); return; } tmp_m = tmp_m->next; } } } else { fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5002); abort (); } return; } int add_constant_to_list (int_const) int int_const; { union fix *fixp_arch; struct list_const1 *ptr; /* The current value of the fixative pointer is stored for the next usage. (If in the nested if case is used.) */ fixp_arch = fixp; while (IF == fixp->if1.major) fixp--; if (fixp == (union fix *) fixst) { error_message (1016); fixp = fixp_arch; return (1); } /* All things we are doing only for */ /* good error message production. */ if (SWITCH == fixp->switch1.major) { if (NULL == fixp->switch1.next) { fixp->switch1.next = (struct list_const1 *) allocate (sizeof (struct list_const1), PERM); /* We need line number and constant. */ fixp->switch1.next->line_number = spf[s].line_counter; fixp->switch1.next->constant = int_const; fixp->switch1.next->next = NULL; } else { ptr = fixp->switch1.next; while (NULL != ptr->next) ptr = ptr->next; ptr->next = (struct list_const1 *) allocate (sizeof (struct list_const1), PERM); ptr->next->line_number = spf[s].line_counter; ptr->next->constant = int_const; ptr->next->next = NULL; } } else { error_message (1016); fixp = fixp_arch; return (1); } fixp = fixp_arch; return (0); } void add_default_to_fixp () { union fix *fixp_arch; /* The current value of the fixative pointer is stored for the next usage. (If in the nested if default is used.) */ fixp_arch = fixp; while (IF == fixp->if1.major) fixp--; if (fixp == (union fix *) fixst) { error_message (3002); fixp = fixp_arch; return; } if (SWITCH == fixp->switch1.major) { /* Only one default statement per */ /* switch. */ if (0 == fixp->switch1.def_use.def_flag) { fixp->switch1.def_use.def_flag = 1; fixp->switch1.def_use.line_number = spf[s].line_counter; fixp->switch1.def_use.adr = kodp; } else { error_message (3003); fixp = fixp_arch; return; } } else { error_message (3002); fixp = fixp_arch; return; } fixp = fixp_arch; return; } /* Functions for setting and resetting of the flag of function definition context. */ void func_def_s () { func_def_f = 1; } void func_def_r () { func_def_f = 0; } /* The function is used in 2 different contexts: - during the function declaration or definition - when entering a block. If a function is defined, the scope is changed already when the opening parenthesis of formal arguments is parsed. So, afterwards when opening bracket of the context of a compound statement is parsed the scope level cannot be changed. When a new block is parsed (not in the context of a function definition) context is changed during the parsing of left bracket. */ void enter_scope () { if (func_def_f) func_def_f = 0; else scope_level++; } void exit_scope () { clear_hash_tab (); clear_tag_tab (); scope_level ? scope_level-- : 0; } static void mov2lvalue (typec, type) struct internal_type *typec; enum intern_arit_class type; { switch (typec->attribute.function_class) { case POINTER: case ARRAY: case SIMPLE: switch (type) { case INTEGER: case SIGNED_AC | INTEGER: GEN_MOVi; break; case UNSIGNED_AC | INTEGER: GEN_MOVui; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: GEN_MOVli; break; case LONG_AC | UNSIGNED_AC | INTEGER: GEN_MOVlui; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: GEN_MOVsi; break; case SHORT_AC | UNSIGNED_AC | INTEGER: GEN_MOVsui; break; case DOUB: GEN_MOVd; break; case LONG_AC | DOUB: GEN_MOVld; break; case FLT: GEN_MOVf; break; case CHR: GEN_MOVc; break; case SIGNED_AC | CHR: GEN_MOVsc; break; case UNSIGNED_AC | CHR: GEN_MOVuc; break; default : fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } GENCODE; break; case ENUM_FC: if (INTEGER == type) { GEN_MOVi; GENCODE; } else { fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } break; case STRUCT_FC: case UNION_FC: { register int i; for (i = 0; i < typec->attribute.memory_size; i++) { GEN_PUSHAIi(i); GENCODE; GEN_MOVbv; GENCODE; } } GEN_POPAe; GENCODE; break; default: /* FIXME: */ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5002); abort (); break; } } /* Generate right MOV instructruction. */ void move2lvalue () { mov2lvalue (type_com[set], type_ac[set]); } /* Compare if pointers to 2 types are comaptible. */ static int type_compare (type1, type2) struct internal_type *type1, *type2; { if (POINTER_P(type2) && ARRAY_P(type1) && type1->output == type2->output) { #if 0 error_message (1028); #endif GEN_MOVpa; GENCODE; } else if (POINTER_P(type2) && ARRAY_P(type1)) error_message (1028); else if (POINTER_P(type1) && POINTER_P(type2) && SIMPLE_P(type1->output) && SIMPLE_P(type2->output)) { if (type1->output->attribute.arit_class == type2->output->attribute.arit_class) return 0; else error_message (6013); } else if (POINTER_P(type1) && POINTER_P(type2) && type1->output != type2->output) error_message (1028); return 0; } /* Find cycles in pointer definitions and declarations. */ static struct internal_type * cyclic_def (type1, type2) struct internal_type *type1, *type2; { struct internal_type *result = NULL; if (type1 == NULL) { fprintfx (stderr, "%s:%d: cyclic_def with bad parameter\n", __FILE__, __LINE__); abort (); } if (type2 == NULL) return result; if (POINTER_P(type2) && type1->output == type2->output) result = type2; if (!result && type2->input != NULL) result = cyclic_def (type1, type2->input); if (!result && type2->arity != NULL) result = cyclic_def (type1, type2->arity); if (!result && type2->output != NULL) result = cyclic_def (type1, type2->output); return result; } /* Combination of all hashing tables. Choose the appropriate one and put the variable there.*/ void put2table (name, type) char *name; struct internal_type *type; { struct internal_type *walk = type; while (walk && !STATIC_P(walk)) walk = walk->output; if (walk && proc == 0) { if (UNUSED_AC == walk->attribute.arit_class) walk->attribute.arit_class = INTEGER; enter_file_scope (); if (-1 == has_loc (VAR, name)) COMPILE_ONLY; } else if (NULL != proc_name_text[proc] && type != NULL) { if (-1 == has_loc (VAR, name)) COMPILE_ONLY; } else if (-1 == has (name)) COMPILE_ONLY; } /* Number of args for a function is returned. */ int get_num_args (type) struct internal_type *type; { register struct internal_type *walk; register int n; if (type && (REMOTE_P(type) || LOCAL_P(type))) { walk = type->input; for (n = 0; walk; walk = walk->arity, n++) if (VOID_P(walk)) n--; } return n; } /* Type promotion. */ void promote_type () { switch (type_ac[set]) { case CHR: GEN_CVTCIt; GENCODE; type_ac[set] = INTEGER; break; case FLT: GEN_CVTFDt; GENCODE; type_ac[set] = DOUB; break; default: /* Yup, it's ok here */ break; } } /* Arrange all things for starting main */ static int start_main () { extern char *string PROTO((char *)); struct ident_tab *ptr; /* This version supports main only without arguments. I have to change it to return appropriate values and parse input args. */ text = string ("main"); ptr = point (text); if (NULL == ptr) { error_message (4003); return 1; } pc = kodp; GEN_CALL(ptr->adr); GENCODE; GEN_STOP; GENCODE; return 0; } /* Checks if specified type specifiers are valid. If not issues error_message. */ void check_spec_constr (type, name) struct internal_type *type; char *name; { if (POINTER_P(type) || ARRAY_P(type) || LOCAL_P(type) || REMOTE_P(type)) while (type->output) type = type->output; if (VOID_P(type)) { if (SIGNED_P(type) || UNSIGNED_P(type) || LONG_P(type) || SHORT_P(type)) error_message (2012, name); } else if (CHAR_P(type)) { if (LONG_P(type) || SHORT_P(type)) error_message (2013, name); } else if (INTEGER_P(type)) ; else if (FLOAT_P(type)) { if (SIGNED_P(type) || UNSIGNED_P(type) || LONG_P(type) || SHORT_P(type)) error_message (2012, name); } else if (DOUBLE_P(type)) { if (SIGNED_P(type) || UNSIGNED_P(type) || SHORT_P(type)) error_message (2014, name); } else if (! TYPEDEF_P(type) && ! (UNSPEC_P (type) && UNDEF_P(type) && UNUSED_P(type))) type->attribute.arit_class += INTEGER; else if (TYPEDEF_P(type)) ; else error_message (5003); if (SIGNED_P(type) && UNSIGNED_P(type)) error_message (2015, name); else if (LONG_P(type) && SHORT_P(type)) error_message (2016, name); } void gen_cast_needed () { if (call_by_value) { GEN_CVTFDt; GENCODE; type_ac[set] = DOUB; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = UNDEF_TQ; type_com[set]->attribute.arit_class = type_ac[set]; type_com[set]->attribute.memory_size = sizeof (double); } } clif-0.93/comp_maint.h100444 1750 1750 10675 6560622041 13450 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * comp_maint.h */ #ifndef _COMP_MAINT_H #define _COMP_MAINT_H /* Process implicit cast in expressions. */ extern int implicit_cast PROTO((void)); /* Process cast to l_value of an expresion. */ extern int l_value_cast PROTO((void)); /* If return occurred it saves the backpatch address of the JMP instruction. */ extern void retfix PROTO((void)); /* If continue occurred it saves the backpatch address of the JMP instruction. */ extern int cofix PROTO((void)); /* If break occurred it saves the backpatch address of the JMP instruction. */ extern int brfix PROTO((void)); /* Backpatches the address of continue in while loop. */ extern void fix_cont_w PROTO((void)); /* Backpatches the address of continue in for loop. */ extern void fix_cont_f PROTO((void)); /* Backpatches the address of break in while loop. */ extern void fix_break_w PROTO((void)); /* Backpatches the address of break in for loop. */ extern void fix_break_f PROTO((void)); /* Backpatches the address of a return statement. */ extern void fix_ret PROTO((void)); /* Backpatches the address of break in for loop. */ extern void fix_break_s PROTO((void)); extern int add_to_spec_list PROTO((void)); extern int add_to_ident_list PROTO((void)); extern void search_duplicate_labels PROTO((void)); extern int add_constant_to_list PROTO((int)); extern void add_default_to_fixp PROTO((void)); extern int yyerror PROTO((char *)); extern void func_def_s PROTO((void)); extern void func_def_r PROTO((void)); extern void enter_scope PROTO((void)); extern void exit_scope PROTO((void)); extern int scope_level; extern int verbose; extern void move2lvalue PROTO((void)); /* Map function for array subscripts. */ extern void array_subscript PROTO((struct internal_type *)); /* Clears internal_type part of the */ /* hash table for local variables. */ extern void clear_internal_type PROTO((struct internal_type *)); /* * Saves dimensions of arrays in the hash table. */ extern void put_array_subscript PROTO((struct internal_type **)); /* Compares two trees, if there are */ /* equivalent. */ extern int compare2trees PROTO((struct internal_type *, struct internal_type *)); extern int type_transform PROTO((enum intern_arit_class, enum intern_func_class, int)); /* Main function. */ extern void clif PROTO((int, char *[])); /* Checking if labels in case */ /* statement are different. */ extern void search_duplicate_labels PROTO((void)); /* Adding integer constant to list if */ /* it is in switch statement. */ extern int add_constant_to_list PROTO((int)); /* Adding default label to the fixative */ /* structure. */ extern void add_default_to_fixp PROTO((void)); /* Source line number. Detecting if */ /* the current line was already */ /* printed. Using in error messages. */ extern int source_line_number; /* Line number where the error was. */ extern int error_line_number; /* Count of errors. */ extern int error_count; #define COMPILE_ONLY no_compile_only = 0 #define COMPILE_P !no_compile_only extern struct internal_type *l_type_spec; /* List of type specifiers in function declaration. */ extern struct ident_list_str *ident_list; /* List of formal parameters. */ /* Combination of all hashing tables. Choose the appropriate one and put the variable there. */ extern void put2table PROTO((char *, struct internal_type *)); /* Number of args for a function is returned. */ extern int get_num_args PROTO((struct internal_type *)); /* Type promotion. */ extern void promote_type PROTO((void)); extern void check_spec_constr PROTO((struct internal_type *, char *)); extern void gen_cast_needed PROTO((void)); #endif /* COMP_MAINT_H */ clif-0.93/config.h100444 1750 1750 3634 6517662356 12563 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _CONFIG_H #define _CONFIG_H #include "auto-config.h" #ifdef HAVE_ASSERT_H #include #ifndef MAX_CELL_MEMORY_SIZE #define MAX_CELL_MEMORY_SIZE sizeof (long double) #endif #endif #if HAVE_LONG_DOUBLE == 0 #ifdef STDC_HEADERS #include #if DBL_MANT_DIG == LDBL_MANT_DIG && DBL_DIG == LDBL_DIG && \ DBL_MIN_EXP == LDBL_MIN_EXP && DBL_MIN_10_EXP == LDBL_MIN_10_EXP && \ DBL_MAX_EXP == LDBL_MAX_EXP && DBL_MAX_10_EXP == LDBL_MAX_10_EXP #define LDOUBLE_EQ_DOUBLE #endif #endif #endif #ifdef HAVE_LIMITS_H #include #if INT_MAX == LONG_MAX && INT_MIN == LONG_MIN #define LONG_EQ_INT #endif #if INT_MAX == SHRT_MAX && INT_MIN == SHRT_MIN #define SHORT_EQ_INT #endif #if UINT_MAX == USHRT_MAX #define UINT_EQ_USHORT #endif #if UINT_MAX == ULONG_MAX #define UINT_EQ_ULONG #endif #if LONG_MAX >= UINT_MAX #define LONG_CAN_UINT #endif #endif typedef union { int *a; long int *b; long unsigned int *c; short int *d; short unsigned int *e; char *f; signed char *g; unsigned char *h; double *i; long double *j; float *k; void (*l)(); } pointer_size; #define POINTER_SIZE sizeof (pointer_size) #endif clif-0.93/config.in100644 1750 1750 3130 6520054743 12720 0ustar korenkoren/* config.in. Generated automatically from configure.in by autoheader. */ /* Define default alignment for doubles. */ #undef MAX_ALIGNMENT /* Define if you want to check stack. */ #undef CHKSTACK /* Define if you want to generate output from the virtual machine. */ #undef CODE /* Define if you want to have automatic control enhancements. */ #undef CONTROL /* Define if you want to use more output during compilation and run-time. */ #undef DEBUG /* Define if you have TIOCSTI macro. */ #undef HAVE_TIOCSTI /* Define if you have . */ #undef HAVE_ASSERT_H /* Define if you don't have vprintf but do have _doprnt. */ #undef HAVE_DOPRNT /* Define if the `long double' type works. */ #undef HAVE_LONG_DOUBLE /* Define if you have the vprintf function. */ #undef HAVE_VPRINTF /* Define as the return type of signal handlers (int or void). */ #undef RETSIGTYPE /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define if you have the isalpha function. */ #undef HAVE_ISALPHA /* Define if you have the isspace function. */ #undef HAVE_ISSPACE /* Define if you have the header file. */ #undef HAVE_ASSERT_H /* Define if you have the header file. */ #undef HAVE_LIMITS_H /* Define if you have the BSD library (-lBSD). */ #undef HAVE_LIBBSD /* Define if you have the bsd library (-lbsd). */ #undef HAVE_LIBBSD /* Define if you have the elf library (-lelf). */ #undef HAVE_LIBELF /* Define if you have the ucb library (-lucb). */ #undef HAVE_LIBUCB clif-0.93/configure100755 1750 1750 267321 6521626267 13117 0ustar korenkoren#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.12 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help --with-x use the X Window System" ac_help="$ac_help --enable-CONTROL features for automatic control" ac_help="$ac_help --enable-CODE symbolic code from virtual machine for debugging" ac_help="$ac_help --enable-DEBUG debugging of the virtual machine" ac_help="$ac_help --enable-CHKSTACK check stack of the virtual machine" # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.12" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file=buf.h # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi PROGS="utils/yy clif rw" # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:537: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:566: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ac_prog_rejected=no for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" break fi done IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$ac_dir/$ac_word" "$@" shift ac_cv_prog_CC="$@" fi fi fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:614: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_works=no fi rm -fr conftest* echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:648: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:653: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo "configure:677: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then CFLAGS="-g -O2" else CFLAGS="-O2" fi else GCC= test "${CFLAGS+set}" = set || CFLAGS="-g" fi for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:709: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_YACC="$ac_prog" break fi done IFS="$ac_save_ifs" fi fi YACC="$ac_cv_prog_YACC" if test -n "$YACC"; then echo "$ac_t""$YACC" 1>&6 else echo "$ac_t""no" 1>&6 fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:741: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_LEX="flex" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex" fi fi LEX="$ac_cv_prog_LEX" if test -n "$LEX"; then echo "$ac_t""$LEX" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$LEXLIB" then case "$LEX" in flex*) ac_lib=fl ;; *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 echo "configure:774: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LEXLIB="-l$ac_lib" else echo "$ac_t""no" 1>&6 fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:816: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 # If we find X, set shell vars x_includes and x_libraries to the # paths, otherwise set no_x=yes. # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 echo "configure:881: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then withval="$with_x" : fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then # Both variables are already set. have_x=yes else if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=NO ac_x_libraries=NO rm -fr conftestdir if mkdir conftestdir; then cd conftestdir # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat > Imakefile <<'EOF' acfindx: @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' EOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && test -f $ac_im_libdir/libX11.$ac_extension; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case "$ac_im_incroot" in /usr/include) ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; esac case "$ac_im_usrlibdir" in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; esac fi cd .. rm -fr conftestdir fi if test "$ac_x_includes" = NO; then # Guess where to find include files, by looking for this one X11 .h file. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* # We can compile using X headers with no special include directory. ac_x_includes= else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* # Look for the header file in a standard set of common directories. # Check X11 before X11Rn because it is often a symlink to the current release. for ac_dir in \ /usr/X11/include \ /usr/X11R6/include \ /usr/X11R5/include \ /usr/X11R4/include \ \ /usr/include/X11 \ /usr/include/X11R6 \ /usr/include/X11R5 \ /usr/include/X11R4 \ \ /usr/local/X11/include \ /usr/local/X11R6/include \ /usr/local/X11R5/include \ /usr/local/X11R4/include \ \ /usr/local/include/X11 \ /usr/local/include/X11R6 \ /usr/local/include/X11R5 \ /usr/local/include/X11R4 \ \ /usr/X386/include \ /usr/x386/include \ /usr/XFree86/include/X11 \ \ /usr/include \ /usr/local/include \ /usr/unsupported/include \ /usr/athena/include \ /usr/local/x11r5/include \ /usr/lpp/Xamples/include \ \ /usr/openwin/include \ /usr/openwin/share/include \ ; \ do if test -r "$ac_dir/$x_direct_test_include"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest* fi # $ac_x_includes = NO if test "$ac_x_libraries" = NO; then # Check for the libraries. test -z "$x_direct_test_library" && x_direct_test_library=Xt test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. ac_x_libraries= else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* LIBS="$ac_save_LIBS" # First see if replacing the include by lib works. # Check X11 before X11Rn because it is often a symlink to the current release. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ /usr/X11/lib \ /usr/X11R6/lib \ /usr/X11R5/lib \ /usr/X11R4/lib \ \ /usr/lib/X11 \ /usr/lib/X11R6 \ /usr/lib/X11R5 \ /usr/lib/X11R4 \ \ /usr/local/X11/lib \ /usr/local/X11R6/lib \ /usr/local/X11R5/lib \ /usr/local/X11R4/lib \ \ /usr/local/lib/X11 \ /usr/local/lib/X11R6 \ /usr/local/lib/X11R5 \ /usr/local/lib/X11R4 \ \ /usr/X386/lib \ /usr/x386/lib \ /usr/XFree86/lib/X11 \ \ /usr/lib \ /usr/local/lib \ /usr/unsupported/lib \ /usr/athena/lib \ /usr/local/x11r5/lib \ /usr/lpp/Xamples/lib \ /lib/usr/lib/X11 \ \ /usr/openwin/lib \ /usr/openwin/share/lib \ ; \ do for ac_extension in a so sl; do if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f conftest* fi # $ac_x_libraries = NO if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then # Didn't find X anywhere. Cache the known absence of X. ac_cv_have_x="have_x=no" else # Record where we found X for the cache. ac_cv_have_x="have_x=yes \ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" fi fi fi eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then echo "$ac_t""$have_x" 1>&6 no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. cat >> confdefs.h <<\EOF #define X_DISPLAY_MISSING 1 EOF X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 echo "configure:1130: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_nospace=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_R_nospace=no fi rm -f conftest* if test $ac_R_nospace = yes; then echo "$ac_t""no" 1>&6 X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_space=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_R_space=no fi rm -f conftest* if test $ac_R_space = yes; then echo "$ac_t""yes" 1>&6 X_LIBS="$X_LIBS -R $x_libraries" else echo "$ac_t""neither works" 1>&6 fi fi LIBS="$ac_xsave_LIBS" esac fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 echo "configure:1195: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" else echo "$ac_t""no" 1>&6 fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 echo "configure:1236: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" else echo "$ac_t""no" 1>&6 fi fi # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 echo "configure:1284: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me #else gethostbyname(); #endif ; return 0; } EOF if { (eval echo configure:1312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_gethostbyname=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 echo "configure:1333: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" else echo "$ac_t""no" 1>&6 fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says simon@lia.di.epfl.ch: it contains # gethostby* variants that don't use the nameserver (or something). # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 echo "configure:1382: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_connect) || defined (__stub___connect) choke me #else connect(); #endif ; return 0; } EOF if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_connect=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_connect=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 echo "configure:1431: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" else echo "$ac_t""no" 1>&6 fi fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 echo "configure:1474: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char remove(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_remove) || defined (__stub___remove) choke me #else remove(); #endif ; return 0; } EOF if { (eval echo configure:1502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_remove=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_remove=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 echo "configure:1523: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" else echo "$ac_t""no" 1>&6 fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 echo "configure:1566: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shmat(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shmat) || defined (__stub___shmat) choke me #else shmat(); #endif ; return 0; } EOF if { (eval echo configure:1594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_shmat=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 echo "configure:1615: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" else echo "$ac_t""no" 1>&6 fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS="$LDFLAGS" test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 echo "configure:1667: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lICE $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" else echo "$ac_t""no" 1>&6 fi LDFLAGS="$ac_save_LDFLAGS" fi echo $ac_n "checking for main in -lelf""... $ac_c" 1>&6 echo "configure:1711: checking for main in -lelf" >&5 ac_lib_var=`echo elf'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lelf $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo elf | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for main in -lucb""... $ac_c" 1>&6 echo "configure:1754: checking for main in -lucb" >&5 ac_lib_var=`echo ucb'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lucb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo ucb | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for main in -lBSD""... $ac_c" 1>&6 echo "configure:1797: checking for main in -lBSD" >&5 ac_lib_var=`echo BSD'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lBSD $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo BSD | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi for ac_hdr in assert.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1843: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in limits.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1883: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done echo $ac_n "checking for vprintf""... $ac_c" 1>&6 echo "configure:1920: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char vprintf(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_vprintf) || defined (__stub___vprintf) choke me #else vprintf(); #endif ; return 0; } EOF if { (eval echo configure:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_vprintf=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define HAVE_VPRINTF 1 EOF else echo "$ac_t""no" 1>&6 fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 echo "configure:1972: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _doprnt(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub__doprnt) || defined (__stub____doprnt) choke me #else _doprnt(); #endif ; return 0; } EOF if { (eval echo configure:2000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func__doprnt=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define HAVE_DOPRNT 1 EOF else echo "$ac_t""no" 1>&6 fi fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 echo "configure:2025: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #ifdef signal #undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main() { int i; ; return 0; } EOF if { (eval echo configure:2047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_type_signal=int fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_signal" 1>&6 cat >> confdefs.h <&6 echo "configure:2066: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memchr" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF if { (eval echo configure:2146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_header_stdc=no fi rm -fr conftest* fi fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF #define STDC_HEADERS 1 EOF fi for ac_func in isalpha isspace do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:2172: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:2200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done ac_safe=`echo "signal.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for signal.h""... $ac_c" 1>&6 echo "configure:2226: checking for signal.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 op_signal=signal.h else echo "$ac_t""no" 1>&6 fi ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termio.h""... $ac_c" 1>&6 echo "configure:2259: checking for termio.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 op_termio=termio.h else echo "$ac_t""no" 1>&6 fi ac_safe=`echo "fcntl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for fcntl.h""... $ac_c" 1>&6 echo "configure:2292: checking for fcntl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 op_fcntl=fcntl.h else echo "$ac_t""no" 1>&6 op_fcntl=sys/file.h fi echo $ac_n "checking for SVR signals""... $ac_c" 1>&6 echo "configure:2326: checking for SVR signals" >&5 if eval "test \"`echo '$''{'clif_cv_sigs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include<$op_signal> #include<$op_termio> #include<$op_fcntl> int main() { sigset(SIGINT,(void *)NULL); ; return 0; } EOF if { (eval echo configure:2341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* clif_cv_sigs=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* clif_cv_sigs=no fi rm -f conftest* fi echo "$ac_t""$clif_cv_sigs" 1>&6 if test $clif_cv_sigs = yes; then echo $ac_n "checking for SVR3 features""... $ac_c" 1>&6 echo "configure:2357: checking for SVR3 features" >&5 if eval "test \"`echo '$''{'clif_cv_lnctl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int x = LNEW_CTLECH; ; return 0; } EOF if { (eval echo configure:2369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* clif_cv_lnctl=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* clif_cv_lnctl=no fi rm -f conftest* fi echo "$ac_t""$clif_cv_lnctl" 1>&6 if test $clif_cv_lnctl = yes; then echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6 echo "configure:2385: checking for main in -lbsd" >&5 ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi ADD_OBJS="$ADD_OBJS sig-svr3.o" ADD_FORK="$ADD_FORK \$(srcdir)/sigig.c" else ADD_OBJS="$ADD_OBJS sig-svr4.o" ADD_FORK="$ADD_FORK \$(srcdir)/sigig.c" fi clif_cv_sigv=no clif_cv_lsig=no clif_cv_psig=no else echo $ac_n "checking for old-BSD signals""... $ac_c" 1>&6 echo "configure:2438: checking for old-BSD signals" >&5 if eval "test \"`echo '$''{'clif_cv_sigv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include<$op_signal> #include<$op_termio> #include<$op_fcntl> int main() { struct sigvec vec,ovec; sigvec(SIGINT,&vec,&ovec); ; return 0; } EOF if { (eval echo configure:2453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* clif_cv_sigv=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* clif_cv_sigv=no fi rm -f conftest* fi echo "$ac_t""$clif_cv_sigv" 1>&6 fi if test $clif_cv_sigv = yes; then ADD_OBJS="$ADD_OBJS sig-bsd.o" ADD_FORK="$ADD_FORK \$(srcdir)/sigig_bsd.c" cat > conftest.$ac_ext < #include<$op_signal> #include<$op_termio> #include<$op_fcntl> int main() { ioctl(stdin,TIOCSTI,"\n"); ; return 0; } EOF if { (eval echo configure:2482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TIOCSTI 1 EOF else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* clif_cv_lsig=no clif_cv_psig=no elif test $clif_cv_sigs = no; then echo $ac_n "checking for Linux signals""... $ac_c" 1>&6 echo "configure:2497: checking for Linux signals" >&5 if eval "test \"`echo '$''{'clif_cv_lsig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include #include int main() { struct sigvec vec,ovec; sigvec(SIGINT,&vec,&ovec); ; return 0; } EOF if { (eval echo configure:2512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ADD_OBJS="$ADD_OBJS inter_handl_lin.o" ADD_FORK="$ADD_FORK \$(srcdir)/sigig_lin.c" ADD_IDIR="$ADD_IDIR -I/usr/include" cat > conftest.$ac_ext < #include #include #include int main() { ioctl (stdin, TIOCSTI, "\n"); ; return 0; } EOF if { (eval echo configure:2528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TIOCSTI 1 EOF else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* clif_cv_lsig=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* clif_cv_lsig=no fi rm -f conftest* fi echo "$ac_t""$clif_cv_lsig" 1>&6 fi if test $clif_cv_sigs = no && test $clif_cv_sigv = no && test $clif_cv_lsig = no; then ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termios.h""... $ac_c" 1>&6 echo "configure:2555: checking for termios.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 op_termio=termios.h else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking if it is a true POSIXized system""... $ac_c" 1>&6 echo "configure:2587: checking if it is a true POSIXized system" >&5 if eval "test \"`echo '$''{'clif_cv_psig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$op_signal> #include <$op_termio> int main() { struct termios term; struct sigaction act, oact; int fd; tcgetattr (fd, &term); sigemptyset (&act.sa_mask); sigaction (SIGINT, &act, &oact); ; return 0; } EOF if { (eval echo configure:2606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* clif_cv_psig=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* clif_cv_psig=no fi rm -f conftest* fi echo "$ac_t""$clif_cv_psig" 1>&6 else clif_cv_psig=no fi if test $clif_cv_sigs = no && test $clif_cv_sigv = no && test $clif_cv_lsig = no && test $clif_cv_psig = yes; then ADD_OBJS="$ADD_OBJS sig-posix.o" ADD_FORK="$ADD_FORK \$(srcdir)/sigig_posix.c" elif test $clif_cv_sigs = no && test $clif_cv_sigv = no && test $clif_cv_lsig = no && test $clif_cv_psig = no; then echo "configure: warning: cannot find proper signal handling you should probably create new signal handling routines sig-....c and sigig...c are examples" 1>&2 ADD_OBJS="$ADD_OBJS dumb.o" ADD_FORK="$ADD_FORK \$(srcdir)/sigig_dumb.c" echo "RETSIGTYPE interrupt_service () {}" > dumb.c echo "void interrupt_register () {}" >> dumb.c echo "void interrupt_service_sync () {}" >> dumb.c echo "void term_restore () {}" >> dumb.c echo "int handler;" >> dumb.c echo "void fatal_handler_register () {}" >> dumb.c echo "void fatal_handler () {}" >> dumb.c echo "void mysigignore () {}" > sigig_dumb.c fi echo $ac_n "checking for long double""... $ac_c" 1>&6 echo "configure:2643: checking for long double" >&5 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then ac_cv_c_long_double=yes else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_long_double=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_c_long_double=no fi rm -fr conftest* fi fi fi echo "$ac_t""$ac_cv_c_long_double" 1>&6 if test $ac_cv_c_long_double = yes; then cat >> confdefs.h <<\EOF #define HAVE_LONG_DOUBLE 1 EOF fi echo $ac_n "checking for default alignment""... $ac_c" 1>&6 echo "configure:2686: checking for default alignment" >&5 if eval "test \"`echo '$''{'clif_cv_align'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then clif_cv_align=8 else cat > conftest.$ac_ext < struct foo { int a; double b;}; int main () { exit ((int)&((struct foo *)0)->b != sizeof (int));} EOF if { (eval echo configure:2703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then clif_cv_align=4 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* clif_cv_align=8 fi rm -fr conftest* fi fi if test $clif_cv_align -eq 4; then cat >> confdefs.h <<\EOF #define MAX_ALIGNMENT 4 EOF else cat >> confdefs.h <<\EOF #define MAX_ALIGNMENT 8 EOF fi echo "$ac_t""$clif_cv_align" 1>&6 # Check whether --enable-CONTROL or --disable-CONTROL was given. if test "${enable_CONTROL+set}" = set; then enableval="$enable_CONTROL" if test "$enableval" = "yes"; then cat >> confdefs.h <<\EOF #define CONTROL 1 EOF SH_OBJS="lin_clnt.o lin_xdr.o" if test $LEX = flex; then echo "configure: warning: automatic \`resume;' generation is not supported with flex" 1>&2 fi fi fi # Check whether --enable-CODE or --disable-CODE was given. if test "${enable_CODE+set}" = set; then enableval="$enable_CODE" if test "$enableval" = "yes"; then cat >> confdefs.h <<\EOF #define CODE 1 EOF fi fi # Check whether --enable-DEBUG or --disable-DEBUG was given. if test "${enable_DEBUG+set}" = set; then enableval="$enable_DEBUG" if test "$enableval" = "yes"; then cat >> confdefs.h <<\EOF #define DEBUG 1 EOF fi fi # Check whether --enable-CHKSTACK or --disable-CHKSTACK was given. if test "${enable_CHKSTACK+set}" = set; then enableval="$enable_CHKSTACK" if test "$enableval" = "yes"; then cat >> confdefs.h <<\EOF #define CHKSTACK 1 EOF fi fi trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 DEFS=-DHAVE_CONFIG_H # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.12" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir trap 'rm -fr `echo "Makefile auto-config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@PROGS@%$PROGS%g s%@CC@%$CC%g s%@YACC@%$YACC%g s%@LEX@%$LEX%g s%@LEXLIB@%$LEXLIB%g s%@CPP@%$CPP%g s%@X_CFLAGS@%$X_CFLAGS%g s%@X_PRE_LIBS@%$X_PRE_LIBS%g s%@X_LIBS@%$X_LIBS%g s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g s%@ADD_IDIR@%$ADD_IDIR%g s%@ADD_OBJS@%$ADD_OBJS%g s%@ADD_FORK@%$ADD_FORK%g s%@SH_OBJS@%$SH_OBJS%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` cat $ac_file_inputs > conftest.in EOF # Transform confdefs.h into a sed script conftest.vals that substitutes # the proper values into config.h.in to produce config.h. And first: # Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF sed -n -f conftest.hdr confdefs.h > conftest.vals rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >> conftest.vals <<\EOF s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. rm -f conftest.tail while : do ac_lines=`grep -c . conftest.vals` # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi # Write a limited-size here document to conftest.frag. echo ' cat > conftest.frag <> $CONFIG_STATUS sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF sed -f conftest.frag conftest.in > conftest.out rm -f conftest.in mv conftest.out conftest.in ' >> $CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail rm -f conftest.vals mv conftest.tail conftest.vals done rm -f conftest.vals cat >> $CONFIG_STATUS <<\EOF rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h cat conftest.in >> conftest.h rm -f conftest.in if cmp -s $ac_file conftest.h 2>/dev/null; then echo "$ac_file is unchanged" rm -f conftest.h else # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" fi rm -f $ac_file mv conftest.h $ac_file fi fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF rm -f Makefile.sed echo 's| ||' > Makefile.sed rm -f Makefile.tmp sed -f Makefile.sed Makefile > Makefile.tmp mv Makefile.tmp Makefile rm -f Makefile.sed case x$CONFIG_HEADERS in xauto-config.h:config.in) echo > stamp-h ;; esac exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 clif-0.93/configure.in100444 1750 1750 10534 6521626255 13464 0ustar korenkorendnl Process this file with autoconf to produce a configure script # Clif - A C-like Interpreter Framework # Copyright (C) 1997, 1998 L. Koren # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. AC_INIT(buf.h) AC_CONFIG_HEADER(auto-config.h:config.in) PROGS="utils/yy clif rw" AC_SUBST(PROGS)dnl AC_PROG_CC AC_PROG_YACC AC_PROG_LEX dnl AC_PROG_INSTALL AC_PATH_XTRA AC_CHECK_LIB(elf,main) AC_CHECK_LIB(ucb,main) AC_CHECK_LIB(BSD,main) AC_CHECK_HEADERS(assert.h) AC_CHECK_HEADERS(limits.h) AC_FUNC_VPRINTF AC_TYPE_SIGNAL AC_HEADER_STDC AC_CHECK_FUNCS(isalpha isspace) AC_HEADER_CHECK(signal.h,op_signal=signal.h) AC_HEADER_CHECK(termio.h,op_termio=termio.h) AC_HEADER_CHECK(fcntl.h,op_fcntl=fcntl.h,op_fcntl=sys/file.h) CLIF_SVR_SIGS if test $clif_cv_sigs = yes; then CLIF_SVR3_TERM if test $clif_cv_lnctl = yes; then AC_CHECK_LIB(bsd,main) ADD_OBJS="$ADD_OBJS sig-svr3.o" ADD_FORK="$ADD_FORK \$(srcdir)/sigig.c" else ADD_OBJS="$ADD_OBJS sig-svr4.o" ADD_FORK="$ADD_FORK \$(srcdir)/sigig.c" fi clif_cv_sigv=no clif_cv_lsig=no clif_cv_psig=no else CLIF_BSD_SIG fi if test $clif_cv_sigv = yes; then ADD_OBJS="$ADD_OBJS sig-bsd.o" ADD_FORK="$ADD_FORK \$(srcdir)/sigig_bsd.c" AC_TRY_LINK([#include #include<$op_signal> #include<$op_termio> #include<$op_fcntl>], [ioctl(stdin,TIOCSTI,"\n");], AC_DEFINE(HAVE_TIOCSTI)) clif_cv_lsig=no clif_cv_psig=no elif test $clif_cv_sigs = no; then CLIF_LINUX_SIG fi if test $clif_cv_sigs = no && test $clif_cv_sigv = no && test $clif_cv_lsig = no; then AC_HEADER_CHECK(termios.h,op_termio=termios.h) CLIF_POSIX_SIG else clif_cv_psig=no fi if test $clif_cv_sigs = no && test $clif_cv_sigv = no && test $clif_cv_lsig = no && test $clif_cv_psig = yes; then ADD_OBJS="$ADD_OBJS sig-posix.o" ADD_FORK="$ADD_FORK \$(srcdir)/sigig_posix.c" elif test $clif_cv_sigs = no && test $clif_cv_sigv = no && test $clif_cv_lsig = no && test $clif_cv_psig = no; then AC_MSG_WARN(cannot find proper signal handling you should probably create new signal handling routines sig-....c and sigig...c are examples, cannot find) ADD_OBJS="$ADD_OBJS dumb.o" ADD_FORK="$ADD_FORK \$(srcdir)/sigig_dumb.c" echo "RETSIGTYPE interrupt_service () {}" > dumb.c echo "void interrupt_register () {}" >> dumb.c echo "void interrupt_service_sync () {}" >> dumb.c echo "void term_restore () {}" >> dumb.c echo "int handler;" >> dumb.c echo "void fatal_handler_register () {}" >> dumb.c echo "void fatal_handler () {}" >> dumb.c echo "void mysigignore () {}" > sigig_dumb.c fi AC_C_LONG_DOUBLE CLIF_MAX_ALIGNMENT dnl echo adding $ADD_OBJS $ADD_FORK AC_ARG_ENABLE(CONTROL, [ --enable-CONTROL features for automatic control], if test "$enableval" = "yes"; then AC_DEFINE(CONTROL) SH_OBJS="lin_clnt.o lin_xdr.o" if test $LEX = flex; then AC_MSG_WARN(automatic \`resume;' generation is not supported with flex) fi fi) AC_ARG_ENABLE(CODE, [ --enable-CODE symbolic code from virtual machine for debugging], if test "$enableval" = "yes"; then AC_DEFINE(CODE) fi) AC_ARG_ENABLE(DEBUG, [ --enable-DEBUG debugging of the virtual machine], if test "$enableval" = "yes"; then AC_DEFINE(DEBUG) fi) AC_ARG_ENABLE(CHKSTACK, [ --enable-CHKSTACK check stack of the virtual machine], if test "$enableval" = "yes"; then AC_DEFINE(CHKSTACK) fi) AC_SUBST(ADD_IDIR)dnl AC_SUBST(ADD_OBJS)dnl AC_SUBST(ADD_FORK)dnl AC_SUBST(SH_OBJS)dnl AC_OUTPUT(Makefile, rm -f Makefile.sed echo 's| ||' > Makefile.sed rm -f Makefile.tmp sed -f Makefile.sed Makefile > Makefile.tmp mv Makefile.tmp Makefile rm -f Makefile.sed [ case x$CONFIG_HEADERS in xauto-config.h:config.in) echo > stamp-h ;; esac] ) clif-0.93/control.h100444 1750 1750 3463 6126742030 12756 0ustar korenkoren/* \verbatim{control_h.tex} */ /* * control.h * * Header of fixative structures. */ #ifndef _CONTROL_H #define _CONTROL_H typedef struct { int major; char *jmp; char *jz; struct cont1 *cnext; struct break1 *bnext; } WHILE1; typedef struct { int major; char *jn; /* Label of the JZ */ char *jmp2; /* Label of the JMP. The first JMP */ /* instruction. It is between expr2 */ /* and expr3. */ char *jmp3; /* Address where to jump if all */ /* statements of the loop are */ /* done. (See manual) */ struct break1 *bnext; struct cont1 *cnext; } FOR1; struct break1 { char *adr; struct break1 *next; }; struct cont1 { char *adr; struct cont1 *next; }; typedef struct { int major; char *jz; char *jmp; } IF1; struct default_usage { int line_number; /* Line number where the default label was used. */ int def_flag; /* Flag if the default label was used. It can be used only once per switch statement. (ANSI) */ char *adr; /* Address where to jump to in the virtual machine code. */ }; typedef struct { int major; char *jz; char *jmp; struct default_usage def_use; struct break1 *bnext; struct list_const1 *next; } SWITCH1; struct list_const1 /* The list of labels in switch statement is created. The list is at the end of switch statement checked if labels in this list are not duplicit. If there are duplicit error message is issued. */ { int line_number; /* Line number where the label was used in the switch statement. */ int constant; /* Label in switch statement. */ struct list_const1 *next; }; union fix { WHILE1 while1; FOR1 for1; IF1 if1; SWITCH1 switch1; }; /* \verbatim */ #endif /* _CONTROL_H */ clif-0.93/copying100444 1750 1750 33036 6023074544 12543 0ustar korenkoren GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. clif-0.93/dbg-out.c100444 1750 1750 10506 6515617723 12662 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include "global.h" #include "allocx.h" #include "printfx.h" #include "dbg-out.h" extern FILEATTR spf[]; extern int getcx PROTO((FILE *)); typedef struct dbg_list DBGLIST; struct dbg_list { int line_counter; char *codp; DBGLIST *next; }; typedef struct dbg_files DBGFILES; struct dbg_files { char *filename; DBGLIST *info; DBGFILES *next; } *dbg_info; static void store_pos PROTO((DBGLIST **)); static void store_pos (pos) DBGLIST **pos; { register DBGLIST *walk; if (*pos == NULL) { /* Beginning of the list. It is a pointer in DBGFILES structure to the info field. */ (*pos) = mallocx (sizeof (DBGLIST)); (*pos)->line_counter = spf[s].line_counter; (*pos)->codp = kodp; (*pos)->next = NULL; return; } /* Going through the list of DBGLIST structures. Adding new information about the line number of the current line and code pointer where the virtual machine code is generated. */ walk = *pos; while (walk->next != NULL) walk = walk->next; walk->next = mallocx (sizeof (DBGLIST)); walk = walk->next; walk->line_counter = spf[s].line_counter; walk->codp = kodp; walk->next = NULL; } void dbg_create () { DBGFILES *walk; if (dbg_info == NULL) { /* We are creating a list of files. In the list, there is another list with line number and code pointer information. */ dbg_info = mallocx (sizeof (DBGFILES)); dbg_info->filename = spf[s].name; dbg_info->info = NULL; dbg_info->next = NULL; store_pos (&dbg_info->info); return; } /* If there is a list just walk through until we find the one with current file name. Then put new information in it. */ walk = dbg_info; while (walk->filename != spf[s].name) { if (walk->next == NULL) { walk->next = mallocx (sizeof (DBGFILES)); walk = walk->next; walk->filename = spf[s].name; walk->info = NULL; walk->next = NULL; } else walk = walk->next; } store_pos (&walk->info); } /* Trying to figure out the source line for the current instruction executed. It compare program counter with stored information and if it matches, it returns this info. */ static DBGLIST * get_pos (info, pc) DBGLIST *info; char *pc; { while (info->next != NULL) { if (info->codp <= pc && info->next->codp > pc && info->codp != info->next->codp) return info; info = info->next; } return NULL; } void dbg_print (pc) char *pc; { DBGFILES *walk = dbg_info; DBGLIST *info = NULL; FILE *fp; char buf[1024]; int i, line_counter = 1; static int line_printed; /* Find the source line according to the current value of the program counter. */ for (; walk != NULL; walk = walk->next) { info = get_pos (walk->info, pc); if (info != NULL) break; } if (walk == NULL) return; /* If the last printed line was the same, don't do it again. */ if (info->line_counter == line_printed) return; fp = fopen (walk->filename, "r"); if (fp == NULL) return; /* Throw away all chars up to line which has to be printed. */ while (line_counter < info->line_counter) { if (getcx (fp) == '\n') line_counter++; } /* Read the currently executed line in the buffer. */ for (i = 0; i < 1024; i++) { buf[i] = getcx (fp); if (buf[i] == '\n') { buf[i] = '\0'; break; } } /* If the buffer overflowed, just return. */ if (i == 1024) return; fprintfx (stderr, "%d: %s\n", info->line_counter, buf); line_printed = info->line_counter; fclose (fp); } clif-0.93/dbg-out.h100444 1750 1750 1600 6515411067 12633 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _DBG_OUT_H #define _DBG_OUT_H void dbg_create PROTO((void)); void dbg_print PROTO((char *)); #endif clif-0.93/define.h100444 1750 1750 2252 6137701030 12520 0ustar korenkoren/* * define.h * * Clif's memory regions. */ #ifndef _DEFINE_H #define _DEFINE_H #ifndef BC /* Constant for size of the framework. */ #define BC 10 #endif /* \verbatim{define_h_SIZE_SPACE.tex} */ #define SIZE_SPACE 210 /* Memory size in pages. */ #define SIZE_ARIT_STACK 7 /* Size of the arithmetical stack in pages. */ #define SIZE_TMP_STACK 52 /* Size of stack of temporaries in pages. */ /* \verbatim */ /* \verbatim{define_h_PAGE.tex} */ #define PAGE 512 /* Size of a page. */ #define SIZE_HAS 1999 /* Size of hash table. */ #define SIZE_HAS_LOC 401 /* Size of hash table for locals. */ #define SIZE_HAS_GOTO 257 /* Size of hash table for goto labels. */ #define MAX_IDENT 1999 /* Max number of variables */ #define MAX_IDENT_LOC 401 /* Max number of local variables. */ #define SIZE_ADR_STACK 256 /* Size of address stack (obsolete). */ #define SIZE_STRUCT_FIX 256 /* Size of the stack of fixative structures. */ #define SIZE_REMOTE 1999 /* Size of hash table for remote function names. */ /* \verbatim */ #define MASKA 3 /* Mask for arrays of type char. */ #endif /* _DEFINE_H */ clif-0.93/environ.c100644 1750 1750 1450 6173510650 12750 0ustar korenkoren#include #include #include #include "environ.h" static char *clif_env[256]; static int count = 0; void init_env () { char *env, *endp; int i = 0; env = getenv ("CLIF_INCLUDE"); while (NULL != (endp = strchr (env, PATH_SEPARATOR))) { *endp = STRING_TERMINATOR; clif_env[i++] = env; env = endp + 1; } clif_env[i] = env; clif_env[i + 1] = NULL; } char * get_next_path () { if (NULL == clif_env[count]) { count = 0; return ((char *) NULL); } else { return (clif_env[count++]); } } int check_valid_name (name) char *name; { int n = strlen (name); if ('l' == name[n - 1] && 'c' == name[n - 2] && '.' == name[n - 3]) { return (1); } else { return (0); } } clif-0.93/environ.h100644 1750 1750 633 6173443250 12740 0ustar korenkoren#ifndef _ENVIRON_H #define _ENVIRON_H #define PATH_SEPARATOR ':' #define DIRECTORY_SEPARATOR '/' #define STRING_TERMINATOR '\0' #define EXTENSION ".cl" #define CLIF_INCLUDE CLIF_INCLUDE #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif void init_env PROTO((void)); char *get_next_path PROTO((void)); #endif clif-0.93/flags.h100444 1750 1750 4443 6646145550 12404 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _FLAGS_H #define _FLAGS_H /* Flag if warnings should be */ /* printed. Default no. */ extern int warning_yes; /* Warn if a comment beginning is in comment. */ extern int warning_comment; /* Warn if it is something wrong in scanf, printf etc. formats. */ extern int warning_format; /* Warn if functions or parameters are implicit defined. */ extern int warning_implicit; /* Don't print warning messages. */ extern int warning_inhibit; /* Nonzero means warn about function definitions that default the return type or that use a null return and have a return-type other than void. */ extern int warning_return_type; /* If set, warn about trigraphs. */ extern int warning_trigraphs; /* Warn about unused locals. */ extern int warning_unused; /* Warn if a variable is used before it is initialized. */ extern int warning_uninitialized; /* Print various extra warnings. */ extern int warning_extra; /* Warn if a function returns an aggregate. */ extern int warning_aggregate_return; /* Warnings are errors. */ extern int warnings_are_errors; /* Flag in the case of errors or */ /* compile only. Default compile and */ /* execute. */ extern int no_compile_only; /* If nonzero compile everything and than call main function. Simulate compiler behavior. */ extern int handle_main; /* Nonzero means call by value should be used. Default. */ extern int call_by_value; /* Nonzero means call by reference. */ extern int call_by_reference; /* If nonzero, generate additional debugging information. */ extern int dbg_symbols; #endif clif-0.93/geninstr.h100444 1750 1750 303136 6560552364 13202 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * geninstr.h * * Header of macros. * Defines instruction set of the * virtual machine. */ #ifndef _GENINSTR_H #define _GENINSTR_H /* * Arithmetic and logical instructions. */ #define GEN_ADDi ((struct OPERAND_0_mi *)kodp)->major = ADD;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ADDss(const) ((struct OPERAND_1_i *)kodp)->major = ADD;\ ((struct OPERAND_1_i *)kodp)->minor = 1;\ ((struct OPERAND_1_i *)kodp)->num = const;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_ADDui ((struct OPERAND_0_mi *)kodp)->major = ADD;\ ((struct OPERAND_0_mi *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ADDli ((struct OPERAND_0_mi *)kodp)->major = ADD;\ ((struct OPERAND_0_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_0_mi); #if 0 #define GEN_ADDsi ((struct OPERAND_0_mi *)kodp)->major = ADD;\ ((struct OPERAND_0_mi *)kodp)->minor = 4;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_ADDlui ((struct OPERAND_0_mi *)kodp)->major = ADD;\ ((struct OPERAND_0_mi *)kodp)->minor = 5;\ kodp += sizeof (struct OPERAND_0_mi); #if 0 #define GEN_ADDsui ((struct OPERAND_0_mi *)kodp)->major = ADD;\ ((struct OPERAND_0_mi *)kodp)->minor = 6;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_ADDd ((struct OPERAND_0_mi *)kodp)->major = ADD;\ ((struct OPERAND_0_mi *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ADDld ((struct OPERAND_0_mi *)kodp)->major = ADD;\ ((struct OPERAND_0_mi *)kodp)->minor = 257;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ADDf ((struct OPERAND_0_mi *)kodp)->major = ADD;\ ((struct OPERAND_0_mi *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_0_mi); #if 0 #define GEN_ADDc ((struct OPERAND_0_mi *)kodp)->major = ADD;\ ((struct OPERAND_0_mi *)kodp)->minor = 768;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ADDsc ((struct OPERAND_0_mi *)kodp)->major = ADD;\ ((struct OPERAND_0_mi *)kodp)->minor = 769;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ADDuc ((struct OPERAND_0_mi *)kodp)->major = ADD;\ ((struct OPERAND_0_mi *)kodp)->minor = 770;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_ADD \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_ADDi; \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_ADDui; \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_ADDli; \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_ADDlui; \ break; \ case DOUB: \ GEN_ADDd; \ break; \ case LONG_AC | DOUB: \ GEN_ADDld; \ break; \ case FLT: \ GEN_ADDf; \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_SUBi ((struct OPERAND_0_mi *)kodp)->major = SUB;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_SUBss(const) ((struct OPERAND_1_i *)kodp)->major = SUB;\ ((struct OPERAND_1_i *)kodp)->num = const;\ ((struct OPERAND_1_i *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_SUBui ((struct OPERAND_0_mi *)kodp)->major = SUB;\ ((struct OPERAND_0_mi *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_SUBli ((struct OPERAND_0_mi *)kodp)->major = SUB;\ ((struct OPERAND_0_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_SUBlui ((struct OPERAND_0_mi *)kodp)->major = SUB;\ ((struct OPERAND_0_mi *)kodp)->minor = 4;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_SUBd ((struct OPERAND_0_mi *)kodp)->major = SUB;\ ((struct OPERAND_0_mi *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_SUBld ((struct OPERAND_0_mi *)kodp)->major = SUB;\ ((struct OPERAND_0_mi *)kodp)->minor = 257;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_SUBf ((struct OPERAND_0_mi *)kodp)->major = SUB;\ ((struct OPERAND_0_mi *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_0_mi); #if 0 #define GEN_SUBc ((struct OPERAND_0_mi *)kodp)->major = SUB;\ ((struct OPERAND_0_mi *)kodp)->minor = 768;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_SUB \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_SUBi; \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_SUBui; \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_SUBli; \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_SUBlui; \ break; \ case DOUB: \ GEN_SUBd; \ break; \ case LONG_AC | DOUB: \ GEN_SUBld; \ break; \ case FLT: \ GEN_SUBf; \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_MULTi ((struct OPERAND_0_mi *)kodp)->major = MULT;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MULTui ((struct OPERAND_0_mi *)kodp)->major = MULT;\ ((struct OPERAND_0_mi *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MULTli ((struct OPERAND_0_mi *)kodp)->major = MULT;\ ((struct OPERAND_0_mi *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MULTlui ((struct OPERAND_0_mi *)kodp)->major = MULT;\ ((struct OPERAND_0_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MULTd ((struct OPERAND_0_mi *)kodp)->major = MULT;\ ((struct OPERAND_0_mi *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MULTld ((struct OPERAND_0_mi *)kodp)->major = MULT;\ ((struct OPERAND_0_mi *)kodp)->minor = 257;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MULTf ((struct OPERAND_0_mi *)kodp)->major = MULT;\ ((struct OPERAND_0_mi *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_0_mi); #if 0 #define GEN_MULTc ((struct OPERAND_0_mi *)kodp)->major = MULT;\ ((struct OPERAND_0_mi *)kodp)->minor = 768;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_MULT \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_MULTi; \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_MULTui; \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_MULTli; \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_MULTlui; \ break; \ case DOUB: \ GEN_MULTd; \ break; \ case LONG_AC | DOUB: \ GEN_MULTld; \ break; \ case FLT: \ GEN_MULTf; \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_DIVi ((struct OPERAND_0_mi *)kodp)->major = DIV;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_DIVui ((struct OPERAND_0_mi *)kodp)->major = DIV;\ ((struct OPERAND_0_mi *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_DIVli ((struct OPERAND_0_mi *)kodp)->major = DIV;\ ((struct OPERAND_0_mi *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_DIVlui ((struct OPERAND_0_mi *)kodp)->major = DIV;\ ((struct OPERAND_0_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_DIVd ((struct OPERAND_0_mi *)kodp)->major = DIV;\ ((struct OPERAND_0_mi *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_DIVld ((struct OPERAND_0_mi *)kodp)->major = DIV;\ ((struct OPERAND_0_mi *)kodp)->minor = 257;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_DIVf ((struct OPERAND_0_mi *)kodp)->major = DIV;\ ((struct OPERAND_0_mi *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_0_mi); #if 0 #define GEN_DIVc ((struct OPERAND_0_mi *)kodp)->major = DIV;\ ((struct OPERAND_0_mi *)kodp)->minor = 768;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_DIV \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_DIVi; \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_DIVui; \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_DIVli; \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_DIVlui; \ break; \ case DOUB: \ GEN_DIVd; \ break; \ case LONG_AC | DOUB: \ GEN_DIVld; \ break; \ case FLT: \ GEN_DIVf; \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_MOD ((struct OPERAND_0_ma *)kodp)->major = MOD;\ kodp += sizeof (struct OPERAND_0_ma); #define GEN_ORi ((struct OPERAND_0_mi *)kodp)->major = OR;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ORui ((struct OPERAND_0_mi *)kodp)->major = OR;\ ((struct OPERAND_0_mi *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ORli ((struct OPERAND_0_mi *)kodp)->major = OR;\ ((struct OPERAND_0_mi *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ORlui ((struct OPERAND_0_mi *)kodp)->major = OR;\ ((struct OPERAND_0_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ORd ((struct OPERAND_0_mi *)kodp)->major = OR;\ ((struct OPERAND_0_mi *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ORld ((struct OPERAND_0_mi *)kodp)->major = OR;\ ((struct OPERAND_0_mi *)kodp)->minor = 257;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ORf ((struct OPERAND_0_mi *)kodp)->major = OR;\ ((struct OPERAND_0_mi *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_0_mi); #if 0 #define GEN_ORc ((struct OPERAND_0_mi *)kodp)->major = OR;\ ((struct OPERAND_0_mi *)kodp)->minor = 768;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_OR \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_ORi; \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_ORui; \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_ORli; \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_ORlui; \ break; \ case DOUB: \ GEN_ORd; \ break; \ case LONG_AC | DOUB: \ GEN_ORld; \ break; \ case FLT: \ GEN_ORf; \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_ANDi ((struct OPERAND_0_mi *)kodp)->major = AND;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ANDui ((struct OPERAND_0_mi *)kodp)->major = AND;\ ((struct OPERAND_0_mi *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ANDli ((struct OPERAND_0_mi *)kodp)->major = AND;\ ((struct OPERAND_0_mi *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ANDlui ((struct OPERAND_0_mi *)kodp)->major = AND;\ ((struct OPERAND_0_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ANDd ((struct OPERAND_0_mi *)kodp)->major = AND;\ ((struct OPERAND_0_mi *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ANDld ((struct OPERAND_0_mi *)kodp)->major = AND;\ ((struct OPERAND_0_mi *)kodp)->minor = 257;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_ANDf ((struct OPERAND_0_mi *)kodp)->major = AND;\ ((struct OPERAND_0_mi *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_0_mi); #if 0 #define GEN_ANDc ((struct OPERAND_0_mi *)kodp)->major = AND;\ ((struct OPERAND_0_mi *)kodp)->minor = 768;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_AND \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_ANDi; \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_ANDui; \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_ANDli; \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_ANDlui; \ break; \ case DOUB: \ GEN_ANDd; \ break; \ case LONG_AC | DOUB: \ GEN_ANDld; \ break; \ case FLT: \ GEN_ANDf; \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_ORB ((struct OPERAND_0_ma *)kodp)->major = ORB;\ kodp += sizeof (struct OPERAND_0_ma); #define GEN_ANDB ((struct OPERAND_0_ma *)kodp)->major = ANDB;\ kodp += sizeof (struct OPERAND_0_ma); #define GEN_EQi ((struct OPERAND_0_mi *)kodp)->major = EQ;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_EQui ((struct OPERAND_0_mi *)kodp)->major = EQ;\ ((struct OPERAND_0_mi *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_EQli ((struct OPERAND_0_mi *)kodp)->major = EQ;\ ((struct OPERAND_0_mi *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_EQlui ((struct OPERAND_0_mi *)kodp)->major = EQ;\ ((struct OPERAND_0_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_EQd ((struct OPERAND_0_mi *)kodp)->major = EQ;\ ((struct OPERAND_0_mi *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_EQld ((struct OPERAND_0_mi *)kodp)->major = EQ;\ ((struct OPERAND_0_mi *)kodp)->minor = 257;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_EQf ((struct OPERAND_0_mi *)kodp)->major = EQ;\ ((struct OPERAND_0_mi *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_0_mi); #if 0 #define GEN_EQc ((struct OPERAND_0_mi *)kodp)->major = EQ;\ ((struct OPERAND_0_mi *)kodp)->minor = 768;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_EQ \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_EQi; \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_EQui; \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_EQli; \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_EQlui; \ break; \ case DOUB: \ GEN_EQd; \ break; \ case LONG_AC | DOUB: \ GEN_EQld; \ break; \ case FLT: \ GEN_EQf; \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_LOi ((struct OPERAND_0_mi *)kodp)->major = LO;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_LOui ((struct OPERAND_0_mi *)kodp)->major = LO;\ ((struct OPERAND_0_mi *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_LOli ((struct OPERAND_0_mi *)kodp)->major = LO;\ ((struct OPERAND_0_mi *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_LOlui ((struct OPERAND_0_mi *)kodp)->major = LO;\ ((struct OPERAND_0_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_LOd ((struct OPERAND_0_mi *)kodp)->major = LO;\ ((struct OPERAND_0_mi *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_LOld ((struct OPERAND_0_mi *)kodp)->major = LO;\ ((struct OPERAND_0_mi *)kodp)->minor = 257;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_LOf ((struct OPERAND_0_mi *)kodp)->major = LO;\ ((struct OPERAND_0_mi *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_0_mi); #if 0 #define GEN_LOc ((struct OPERAND_0_mi *)kodp)->major = LO;\ ((struct OPERAND_0_mi *)kodp)->minor = 768;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_LO \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_LOi; \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_LOui; \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_LOli; \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_LOlui; \ break; \ case DOUB: \ GEN_LOd; \ break; \ case LONG_AC | DOUB: \ GEN_LOld; \ break; \ case FLT: \ GEN_LOf; \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_GRi ((struct OPERAND_0_mi *)kodp)->major = GR;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_GRui ((struct OPERAND_0_mi *)kodp)->major = GR;\ ((struct OPERAND_0_mi *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_GRli ((struct OPERAND_0_mi *)kodp)->major = GR;\ ((struct OPERAND_0_mi *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_GRlui ((struct OPERAND_0_mi *)kodp)->major = GR;\ ((struct OPERAND_0_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_GRd ((struct OPERAND_0_mi *)kodp)->major = GR;\ ((struct OPERAND_0_mi *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_GRld ((struct OPERAND_0_mi *)kodp)->major = GR;\ ((struct OPERAND_0_mi *)kodp)->minor = 257;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_GRf ((struct OPERAND_0_mi *)kodp)->major = GR;\ ((struct OPERAND_0_mi *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_0_mi); #if 0 #define GEN_GRc ((struct OPERAND_0_mi *)kodp)->major = GR;\ ((struct OPERAND_0_mi *)kodp)->minor = 768;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_GR \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_GRi; \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_GRui; \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_GRli; \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_GRlui; \ break; \ case DOUB: \ GEN_GRd; \ break; \ case LONG_AC | DOUB: \ GEN_GRld; \ break; \ case FLT: \ GEN_GRf; \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_LEi ((struct OPERAND_0_mi *)kodp)->major = LE;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_LEui ((struct OPERAND_0_mi *)kodp)->major = LE;\ ((struct OPERAND_0_mi *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_LEli ((struct OPERAND_0_mi *)kodp)->major = LE;\ ((struct OPERAND_0_mi *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_LElui ((struct OPERAND_0_mi *)kodp)->major = LE;\ ((struct OPERAND_0_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_LEd ((struct OPERAND_0_mi *)kodp)->major = LE;\ ((struct OPERAND_0_mi *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_LEld ((struct OPERAND_0_mi *)kodp)->major = LE;\ ((struct OPERAND_0_mi *)kodp)->minor = 257;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_LEf ((struct OPERAND_0_mi *)kodp)->major = LE;\ ((struct OPERAND_0_mi *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_0_mi); #if 0 #define GEN_LEc ((struct OPERAND_0_mi *)kodp)->major = LE;\ ((struct OPERAND_0_mi *)kodp)->minor = 768;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_LE \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_LEi; \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_LEui; \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_LEli; \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_LElui; \ break; \ case DOUB: \ GEN_LEd; \ break; \ case LONG_AC | DOUB: \ GEN_LEld; \ break; \ case FLT: \ GEN_LEf; \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_GEi ((struct OPERAND_0_mi *)kodp)->major = GE;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_GEui ((struct OPERAND_0_mi *)kodp)->major = GE;\ ((struct OPERAND_0_mi *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_GEli ((struct OPERAND_0_mi *)kodp)->major = GE;\ ((struct OPERAND_0_mi *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_GElui ((struct OPERAND_0_mi *)kodp)->major = GE;\ ((struct OPERAND_0_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_GEd ((struct OPERAND_0_mi *)kodp)->major = GE;\ ((struct OPERAND_0_mi *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_GEld ((struct OPERAND_0_mi *)kodp)->major = GE;\ ((struct OPERAND_0_mi *)kodp)->minor = 257;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_GEf ((struct OPERAND_0_mi *)kodp)->major = GE;\ ((struct OPERAND_0_mi *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_0_mi); #if 0 #define GEN_GEc ((struct OPERAND_0_mi *)kodp)->major = GE;\ ((struct OPERAND_0_mi *)kodp)->minor = 768;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_GE \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_GEi; \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_GEui; \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_GEli; \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_GElui; \ break; \ case DOUB: \ GEN_GEd; \ break; \ case LONG_AC | DOUB: \ GEN_GEld; \ break; \ case FLT: \ GEN_GEf; \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_NEi ((struct OPERAND_0_mi *)kodp)->major = NE;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_NEui ((struct OPERAND_0_mi *)kodp)->major = NE;\ ((struct OPERAND_0_mi *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_NEli ((struct OPERAND_0_mi *)kodp)->major = NE;\ ((struct OPERAND_0_mi *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_NElui ((struct OPERAND_0_mi *)kodp)->major = NE;\ ((struct OPERAND_0_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_NEd ((struct OPERAND_0_mi *)kodp)->major = NE;\ ((struct OPERAND_0_mi *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_NEld ((struct OPERAND_0_mi *)kodp)->major = NE;\ ((struct OPERAND_0_mi *)kodp)->minor = 257;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_NEf ((struct OPERAND_0_mi *)kodp)->major = NE;\ ((struct OPERAND_0_mi *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_0_mi); #if 0 #define GEN_NEc ((struct OPERAND_0_mi *)kodp)->major = NE;\ ((struct OPERAND_0_mi *)kodp)->minor = 768;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_NE \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_NEi; \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_NEui; \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_NEli; \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_NElui; \ break; \ case DOUB: \ GEN_NEd; \ break; \ case LONG_AC | DOUB: \ GEN_NEld; \ break; \ case FLT: \ GEN_NEf; \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_NEGi ((struct OPERAND_0_mi *)kodp)->major = NEG;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_NEGui ((struct OPERAND_0_mi *)kodp)->major = NEG;\ ((struct OPERAND_0_mi *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_NEGli ((struct OPERAND_0_mi *)kodp)->major = NEG;\ ((struct OPERAND_0_mi *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_NEGlui ((struct OPERAND_0_mi *)kodp)->major = NEG;\ ((struct OPERAND_0_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_NEGd ((struct OPERAND_0_mi *)kodp)->major = NEG;\ ((struct OPERAND_0_mi *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_NEGld ((struct OPERAND_0_mi *)kodp)->major = NEG;\ ((struct OPERAND_0_mi *)kodp)->minor = 257;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_NEGf ((struct OPERAND_0_mi *)kodp)->major = NEG;\ ((struct OPERAND_0_mi *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_0_mi); #if 0 #define GEN_NEGc ((struct OPERAND_0_mi *)kodp)->major = NEG;\ ((struct OPERAND_0_mi *)kodp)->minor = 768;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_NEG \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_NEGi; \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_NEGui; \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_NEGli; \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_NEGlui; \ break; \ case DOUB: \ GEN_NEGd; \ break; \ case LONG_AC | DOUB: \ GEN_NEGld; \ break; \ case FLT: \ GEN_NEGf; \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_NOT ((struct OPERAND_0_ma *)kodp)->major = NOT;\ kodp += sizeof (struct OPERAND_0_ma); #define GEN_SAL ((struct OPERAND_0_ma *)kodp)->major = SAL;\ kodp += sizeof (struct OPERAND_0_ma); #define GEN_SAR ((struct OPERAND_0_ma *)kodp)->major = SAR;\ kodp += sizeof (struct OPERAND_0_ma); #define GEN_XOR ((struct OPERAND_0_ma *)kodp)->major = XOR;\ kodp += sizeof (struct OPERAND_0_ma); /* * I/O instructions. */ #define GEN_INi(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = IN;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ ((struct OPERAND_1_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_INri(off1) ((struct OPERAND_1_i *)kodp)->major = IN;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ ((struct OPERAND_1_i *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_INrri(of1) ((struct OPERAND_1_i *)kodp)->major = IN;\ ((struct OPERAND_1_i *)kodp)->num = of1;\ ((struct OPERAND_1_i *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_INoi(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = IN;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ ((struct OPERAND_1_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_INroi(off1) ((struct OPERAND_1_i *)kodp)->major = IN;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ ((struct OPERAND_1_i *)kodp)->minor = 4;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_INrroi(of1) ((struct OPERAND_1_i *)kodp)->major = IN;\ ((struct OPERAND_1_i *)kodp)->num = of1;\ ((struct OPERAND_1_i *)kodp)->minor = 5;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_INd(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = IN;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ ((struct OPERAND_1_mi *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_INrd(off1) ((struct OPERAND_1_i *)kodp)->major = IN;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ ((struct OPERAND_1_i *)kodp)->minor = 257;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_INrrd(of1) ((struct OPERAND_1_i *)kodp)->major = IN;\ ((struct OPERAND_1_i *)kodp)->num = of1;\ ((struct OPERAND_1_i *)kodp)->minor = 258;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_INod(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = IN;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ ((struct OPERAND_1_mi *)kodp)->minor = 259;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_INrod(off1) ((struct OPERAND_1_i *)kodp)->major = IN;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ ((struct OPERAND_1_i *)kodp)->minor = 260;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_INrrod(of1) ((struct OPERAND_1_i *)kodp)->major = IN;\ ((struct OPERAND_1_i *)kodp)->num = of1;\ ((struct OPERAND_1_i *)kodp)->minor = 261;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_INf(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = IN;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ ((struct OPERAND_1_mi *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_INrf(off1) ((struct OPERAND_1_i *)kodp)->major = IN;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ ((struct OPERAND_1_i *)kodp)->minor = 513;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_INrrf(of1) ((struct OPERAND_1_i *)kodp)->major = IN;\ ((struct OPERAND_1_i *)kodp)->num = of1;\ ((struct OPERAND_1_i *)kodp)->minor = 514;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_INof(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = IN;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ ((struct OPERAND_1_mi *)kodp)->minor = 515;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_INrof(off1) ((struct OPERAND_1_i *)kodp)->major = IN;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ ((struct OPERAND_1_i *)kodp)->minor = 516;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_INrrof(of1) ((struct OPERAND_1_i *)kodp)->major = IN;\ ((struct OPERAND_1_i *)kodp)->num = of1;\ ((struct OPERAND_1_i *)kodp)->minor = 517;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_INc(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = IN;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ ((struct OPERAND_1_mi *)kodp)->minor = 768;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_INrc(off1) ((struct OPERAND_1_i *)kodp)->major = IN;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ ((struct OPERAND_1_i *)kodp)->minor = 769;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_INrrc(of1) ((struct OPERAND_1_i *)kodp)->major = IN;\ ((struct OPERAND_1_i *)kodp)->num = of1;\ ((struct OPERAND_1_i *)kodp)->minor = 770;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_INoc(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = IN;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ ((struct OPERAND_1_mi *)kodp)->minor = 771;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_INroc(off1) ((struct OPERAND_1_i *)kodp)->major = IN;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ ((struct OPERAND_1_i *)kodp)->minor = 772;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_INrroc(of1) ((struct OPERAND_1_i *)kodp)->major = IN;\ ((struct OPERAND_1_i *)kodp)->num = of1;\ ((struct OPERAND_1_i *)kodp)->minor = 773;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_OUTi(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = OUT;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ ((struct OPERAND_1_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_OUTri(off1) ((struct OPERAND_1_i *)kodp)->major = OUT;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ ((struct OPERAND_1_i *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_OUTrri(of1) ((struct OPERAND_1_i *)kodp)->major = OUT;\ ((struct OPERAND_1_i *)kodp)->num = of1;\ ((struct OPERAND_1_i *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_OUToi(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = OUT;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ ((struct OPERAND_1_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_OUTroi(off1) ((struct OPERAND_1_i *)kodp)->major = OUT;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ ((struct OPERAND_1_i *)kodp)->minor = 4;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_OUTrroi(of1) ((struct OPERAND_1_i *)kodp)->major = OUT;\ ((struct OPERAND_1_i *)kodp)->num = of1;\ ((struct OPERAND_1_i *)kodp)->minor = 5;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_OUTd(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = OUT;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ ((struct OPERAND_1_mi *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_OUTrd(off1) ((struct OPERAND_1_i *)kodp)->major = OUT;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ ((struct OPERAND_1_i *)kodp)->minor = 257;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_OUTrrd(of1) ((struct OPERAND_1_i *)kodp)->major = OUT;\ ((struct OPERAND_1_i *)kodp)->num = of1;\ ((struct OPERAND_1_i *)kodp)->minor = 258;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_OUTod(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = OUT;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ ((struct OPERAND_1_mi *)kodp)->minor = 259;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_OUTrod(off1) ((struct OPERAND_1_i *)kodp)->major = OUT;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ ((struct OPERAND_1_i *)kodp)->minor = 260;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_OUTrrod(of1) ((struct OPERAND_1_i *)kodp)->major = OUT;\ ((struct OPERAND_1_i *)kodp)->num = of1;\ ((struct OPERAND_1_i *)kodp)->minor = 261;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_OUTf(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = OUT;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ ((struct OPERAND_1_mi *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_OUTrf(off1) ((struct OPERAND_1_i *)kodp)->major = OUT;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ ((struct OPERAND_1_i *)kodp)->minor = 513;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_OUTrrf(of1) ((struct OPERAND_1_i *)kodp)->major = OUT;\ ((struct OPERAND_1_i *)kodp)->num = of1;\ ((struct OPERAND_1_i *)kodp)->minor = 514;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_OUTof(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = OUT;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ ((struct OPERAND_1_mi *)kodp)->minor = 515;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_OUTrof(off1) ((struct OPERAND_1_i *)kodp)->major = OUT;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ ((struct OPERAND_1_i *)kodp)->minor = 516;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_OUTrrof(of1) ((struct OPERAND_1_i *)kodp)->major = OUT;\ ((struct OPERAND_1_i *)kodp)->num = of1;\ ((struct OPERAND_1_i *)kodp)->minor = 517;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_OUTc(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = OUT;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ ((struct OPERAND_1_mi *)kodp)->minor = 768;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_OUTrc(off1) ((struct OPERAND_1_i *)kodp)->major = OUT;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ ((struct OPERAND_1_i *)kodp)->minor = 769;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_OUTrrc(of1) ((struct OPERAND_1_i *)kodp)->major = OUT;\ ((struct OPERAND_1_i *)kodp)->num = of1;\ ((struct OPERAND_1_i *)kodp)->minor = 770;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_OUToc(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = OUT;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ ((struct OPERAND_1_mi *)kodp)->minor = 771;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_OUTroc(off1) ((struct OPERAND_1_i *)kodp)->major = OUT;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ ((struct OPERAND_1_i *)kodp)->minor = 772;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_OUTrroc(of1) ((struct OPERAND_1_i *)kodp)->major = OUT;\ ((struct OPERAND_1_i *)kodp)->num = of1;\ ((struct OPERAND_1_i *)kodp)->minor = 773;\ kodp += sizeof (struct OPERAND_1_i); /* * Instructions on stacks. */ #define GEN_PUSHA(v_adr) ((struct OPERAND_1_mi *)kodp)->major = PUSHA;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr;\ ((struct OPERAND_1_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_PUSHAr(off) ((struct OPERAND_1_i *)kodp)->major = PUSHA;\ ((struct OPERAND_1_i *)kodp)->num = off;\ ((struct OPERAND_1_i *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_PUSHArr(off) ((struct OPERAND_1_i *)kodp)->major = PUSHA;\ ((struct OPERAND_1_i *)kodp)->num = off;\ ((struct OPERAND_1_i *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_PUSHAIi(n) ((struct OPERAND_1_i *)kodp)->major = PUSHAI;\ ((struct OPERAND_1_i *)kodp)->minor = 0;\ ((struct OPERAND_1_i *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_PUSHAIui(n) ((struct OPERAND_1_ui *)kodp)->major = PUSHAI;\ ((struct OPERAND_1_ui *)kodp)->minor = 1;\ ((struct OPERAND_1_ui *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_ui); #define GEN_PUSHAIli(n) ((struct OPERAND_1_li *)kodp)->major = PUSHAI;\ ((struct OPERAND_1_li *)kodp)->minor = 2;\ ((struct OPERAND_1_li *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_li); #define GEN_PUSHAIlui(n) ((struct OPERAND_1_lui *)kodp)->major = PUSHAI;\ ((struct OPERAND_1_lui *)kodp)->minor = 3;\ ((struct OPERAND_1_lui *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_lui); #define GEN_PUSHAIsi(n) ((struct OPERAND_1_si *)kodp)->major = PUSHAI;\ ((struct OPERAND_1_si *)kodp)->minor = 4;\ ((struct OPERAND_1_si *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_si);\ align_memory (&kodp, sizeof(int)); #define GEN_PUSHAIsui(n) ((struct OPERAND_1_sui *)kodp)->major = PUSHAI;\ ((struct OPERAND_1_sui *)kodp)->minor = 5;\ ((struct OPERAND_1_sui *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_sui);\ align_memory (&kodp, sizeof(int)); #define GEN_PUSHAId(n) ((struct OPERAND_1_id *)kodp)->major = PUSHAI;\ ((struct OPERAND_1_id *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_0_mi);\ align_memory (&kodp, sizeof(double));\ *(double *)kodp = n;\ kodp += sizeof (double); #define GEN_PUSHAIld(n) ((struct OPERAND_1_ild *)kodp)->major = PUSHAI;\ ((struct OPERAND_1_ild *)kodp)->minor = 257;\ kodp += sizeof (struct OPERAND_0_mi);\ align_memory (&kodp, sizeof (long double));\ *(long double *)kodp = n;\ kodp += sizeof (long double); #define GEN_PUSHAIf(n) ((struct OPERAND_1_if *)kodp)->major = PUSHAI;\ ((struct OPERAND_1_if *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_0_mi);\ align_memory (&kodp, sizeof(float));\ *(float *)kodp = n;\ kodp += sizeof (float); #define GEN_PUSHAIc(n) ((struct OPERAND_1_ic *)kodp)->major = PUSHAI;\ ((struct OPERAND_1_ic *)kodp)->minor = 768;\ ((struct OPERAND_1_ic *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_ic);\ align_memory (&kodp, sizeof(int)); #define GEN_PUSHAIst(n) ((struct OPERAND_1_mi *)kodp)->major = PUSHAI;\ ((struct OPERAND_1_mi *)kodp)->minor = 769;\ ((struct OPERAND_1_mi *)kodp)->adr = n;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_PUSHAIsc(n) ((struct OPERAND_1_isc *)kodp)->major = PUSHAI;\ ((struct OPERAND_1_isc *)kodp)->minor = 770;\ ((struct OPERAND_1_isc *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_isc);\ align_memory (&kodp, sizeof (int)); #define GEN_PUSHAIuc(n) ((struct OPERAND_1_iuc *)kodp)->major = PUSHAI;\ ((struct OPERAND_1_iuc *)kodp)->minor = 771;\ ((struct OPERAND_1_iuc *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_iuc);\ align_memory (&kodp, sizeof (int)); #define GEN_PUSHAI(num) \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_PUSHAIi(num); \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_PUSHAIui((unsigned int) num); \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_PUSHAIli((long int) num); \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_PUSHAIlui((long unsigned int) num); \ break; \ case SHORT_AC | INTEGER: \ case SHORT_AC | SIGNED_AC | INTEGER: \ GEN_PUSHAIsi((short int) num); \ break; \ case SHORT_AC | UNSIGNED_AC | INTEGER: \ GEN_PUSHAIsui((short unsigned int) num); \ break; \ case DOUB: \ GEN_PUSHAId((double) num); \ break; \ case LONG_AC | DOUB: \ GEN_PUSHAIld((long double) num); \ break; \ case FLT: \ GEN_PUSHAIf((float) num); \ break; \ case CHR: \ GEN_PUSHAIc((char) num); \ break; \ case SIGNED_AC | CHR: \ GEN_PUSHAIsc((signed char) num); \ break; \ case UNSIGNED_AC | CHR: \ GEN_PUSHAIc((unsigned char) num); \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_POPAe ((struct OPERAND_0_mi *)kodp)->major = POPA;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_POPAst(n) ((struct OPERAND_1_i *)kodp)->major = POPA;\ ((struct OPERAND_1_i *)kodp)->minor = 1;\ ((struct OPERAND_1_i *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_POPAi(n) ((struct OPERAND_1_i *)kodp)->major = POPA;\ ((struct OPERAND_1_i *)kodp)->minor = 2;\ ((struct OPERAND_1_i *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_POPAui(n) ((struct OPERAND_1_i *)kodp)->major = POPA;\ ((struct OPERAND_1_i *)kodp)->minor = 3;\ ((struct OPERAND_1_i *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_POPAli(n) ((struct OPERAND_1_i *)kodp)->major = POPA;\ ((struct OPERAND_1_i *)kodp)->minor = 4;\ ((struct OPERAND_1_i *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_POPAlui(n) ((struct OPERAND_1_i *)kodp)->major = POPA;\ ((struct OPERAND_1_i *)kodp)->minor = 5;\ ((struct OPERAND_1_i *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_POPAsi(n) ((struct OPERAND_1_i *)kodp)->major = POPA;\ ((struct OPERAND_1_i *)kodp)->minor = 6;\ ((struct OPERAND_1_i *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_POPAsui(n) ((struct OPERAND_1_i *)kodp)->major = POPA;\ ((struct OPERAND_1_i *)kodp)->minor = 7;\ ((struct OPERAND_1_i *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_POPAd(n) ((struct OPERAND_1_i *)kodp)->major = POPA;\ ((struct OPERAND_1_i *)kodp)->minor = 256;\ ((struct OPERAND_1_i *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_POPAld(n) ((struct OPERAND_1_i *)kodp)->major = POPA;\ ((struct OPERAND_1_i *)kodp)->minor = 257;\ ((struct OPERAND_1_i *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_POPAf(n) ((struct OPERAND_1_i *)kodp)->major = POPA;\ ((struct OPERAND_1_i *)kodp)->minor = 512;\ ((struct OPERAND_1_i *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_POPAc(n) ((struct OPERAND_1_i *)kodp)->major = POPA;\ ((struct OPERAND_1_i *)kodp)->minor = 768;\ ((struct OPERAND_1_i *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_POPAsc(n) ((struct OPERAND_1_i *)kodp)->major = POPA;\ ((struct OPERAND_1_i *)kodp)->minor = 769;\ ((struct OPERAND_1_i *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_POPAuc(n) ((struct OPERAND_1_i *)kodp)->major = POPA;\ ((struct OPERAND_1_i *)kodp)->minor = 770;\ ((struct OPERAND_1_i *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_POPAb(n) ((struct OPERAND_1_i *)kodp)->major = POPA;\ ((struct OPERAND_1_i *)kodp)->minor = 771;\ ((struct OPERAND_1_i *)kodp)->num = n;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_POPA(off) \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_POPAi(off); \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_POPAui(off); \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_POPAli(off); \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_POPAlui(off); \ break; \ case SHORT_AC | INTEGER: \ case SHORT_AC | SIGNED_AC | INTEGER: \ GEN_POPAsi(off); \ break; \ case SHORT_AC | UNSIGNED_AC | INTEGER: \ GEN_POPAsui(off); \ break; \ case DOUB: \ GEN_POPAd(off); \ break; \ case LONG_AC | DOUB: \ GEN_POPAld(off); \ break; \ case FLT: \ GEN_POPAf(off); \ break; \ case CHR: \ GEN_POPAc(off); \ break; \ case SIGNED_AC | CHR: \ GEN_POPAsc(off); \ break; \ case UNSIGNED_AC | CHR: \ GEN_POPAuc(off); \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_PUSHb ((struct OPERAND_0_mi *)kodp)->major = PUSH;\ ((struct OPERAND_0_mi *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_PUSHt ((struct OPERAND_0_mi *)kodp)->major = PUSH;\ ((struct OPERAND_0_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_PUSHf ((struct OPERAND_0_mi *)kodp)->major = PUSH;\ ((struct OPERAND_0_mi *)kodp)->minor = 4;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_POPb ((struct OPERAND_0_mi *)kodp)->major = POP;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_POPt ((struct OPERAND_0_mi *)kodp)->major = POP;\ ((struct OPERAND_0_mi *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_POPf ((struct OPERAND_0_mi *)kodp)->major = POP;\ ((struct OPERAND_0_mi *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_0_mi); /* * Address instructions. */ #define GEN_MOVi ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVbs ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVsb ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVt ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVfs ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 4;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVsf ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 5;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVaa ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 6;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVap ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 7;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVpa ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 8;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVar ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 9;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVvi ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 10;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVbv ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 11;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVui ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 12;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVli ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 13;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVlui ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 14;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVsi ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 15;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVsui ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 16;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVvui ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 17;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVvli ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 18;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVvlui ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 19;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVvsi ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 20;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVvsui ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 21;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVd ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 256;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVvd ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 257 ;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVld ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 258;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVvld ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 259;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVf ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 512;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVvf ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 513;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVc ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 768;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVvc ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 769;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVsc ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 770;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVuc ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 771;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVvsc ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 772;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOVvuc ((struct OPERAND_0_mi *)kodp)->major = MOV;\ ((struct OPERAND_0_mi *)kodp)->minor = 773;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_MOV \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_MOVi; \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_MOVui; \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_MOVli; \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_MOVlui; \ break; \ case SHORT_AC | INTEGER: \ case SHORT_AC | SIGNED_AC | INTEGER: \ GEN_MOVsi; \ break; \ case SHORT_AC | UNSIGNED_AC | INTEGER: \ GEN_MOVsui; \ break; \ case DOUB: \ GEN_MOVd; \ break; \ case LONG_AC | DOUB: \ GEN_MOVld; \ break; \ case FLT: \ GEN_MOVf; \ break; \ case CHR: \ GEN_MOVc; \ break; \ case SIGNED_AC | CHR: \ GEN_MOVsc; \ break; \ case UNSIGNED_AC | CHR: \ GEN_MOVuc; \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_MOVv \ switch (type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ GEN_MOVvi; \ break; \ case UNSIGNED_AC | INTEGER: \ GEN_MOVvui; \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ GEN_MOVvli; \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ GEN_MOVvlui; \ break; \ case SHORT_AC | INTEGER: \ case SHORT_AC | SIGNED_AC | INTEGER: \ GEN_MOVvsi; \ break; \ case SHORT_AC | UNSIGNED_AC | INTEGER: \ GEN_MOVvsui; \ break; \ case DOUB: \ GEN_MOVvd; \ break; \ case LONG_AC | DOUB: \ GEN_MOVvld; \ break; \ case FLT: \ GEN_MOVvf; \ break; \ case CHR: \ GEN_MOVvc; \ break; \ case SIGNED_AC | CHR: \ GEN_MOVvsc; \ break; \ case UNSIGNED_AC | CHR: \ GEN_MOVvuc; \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } /* * Instructions on the stack of temporaries. * Instructions for casts of operands. */ #define GEN_CLRT ((struct OPERAND_0_ma *)kodp)->major = CLRT;\ kodp += sizeof (struct OPERAND_0_ma); #define GEN_CLRTr ((struct OPERAND_0_ma *)kodp3)->major = CLRT;\ kodp += sizeof (struct OPERAND_0_ma); #define GEN_CVTIDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 0;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTIDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 1;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTDI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 2;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTIFt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 3;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTIFb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 4;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTFI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 5;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTFDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 6;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTFDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 7;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTDF ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 8;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTCIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 9;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTCIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 10;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTIC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 11;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTCDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 12;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTCDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 13;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTDC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 14;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTCFt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 15;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTCFb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 16;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTFC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 17;\ kodp += sizeof (struct OPERAND_0_mi); /* */ #define GEN_CVTUIDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 18;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUIDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 19;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUIFt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 20;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUIFb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 21;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUILIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 22;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUILIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 23;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef UINT_EQ_ULONG #define GEN_CVTUILUIt #define GEN_CVTUILUIb #else #define GEN_CVTUILUIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 24;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUILUIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 25;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTUII ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 26;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef SHORT_EQ_INT #define GEN_CVTUISI GEN_CVTUII #else #define GEN_CVTUISI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 27;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_USHORT #define GEN_CVTUISUI #else #define GEN_CVTUISUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 28;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTUIC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 29;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUISC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 30;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUIUC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 31;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef LONG_EQ_INT #define GEN_CVTLIDt GEN_CVTIDt #define GEN_CVTLIDb GEN_CVTIDb #define GEN_CVTLIFt GEN_CVTIFt #define GEN_CVTLIFb GEN_CVTIFb #define GEN_CVTLILUIt GEN_CVTILUIt #define GEN_CVTLILUIb GEN_CVTILUIb #define GEN_CVTLII #define GEN_CVTLIUI GEN_CVTIUIt #ifdef SHORT_EQ_INT #define GEN_CVTLISI #else #define GEN_CVTLISI GEN_CVTISI #endif #define GEN_CVTLISUI GEN_CVTISUI #define GEN_CVTLIC GEN_CVTIC #define GEN_CVTLISC GEN_CVTISC #define GEN_CVTLIUC GEN_CVTIUC #else #define GEN_CVTLIDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 32;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLIDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 33;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLIFt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 34;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLIFb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 35;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLILUIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 36;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLILUIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 37;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLII ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 38;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLIUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 39;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef SHORT_EQ_INT #define GEN_CVTLISI GEN_CVTLII #else #define GEN_CVTLISI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 40;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTLISUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 41;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLIC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 42;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLISC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 43;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLIUC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 44;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_ULONG #define GEN_CVTLUIDt GEN_CVTUIDt #define GEN_CVTLUIDb GEN_CVTUIDb #define GEN_CVTLUIFt GEN_CVTUIFt #define GEN_CVTLUIFb GEN_CVTUIFb #define GEN_CVTLUILI GEN_CVTUILIt #define GEN_CVTLUIUI #define GEN_CVTLUII GEN_CVTUII #define GEN_CVTLUISUI GEN_CVTUISUI #define GEN_CVTLUISI GEN_CVTUISI #define GEN_CVTLUIC GEN_CVTUIC #define GEN_CVTLUISC GEN_CVTUISC #define GEN_CVTLUIUC GEN_CVTUIUC #else #define GEN_CVTLUIDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 45;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLUIDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 46;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLUIFt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 47;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLUIFb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 48;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLUILI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 49;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLUIUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 50;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLUII ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 51;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLUISUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 52;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLUISI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 53;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLUIC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 54;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLUISC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 55;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLUIUC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 56;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef SHORT_EQ_INT #define GEN_CVTSIDt GEN_CVTIDt #define GEN_CVTSIDb GEN_CVTIDb #define GEN_CVTSIFt GEN_CVTIFt #define GEN_CVTSIFb GEN_CVTIFb #define GEN_CVTSILIt GEN_CVTILIt #define GEN_CVTSILIb GEN_CVTILIb #define GEN_CVTSILUIt GEN_CVTILUIt #define GEN_CVTSILUIb GEN_CVTILUIb #define GEN_CVTSIIt #define GEN_CVTSIIb #define GEN_CVTSIUIt GEN_CVTIUIt #define GEN_CVTSIUIb GEN_CVTIUIb #define GEN_CVTSISUI GEN_CVTISUI #define GEN_CVTSIC GEN_CVTIC #define GEN_CVTSIUC GEN_CVTIUC #define GEN_CVTSISC GEN_CVTISC #else #define GEN_CVTSIDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 57;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSIDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 58;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSIFt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 59;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSIFb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 60;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef LONG_EQ_INT #define GEN_CVTSILIt GEN_CVTSIIt #define GEN_CVTSILIb GEN_CVTSIIb #else #define GEN_CVTSILIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 61;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSILIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 62;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTSILUIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 63;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSILUIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 64;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSIIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 65;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSIIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 66;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSIUIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 67;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSIUIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 68;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSISUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 69;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSIC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 70;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSIUC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 71;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSISC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 72;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_USHORT #define GEN_CVTSUIDt GEN_CVTUIDt #define GEN_CVTSUIDb GEN_CVTUIDb #define GEN_CVTSUIFt GEN_CVTUIFt #define GEN_CVTSUIFb GEN_CVTUIFb #define GEN_CVTSUILIt GEN_CVTUILIt #define GEN_CVTSUILIb GEN_CVTUILIb #define GEN_CVTSUILUIt GEN_CVTUILUIt #define GEN_CVTSUILUIb GEN_CVTUILUIb #define GEN_CVTSUIIt GEN_CVTUIIt #define GEN_CVTSUIIb GEN_CVTUIIb #define GEN_CVTSUIUIt #define GEN_CVTSUIUIb #define GEN_CVTSUISI GEN_CVTUISI #define GEN_CVTSUIC GEN_CVTUIC #define GEN_CVTSUIUC GEN_CVTUIUC #define GEN_CVTSUISC GEN_CVTUISC #else #define GEN_CVTSUIDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 73;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSUIDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 74;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSUIFt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 75;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSUIFb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 76;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSUILIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 77;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSUILIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 78;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSUILUIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 79;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSUILUIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 80;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSUIIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 81;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSUIIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 82;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSUIUIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 83;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSUIUIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 84;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSUISI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 85;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSUIC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 86;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSUIUC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 87;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSUISC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 88;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef LONG_EQ_INT #define GEN_CVTCLIt GEN_CVTCIt #define GEN_CVTCLIb GEN_CVTCIb #else #define GEN_CVTCLIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 89;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTCLIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 90;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_ULONG #define GEN_CVTCLUIt GEN_CVTCUIt #define GEN_CVTCLUIb GEN_CVTCUIb #else #define GEN_CVTCLUIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 91;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTCLUIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 92;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTCUIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 93;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTCUIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 94;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef SHORT_EQ_INT #define GEN_CVTCSI GEN_CVTCI #else #define GEN_CVTCSI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 95;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_USHORT #define GEN_CVTCSUI GEN_CVTCUIt #else #define GEN_CVTCSUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 96;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTCSC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 97;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTCUC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 98;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSCDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 99;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSCDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 100;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSCFt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 101;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSCFb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 102;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef LONG_EQ_INT #define GEN_CVTSCLIt GEN_CVTSCIt #define GEN_CVTSCLIb GEN_CVTSCIb #else #define GEN_CVTSCLIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 103;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSCLIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 104;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_ULONG #define GEN_CVTSCLUIt GEN_CVTSCUIt #define GEN_CVTSCLUIb GEN_CVTSCUIb #else #define GEN_CVTSCLUIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 105;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSCLUIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 106;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTSCIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 107;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSCIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 108;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSCUIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 109;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSCUIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 110;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef SHORT_EQ_INT #define GEN_CVTSCSI GEN_CVTSCIt #else #define GEN_CVTSCSI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 111;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_USHORT #define GEN_CVTSCSUI GEN_CVTSCUIt #else #define GEN_CVTSCSUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 112;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTSCC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 113;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSCUC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 114;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUCDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 115;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUCDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 116;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUCFt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 117;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUCFb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 118;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef LONG_EQ_INT #define GEN_CVTUCLIt GEN_CVTUCIt #define GEN_CVTUCLIb GEN_CVTUCIb #else #define GEN_CVTUCLIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 119;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUCLIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 120;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_ULONG #define GEN_CVTUCLUIt GEN_CVTUCUIt #define GEN_CVTUCLUIb GEN_CVTUCUIb #else #define GEN_CVTUCLUIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 121;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUCLUIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 122;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTUCIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 123;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUCIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 124;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUCUIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 125;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUCUIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 126;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef SHORT_EQ_INT #define GEN_CVTUCSI GEN_CVTUCIt #else #define GEN_CVTUCSI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 127;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_USHORT #define GEN_CVTUCSUI GEN_CVTUCUIt #else #define GEN_CVTUCSUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 128;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTUCC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 129;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUCSC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 130;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef LONG_EQ_INT #define GEN_CVTDLI GEN_CVTDI #else #define GEN_CVTDLI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 131;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_ULONG #define GEN_CVTDLUI GEN_CVTDUI #else #define GEN_CVTDLUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 132;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTDUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 133;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef SHORT_EQ_INT #define GEN_CVTDSI GEN_CVTDI #else #define GEN_CVTDSI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 134;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_USHORT #define GEN_CVTDSUI GEN_CVTDUI #else #define GEN_CVTDSUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 135;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTDSC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 136;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTDUC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 137;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef LONG_EQ_INT #define GEN_CVTFLI GEN_CVTFI #else #define GEN_CVTFLI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 138;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_ULONG #define GEN_CVTFLUI GEN_CVTFUI #else #define GEN_CVTFLUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 139;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTFUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 140;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef SHORT_EQ_INT #define GEN_CVTFSI GEN_CVTFI #else #define GEN_CVTFSI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 141;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_USHORT #define GEN_CVTFSUI GEN_CVTFUI #else #define GEN_CVTFSUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 142;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTFSC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 143;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTFUC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 144;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef LONG_EQ_INT #define GEN_CVTILIt #define GEN_CVTILIb #else #define GEN_CVTILIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 145;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTILIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 146;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_ULONG #define GEN_CVTILUIt GEN_CVTIUIt #define GEN_CVTILUIb GEN_CVTIUIb #else #define GEN_CVTILUIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 147;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTILUIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 148;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTIUIt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 149;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTIUIb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 150;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef SHORT_EQ_INT #define GEN_CVTISI #else #define GEN_CVTISI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 151;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_USHORT #define GEN_CVTISUI GEN_CVTIUIt #else #define GEN_CVTISUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 152;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTISC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 153;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTIUC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 154;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef LDOUBLE_EQ_DOUBLE #define GEN_CVTLDD #define GEN_CVTLDF GEN_CVTDF #define GEN_CVTLDLI GEN_CVTDLI #define GEN_CVTLDLUI GEN_CVTDLUI #define GEN_CVTLDI GEN_CVTDI #define GEN_CVTLDUI GEN_CVTDUI #define GEN_CVTLDSI GEN_CVTDSI #define GEN_CVTLDSUI GEN_CVTDSUI #define GEN_CVTLDC GEN_CVTDC #define GEN_CVTLDUC GEN_CVTDUC #define GEN_CVTLDSC GEN_CVTDSC #define GEN_CVTILDt GEN_CVTIDt #define GEN_CVTILDb GEN_CVTIDb #define GEN_CVTUILDt GEN_CVTUIDt #define GEN_CVTUILDb GEN_CVTUIDb #define GEN_CVTLILDt GEN_CVTLIDt #define GEN_CVTLILDb GEN_CVTLIDb #define GEN_CVTSILDt GEN_CVTSIDt #define GEN_CVTSILDb GEN_CVTSIDb #define GEN_CVTLUILDt GEN_CVTLUIDt #define GEN_CVTLUILDb GEN_CVTLUIDb #define GEN_CVTSUILDt GEN_CVTSUIDt #define GEN_CVTSUILDb GEN_CVTSUIDb #define GEN_CVTDLDt #define GEN_CVTDLDb #define GEN_CVTFLDt GEN_CVTFDt #define GEN_CVTFLDb GEN_CVTFDb #define GEN_CVTCLDt GEN_CVTCDt #define GEN_CVTCLDb GEN_CVTCDb #define GEN_CVTSCLDt GEN_CVTSCDt #define GEN_CVTSCLDb GEN_CVTSCDb #define GEN_CVTUCLDt GEN_CVTUCDt #define GEN_CVTUCLDb GEN_CVTUCDb #else #define GEN_CVTLDD ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 155;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLDF ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 156;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef LONG_EQ_INT #define GEN_CVTLDLI GEN_CVTLDI #else #define GEN_CVTLDLI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 157;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_ULONG #define GEN_CVTLDLUI GEN_CVTLDUI #else #define GEN_CVTLDLUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 158;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTLDI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 159;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLDUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 160;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef SHORT_EQ_INT #define GEN_CVTLDSI GEN_CVTLDI #else #define GEN_CVTLDSI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 161;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_USHORT #define GEN_CVTLDSUI GEN_CVTLDUI #else #define GEN_CVTLDSUI ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 162;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTLDC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 163;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLDUC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 164;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLDSC ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 165;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTILDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 166;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTILDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 167;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUILDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 168;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUILDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 169;\ kodp += sizeof (struct OPERAND_0_mi); #ifdef LONG_EQ_INT #define GEN_CVTLILDt GEN_CVTILDt #define GEN_CVTLILDb GEN_CVTILDb #else #define GEN_CVTLILDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 170;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLILDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 171;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef SHORT_EQ_INT #define GEN_CVTSILDt GEN_CVTILDt #define GEN_CVTSILDb GEN_CVTILDb #else #define GEN_CVTSILDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 172;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSILDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 173;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_ULONG #define GEN_CVTLUILDt GEN_CVTUILDt #define GEN_CVTLUILDb GEN_CVTUILDb #else #define GEN_CVTLUILDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 174;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTLUILDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 175;\ kodp += sizeof (struct OPERAND_0_mi); #endif #ifdef UINT_EQ_USHORT #define GEN_CVTSUILDt GEN_CVTUILDt #define GEN_CVTSUILDb GEN_CVTUILDb #else #define GEN_CVTSUILDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 176;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSUILDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 177;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_CVTDLDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 178;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTDLDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 179;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTFLDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 180;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTFLDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 181;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTCLDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 182;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTCLDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 183;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSCLDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 184;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTSCLDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 185;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUCLDt ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 186;\ kodp += sizeof (struct OPERAND_0_mi); #define GEN_CVTUCLDb ((struct OPERAND_0_mi *)kodp)->major = CVT;\ ((struct OPERAND_0_mi *)kodp)->minor = 187;\ kodp += sizeof (struct OPERAND_0_mi); #endif #define GEN_MESS(mes) ((struct OPERAND_1_ma *)kodp)->major = MESS;\ ((struct OPERAND_1_ma *)kodp)->adr = mes;\ kodp += sizeof (struct OPERAND_1_ma); /* * Control instructions. */ #define GEN_STOP ((struct OPERAND_0_ma *)kodp)->major = STOP;\ kodp += sizeof (struct OPERAND_0_ma); #define GEN_INTER ((struct OPERAND_0_ma *)kodp)->major = INTER;\ kodp += sizeof (struct OPERAND_0_ma); #define GEN_IRET ((struct OPERAND_0_ma *)kodp)->major = IRET;\ kodp += sizeof (struct OPERAND_0_ma); #define GEN_HALT ((struct OPERAND_0_ma *)kodp)->major = HALT;\ kodp += sizeof (struct OPERAND_0_ma); /* * Jump instructions. */ #define GEN_JMP ((struct OPERAND_1_ma *)kodp)->major = JMP;\ kodp += sizeof (struct OPERAND_1_ma); #define GEN_JZ ((struct OPERAND_1_ma *)kodp)->major = JZ;\ kodp += sizeof (struct OPERAND_1_ma); #define GEN_JNZ ((struct OPERAND_1_ma *)kodp)->major = JNZ;\ kodp += sizeof (struct OPERAND_1_ma); /* * Instructions call and ret. */ #define GEN_CALL(v_adr1) ((struct OPERAND_1_mi *)kodp)->major = CALLi;\ ((struct OPERAND_1_mi *)kodp)->minor = 0;\ ((struct OPERAND_1_mi *)kodp)->adr = v_adr1;\ kodp += sizeof (struct OPERAND_1_mi); #define GEN_XCALLi(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 1;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLd(off1) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 2;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLf(off1) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 3;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLc(off1) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 4;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLv(off1) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 5;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLui(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 6;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLli(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 7;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLlui(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 8;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLsi(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 9;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLsui(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 10;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLld(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 11;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLsc(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 12;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLuc(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 13;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLiv(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 14;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLdv(off1) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 15;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLfv(off1) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 16;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLcv(off1) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 17;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLvv(off1) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 18;\ ((struct OPERAND_1_i *)kodp)->num = off1;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLuiv(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 19;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLliv(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 20;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLluiv(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 21;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLsiv(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 22;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLsuiv(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 23;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLldv(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 24;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLscv(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 25;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALLucv(off) ((struct OPERAND_1_i *)kodp)->major = CALLi;\ ((struct OPERAND_1_i *)kodp)->minor = 26;\ ((struct OPERAND_1_i *)kodp)->num = off;\ kodp += sizeof (struct OPERAND_1_i); #define GEN_XCALL \ switch(type_ac[set]) \ { \ case INTEGER: \ case SIGNED_AC | INTEGER: \ if (call_by_value) \ { \ GEN_XCALLiv(*(int *)proc_name[proc]); \ } \ else if (call_by_reference) \ { \ GEN_XCALLi(*(int *)proc_name[proc]); \ } \ break; \ case UNSIGNED_AC | INTEGER: \ if (call_by_value) \ { \ GEN_XCALLuiv(*(int *)proc_name[proc]); \ } \ else if (call_by_reference) \ { \ GEN_XCALLui(*(int *)proc_name[proc]); \ } \ break; \ case LONG_AC | INTEGER: \ case LONG_AC | SIGNED_AC | INTEGER: \ if (call_by_value) \ { \ GEN_XCALLliv(*(int *)proc_name[proc]); \ } \ else if (call_by_reference) \ { \ GEN_XCALLli(*(int *)proc_name[proc]); \ } \ break; \ case LONG_AC | UNSIGNED_AC | INTEGER: \ if (call_by_value) \ { \ GEN_XCALLluiv(*(int *)proc_name[proc]); \ } \ else if (call_by_reference) \ { \ GEN_XCALLlui(*(int *)proc_name[proc]); \ } \ break; \ case SHORT_AC | INTEGER: \ case SHORT_AC | SIGNED_AC | INTEGER: \ if (call_by_value) \ { \ GEN_XCALLsiv(*(int *)proc_name[proc]); \ } \ else if (call_by_reference) \ { \ GEN_XCALLsi(*(int *)proc_name[proc]); \ } \ break; \ case SHORT_AC | UNSIGNED_AC | INTEGER: \ if (call_by_value) \ { \ GEN_XCALLsuiv(*(int *)proc_name[proc]); \ } \ else if (call_by_reference) \ { \ GEN_XCALLsui(*(int *)proc_name[proc]); \ } \ break; \ case DOUB: \ if (call_by_value) \ { \ GEN_XCALLdv(*(int *)proc_name[proc]); \ } \ else if (call_by_reference) \ { \ GEN_XCALLd(*(int *)proc_name[proc]); \ } \ break; \ case LONG_AC | DOUB: \ if (call_by_value) \ { \ GEN_XCALLldv(*(int *)proc_name[proc]); \ } \ else if (call_by_reference) \ { \ GEN_XCALLld(*(int *)proc_name[proc]); \ } \ break; \ case FLT: \ if (call_by_value) \ { \ GEN_XCALLfv(*(int *)proc_name[proc]); \ } \ else if (call_by_reference) \ { \ GEN_XCALLf(*(int *)proc_name[proc]); \ } \ break; \ case CHR: \ if (call_by_value) \ { \ GEN_XCALLcv(*(int *)proc_name[proc]); \ } \ else if (call_by_reference) \ { \ GEN_XCALLc(*(int *)proc_name[proc]); \ } \ break; \ case SIGNED_AC | CHR: \ if (call_by_value) \ { \ GEN_XCALLscv(*(int *)proc_name[proc]); \ } \ else if (call_by_reference) \ { \ GEN_XCALLsc(*(int *)proc_name[proc]); \ } \ break; \ case UNSIGNED_AC | CHR: \ if (call_by_value) \ { \ GEN_XCALLucv(*(int *)proc_name[proc]); \ } \ else if (call_by_reference) \ { \ GEN_XCALLuc(*(int *)proc_name[proc]); \ } \ break; \ case VID: \ if (call_by_value) \ { \ GEN_XCALLvv(*(int *)proc_name[proc]); \ } \ else if (call_by_reference) \ { \ GEN_XCALLv(*(int *)proc_name[proc]); \ } \ break; \ default: \ fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); \ error_message (5000); return (0); \ } #define GEN_RET ((struct OPERAND_0_ma *)kodp)->major = RET;\ kodp += sizeof (struct OPERAND_0_ma); #define GEN_XCHG ((struct OPERAND_0_ma *)kodp)->major = XCHG;\ kodp += sizeof (struct OPERAND_0_ma); #endif /* _GENINSTR_H */ clif-0.93/getc_unix.c100444 1750 1750 2230 6354712564 13261 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * getc_unix.c * * Interface for getc. * Redefined for different platforms. */ #include #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif int getcx PROTO((FILE *)); int getcx (input) FILE *input; { return (getc (input)); } clif-0.93/global.c100444 1750 1750 10437 6555164347 12567 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * global.c * * Definition of global variables. */ #include "type.h" /* Needed for definition of constant */ /* cells. */ #include "buf.h" /* Needed for line_buf[YYLMAX]. */ int s; /* Number of opened files. */ int char_counter; /* Counter of characters. */ char line_buf[YYLMAX]; /* Contains whole line during lexical */ /* analysis and compiling. */ char *mem_start; /* Pointer to the memory. */ char *stack; /* Stack pointer */ char *bp; /* Base pointer. * Used for relative addressing of variables. */ char *frame; /* Frame pointer. * Used for parameter passing to * remote functions. */ char **ast; /* Arithmetic stack pointer. */ char *pc; /* Program counter. * Points to the next executed instruction. */ char *fixst; /* Pointer to the fixative stack */ #if 0 char **adr_stack; /* Pointer to the address stack (obsolete). */ #endif char *tmp; /* Pointer to the stack of temporaries. */ char *tmph; /* Pointer to the current level beginning * of the stack of temporaries. * It is used for clearing the stack. */ char *tmp_start; /* Pointer to the beginning of the stack * of temporaries. */ char *proc_name[256]; /* Address of function beginning. */ char *proc_name_text[256]; /* Pointer to names of remote functions. */ char *struct_union_enum_name[256]; /* Names of tags. */ struct CONTEXT *context; int proc; /* Counter for function call. * Used by nested calls when function is * used as parameter. */ int suen_count; /* struct_union_enum_name counter. Nesting levels of tag declaration. */ struct internal_type *type_com[256]; /* Complex type of an operand in * expression (simple, array). */ int dim[256]; /* Max size of array dimensions (256). */ int poc; /* Counter of the number of dimensions * in arrays. */ int remote_flag = 0; /* Flag for remote function call. */ int body_flag = 1; /* Flag of a variable body. */ int typedef_f = 1; /* If in the context can be TYPENAME token equals 1; 0 otherwise. */ int enum_value = 0; /* Value of the enumeration specifier. */ struct internal_type *typeh[256]; int type_spec_count = 0; /* \verbatim{global_c_remote_ptr_C.tex} */ struct remote_tab *remote_ptr_C; /* Pointer to the structure of remote * function table. */ /* \verbatim */ /* \verbatim{global_c_rp.tex} */ struct return1 *rp; /* Pointer for backpatch address of */ /* return in a function. */ /* \verbatim */ char *kodp; /* Pointer to the generated code. */ char *kodp1; /* Pointer for sweeping out unuseful */ /* code from the memory. */ char *kodp2; /* Pointer for remembering context */ /* used during context switching in */ /* interrupts. */ char *kodp3; /* Pointer for fixing returns in */ /* functions. */ char *kodp4; /* If there is l_value throw away last PUSH instruction. */ /* Pointers to the last and current generated instruction. */ char *last_instr, *current_instr; int count[256],count_arr=1; int virtual_machine_suspended=1; int clif_interrupt_level=0; int set=0; /* \verbatim{global_c_fixp.tex} */ union fix *fixp; /* Pointer to the fixative stack. */ /* \verbatim */ char *call_fix[256]; /* Address' backpatching during * parameter passing. */ clif-0.93/global.h100444 1750 1750 14420 6555164441 12563 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * global.h * * Declaration of global variables. */ #ifndef _GLOBAL_H #define _GLOBAL_H #include #if __STDC__ #include #else #include #endif #include "ansidecl.h" extern int s; /* Number of opened files. */ extern int line_counter,char_counter; /* Counter of lines and characters. */ extern char line_buf[]; /* Contains whole line during lexical */ /* analysis and compiling. */ extern char *mem_start; /* Pointer to the memory. */ extern char *stack; /* Stack pointer. */ extern char *bp; /* Base pointer. * Used for relative addressing of variables. */ extern char *frame; /* Frame pointer. * Used for parameter passing to * remote functions. */ extern char **ast; /* Arithmetic stack pointer. */ extern char *pc; /* Program counter. * Points to the next executed instruction. */ extern char *fixst; /* Pointer to the fixative stack. */ #if 0 extern char **adr_stack; /* Pointer to the address stack (obsolete). */ #endif extern char *tmp; /* Pointer to the stack of temporaries. */ extern char *tmph; /* Pointer to the current level beginning * of the stack of temporaries. * It is used for clearing the stack. */ extern char *tmp_start; /* Pointer to the beginning of the stack * of temporaries. */ extern char *proc_name[]; /* Address of function beginning. */ extern char *proc_name_text[]; /* Pointer to names of remote functions. */ extern char *struct_union_enum_name[]; /* Names of tags. */ extern struct CONTEXT *context; extern int proc; /* Counter for function call. Used by * nested calls when function is used as * parameter. */ extern int suen_count; /* struct_union_enum_name counter. Nesting levels of tag declaration. */ extern struct internal_type *type_com[]; /* Complex type of an operand in an expression * (simple, array). */ extern struct remote_has_tab *hastab_remote; /* Pointers to the hash table of remote * functions. */ extern int dim[]; /* Max size of array dimensions (256). */ extern int poc; /* Counter of the number of dimensions * in arrays. */ extern int remote_flag; /* Flag for remote function call. */ extern int body_flag; /* Flag of a variable body. */ extern int typedef_f; /* If in the context can be TYPENAME token equals 1; 0 otherwise. */ extern int enum_value; /* Value of the enumeration specifier. */ extern struct internal_type *typeh[]; extern int type_spec_count; extern struct remote_tab *remote_ptr_C; /* Pointer to the structure of remote * function table. */ extern struct return1 *rp; /* Pointer for backpatch address of * return in a function. */ extern char *kodp; /* Pointer to the generated code. */ extern char *kodp1; /* Pointer for sweeping out unuseful */ /* code from the memory. */ extern char *kodp2; /* Pointer for remembering context */ /* used during context switching in */ /* interrupts. */ extern char *kodp3; /* Pointer for fixing returns in */ /* functions. */ extern char *kodp4; /* If there is l_value throw away last PUSH instruction. */ /* Pointers to the last and current generated instruction. */ extern char *last_instr, *current_instr; extern int count[], count_arr; extern int handler; /* Interrupt service. */ extern int virtual_machine_suspended; extern int clif_interrupt_level; extern int set; extern union fix *fixp; /* Pointer to the fixative stack. */ extern char *call_fix[]; /* Address' backpatching during */ /* parameter passing. */ #if 0 char *say(); #endif extern char *text; extern void error_message PVPROTO((int, ...)); #ifndef MSDOS extern void interrupt_service_sync PROTO((void)); #endif #ifndef NOT_MSWIN_AND_YES_DOS extern void store_context PROTO((void)); extern void restore_context PROTO((void)); #endif typedef struct fileattr FILEATTR; struct fileattr { FILE *fp; char *name; int line_counter; }; #ifndef MSDOS #define HANDLER_TEST handler #define HANDLER_SET handler = 0 #define VIRTUAL_MACHINE_SUSPENDED_SET virtual_machine_suspended = 1 #define VIRTUAL_MACHINE_SUSPENDED_RESET virtual_machine_suspended = 0 #define CLIF_INTERRUPT_LEVEL_INCREMENT ++clif_interrupt_level #define CLIF_INTERRUPT_LEVEL_DECREMENT (clif_interrupt_level<=0?clif_interrupt_level:--clif_interrupt_level) #endif #ifdef MSWIN #define HANDLER_TEST handler_t() #define HANDLER_SET handler = 0 #define VIRTUAL_MACHINE_SUSPENDED_SET virtual_mach_sus_ss() #define VIRTUAL_MACHINE_SUSPENDED_RESET virtual_mach_sus_rr() #define CLIF_INTERRUPT_LEVEL_INCREMENT inter_level_p() #define CLIF_INTERRUPT_LEVEL_DECREMENT inter_level_m() #endif /* Used only for debugging purposes. For compiling this use -DDEBUG Checks kodp for right value. kodp is used by code generetion as pointer to the end of the generated code. */ #ifdef DEBUG #define GENCODE printfx ("kodp=%u\n", kodp); \ last_instr = current_instr; \ current_instr = kodp; #else #define GENCODE last_instr = current_instr; \ current_instr = kodp; #endif /* Checks stack overflow. * Only if -DCHKSTACK is defined during * compilation. */ #ifdef CHKSTACK #define check_stack() if (stack <= kodp) \ { \ error_message (4001); \ return (-2); \ } #else #define check_stack() #endif #endif /* _GLOBAL_H */ clif-0.93/graph.c100444 1750 1750 7166 6354714464 12413 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * graph.c * * Graphic primitives. */ #include #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif static void d_move PROTO((int, int)); static void d_draw PROTO((int, int, int, int)); static void d_point PROTO((int, int, int, int)); static void window PROTO((int, int, double, double, double, double)); static void move PROTO((int, int, double, double)); static void draw PROTO((int, int, double, double)); static void draw_point PROTO((int, int, double, double)); /* \verbatim{graph_c_window.tex} */ /* * Creates a window from user's coordinates. * Counts world coordinates. * handle - is handle of the window * n - specifies line in the window (user can have more lines in the window) * rest are coordinates */ static void window (handle, n, x_left, y_down, x_right, y_up) int handle, n; double x_left, y_down, x_right, y_up; { channel[handle].member[n].ax = (channel[handle].w_resolution[0] - 1) / (fabs(x_left - x_right)); channel[handle].member[n].ay = (channel[handle].w_resolution[1] - 1) / (fabs(y_down - y_up)); } /* \verbatim */ /* \verbatim{graph_c_move.tex} */ /* * Moves cursor to the specified position. * handle - is handle of the window * n - specifies line in the window (user can have more lines in the window) * x, y - coordinates */ static void move (handle, n, x, y) int handle, n; double x, y; { d_move((int)floor ((x - channel[handle].start_time) * channel[handle].member[n].ax), channel[handle].w_resolution[1] - 1 - (int)floor ((y - channel[handle].member[n].lower) * channel[handle].member[n].ay)); } /* \verbatim */ /* \verbatim{graph_c_draw.tex} */ /* * Draws a line from the cursor position to the point of coordinates. * handle - is handle of the window * n - specifies line in the window (user can have more lines in the window) * x, y - coordinates */ static void draw (handle, n, x, y) int handle, n; double x, y; { d_draw (handle, n, (int)floor ((x - channel[handle].start_time) * channel[handle].member[n].ax), channel[handle].w_resolution[1] - 1 - (int)floor ((y - channel[handle].member[n].lower) * channel[handle].member[n].ay)); } /* \verbatim */ /* \verbatim{graph_c_draw_point.tex} */ /* * Draws a point from the coordinates. * handle - is handle of the window * n - specifies line in the window (user can have more lines in the window) * x, y - coordinates */ static void draw_point (handle, n, x, y) int handle, n; double x, y; { d_point (handle, n, (int)floor ((x - channel[handle].start_time) * channel[handle].member[n].ax), channel[handle].w_resolution[1] - 1 - (int)floor ((y - channel[handle].member[n].lower) * channel[handle].member[n].ay)); } /* \verbatim */ clif-0.93/help.c100444 1750 1750 4220 6354503470 12217 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * help.c * * Prints out a short help file. */ #include #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif extern int fprintfx PROTO((FILE *, char *, ...)); extern int getcx PROTO((FILE *)); extern char version[]; extern int verbose; int help PROTO((int)); int help (typ) int typ; { FILE *spf; int znak; switch(typ) { case 1: if((spf = fopen ("small.hlp", "r")) == NULL) { fprintfx (stderr, "\tcopy file small.hlp in this directory\n"); return (-1); } else { while ((znak = getcx (spf)) != EOF) putc ((char)znak, stdout); } break; case 2: if((spf = fopen ("copying", "r")) == NULL) { fprintfx (stderr, "\tcopy file copying in this directory\n"); return (-1); } else { while ((znak = getcx (spf)) != EOF) putc ((char)znak, stdout); } break; case 3: if ((spf = fopen ("warranty", "r")) == NULL) { fprintfx (stderr, "\tcopy file warranty in this directory\n"); return(-1); } else { while ((znak = getcx (spf)) != EOF) putc ((char)znak, stdout); } break; case 4: verbose = 1; break; case 5: fprintfx (stderr, "clif version %s\n", version); return (-1); } return (0); } clif-0.93/init_ch.c100444 1750 1750 3343 6354712204 12706 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * init_ch.c * * Initialization of the channel compiler and * redefinition of its input function. */ #include #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif int input_channel PROTO((void)); void init_ch PROTO((char *)); int buf_cnt; char *inp_buf; /* * Redefinition of input for channel compiler. */ int input_channel () { yy_channeltchar = yy_channelsptr>yy_channelsbuf?U_channel(*--yy_channelsptr):inp_buf[buf_cnt++]; if (yy_channeltchar == 10) yy_channellineno++; if (yy_channeltchar == '\0') return (0); return (yy_channeltchar); } /* * Initialization of the channel compiler. */ void init_ch (input_buffer) char *input_buffer; { buf_cnt = 0; inp_buf = input_buffer; } /* * Redefinition of internal yacc function yywrap. */ int yy_channelwrap () { return (1); } clif-0.93/init_rs.c100444 1750 1750 10530 6514121437 12754 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * init_rs.c * * Initialization of the run string compiler * and redefinition of its input function. */ #include #include #include #include "allocx.h" #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif #ifndef FLEX_SCANNER int input_rs_ PROTO((void)); #endif void init_rs PROTO((int, char *[])); extern int getcx PROTO((FILE *)); extern void error_message PROTO((int, ...)); extern int fprintfx PROTO((FILE *, char *, ...)); FILE *pfrs; extern char *argvv[]; static char *argv_rs[200]; static int argc_rs; #ifndef FLEX_SCANNER static int argc_rs_pointer = 1, counter_rs = 0; #else static void switch_to_char_buffer PROTO((void)); #endif char name[]="clif.ini";/* Name of the Clif's initialization file. * It is always opened. */ int yy_rs_wrap PROTO((void)); #ifndef FLEX_SCANNER /* * Redefinition of the input for the run string compiler. */ int input_rs_ () { if ((argc_rs_pointer < argc_rs) || (pfrs != NULL)) { if (pfrs == NULL) { if (argv_rs[argc_rs_pointer][counter_rs] != '\0') { yy_rs_tchar = yy_rs_sptr > yy_rs_sbuf ? U_rs_(*--yy_rs_sptr) : argv_rs[argc_rs_pointer][counter_rs++]; } else if (++argc_rs_pointer >= argc_rs) return 0; else { yy_rs_tchar = yy_rs_sptr > yy_rs_sbuf ? U_rs_(*--yy_rs_sptr) : '\n'; counter_rs = 0; } } else yy_rs_tchar = yy_rs_sptr > yy_rs_sbuf ? U_rs_(*--yy_rs_sptr): getcx (pfrs); if (yy_rs_tchar == 10) yy_rs_lineno++; if (yy_rs_tchar == EOF) { fclose (pfrs); pfrs = NULL; if (argc_rs_pointer < argc_rs) { if(argv_rs[argc_rs_pointer][counter_rs] != '\0') { yy_rs_tchar = yy_rs_sptr > yy_rs_sbuf ? U_rs_(*--yy_rs_sptr) : argv_rs[argc_rs_pointer][counter_rs++]; } else if ((++argc_rs_pointer) >= argc_rs) return 0; else { yy_rs_tchar = yy_rs_sptr > yy_rs_sbuf ? U_rs_(*--yy_rs_sptr) : '\n'; counter_rs = 0; } } else return 0; } return (yy_rs_tchar); } else return 0; } #else static void switch_to_char_buffer () { register int i, len = 0; char *str_ptr = NULL; for (i = 1; i < argc_rs; i++) { int tmp_len = strlen (argv_rs[i]); str_ptr = reallocx (str_ptr, tmp_len + len + 1); if (str_ptr == NULL) { error_message (4002); return; } if (len > 0) { str_ptr[len] = ' '; str_ptr[len + 1] = '\0'; len++; } else str_ptr[0] = '\0'; len += tmp_len; strcat (str_ptr, argv_rs[i]); } if (NULL != str_ptr) yy_rs__scan_string (str_ptr); } #endif /* * Initialization of the run string compiler. */ void init_rs (argc1,argv1) int argc1; char *argv1[]; { int b; if ((argvv[0] = (char *)callocx (1, 6)) == NULL) { error_message (4002); return; } strcpy (argvv[0],"stdin"); for (b = 1; b < argc1; b++) { if ((argv_rs[b] = (char *)callocx (1, strlen (argv1[b]) + 1)) == NULL) { error_message (4002); return; } strcpy (argv_rs[b], argv1[b]); } argc_rs = argc1; pfrs = fopen (name, "r"); if (pfrs == NULL) fprintfx (stderr, "\nwarning: clif.ini does not exist\n"); #ifdef FLEX_SCANNER yy_rs_in = pfrs; #endif } /* * Redefinition of internal yacc function yywrap. */ int yy_rs_wrap () { #ifdef FLEX_SCANNER static int flag; if (! flag) { switch_to_char_buffer (); flag = 1; return 0; } #endif return 1; } clif-0.93/input.c100444 1750 1750 12432 6515712744 12457 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* \verbatim{input_c.tex} */ /* * input.c * * Initialization of the main compiler * and redefinition of its input functions. * Different input function are used during * synchronous and asynchronous interrupt * handling. */ #include #include #include "global.h" #include "lex_t.h" #include "input.h" extern FILEATTR pf, spf[]; #ifndef FLEX_SCANNER extern int yylineno; extern int yytchar; extern char *yysptr, yysbuf[]; extern int getcx PROTO((FILE *)); static int buf_pointer = 0; #else extern FILE *yyin; #endif #define U(x) x int (*input) PROTO((void)); char string_resume[]="resume;"; /* Buffer for input by return * from asynchronous interrupt. */ extern int no_compile_only; /* Flag in the case of errors or */ /* compile only. */ extern int handle_main; /* If set, compiler like behavior. */ extern int source_line_number; /* Source line number. Detecting if */ /* the current line was already */ /* printed. Using in error messages. */ extern void exit_file_scope PROTO((void)); #ifndef FLEX_SCANNER /* * Redefinition of the input for the main compiler. */ int input_komp () { #ifdef DEBUG_INTER printfx("in front of getc in input\n"); #endif yytchar=yysptr>yysbuf?U(*--yysptr):getcx(pf.fp); #ifdef DEBUG_INTER printfx("behind of getc in input, read character %c - %x\n", yytchar, yytchar); #endif if(yytchar == '\n') /* LF */ { yylineno++; spf[s].line_counter++; char_counter = 0; line_buf[0] = 0; } if(yytchar == EOF) /* Is current char EOF? */ { if (s > 0) { spf[s].line_counter = 1; /* Counting lines from beginning. */ source_line_number = 0; /* Resetting line number in the */ /* presence of errors. */ fclose (spf[s].fp); exit_file_scope (); s = s - 1; if (! s && ! no_compile_only) return 0; /* If we want compiler-like behavior, don't switch to stdin. */ if (! s && handle_main) return 0; pf = spf[s]; /* Move to the next opened file. */ } #ifdef DEBUG_INTER printfx ("in front of the second getc in input\n"); #endif yytchar = yysptr>yysbuf?U(*--yysptr):getcx(pf.fp); /* The first char */ #ifdef DEBUG_INTER printfx ("behind of the second getc in input, read character %c - %x\n", yytchar, yytchar); #endif } return (yytchar); } /* * Redefinition of the input for the main compiler. * It is used during an interrupt. */ int input_std () { #ifdef DEBUG_INTER printfx ("in front of the third getc in input\n"); #endif yytchar = yysptr>yysbuf?U(*--yysptr):getcx(stdin); #ifdef DEBUG_INTER printfx ("behind of the third getc in input, read character %c - %x\n", yytchar, yytchar); #endif if (yytchar == '\n') /* LF */ { yylineno++; spf[s].line_counter++; char_counter = 0; line_buf[0] = 0; } #ifndef NOT_MSWIN_AND_YES_DOS if (HANDLER_TEST) { HANDLER_SET; input = input_buf; buf_pointer = 0; return (input_buf()); } #endif return (yytchar); } /* * Redefinition of the input for the main compiler. * It is used by return from an interrupt. */ int input_buf () { yytchar = yysptr>yysbuf?U(*--yysptr):string_resume[buf_pointer++]; if (yytchar == '\n') /* LF */ { yylineno++; spf[s].line_counter++; char_counter = 0; line_buf[0] = 0; } return (yytchar); } #else int terminate_buffer () { fclose (spf[s].fp); spf[s].fp = NULL; spf[s].name = NULL; spf[s--].line_counter = 1; source_line_number = 0; exit_file_scope (); /* Do not switch to stdin, if the user wants compiler-like behavior. */ if (! s && handle_main) return 1; return (! s && ! no_compile_only); } #endif /* FLEX_SCANNER */ /* * Initialization of the main compiler input. */ int init_input (argc1, argv1) int argc1; char *argv1[]; { int b; #ifndef FLEX_SCANNER input = input_komp; #endif s = argc1 - 1; spf[0].fp = stdin; spf[0].name = "stdin"; spf[0].line_counter = 1; for (b = 1; b < argc1; b++) /* File opening and storing their pointer. */ { spf[argc1 - b].fp = fopen(argv1[b],"r"); spf[argc1 - b].name = argv1[b]; spf[argc1 - b].line_counter = 1; if (spf[argc1-b].fp == NULL) { s = argc1 - b; error_message (7001); return (-1); } } /* * Takes the first file pointer from the stack. */ #ifdef FLEX_SCANNER yyin = spf[s].fp; #else pf.fp = spf[s].fp; #endif return 0; } /* \verbatim */ clif-0.93/input.h100444 1750 1750 2654 6514212652 12441 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * input.h * * Redefinition of the input function for yacc. */ #ifndef _INPUT_H #define _INPUT_H #ifdef input #undef input #endif #ifndef FLEX_SCANNER extern int (*input) PROTO((void)); extern int input_buf PROTO((void)); extern int input_komp PROTO((void)); extern int input_std PROTO((void)); #else extern void switch_to_stdin PROTO((void)); extern void switch_to_char_buffer PROTO((void)); extern int switch_to_buffer PROTO((void)); extern int terminate_buffer PROTO((void)); #endif extern void set_new_name PROTO((char *)); extern int init_input PROTO((int, char *[])); #endif /* _INPUT_H */ clif-0.93/instr.h100444 1750 1750 7526 6507756231 12454 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * instr.h * * Header of structures. * Defines size of virtual machine * instructions. */ #ifndef _INSTR_H #define _INSTR_H /* * No operand, only major */ struct OPERAND_0_ma { int major; }; /* * No operand, only major and minor. */ struct OPERAND_0_mi { int major; int minor; }; /* * One operand and major only. */ struct OPERAND_1_ma { int major; char *adr; }; /* * One operand and major and minor. */ struct OPERAND_1_mi { int major; int minor; char *adr; }; /* * One operand (immediately integer) and major and minor. */ struct OPERAND_1_i { int major; int minor; int num; }; /* * One operand (immediately unsigned integer) and major and minor. */ struct OPERAND_1_ui { int major; int minor; unsigned int num; }; /* * One operand (immediately long integer) and major and minor. */ struct OPERAND_1_li { int major; int minor; long int num; }; /* * One operand (immediately long unsigned integer) and major and minor. */ struct OPERAND_1_lui { int major; int minor; long unsigned int num; }; /* * One operand (immediately short integer) and major and minor. */ struct OPERAND_1_si { int major; int minor; short int num; }; /* * One operand (immediately short unsigned integer) and major and minor. */ struct OPERAND_1_sui { int major; int minor; short unsigned int num; }; /* * One operand (immediately double) and major and minor. */ struct OPERAND_1_id { int major; int minor; double num; }; /* * One operand (immediately long double) and major and minor. */ struct OPERAND_1_ild { int major; int minor; long double num; }; /* * One operand (immediately float) and major and minor. */ struct OPERAND_1_if { int major; int minor; float num; }; /* * One operand (immediately char) and major and minor. */ struct OPERAND_1_ic { int major; int minor; char num; }; /* * One operand (immediately signed char) and major and minor. */ struct OPERAND_1_isc { int major; int minor; signed char num; }; /* * One operand (immediately unsigned char) and major and minor. */ struct OPERAND_1_iuc { int major; int minor; unsigned char num; }; /* * Arithmetic and logical instructions. */ #define ADD 10 #define SUB 11 #define MULT 12 #define DIV 13 #define MOD 14 #define OR 15 #define AND 16 #define ORB 17 #define ANDB 18 #define EQ 19 #define LO 20 #define GR 21 #define LE 22 #define GE 23 #define NE 24 #define NEG 45 #define NOT 46 #define SAL 47 #define SAR 48 #define XOR 49 #define CVT 44 /* * Control instructions. */ #define JMP 25 #define JNZ 26 #define JZ 27 #define RET 28 #define CALLi 29 #define HALT 34 #define STOP 35 #define INTER 50 #define IRET 51 /* * I/O instructions. */ #define OUT 30 #define IN 31 #define MESS 36 /* * Instructions on stacks. */ #define PUSHAI 32 #define PUSHA 33 #define MOV 37 #define PUSH 38 #define POP 39 #define POPA 40 #define POPAD 41 #define PUSHAD 42 #define CLRT 43 #define XCHG 52 #endif /* _INSTR_H */ clif-0.93/intrinsic.h100444 1750 1750 4765 6501215510 13301 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* \verbatim{intrinsic_h.tex} */ /* * intrinsic.h * * List of intrinsic functions. */ #ifndef _INTRINSIC_H #define _INTRINSIC_H #include #include "myintrinsic.c" #ifdef CONTROL #include "example/apl.c" #endif typedef void (*INTRINSIC_FUNCTION) PROTO((char **)); struct INTR { char *name; INTRINSIC_FUNCTION adr; } intr_name[]= {{"cclose", (INTRINSIC_FUNCTION)cclose}, {"cgetc", (INTRINSIC_FUNCTION)cgetc}, {"chclose", (INTRINSIC_FUNCTION)chclose}, {"chflush", (INTRINSIC_FUNCTION)chflush}, {"chopen", (INTRINSIC_FUNCTION)chopen}, {"chwrite", (INTRINSIC_FUNCTION)chwrite}, {"copen", (INTRINSIC_FUNCTION)copen}, {"cputc", (INTRINSIC_FUNCTION)cputc}, {"exp", (INTRINSIC_FUNCTION)exp_}, {"fflush", (INTRINSIC_FUNCTION)cfflush}, {"fprintf", (INTRINSIC_FUNCTION)cfprintf}, {"fscanf", (INTRINSIC_FUNCTION)cfscanf}, {"printf", (INTRINSIC_FUNCTION)cprintf}, {"scanf", (INTRINSIC_FUNCTION)cscanf}, {"sin", (INTRINSIC_FUNCTION)sin_} #ifdef CONTROL , {"green_func", (INTRINSIC_FUNCTION)green_func}, {"csigpause", (INTRINSIC_FUNCTION)csigpause}, {"open_termo", (INTRINSIC_FUNCTION)open_termo}, {"read_termo", (INTRINSIC_FUNCTION)read_termo}, {"write_termo", (INTRINSIC_FUNCTION)write_termo}, {"close_termo", (INTRINSIC_FUNCTION)close_termo}, {"init_wait", (INTRINSIC_FUNCTION)init_wait} #endif }; /* * Number of intrinsic functions. */ #define SIZE_REM sizeof(intr_name)/sizeof(intr_name[0]) /* * Size of an array of intrinsic functions. */ void (*(f[SIZE_REM])) PROTO((char **)); /* \verbatim */ #endif /* _INTRINSIC_H */ clif-0.93/io.ci100444 1750 1750 0 6501232053 15336 1clif-0.93/tests/io.ciustar korenkorenclif-0.93/keyword.c100644 1750 1750 6460 7125344315 12763 0ustar korenkoren/* C code produced by gperf version 2.1 (K&R C version) */ /* Command-line: gperf -t -p -k 2,3 ./keyword.gperf */ #include "config.h" #ifdef STDC_HEADERS #include #endif #include "token.h" struct el_mc { char *name; int kval; }; #define MIN_WORD_LENGTH 2 #define MAX_WORD_LENGTH 11 #define MIN_HASH_VALUE 2 #define MAX_HASH_VALUE 96 /* 39 keywords 95 is the maximum key range */ static int hash (str, len) register char *str; register unsigned int len; { static unsigned char hash_table[] = { 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 40, 96, 0, 96, 0, 5, 15, 15, 40, 96, 96, 25, 45, 10, 0, 0, 96, 5, 20, 0, 25, 96, 50, 30, 10, 10, 96, 96, 96, 96, 96, }; register int hval = len; switch (hval) { default: case 3: hval += hash_table[str[2]]; case 2: hval += hash_table[str[1]]; } return hval ; } struct el_mc * in_word_set (str, len) register char *str; register unsigned int len; { static struct el_mc wordlist[] = { {"",}, {"",}, {"do", DO}, {"rpc", RPC}, {"goto", GOTO}, {"",}, {"return", RETURN }, {"if", IF}, {"for", FOR}, {"",}, {"break", BREAK}, {"struct", STRUCT}, {"default", DEFAULT}, {"int", INT}, {"long", LONG}, {"const", CONST}, {"",}, {"typedef", TYPEDEF}, {"continue", CONTINUE}, {"intrinsic", INTRINSIC}, {"short", SHORT}, {"",}, {"",}, {"register", REGISTER}, {"",}, {"",}, {"resume", RESUME}, {"",}, {"",}, {"auto", AUTO}, {"float", FLOAT}, {"double", DOUBLE}, {"",}, {"volatile", VOLATILE}, {"",}, {"",}, {"extern", EXTERN}, {"",}, {"unsigned", UNSIGNED}, {"enum", ENUM}, {"",}, {"export_type", EXPORT_T}, {"",}, {"",}, {"void", VOID}, {"",}, {"static", STATIC}, {"",}, {"",}, {"else", ELSE}, {"",}, {"remote", REMOTE}, {"",}, {"csuspend", CSUSPEND}, {"",}, {"union", UNION}, {"sizeof", SIZEOF}, {"",}, {"",}, {"char", CHAR}, {"while", WHILE}, {"signed", SIGNED}, {"",}, {"",}, {"case", CASE}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"exit", EXIT}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"switch", SWITCH}, }; if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { register int key = hash (str, len); if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) { register char *s = wordlist[key].name; if (*s == *str && !strcmp (str + 1, s + 1)) return &wordlist[key]; } } return 0; } clif-0.93/keyword.gperf100444 1750 1750 1253 7125344312 13632 0ustar korenkoren%{ #include "config.h" #ifdef STDC_HEADERS #include #endif #include "token.h" %} struct el_mc { char *name; int kval; }; %% auto, AUTO break, BREAK case, CASE char, CHAR const, CONST continue, CONTINUE csuspend, CSUSPEND default, DEFAULT do, DO double, DOUBLE else, ELSE enum, ENUM exit, EXIT export_type, EXPORT_T extern, EXTERN float, FLOAT for, FOR goto, GOTO if, IF int, INT intrinsic, INTRINSIC long, LONG register, REGISTER remote, REMOTE return, RETURN resume, RESUME rpc, RPC short, SHORT signed, SIGNED sizeof, SIZEOF static, STATIC struct, STRUCT switch, SWITCH typedef, TYPEDEF union, UNION unsigned, UNSIGNED void, VOID volatile, VOLATILE while, WHILE %% clif-0.93/lex_t.h100644 1750 1750 25 7130574566 12357 0ustar korenkoren#define FLEX_SCANNER clif-0.93/load.c100444 1750 1750 4465 6354676424 12233 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * load.c * * Function load for a dynamic loading of intrinsic functions. */ #include "mystdio.h" #include "load.h" #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif extern void link_function PROTO((int)); extern char *string PROTO((char *)); static int load_flag=0; /* * Loads intrinsic C functions into the hash table. */ int load (x) struct remote_tab **x; { int i = 0; struct remote_tab *arch=NULL; if (!load_flag) { if (SIZE_REM > 0) { *x = (struct remote_tab *) allocate (sizeof(struct remote_tab), PERM); (*x)->name = intr_name[i].name; (*x)->adr = (INTRINSIC_FUNCTION)intr_name[i].adr; (*x)->next = NULL; arch = *x; for (i = 1; i < SIZE_REM; i++) { arch->next = (struct remote_tab *) allocate (sizeof(struct remote_tab), PERM); arch = arch->next; arch->name = intr_name[i].name; arch->adr = (INTRINSIC_FUNCTION)intr_name[i].adr; arch->next = NULL; } load_flag = 1; return (0); } else { error_message (1008); return (-1); } } else { return (1); } } static int load_flag_new=0; int load_new () { int i; if(!load_flag_new) { for(i = 0; i < SIZE_REM; i++) { text = string (intr_name[i].name); link_function (i); } load_flag_new = 1; return (0); } else return (load_flag_new); } int unload () { load_flag_new = 0; return (0); } clif-0.93/load.h100444 1750 1750 2363 6343252770 12223 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * load.h */ #ifndef _LOAD_H #define _LOAD_H #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif /* Loads intrinsic C functions into the hash table. */ int load PROTO((struct remote_tab **)); /* Loads extern functions into hash_table. */ int load_new PROTO((void)); /* Unloads extern functions. */ int unload PROTO((void)); #endif clif-0.93/ls.h100444 1750 1750 2064 6343256570 11722 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * ls.h */ #ifndef _LS_H #define _LS_H #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif int yylex PROTO((void)); extern char yytext[]; #endif clif-0.93/ls.l100444 1750 1750 33765 7130573707 11761 0ustar korenkoren%{/* -*-c-*- */ /* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998, 1999, 2000 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * ls * * lex source for Clif's compiler */ #include #include "config.h" #ifdef STDC_HEADERS #include #endif #include "global.h" #include "mystdio.h" #include "tables.h" #include "token.h" #include "dbg-out.h" #define LG_MC 35 /* Max length of identifiers */ #define MAX_MESS 250 /* * Max size of output messages (obsolete) */ char *text; char message[MAX_MESS]; /* * Buffer of output messages (obsolete) */ extern FILEATTR pf, spf[]; extern int s, char_counter; #include "input.h" /* * Redefining of the input function */ #ifdef FLEX_SCANNER #define YY_NO_UNPUT extern char string_resume[]; #endif #include "buf.h" /* * Changes size of buffer */ #include "allocx.h" static int find_ident PROTO((char *, int)); extern char *string PROTO((char *)); extern void s_conv PROTO((char *)); extern int dbg_symbols; #define NL '\n' %} mes ["] newline [\n] tab [ \t] cifra [0-9] exp [Ee][-+]?{cifra}+ lettr [A-Z_a-z] alfa [A-Z_a-z0-9] numberi {cifra}+ numberd ({cifra}*"."{cifra}+({exp})?)|({cifra}+"."{cifra}*({exp})?)|({cifra}+{exp}) world {lettr}{alfa}* AN [^\/]|[^\*]\/ /* In the following there is no the " character. */ /* The $, `, @ characters are not in ANSI C Standard. */ stringc [-A-Z_a-z0-9=!*:% \\\(\)\n\t\.#$&'`\+,\/@\[\]\^\{\}\>\<\~\|\?;] numberc '{stringc}' hexa [a-fA-F0-9] FCS [Ff] LCS [Ll] UCS [Uu] octalnum [0-7] s_esc_s (\\(\'|\"|\?|\\|a|b|f|n|r|t|v))|(\"|\?) o_esc_s (\\{octalnum}|\\{octalnum}{octalnum}|\\{octalnum}{octalnum}{octalnum}) h_esc_s (\\[xX]{hexa}+) %% {tab} {char_counter += yyleng; strcat (line_buf, yytext); /* * tabs, spaces */} {newline} { #ifdef FLEX_SCANNER spf[s].line_counter++; line_buf[0] = 0; char_counter = 0; #endif if (dbg_symbols) dbg_create (); } 0x{hexa}+{UCS} { sscanf (yytext, "%ux", &yylval.myuint); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERUI); } 0x{hexa}+{LCS} { sscanf (yytext, "%lx", &yylval.mylint); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERLI); } 0x{hexa}+{UCS}{LCS} { sscanf (yytext, "%lux", &yylval.myluint); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERLUI); } 0x{hexa}+{LCS}{UCS} { sscanf (yytext, "%lx", &yylval.myluint); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERLUI); } 0x{hexa}+ { sscanf (yytext, "%x", &yylval.myint); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERI); } {numberi}{UCS} { sscanf (yytext, "%u", &yylval.myuint); char_counter += yyleng; strcat (line_buf,yytext); return (NUMBERUI); /* * Matches integer numbers */} {numberi}{LCS} { sscanf (yytext, "%ld", &yylval.mylint); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERLI); /* * Matches integer numbers */} {numberi}{UCS}{LCS} { sscanf (yytext, "%lu", &yylval.myluint); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERLUI); /* * Matches integer numbers */} {numberi}{LCS}{UCS} { sscanf (yytext, "%lu", &yylval.myluint); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERLUI); /* * Matches integer numbers */} {numberi} { sscanf (yytext, "%d", &yylval.myint); char_counter += yyleng; strcat (line_buf,yytext); return (NUMBERI); /* * Matches integer numbers */} {numberd}{FCS} { sscanf (yytext, "%f", &yylval.myfloat); char_counter += yyleng; strcat (line_buf,yytext); return (NUMBERF); /* * Matches float numbers */} {numberd}{LCS} { sscanf (yytext, "%Lf", &yylval.myldouble); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERLD); /* * Matches long double numbers */} {numberd} { sscanf (yytext, "%lf", &yylval.mydouble); char_counter += yyleng; strcat (line_buf, yytext); return (NUMBERD); /* * Matches double numbers */} '\\0' {char_counter += yyleng; yytext[0] = 0; strcat (line_buf, "'\\0'"); yylval.mychar = 0; return (NUMBERC); } {LCS}?(('({s_esc_s}|{o_esc_s}|{h_esc_s})')|{numberc}) { int i, j; char_counter += yyleng; strcat (line_buf, yytext); for (i = 1; yytext[i] != '\0'; i++) if (yytext[i - 1] == '\\' && yytext[i] == 'X') { error_message (6033, "X"); break; } if (yytext[0] == 'l') { error_message (1038, "l"); error_message (1039, "character"); } #if 0 /* Constant L 'a' should be wide character constant. It seems, there is no difference in representation yet. */ if (yytext[0] == 'L') { for (i = 0; yytext[i] != '\0'; i++) if (yytext[i] == '\'') break; yytext[0] = yytext[i + 1]; sscanf (yytext, "%d", &yylval.myint); return (NUMBERI); } #endif for (i = 0; yytext[i] != '\0'; i++) if (yytext[i] == '\'') break; for (j = i + 1, i = 0; yytext[j] != '\0'; j++, i++) yytext[i] = yytext[j]; yytext[i] = '\0'; if (yytext[0] == '\\') { switch (yytext[1]) { case '\'': yylval.mychar = '\''; break; case '"': yylval.mychar = '\"'; break; case '?': yylval.mychar = '\?'; break; case '\\': yylval.mychar = '\\'; break; case 'a': yylval.mychar = '\a'; break; case 'b': yylval.mychar = '\b'; break; case 'f': yylval.mychar = '\f'; break; case 'n': yylval.mychar = '\n'; break; case 'r': yylval.mychar = '\r'; break; case 't': yylval.mychar = '\t'; break; case 'v': yylval.mychar = '\v'; break; case 'x': yytext[0] = '0'; sscanf (yytext, "%x", (unsigned *) &yylval.mychar); break; default: yytext[0] = '0'; sscanf (yytext, "%o", (unsigned *) &yylval.mychar); break; } } else sscanf (yytext, "%c", &yylval.mychar); return (NUMBERC); } {world} { int i; strcat (line_buf, yytext); char_counter += yyleng; i = find_ident (yytext, yyleng); /* * Matches keywords */ if (i) return i; else { text = string (yytext); yylval.mystring = text; /* If the identifier just matched was previously declared as typedef return it as TYPENAME; IDENT otherwise. */ if (typedef_p (text)) return TYPENAME; else return IDENT; } } ("/*"|"/*/")({AN})*"*/" { #ifdef FLEX_SCANNER char *str; #endif char_counter += yyleng; strcat (line_buf, yytext); if (NULL != strstr (&yytext[2], "/*")) {error_message (6005);} /* * Matches and discards comments */ #ifdef FLEX_SCANNER str = yytext; str = strstr (str, "\n"); while (str != NULL) { spf[s].line_counter++; str = &str[1]; str = strstr (str, "\n"); } #endif } load[ ]*\([ ]* {char name[20],*tmp_p; int w,ab=' '; char_counter += yyleng; strcat (line_buf, yytext); for (w = 0; ab != ';'; w++) { ab = input (); name[w] = ab; } tmp_p = (char *)strchr (name,')'); if (NULL == tmp_p) { error_message (1004, ")"); return (0); } *tmp_p = '\0'; tmp_p = (char *)strchr (name,' '); if (NULL != tmp_p) { *tmp_p = '\0'; } char_counter += w; strcat (line_buf, name); s++; spf[s].fp = fopen (name, "r"); if (NULL == spf[s].fp) { yytext[0] = '\0'; s--; strcpy (yytext, name); error_message (1011); return (0); } if (NULL == (spf[s].name = (char *) allocate (strlen (name) + 1, PERM))) { error_message (4002); return (0); } strcpy (spf[s].name, name); spf[s].line_counter = 1; #ifdef FLEX_SCANNER yy_switch_to_buffer (yy_create_buffer (spf[s].fp, YY_BUF_SIZE)); #else pf = spf[s]; #endif } ({LCS}?\"({stringc}|(\\\"))+\"({tab}|{newline})*)+ {int wide_string = 0; char_counter += yyleng; if (yytext[0] == 'l') { error_message (1040); error_message (1039, "string"); } else if (yytext[0] == 'L') wide_string = 1; strcat (line_buf, yytext); s_conv (yytext); /* I do not differentiate between strings and wide string literal. However, there is room for it in the union. */ yylval.mystring = string (yytext); if (wide_string) return (WSTRINGC); else return (STRINGC); } ">>=" {char_counter += yyleng; strcat (line_buf, yytext); return (RIGHT_ASSIGN);} "<<=" {char_counter += yyleng; strcat (line_buf, yytext); return (LEFT_ASSIGN);} "+=" {char_counter += yyleng; strcat (line_buf, yytext); return (ADD_ASSIGN);} "-=" {char_counter += yyleng; strcat (line_buf, yytext); return (SUB_ASSIGN);} "*=" {char_counter += yyleng; strcat (line_buf, yytext); return (MUL_ASSIGN);} "/=" {char_counter += yyleng; strcat (line_buf, yytext); return (DIV_ASSIGN);} "%=" {char_counter += yyleng; strcat (line_buf, yytext); return (MOD_ASSIGN);} "&=" {char_counter += yyleng; strcat (line_buf, yytext); return (AND_ASSIGN);} "^=" {char_counter += yyleng; strcat (line_buf, yytext); return (XOR_ASSIGN);} "|=" {char_counter += yyleng; strcat (line_buf, yytext); return (OR_ASSIGN);} "&&" {char_counter += yyleng; strcat (line_buf, yytext); return (AND_A);} "||" {char_counter += yyleng; strcat (line_buf, yytext); return (OR_A);} "==" {char_counter += yyleng; strcat (line_buf, yytext); return (EQ_A);} ">=" {char_counter += yyleng; strcat (line_buf, yytext); return (GQ);} "<=" {char_counter += yyleng; strcat (line_buf, yytext); return (LQ);} "!=" {char_counter += yyleng; strcat (line_buf, yytext); return (NE_A);} "++" {char_counter += yyleng; strcat (line_buf, yytext); return (PP);} "--" {char_counter += yyleng; strcat (line_buf, yytext); return (MM);} "!" {char_counter += yyleng; strcat (line_buf, yytext); return (NEG_T);} "~" {char_counter += yyleng; strcat (line_buf, yytext); return (NEG_B);} ">>" {char_counter += yyleng; strcat (line_buf, yytext); return (SHIR);} "<<" {char_counter += yyleng; strcat (line_buf, yytext); return (SHIL);} "->" {char_counter += yyleng; strcat (line_buf, yytext); return (PTR);} "??=" {char_counter += yyleng; strcat (line_buf, "#"); error_message (6032); return ('#'); } "??(" {char_counter += yyleng; strcat (line_buf, "["); error_message (6032); return ('['); } "??/" {char_counter += yyleng; strcat (line_buf, "\\"); error_message (6032); return ('\\'); } "??)" {char_counter += yyleng; strcat (line_buf, "]"); error_message (6032); return (']'); } "??'" {char_counter += yyleng; strcat (line_buf, "^"); error_message (6032); return ('^'); } "??<" {char_counter += yyleng; strcat (line_buf, "{"); error_message (6032); return ('{'); } "??!" {char_counter += yyleng; strcat (line_buf, "|"); error_message (6032); return ('|'); } "??>" {char_counter += yyleng; strcat (line_buf, "}"); error_message (6032); return ('}'); } "??-" {char_counter += yyleng; strcat (line_buf, "~"); error_message (6032); return ('~'); } . {char_counter += yyleng; strcat (line_buf, yytext); return (*yytext); /* * Returns rest simple characters */} %% struct el_mc { char *name; int tok; }; extern struct el_mc * in_word_set PROTO((register char *, register unsigned int)); /* * Looks up if a identifier is not a keyword */ static int find_ident (s, len) char *s; int len; { register struct el_mc *ret_val; ret_val = in_word_set (s, len); if (ret_val) return ret_val->tok; else return 0; } int yywrap () { #ifdef FLEX_SCANNER return (! switch_to_buffer ()); #else return 1; #endif } #ifndef FLEX_SCANNER #ifdef unput #undef unput #endif #define unput(c) {yytchar = (c); \ if (NL == yytchar) \ { \ yylineno--; \ spf[s].line_counter--; \ } \ *yysptr++ = yytchar;} #else void switch_to_stdin () { s++; spf[s] = spf[0]; yy_switch_to_buffer (yy_create_buffer (stdin, YY_BUF_SIZE)); yy_set_interactive (1); } void switch_to_char_buffer () { yy_scan_string (string_resume); } int switch_to_buffer () { if (terminate_buffer ()) return 0; else { yy_delete_buffer (YY_CURRENT_BUFFER); yy_switch_to_buffer (yy_create_buffer (spf[s].fp, YY_BUF_SIZE)); } return 1; } void * store_buffer_state () { YY_BUFFER_STATE *state; state = (YY_BUFFER_STATE *) allocate (sizeof (YY_BUFFER_STATE), 0); *state = YY_CURRENT_BUFFER; return ((void *) state); } void flush_buffer (state) void *state; { yy_flush_buffer (YY_CURRENT_BUFFER); yy_switch_to_buffer (*(YY_BUFFER_STATE *)state); #if 0 deallocate (state); #endif } #endif /* ! FLEX_SCANNER */ clif-0.93/makedep100755 1750 1750 42 6061052324 12407 0ustar korenkorencc -xM1 -DXWIN *.c >.dependencies clif-0.93/memmove.c100444 1750 1750 2166 6344310404 12733 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * memmove.c * * Definition of an independent memmove function. */ #include "global.h" #include "cast.h" #include "memmove.h" void *memmovex(s1, s2, n) void *s1, *s2; unsigned int n; { int i; for (i = n / sizeof(int) - 1; i >= 0; --i) CS ((int *)s1 + i) = CS ((int *)s2 + i); return (s1); } clif-0.93/memmove.h100444 1750 1750 2113 6343253730 12737 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * memmove.h */ #ifndef _MEMMOVE_H #define _MEMMOVE_H #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif void *memmovex PROTO((void *, void *, unsigned int )); #endif clif-0.93/multi_platform_maintenance100644 1750 1750 441 5657720654 16443 0ustar korenkorenudrziavanie celeho kompilatora na viacerych pocitacoch: na CDC bude current verzia plus jej backup plus backup chodiacej verzie na kazdom inom pocitaci bude chodiaca verzia plus jej backup vyvoj vsetkych zdrojakov bude iba na CDC Sun - pluto.elf ma zle implementovanu funkciu vfprintf clif-0.93/myintrinsic.c100444 1750 1750 25450 6632463622 13672 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * myintrinsic.c * * In this file are functions which user consider to * have as intrinsic function in Clif. * There are part of the "library". */ #include #include "config.h" #if STDC_HEADERS #include #else #ifndef HAVE_ISSPACE #define HT '\t' #define NL '\n' #define VT '\v' #define NP '\f' #define CR '\r' #define SP ' ' #define isspace(c) \ (c == HT || c == NL || c == VT || c == NP || c == CR || c == SP) #endif #endif #include "type.h" #include "struct.h" #include "define.h" #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif #ifndef BUFSIZ #define BUFSIZ 1024 #endif double sin_ PROTO((char **)); double exp_ PROTO((char **)); int cprintf PROTO((char **)); int cscanf PROTO((char **)); int copen PROTO((char **)); int cclose PROTO((char **)); int cputc PROTO((char **)); int cgetc PROTO((char **)); /* Channel functions. */ void chclose PROTO((char **)); void chwrite PROTO((char **)); int chopen PROTO((char **)); void chflush PROTO((void)); static int do_fprintf PROTO((FILE *, char **)); static int do_fscanf PROTO((FILE *, char **)); int transform_to_simple_type PROTO((enum global_type)); FILE *str[100]={stdin,stdout,stderr}; /* Handles of standard devices. * 0 - stdin * 1 - stdout * 2 - stderr */ int handle_pointer=2; /* * Intrinsic functions. */ /* \verbatim{myintrinsic_c_sin_.tex} */ double sin_(a)char **a;{return(sin(*(double *) a[0]));} /* \verbatim */ double exp_(x)char **x;{return(exp(*(double *)x[0]));} static int do_fprintf (stream, a) FILE *stream; char **a; { char *form; char c, buf[BUFSIZ]; extern int call_by_value, call_by_reference; int n = 2, result = 0, part_res; if (call_by_value) form = *(char **)a[0]; else if (call_by_reference) form = (char *)a[0]; while ((c = *form++)) { if ('%' != c) { part_res = fputc (c, stream); if (EOF == part_res) { result = part_res; break; } else part_res = 1; } else { int i; buf[0] = c; for (i = 1; *form; form++, i++) { buf[i] = c = *form; if ('c' == c) { buf[i + 1] = '\0'; part_res = fprintfx (stream, buf, *(char *)a[n]); form++; n += 2; break; } else if ('d' == c || 'i' == c || 'o' == c || 'u' == c || 'x' == c || 'X' == c) { int res; buf[i + 1] = '\0'; res = transform_to_simple_type (*(int *)a[n + 1]); if (res == (SIGNED_AC | CHR)) part_res = fprintfx (stream, buf, *(signed char *)a[n]); else if (res == (UNSIGNED_AC | CHR)) part_res = fprintfx (stream, buf, *(unsigned char *)a[n]); else if (res == CHR) part_res = fprintfx (stream, buf, *(char *)a[n]); else if (res == (UNSIGNED_AC | INTEGER)) part_res = fprintfx (stream, buf, *(unsigned int *)a[n]); else if (res == (LONG_AC | INTEGER)) part_res = fprintfx (stream, buf, *(long int *)a[n]); else if (res == (LONG_AC | UNSIGNED_AC | INTEGER)) part_res = fprintfx (stream, buf, *(long unsigned int *)a[n]); else if (res == (SHORT_AC | INTEGER)) part_res = fprintfx (stream, buf, *(short int *)a[n]); else if (res == (SHORT_AC | UNSIGNED_AC | INTEGER)) part_res = fprintfx (stream, buf, *(short unsigned int *)a[n]); else part_res = fprintfx (stream, buf, *(int *)a[n]); form++; n += 2; break; } else if ('f' == c) { int res; buf[i + 1] = '\0'; if (call_by_value) res = transform_to_simple_type (*(int *)a[n + 2]); else if (call_by_reference) res = transform_to_simple_type (*(int *)a[n + 1]); if (res == FLT) part_res = fprintfx (stream, buf, *(float *)a[n]); else if (res == DOUB) part_res = fprintfx (stream, buf, *(double *)a[n]); else part_res = fprintfx (stream, buf, *(long double *)a[n]); form++; if (call_by_value) n += 1; n += 2; break; } else if ('g' == c || 'G' == c || 'e' == c || 'E' == c) { int res; buf[i + 1] = '\0'; if (call_by_value) res = transform_to_simple_type (*(int *)a[n + 2]); else if (call_by_reference) res = transform_to_simple_type (*(int *)a[n + 1]); if (res == FLT) part_res = fprintfx (stream, buf, *(float *)a[n]); else if (res == DOUB) part_res = fprintfx (stream, buf, *(double *)a[n]); else part_res = fprintfx (stream, buf, *(long double *)a[n]); form++; if (call_by_value) n += 1; n += 2; break; } else if ('s' == c) { buf[i + 1] = '\0'; if (call_by_value) part_res = fprintfx (stream, buf, *(char **)a[n]); else part_res = fprintfx (stream, buf, a[n]); form++; n += 2; break; } else if ('p' == c) { buf[i + 1] = '\0'; part_res = fprintfx (stream, buf, *(int *)a[n]); form++; n += 2; break; } else if ('n' == c) { buf[i + 1] = '\0'; part_res = fprintfx (stream, buf, *(int *)a[n]); form++; n += 2; break; } } } if (EOF == part_res) { result = part_res; break; } else result += part_res; } return result; } /* * Writes to a file. */ int cfprintf (a) char **a; { return do_fprintf (str[*(int *)a[0]], &a[2]); } int cprintf (a) char **a; { return do_fprintf (str[1], a); } static int do_fscanf (stream, a) FILE *stream; char **a; { char *form; char buf[BUFSIZ]; int c; int n = 1, result = 0, part_res; extern int call_by_value, call_by_reference; if (call_by_value) form = *(char **)a[0]; else if (call_by_reference) form = (char *)a[0]; /* Parse format string. */ while ((c = *form++)) { if ('%' != c) { part_res = getc (stream); if (EOF == part_res) { result = part_res; break; } else if (isspace (c) && isspace (part_res)) part_res = 0; else if (c != part_res) { result = part_res = EOF; break; } else part_res = 0; } else { int i; buf[0] = c; for (i = 1; *form; form++, i++) { buf[i] = c = *form; if ('c' == c) { buf[i + 1] = '\0'; if (call_by_value) part_res = fscanf (stream, buf, *(char *)a[n]); else if (call_by_reference) part_res = fscanf (stream, buf, a[n]); form++; n++; break; } else if ('d' == c || 'i' == c || 'o' == c || 'u' == c || 'x' == c || 'X' == c) { buf[i + 1] = '\0'; if (call_by_value) part_res = fscanf (stream, buf, *(int *)a[n]); else if (call_by_reference) part_res = fscanf (stream, buf, a[n]); form++; n++; break; } else if ('f' == c || 'g' == c || 'G' == c || 'e' == c || 'E' == c) { buf[i + 1] = '\0'; if (call_by_value) { if (buf[i - 1] == 'l') part_res = fscanf (stream, buf, *(double *)a[n]); else if (buf[i - 1] == 'L') part_res = fscanf (stream, buf, *(long double *)a[n]); else part_res = fscanf (stream, buf, *(float *)a[n]); } else if (call_by_reference) part_res = fscanf (stream, buf, a[n]); form++; n++; break; } else if ('s' == c) { buf[i + 1] = '\0'; if (call_by_value) part_res = fscanf (stream, buf, *(char *)a[n]); else if (call_by_reference) part_res = fscanf (stream, buf, a[n]); form++; n++; break; } else if ('p' == c) { buf[i + 1] = '\0'; if (call_by_value) part_res = fscanf (stream, buf, *(char *)a[n]); else if (call_by_reference) part_res = fscanf (stream, buf, a[n]); form++; n++; break; } else if ('n' == c) { buf[i + 1] = '\0'; if (call_by_value) part_res = fscanf (stream, buf, *(char *)a[n]); else if (call_by_reference) part_res = fscanf (stream, buf, a[n]); form++; n++; break; } } } if (EOF == part_res) { result = part_res; break; } else result += part_res; } return result; } /* * Reads from a file. */ int cfscanf (a) char **a; { return do_fscanf (str[*(int *)a[0]], &a[1]); } int cscanf (a) char **a; { return do_fscanf (str[0], a); } /* * Opens a stream. */ int copen (a) char **a; { char *fn, *type; fn = (char *)a[0]; type = (char *)a[1]; if ((str[++handle_pointer]=fopen(fn,type)) == NULL) return(EOF); else return(handle_pointer); } /* * Closes a stream. */ int cclose (a) char **a; { int *handle; handle = (int *)a[0]; handle_pointer--; return (fclose (str[*handle])); } /* * Puts a character into a stream. */ int cputc (a) char **a; { char *c; int *handle; c = (char *)a[0]; handle = (int *)a[1]; return (fputc (*c, str[*handle]));} /* * Gets a character from a stream. */ int cgetc (a) char **a; { int *handle; handle = (int *)a[0]; return (fgetc (str[*handle])); } int cfflush (a) char **a; { return fflush (str[*(int *)a[0]]); } /* * Supporting functions. */ /* * Transformation from a global type to simple or array. */ int transform_to_simple_type (type) enum global_type type; { switch(type) { case INTEGERAR : return INTEGER; case FLTAR : return FLT; case DOUBAR : return DOUB; case CHRAR : return CHRAR; case INTEGERS : return INTEGER; case UINTEGERS: return UNSIGNED_AC | INTEGER; case LINTEGERS: return LONG_AC | INTEGER; case LUINTEGERS: return LONG_AC | UNSIGNED_AC | INTEGER; case SINTEGERS: return SHORT_AC | INTEGER; case SUINTEGERS: return SHORT_AC | UNSIGNED_AC | INTEGER; case FLTS : return FLT; case DOUBS : return DOUB; case LDOUBS: return (LONG_AC | DOUB); case CHRS : case SCHRS: case UCHRS: return CHR; default: abort (); break; } return(EOF); } clif-0.93/mystdio.h100444 1750 1750 247 6041446660 12751 0ustar korenkoren/* * mystdio.h */ #ifndef _MYSTDIO_H #define _MYSTDIO_H /*#ifdef CDC*/ #ifdef NULL #undef NULL #endif #define NULL ((void *)0) /*#endif*/ #endif /* _MYSTDIO_H */ clif-0.93/parser.h100444 1750 1750 7567 6636762007 12617 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * parser.h * * Definition of parser's variables. */ #ifndef _PARSER_H #define _PARSER_H static int param_flag = 0; /* Flag during parsing of parameters. */ static int atom_type_flag = 0; /* Flag of type - pointer, atom. */ struct var_s { char *adr; int offset; char *name; } variable[256]; /* Structure of the absolute address or offset of the actual variable in l_value and its name. */ static int it_is_in_case = 0; /* Flag if the integer constant is */ /* a label. */ static char *jmp1; /* Pointer to the beginning of code in */ /* for loop. */ /* It is an address between the expr1 */ /* and the expr2. (See manual). */ /* Flag for the first subscript. It needs special action. */ static int subscript_flag[256]; static int is_address = 0; /* Flag for unary_expression address operand. */ /* Flag for structure or union field. True if it the field is not the first one (e.g. a.b.c); false for first one (e.g. a.b). */ static int struct_union_field[256]; static char *or_jmp[256], *and_jmp[256]; /* They are used for backpatching of && and || expressions. */ int main_defined; /* Set if main is defined. */ static int initialize_only; /* Set when there is a need for initialization of variables. */ static int full_bracketing; /* Flag for proper code generation for fully bracketed initialization. */ static int aggregate_memory_size[256]; /* Each subtype is remembered during initialization and checked if it has the right number of initializers. if not, they are completed by zeros. */ #define TYPE_CLEAR subscript_flag[set] = 0;\ struct_union_field[set] = 0;\ type_ac[set] = 0; type_com[set--] = NULL; \ if (0 > set) \ error_message (5003); #define SET_ADDRESS variable[set].adr = NULL; \ variable[set].offset = 0; #define FUNCTION_PROLOGUE GEN_PUSHb; GENCODE;\ GEN_PUSHt; GENCODE;\ GEN_MOVt; GENCODE;\ GEN_MOVbs; GENCODE; #define FUNCTION_EPILOGUE GEN_MOVsb; GENCODE;\ GEN_POPt; GENCODE;\ GEN_POPb; GENCODE;\ GEN_RET; GENCODE; #define DELETE_SUBSCRIPT while (-1 != dim[poc])\ dim[poc--] = -1; #define OFFSET_LAST_ADD \ if (variable[set].offset || variable[set].adr != NULL) \ { \ struct_union_field[set] > 0 ? \ struct_union_field[set]-- : \ struct_union_field[set]; \ if (struct_union_field[set]) \ { \ GEN_ADDi; GENCODE; \ } \ struct_union_field[set] = 0; \ } #define OFFSET_LAST_ADD_ARRAY \ if (struct_union_field[set]) \ { \ GEN_ADDi; GENCODE; \ } \ struct_union_field[set] = 0; #define ERROR_P if (error_count) \ break; #define MOV_P (((struct OPERAND_0_mi *)last_instr)->major == MOV) #define POPA_P (((struct OPERAND_0_mi *)last_instr)->major == POPA) #define PUSHA_P (((struct OPERAND_0_ma *)last_instr)->major == PUSHA) #define RESET_CODE_GENERATION_BEGINNING \ kodp = kodp1; pc = kodp; current_instr = kodp; last_instr = kodp; #define SET_CODE_GENERATION_BEGINNING \ kodp1 = kodp; pc = kodp; #endif /* _PARSER_H */ clif-0.93/printf_unix.c100444 1750 1750 3007 6501541634 13634 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * printf_unix.c * * Redefinition of printf and fprintf functions. */ #include "printfx.h" int fprintfx VPROTO((FILE *stream, ...)) { va_list point; #ifndef __STDC__ FILE *stream; #endif char *format; int tmp; VA_START (point, stream); #ifndef __STDC__ stream = va_arg (point, FILE *); #endif format = va_arg (point, char *); tmp = vfprintf (stream, format, point); va_end (point); return tmp; } int printfx PVPROTO((char *format, ...)) { va_list point; #ifndef __STDC__ char *format; #endif int tmp; VA_START (point, format); #ifndef __STDC__ format = va_arg (point, char *); #endif tmp = vprintf (format, point); va_end (point); return tmp; } clif-0.93/printfx.h100444 1750 1750 2106 6501542137 12764 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * printfx.h */ #ifndef _PRINTFX_H #define _PRINTFX_H #include #if __STDC__ #include #else #include #endif #include "ansidecl.h" int fprintfx PVPROTO((FILE *, ...)); int printfx PVPROTO((char *, ...)); #endif clif-0.93/pso.c100444 1750 1750 12026 7125135176 12114 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1998, 2000 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ struct var_s { char *adr; int offset; char *name; }; #include #include "allocx.h" #include "flags.h" #include "global.h" #include "tables.h" #include "type.h" #include "struct.h" #include "comp_maint.h" #include "instr.h" #include "geninstr.h" #include "pso.h" /* Lookup in tables of local variables, if the variable is not found in the table of global variables. Setting of addresses for code generation. */ void lookup_tables (var_name, variable) char *var_name; struct var_s variable[]; { struct ident_tab_loc *loc_var; if (NULL == (loc_var = point_loc (var_name))) { struct ident_tab *var; var = point (var_name); if (NULL == var) COMPILE_ONLY; if ((STRUCT_P(var->type) || UNION_P(var->type)) && -1 == add_to_ident_list ()) COMPILE_ONLY; variable[++set].adr = var->adr; variable[set].name = var_name; variable[set].offset = 0; type_com[set] = var->type; } else { /* Address is non NULL only if the local variable is declared static. */ if (NULL != loc_var->adr) { variable[set].offset = 0; variable[set].adr = loc_var->adr; variable[set].name = var_name; } else { /* First part of the offset is set in the point_loc function. */ variable[set].offset += loc_var->offset; variable[set].adr = NULL; variable[set].name = var_name; } type_com[set] = loc_var->type; } if (NULL == type_com[set]->output) type_ac[set] = type_com[set]->attribute.arit_class; else if (LOCAL_P(type_com[set]) || REMOTE_P(type_com[set])) { type_ac[set] = type_com[set]->output->attribute.arit_class; proc_name_text[++proc] = text; } else if (ARRAY_P(type_com[set])) { type_ac[set] = type_com[set]->output->attribute.arit_class; array_subscript (type_com[set]->input); } else if (POINTER_P(type_com[set])) type_ac[set] = LONG_AC | INTEGER; kodp4 = kodp; if (0 < variable[set].offset) { if (call_by_value) { if (ARRAY_P(type_com[set])) { GEN_PUSHArr(variable[set].offset); } else { GEN_PUSHAr(variable[set].offset); } } else if (call_by_reference) { GEN_PUSHArr(variable[set].offset); } GENCODE; } else if (0 > variable[set].offset) { GEN_PUSHAr(variable[set].offset); GENCODE; } else if (! LOCAL_P(type_com[set]) && ! REMOTE_P(type_com[set])) { GEN_PUSHA(variable[set].adr); GENCODE; } } /* The typedef structure (only the beginning part) is copied, if any non simple part was inserted, i.e. pointer, function, array, struct, etc. */ void typedef_copy (type) struct internal_type *type; { typeh[type_spec_count] = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)typeh[type_spec_count], sizeof(struct internal_type)); typeh[type_spec_count]->attribute.function_class = SIMPLE; typeh[type_spec_count]->attribute.type_qualifier = UNDEF_TQ; typeh[type_spec_count]->attribute.arit_class = UNUSED_AC; typeh[type_spec_count]->attribute.storage_class_specifier = TYPEDEF_SC; typeh[type_spec_count]->output = type; } /* For cast operator, size of operand is returned. */ int set_memory_size (arit_class) enum intern_arit_class arit_class; { switch (arit_class) { case INTEGER: case SIGNED_AC | INTEGER: return sizeof (int); case UNSIGNED_AC | INTEGER: return sizeof (unsigned int); case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: return sizeof (long int); case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: return sizeof (short int); case LONG_AC | UNSIGNED_AC | INTEGER: return sizeof (long unsigned int); case SHORT_AC | UNSIGNED_AC | INTEGER: return sizeof (short unsigned int); case DOUB: return sizeof (double); case LONG_AC | DOUB: return sizeof (long double); case FLT: return sizeof (float); case CHR: /* Moze byt este problem so zarovnanim */ return sizeof (char); case SIGNED_AC | CHR: return sizeof (signed char); case UNSIGNED_AC | CHR: return sizeof (unsigned char); case VID: default: return 0; } return 0; } clif-0.93/pso.h100444 1750 1750 1713 7125133703 12074 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1998, 2000 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ extern void lookup_tables PROTO((char *, struct var_s [])); extern void typedef_copy PROTO((struct internal_type *)); extern int set_memory_size PROTO((enum intern_arit_class)); clif-0.93/remote_call.c100444 1750 1750 7221 6354677174 13576 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * remote_call.c * * Maintenance functions for calling remote functions. */ #include #include "allocx.h" #include "printfx.h" #include "global.h" #include "intrinsic.h" #include "load.c" #include "remote_call.h" static int hash_code_remote PROTO((char *)); static void putstruct_remote PROTO((struct remote_has_tab *, char *, int)); /* Looks up the hash table of remote functions. */ static struct remote_has_tab *lookup_remote PROTO((char *s)); /* \verbatim{remote_call_c_hastab_remote.tex} */ struct remote_has_tab *hastab_remote; /* \verbatim */ static int remote_offset_counter = 0; /* Counter for remote function */ /* offset. */ /* * Checks the table if a function is in. * If not it saves all needed information. */ void has_remote (x) struct remote_tab *x; { struct remote_has_tab *np, *arch; while (x != NULL) { if (NULL == lookup_remote (x->name)) /* The function is not in the table. */ { #ifdef DEBUG printfx("Including new remote function\n"); printfx("hash code:%u\n",hash_code_remote(x->name)); #endif f[remote_offset_counter] = (INTRINSIC_FUNCTION)x->adr; np = hastab_remote + hash_code_remote (x->name); if(np->name == NULL) /* There is no list. */ { putstruct_remote (np, x->name, remote_offset_counter); x = x->next; remote_offset_counter++; } else /* There is a list. */ { do { arch=np; np=np->next; } while(np != NULL); np = (struct remote_has_tab *) allocate (sizeof(struct remote_has_tab), PERM); arch->next = np; putstruct_remote (np, x->name, remote_offset_counter); x = x->next; remote_offset_counter++; } arch = NULL; } else /* The function is in the table. */ { error_message (1006); } } } /* * Saves useful information about functions * and connect the information with the * function name. */ static void putstruct_remote (np, name, i) struct remote_has_tab *np; char *name; int i; { np->name = name; #ifdef DEBUG printfx("function's name %s is stored\n",np->name); #endif np->offset = i; #ifdef DEBUG printfx("offset:%u is in table\n",np->offset); #endif } /* * Looks up the hash table of remote functions. */ static struct remote_has_tab * lookup_remote (s) char *s; { struct remote_has_tab *ps; ps = hastab_remote + hash_code_remote (s); if(*(int *)ps == 0) return(NULL); while ((ps->name != s) && (ps->next != NULL)) ps = ps->next; if ((ps->next == NULL) && (ps->name != s)) return (NULL); else return (ps); } /* * Hash function. */ static int hash_code_remote (s) char *s; { int c = 0; while(*s) { c = c<<1^(*s); s++; } if (c<0) c = (-c); return (c % SIZE_REMOTE); } clif-0.93/remote_call.h100444 1750 1750 2245 6343252314 13563 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * remote_call.h */ #ifndef _REMOTE_CALL_H #define _REMOTE_CALL_H #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif /* Checks the table if a function is in. If not it saves all needed information. */ void has_remote PROTO((struct remote_tab *)); #endif clif-0.93/rs-lex.c100644 1750 1750 152774 6646150117 12565 0ustar korenkoren/* A lexical scanner generated by flex */ /* Scanner skeleton version: * $Header: /home/ncvs/src/usr.bin/lex/skel.c,v 1.1.1.2.2.1 1997/02/23 01:37:10 joerg Exp $ */ #define FLEX_SCANNER #define YY_rs__FLEX_MAJOR_VERSION 2 #define YY_rs__FLEX_MINOR_VERSION 5 #include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include #include /* Use prototypes in function declarations. */ #define YY_rs__USE_PROTOS /* The "const" storage-class-modifier is valid. */ #define YY_rs__USE_CONST #else /* ! __cplusplus */ #if __STDC__ #define YY_rs__USE_PROTOS #define YY_rs__USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ #pragma warn -rch #pragma warn -use #include #include #define YY_rs__USE_CONST #define YY_rs__USE_PROTOS #endif #ifdef YY_rs__USE_CONST #define yy_rs_const const #else #define yy_rs_const #endif #ifdef YY_rs__USE_PROTOS #define YY_rs__PROTO(proto) proto #else #define YY_rs__PROTO(proto) () #endif /* Returned upon end-of-file. */ #define YY_rs__NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_rs__SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN_rs_. */ #define BEGIN_rs_ yy_rs__start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN_rs_ to return to the state. The YY_rs_STATE alias is for lex * compatibility. */ #define YY_rs__START ((yy_rs__start - 1) / 2) #define YY_rs_STATE YY_rs__START /* Action number for EOF rule of a given start state. */ #define YY_rs__STATE_EOF(state) (YY_rs__END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_rs__NEW_FILE yy_rs_restart( yy_rs_in ) #define YY_rs__END_OF_BUFFER_CHAR 0 /* Size of default input_rs_ buffer. */ #define YY_rs__BUF_SIZE 16384 typedef struct yy_rs__buffer_state *YY_rs__BUFFER_STATE; extern int yy_rs_leng; extern FILE *yy_rs_in, *yy_rs_out; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* The funky do-while in the following #define is used to turn the definition * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * * if ( condition_holds ) * yy_rs_less( 5 ); * else * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the yy_rs_less() call. */ /* Return all but the first 'n' matched characters back to the input_rs_ stream. */ #define yy_rs_less(n) \ do \ { \ /* Undo effects of setting up yy_rs_text. */ \ *yy_rs__cp = yy_rs__hold_char; \ YY_rs__RESTORE_YY_rs__MORE_OFFSET \ yy_rs__c_buf_p = yy_rs__cp = yy_rs__bp + n - YY_rs__MORE_ADJ; \ YY_rs__DO_BEFORE_ACTION; /* set up yy_rs_text again */ \ } \ while ( 0 ) #define unput_rs_(c) yy_rs_unput_rs_( c, yy_rs_text_ptr ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ typedef unsigned int yy_rs__size_t; struct yy_rs__buffer_state { FILE *yy_rs__input_rs__file; char *yy_rs__ch_buf; /* input_rs_ buffer */ char *yy_rs__buf_pos; /* current position in input_rs_ buffer */ /* Size of input_rs_ buffer in bytes, not including room for EOB * characters. */ yy_rs__size_t yy_rs__buf_size; /* Number of characters read into yy_rs__ch_buf, not including EOB * characters. */ int yy_rs__n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_rs__is_our_buffer; /* Whether this is an "interactive" input_rs_ source; if so, and * if we're using stdio for input_rs_, then we want to use getc() * instead of fread(), to make sure we stop fetching input_rs_ after * each newline. */ int yy_rs__is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_rs__at_bol; /* Whether to try to fill the input_rs_ buffer when we reach the * end of it. */ int yy_rs__fill_buffer; int yy_rs__buffer_status; #define YY_rs__BUFFER_NEW 0 #define YY_rs__BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_rs__EOF_PENDING, to indicate that we * shouldn't try reading from the input_rs_ source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yy_rs_restart()), so that the user can continue scanning by * just pointing yy_rs_in at a new input_rs_ file. */ #define YY_rs__BUFFER_EOF_PENDING 2 }; static YY_rs__BUFFER_STATE yy_rs__current_buffer = 0; /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". */ #define YY_rs__CURRENT_BUFFER yy_rs__current_buffer /* yy_rs__hold_char holds the character lost when yy_rs_text is formed. */ static char yy_rs__hold_char; static int yy_rs__n_chars; /* number of characters read into yy_rs__ch_buf */ int yy_rs_leng; /* Points to current character in buffer. */ static char *yy_rs__c_buf_p = (char *) 0; static int yy_rs__init = 1; /* whether we need to initialize */ static int yy_rs__start = 0; /* start state number */ /* Flag which is used to allow yy_rs_wrap()'s to do buffer switches * instead of setting up a fresh yy_rs_in. A bit of a hack ... */ static int yy_rs__did_buffer_switch_on_eof; void yy_rs_restart YY_rs__PROTO(( FILE *input_rs__file )); void yy_rs__switch_to_buffer YY_rs__PROTO(( YY_rs__BUFFER_STATE new_buffer )); void yy_rs__load_buffer_state YY_rs__PROTO(( void )); YY_rs__BUFFER_STATE yy_rs__create_buffer YY_rs__PROTO(( FILE *file, int size )); void yy_rs__delete_buffer YY_rs__PROTO(( YY_rs__BUFFER_STATE b )); void yy_rs__init_buffer YY_rs__PROTO(( YY_rs__BUFFER_STATE b, FILE *file )); void yy_rs__flush_buffer YY_rs__PROTO(( YY_rs__BUFFER_STATE b )); #define YY_rs__FLUSH_BUFFER yy_rs__flush_buffer( yy_rs__current_buffer ) YY_rs__BUFFER_STATE yy_rs__scan_buffer YY_rs__PROTO(( char *base, yy_rs__size_t size )); YY_rs__BUFFER_STATE yy_rs__scan_string YY_rs__PROTO(( yy_rs_const char *yy_rs__str )); YY_rs__BUFFER_STATE yy_rs__scan_bytes YY_rs__PROTO(( yy_rs_const char *bytes, int len )); static void *yy_rs__flex_alloc YY_rs__PROTO(( yy_rs__size_t )); static void *yy_rs__flex_realloc YY_rs__PROTO(( void *, yy_rs__size_t )); static void yy_rs__flex_free YY_rs__PROTO(( void * )); #define yy_rs__new_buffer yy_rs__create_buffer #define yy_rs__set_interactive(is_interactive) \ { \ if ( ! yy_rs__current_buffer ) \ yy_rs__current_buffer = yy_rs__create_buffer( yy_rs_in, YY_rs__BUF_SIZE ); \ yy_rs__current_buffer->yy_rs__is_interactive = is_interactive; \ } #define yy_rs__set_bol(at_bol) \ { \ if ( ! yy_rs__current_buffer ) \ yy_rs__current_buffer = yy_rs__create_buffer( yy_rs_in, YY_rs__BUF_SIZE ); \ yy_rs__current_buffer->yy_rs__at_bol = at_bol; \ } #define YY_rs__AT_BOL() (yy_rs__current_buffer->yy_rs__at_bol) typedef unsigned char YY_rs__CHAR; FILE *yy_rs_in = (FILE *) 0, *yy_rs_out = (FILE *) 0; typedef int yy_rs__state_type; extern char *yy_rs_text; #define yy_rs_text_ptr yy_rs_text static yy_rs__state_type yy_rs__get_previous_state YY_rs__PROTO(( void )); static yy_rs__state_type yy_rs__try_NUL_trans YY_rs__PROTO(( yy_rs__state_type current_state )); static int yy_rs__get_next_buffer YY_rs__PROTO(( void )); static void yy_rs__fatal_error YY_rs__PROTO(( yy_rs_const char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up yy_rs_text. */ #define YY_rs__DO_BEFORE_ACTION \ yy_rs_text_ptr = yy_rs__bp; \ yy_rs_leng = (int) (yy_rs__cp - yy_rs__bp); \ yy_rs__hold_char = *yy_rs__cp; \ *yy_rs__cp = '\0'; \ yy_rs__c_buf_p = yy_rs__cp; #define YY_rs__NUM_RULES 47 #define YY_rs__END_OF_BUFFER 48 static yy_rs_const short int yy_rs__accept[230] = { 0, 0, 0, 48, 46, 1, 2, 46, 45, 45, 3, 0, 18, 0, 0, 16, 40, 28, 27, 0, 0, 12, 23, 45, 19, 45, 20, 17, 24, 3, 0, 0, 39, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 5, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 44, 42, 0, 0, 0, 32, 0, 0, 0, 0, 37, 0, 0, 0, 21, 43, 41, 0, 26, 0, 30, 0, 0, 0, 0, 0, 0, 0, 25, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 36, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 10, 7, 0, 0, 0, 8, 0 } ; static yy_rs_const int yy_rs__ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 1, 1, 1, 1, 8, 1, 9, 10, 11, 5, 12, 5, 13, 14, 15, 5, 5, 16, 5, 17, 18, 19, 5, 20, 21, 22, 5, 23, 24, 5, 25, 5, 1, 5, 1, 1, 5, 1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 5, 5, 35, 36, 37, 38, 39, 5, 40, 41, 42, 43, 44, 45, 5, 46, 47, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yy_rs_const int yy_rs__meta[48] = { 0, 1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 } ; static yy_rs_const short int yy_rs__base[232] = { 0, 0, 8, 313, 314, 314, 314, 13, 0, 51, 305, 86, 314, 2, 0, 13, 17, 123, 1, 265, 23, 314, 22, 0, 314, 21, 0, 22, 0, 303, 15, 38, 42, 54, 314, 16, 48, 46, 47, 50, 271, 268, 269, 270, 275, 264, 266, 314, 276, 275, 262, 0, 53, 52, 57, 54, 61, 52, 74, 85, 82, 267, 263, 261, 256, 255, 255, 251, 258, 65, 256, 253, 285, 84, 79, 88, 107, 95, 90, 314, 98, 103, 112, 248, 314, 251, 248, 249, 249, 240, 250, 239, 239, 244, 249, 249, 0, 105, 314, 122, 118, 120, 124, 121, 126, 130, 246, 245, 234, 247, 238, 231, 230, 235, 238, 263, 231, 239, 133, 134, 138, 141, 155, 147, 152, 149, 232, 226, 314, 220, 233, 223, 233, 232, 228, 229, 225, 219, 160, 160, 157, 157, 314, 314, 314, 155, 227, 210, 314, 217, 246, 210, 213, 314, 201, 242, 210, 314, 314, 314, 156, 314, 202, 314, 201, 200, 208, 206, 235, 202, 233, 314, 206, 314, 189, 193, 186, 142, 206, 204, 226, 190, 314, 198, 197, 200, 191, 178, 183, 192, 192, 189, 184, 181, 213, 186, 314, 314, 185, 171, 314, 144, 171, 172, 181, 180, 183, 165, 177, 314, 175, 170, 160, 161, 167, 153, 158, 165, 145, 153, 314, 115, 113, 314, 314, 74, 61, 46, 314, 314, 202, 3 } ; static yy_rs_const short int yy_rs__def[232] = { 0, 230, 230, 229, 229, 229, 229, 229, 231, 231, 231, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 231, 229, 231, 231, 231, 231, 231, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 231, 231, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 231, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 231, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 0, 229, 229 } ; static yy_rs_const short int yy_rs__nxt[362] = { 0, 4, 5, 6, 7, 23, 9, 10, 4, 4, 5, 6, 7, 34, 9, 10, 4, 11, 35, 35, 229, 12, 229, 13, 14, 36, 229, 15, 229, 37, 34, 38, 51, 53, 52, 57, 16, 17, 35, 35, 13, 18, 19, 36, 20, 21, 15, 37, 38, 51, 54, 48, 52, 53, 55, 57, 49, 16, 22, 24, 50, 25, 26, 56, 58, 27, 59, 60, 54, 73, 60, 74, 55, 75, 76, 28, 228, 78, 25, 26, 56, 77, 61, 58, 27, 62, 59, 60, 73, 227, 60, 74, 75, 79, 76, 80, 28, 30, 78, 91, 31, 77, 82, 96, 97, 102, 81, 98, 92, 32, 33, 226, 80, 79, 30, 101, 103, 99, 104, 31, 118, 105, 82, 96, 102, 97, 81, 98, 100, 121, 32, 33, 38, 120, 99, 101, 103, 104, 105, 118, 119, 122, 123, 225, 124, 224, 121, 125, 100, 39, 138, 40, 120, 41, 42, 139, 140, 43, 141, 143, 119, 122, 123, 44, 124, 45, 46, 125, 142, 144, 138, 145, 158, 157, 159, 139, 140, 143, 141, 160, 161, 171, 184, 223, 205, 222, 185, 142, 206, 144, 158, 145, 157, 221, 159, 220, 219, 218, 217, 160, 216, 161, 171, 8, 8, 215, 214, 213, 212, 211, 210, 209, 208, 207, 204, 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, 186, 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, 172, 170, 169, 168, 167, 166, 165, 164, 163, 162, 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 146, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 95, 94, 93, 90, 89, 88, 87, 86, 85, 84, 83, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 29, 47, 29, 229, 3, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229 } ; static yy_rs_const short int yy_rs__chk[362] = { 0, 1, 1, 1, 1, 231, 1, 1, 1, 2, 2, 2, 2, 13, 2, 2, 2, 7, 14, 18, 0, 7, 0, 7, 7, 15, 0, 7, 0, 16, 13, 22, 25, 30, 27, 35, 7, 7, 14, 18, 7, 7, 7, 15, 7, 7, 7, 16, 22, 25, 31, 20, 27, 30, 32, 35, 20, 7, 7, 9, 20, 9, 9, 33, 36, 9, 37, 38, 31, 52, 39, 53, 32, 54, 55, 9, 227, 57, 9, 9, 33, 56, 39, 36, 9, 39, 37, 38, 52, 226, 39, 53, 54, 58, 55, 59, 9, 11, 57, 69, 11, 56, 60, 73, 74, 78, 59, 75, 69, 11, 11, 225, 59, 58, 11, 77, 80, 76, 81, 11, 97, 82, 60, 73, 78, 74, 59, 75, 76, 101, 11, 11, 17, 100, 76, 77, 80, 81, 82, 97, 99, 102, 103, 222, 104, 221, 101, 105, 76, 17, 118, 17, 100, 17, 17, 119, 120, 17, 121, 123, 99, 102, 103, 17, 104, 17, 17, 105, 122, 124, 118, 125, 139, 138, 140, 119, 120, 123, 121, 141, 145, 160, 177, 219, 201, 218, 177, 122, 201, 124, 139, 125, 138, 217, 140, 216, 215, 214, 213, 141, 212, 145, 160, 230, 230, 211, 210, 208, 207, 206, 205, 204, 203, 202, 199, 198, 195, 194, 193, 192, 191, 190, 189, 188, 187, 186, 185, 184, 183, 181, 180, 179, 178, 176, 175, 174, 172, 170, 169, 168, 167, 166, 165, 164, 162, 156, 155, 154, 152, 151, 150, 149, 147, 146, 137, 136, 135, 134, 133, 132, 131, 130, 129, 127, 126, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 83, 72, 71, 70, 68, 67, 66, 65, 64, 63, 62, 61, 50, 49, 48, 46, 45, 44, 43, 42, 41, 40, 29, 19, 10, 3, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229 } ; static yy_rs__state_type yy_rs__last_accepting_state; static char *yy_rs__last_accepting_cpos; /* The intent behind this definition is that it'll catch * any uses of REJECT_rs_ which flex missed. */ #define REJECT_rs_ reject_used_but_not_detected #define yy_rs_more() yy_rs_more_used_but_not_detected #define YY_rs__MORE_ADJ 0 #define YY_rs__RESTORE_YY_rs__MORE_OFFSET char *yy_rs_text; #line 1 "run_str.l" #define INITIAL_rs_ 0 #line 2 "run_str.l" /* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * run_str.l * * lex source for run string analysis */ #include #include #ifdef input_rs_ #undef input_rs_ #undef yy_rs_wrap #endif #include"buf.h" #include"rs-parser.h" #include"init_rs.c" #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif #ifdef FLEX_SCANNER #define YY_rs__NO_UNPUT #endif extern char *string PROTO((char *)); #line 568 "lex.yy_rs_.c" /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_rs__SKIP_YY_rs_WRAP #ifdef __cplusplus extern "C" int yy_rs_wrap YY_rs__PROTO(( void )); #else extern int yy_rs_wrap YY_rs__PROTO(( void )); #endif #endif #ifndef YY_rs__NO_UNPUT static void yy_rs_unput_rs_ YY_rs__PROTO(( int c, char *buf_ptr )); #endif #ifndef yy_rs_text_ptr static void yy_rs__flex_strncpy YY_rs__PROTO(( char *, yy_rs_const char *, int )); #endif #ifdef YY_rs__NEED_STRLEN static int yy_rs__flex_strlen YY_rs__PROTO(( yy_rs_const char * )); #endif #ifndef YY_rs__NO_INPUT #ifdef __cplusplus static int yy_rs_input_rs_ YY_rs__PROTO(( void )); #else static int input_rs_ YY_rs__PROTO(( void )); #endif #endif #if YY_rs__STACK_USED static int yy_rs__start_stack_ptr = 0; static int yy_rs__start_stack_depth = 0; static int *yy_rs__start_stack = 0; #ifndef YY_rs__NO_PUSH_STATE static void yy_rs__push_state YY_rs__PROTO(( int new_state )); #endif #ifndef YY_rs__NO_POP_STATE static void yy_rs__pop_state YY_rs__PROTO(( void )); #endif #ifndef YY_rs__NO_TOP_STATE static int yy_rs__top_state YY_rs__PROTO(( void )); #endif #else #define YY_rs__NO_PUSH_STATE 1 #define YY_rs__NO_POP_STATE 1 #define YY_rs__NO_TOP_STATE 1 #endif #ifdef YY_rs__MALLOC_DECL YY_rs__MALLOC_DECL #else #if __STDC__ #ifndef __cplusplus #include #endif #else /* Just try to get by without declaring the routines. This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * or sizeof(void*) != sizeof(int). */ #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_rs__READ_BUF_SIZE #define YY_rs__READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output_rs_. */ #ifndef ECHO_rs_ /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO_rs_ (void) fwrite( yy_rs_text, yy_rs_leng, 1, yy_rs_out ) #endif /* Gets input_rs_ and stuffs it into "buf". number of characters read, or YY_rs__NULL, * is returned in "result". */ #ifndef YY_rs__INPUT #define YY_rs__INPUT(buf,result,max_size) \ if ( yy_rs__current_buffer->yy_rs__is_interactive ) \ { \ int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( yy_rs_in )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yy_rs_in ) ) \ YY_rs__FATAL_ERROR( "input_rs_ in flex scanner failed" ); \ result = n; \ } \ else if ( ((result = fread( buf, 1, max_size, yy_rs_in )) == 0) \ && ferror( yy_rs_in ) ) \ YY_rs__FATAL_ERROR( "input_rs_ in flex scanner failed" ); #endif /* No semi-colon after return; correct usage is to write "yy_rs_terminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yy_rs_terminate #define yy_rs_terminate() return YY_rs__NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_rs__START_STACK_INCR #define YY_rs__START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_rs__FATAL_ERROR #define YY_rs__FATAL_ERROR(msg) yy_rs__fatal_error( msg ) #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_rs__DECL #define YY_rs__DECL int yy_rs_lex YY_rs__PROTO(( void )) #endif /* Code executed at the beginning of each rule, after yy_rs_text and yy_rs_leng * have been set up. */ #ifndef YY_rs__USER_ACTION #define YY_rs__USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_rs__BREAK #define YY_rs__BREAK break; #endif #define YY_rs__RULE_SETUP \ YY_rs__USER_ACTION YY_rs__DECL { register yy_rs__state_type yy_rs__current_state; register char *yy_rs__cp, *yy_rs__bp; register int yy_rs__act; #line 69 "run_str.l" #line 721 "lex.yy_rs_.c" if ( yy_rs__init ) { yy_rs__init = 0; #ifdef YY_rs__USER_INIT YY_rs__USER_INIT; #endif if ( ! yy_rs__start ) yy_rs__start = 1; /* first start state */ if ( ! yy_rs_in ) yy_rs_in = stdin; if ( ! yy_rs_out ) yy_rs_out = stdout; if ( ! yy_rs__current_buffer ) yy_rs__current_buffer = yy_rs__create_buffer( yy_rs_in, YY_rs__BUF_SIZE ); yy_rs__load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { yy_rs__cp = yy_rs__c_buf_p; /* Support of yy_rs_text. */ *yy_rs__cp = yy_rs__hold_char; /* yy_rs__bp points to the position in yy_rs__ch_buf of the start of * the current run. */ yy_rs__bp = yy_rs__cp; yy_rs__current_state = yy_rs__start; yy_rs__match: do { register YY_rs__CHAR yy_rs__c = yy_rs__ec[YY_rs__SC_TO_UI(*yy_rs__cp)]; if ( yy_rs__accept[yy_rs__current_state] ) { yy_rs__last_accepting_state = yy_rs__current_state; yy_rs__last_accepting_cpos = yy_rs__cp; } while ( yy_rs__chk[yy_rs__base[yy_rs__current_state] + yy_rs__c] != yy_rs__current_state ) { yy_rs__current_state = (int) yy_rs__def[yy_rs__current_state]; if ( yy_rs__current_state >= 230 ) yy_rs__c = yy_rs__meta[(unsigned int) yy_rs__c]; } yy_rs__current_state = yy_rs__nxt[yy_rs__base[yy_rs__current_state] + (unsigned int) yy_rs__c]; ++yy_rs__cp; } while ( yy_rs__base[yy_rs__current_state] != 314 ); yy_rs__find_action: yy_rs__act = yy_rs__accept[yy_rs__current_state]; if ( yy_rs__act == 0 ) { /* have to back up */ yy_rs__cp = yy_rs__last_accepting_cpos; yy_rs__current_state = yy_rs__last_accepting_state; yy_rs__act = yy_rs__accept[yy_rs__current_state]; } YY_rs__DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_rs__act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_rs__DO_BEFORE_ACTION */ *yy_rs__cp = yy_rs__hold_char; yy_rs__cp = yy_rs__last_accepting_cpos; yy_rs__current_state = yy_rs__last_accepting_state; goto yy_rs__find_action; case 1: YY_rs__RULE_SETUP #line 70 "run_str.l" {} YY_rs__BREAK case 2: YY_rs__RULE_SETUP #line 71 "run_str.l" {;} YY_rs__BREAK case 3: YY_rs__RULE_SETUP #line 72 "run_str.l" {sscanf (yy_rs_text, "%d", &yy_rs_lval.myy_rs_int); return (NUMBER); /* * Matches an integer number. */} YY_rs__BREAK case 4: YY_rs__RULE_SETUP #line 76 "run_str.l" {return (BGC);} YY_rs__BREAK case 5: YY_rs__RULE_SETUP #line 77 "run_str.l" {return (BGC); /* * Redefining of size of framework memory. */} YY_rs__BREAK case 6: YY_rs__RULE_SETUP #line 81 "run_str.l" {return (DUMP_YACC);} YY_rs__BREAK case 7: YY_rs__RULE_SETUP #line 82 "run_str.l" {return (CALL_BY_REFERENCE);} YY_rs__BREAK case 8: YY_rs__RULE_SETUP #line 83 "run_str.l" {return (NO_CALL_BY_REFERENCE);} YY_rs__BREAK case 9: YY_rs__RULE_SETUP #line 84 "run_str.l" {return (CALL_BY_VALUE);} YY_rs__BREAK case 10: YY_rs__RULE_SETUP #line 85 "run_str.l" {return (NO_CALL_BY_VALUE);} YY_rs__BREAK case 11: YY_rs__RULE_SETUP #line 86 "run_str.l" {return (HANDLE_MAIN);} YY_rs__BREAK case 12: YY_rs__RULE_SETUP #line 87 "run_str.l" {return (DBG_INFO);} YY_rs__BREAK case 13: YY_rs__RULE_SETUP #line 88 "run_str.l" {return (HELP);} YY_rs__BREAK case 14: YY_rs__RULE_SETUP #line 89 "run_str.l" {return (HELP);} YY_rs__BREAK case 15: YY_rs__RULE_SETUP #line 90 "run_str.l" {return (HELP); /* * Starts a help. */} YY_rs__BREAK case 16: YY_rs__RULE_SETUP #line 94 "run_str.l" {return (HELP); /* Starts a help. */} YY_rs__BREAK case 17: YY_rs__RULE_SETUP #line 95 "run_str.l" {return (HELP); /* Starts a help. */} YY_rs__BREAK case 18: YY_rs__RULE_SETUP #line 96 "run_str.l" {return (HELP); /* Starts a help */} YY_rs__BREAK case 19: YY_rs__RULE_SETUP #line 97 "run_str.l" {return (HELP); /* Starts a help */} YY_rs__BREAK case 20: YY_rs__RULE_SETUP #line 98 "run_str.l" {return (COPYING); /* Starts copying policy */} YY_rs__BREAK case 21: YY_rs__RULE_SETUP #line 99 "run_str.l" {return (COPYING);} YY_rs__BREAK case 22: YY_rs__RULE_SETUP #line 100 "run_str.l" {return (COPYING);} YY_rs__BREAK case 23: YY_rs__RULE_SETUP #line 101 "run_str.l" {return (WARNING_INHIBIT); /* Starts warranty */} YY_rs__BREAK case 24: YY_rs__RULE_SETUP #line 102 "run_str.l" {return (WARRANTY); /* Starts warranty */} YY_rs__BREAK case 25: YY_rs__RULE_SETUP #line 103 "run_str.l" {return (WARRANTY);} YY_rs__BREAK case 26: YY_rs__RULE_SETUP #line 104 "run_str.l" {return (WARRANTY);} YY_rs__BREAK case 27: YY_rs__RULE_SETUP #line 105 "run_str.l" {return (COMPILE); /* Starts compiling only */} YY_rs__BREAK case 28: YY_rs__RULE_SETUP #line 106 "run_str.l" {return (WARNING_EXTRA);} YY_rs__BREAK case 29: YY_rs__RULE_SETUP #line 107 "run_str.l" {return (WARNING_AGGREGATE_RETURN);} YY_rs__BREAK case 30: YY_rs__RULE_SETUP #line 108 "run_str.l" {return (WARNING_COMMENT);} YY_rs__BREAK case 31: YY_rs__RULE_SETUP #line 109 "run_str.l" {return (WARNING_ERROR);} YY_rs__BREAK case 32: YY_rs__RULE_SETUP #line 110 "run_str.l" {return (WARNING_FORMAT);} YY_rs__BREAK case 33: YY_rs__RULE_SETUP #line 111 "run_str.l" {return (WARNING_IMPLICIT);} YY_rs__BREAK case 34: YY_rs__RULE_SETUP #line 112 "run_str.l" {return (WARNING_RETURN_TYPE);} YY_rs__BREAK case 35: YY_rs__RULE_SETUP #line 113 "run_str.l" {return (WARNING_TRIGRAPHS);} YY_rs__BREAK case 36: YY_rs__RULE_SETUP #line 114 "run_str.l" {return (WARNING_UNINITIAL_rs_IZED);} YY_rs__BREAK case 37: YY_rs__RULE_SETUP #line 115 "run_str.l" {return (WARNING_UNUSED);} YY_rs__BREAK case 38: YY_rs__RULE_SETUP #line 116 "run_str.l" {return (WARNING); /* Prints warnings as well */} YY_rs__BREAK case 39: YY_rs__RULE_SETUP #line 117 "run_str.l" {return (VERSION); /* Prints version number */} YY_rs__BREAK case 40: YY_rs__RULE_SETUP #line 118 "run_str.l" {return (VERSION); /* Prints version number */} YY_rs__BREAK case 41: YY_rs__RULE_SETUP #line 119 "run_str.l" {return (VERSION); /* Prints version number */} YY_rs__BREAK case 42: YY_rs__RULE_SETUP #line 120 "run_str.l" {return (VERSION); /* Prints version number */} YY_rs__BREAK case 43: YY_rs__RULE_SETUP #line 121 "run_str.l" {return (VERBOSE); /* Prints message about environment */} YY_rs__BREAK case 44: YY_rs__RULE_SETUP #line 122 "run_str.l" {return (VERBOSE); /* Prints message about environment */} YY_rs__BREAK case 45: YY_rs__RULE_SETUP #line 123 "run_str.l" {/* * Other run string parameters. */ yy_rs_lval.myy_rs_string = string (yy_rs_text); return(STRING);} YY_rs__BREAK case 46: YY_rs__RULE_SETUP #line 128 "run_str.l" {return (*yy_rs_text);} YY_rs__BREAK case 47: YY_rs__RULE_SETUP #line 129 "run_str.l" ECHO_rs_; YY_rs__BREAK #line 1052 "lex.yy_rs_.c" case YY_rs__STATE_EOF(INITIAL_rs_): yy_rs_terminate(); case YY_rs__END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_rs__amount_of_matched_text = (int) (yy_rs__cp - yy_rs_text_ptr) - 1; /* Undo the effects of YY_rs__DO_BEFORE_ACTION. */ *yy_rs__cp = yy_rs__hold_char; YY_rs__RESTORE_YY_rs__MORE_OFFSET if ( yy_rs__current_buffer->yy_rs__buffer_status == YY_rs__BUFFER_NEW ) { /* We're scanning a new file or input_rs_ source. It's * possible that this happened because the user * just pointed yy_rs_in at a new source and called * yy_rs_lex(). If so, then we have to assure * consistency between yy_rs__current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input_rs_ source. */ yy_rs__n_chars = yy_rs__current_buffer->yy_rs__n_chars; yy_rs__current_buffer->yy_rs__input_rs__file = yy_rs_in; yy_rs__current_buffer->yy_rs__buffer_status = YY_rs__BUFFER_NORMAL; } /* Note that here we test for yy_rs__c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_rs__c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input_rs_(). */ if ( yy_rs__c_buf_p <= &yy_rs__current_buffer->yy_rs__ch_buf[yy_rs__n_chars] ) { /* This was really a NUL. */ yy_rs__state_type yy_rs__next_state; yy_rs__c_buf_p = yy_rs_text_ptr + yy_rs__amount_of_matched_text; yy_rs__current_state = yy_rs__get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_rs__get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_rs__next_state = yy_rs__try_NUL_trans( yy_rs__current_state ); yy_rs__bp = yy_rs_text_ptr + YY_rs__MORE_ADJ; if ( yy_rs__next_state ) { /* Consume the NUL. */ yy_rs__cp = ++yy_rs__c_buf_p; yy_rs__current_state = yy_rs__next_state; goto yy_rs__match; } else { yy_rs__cp = yy_rs__c_buf_p; goto yy_rs__find_action; } } else switch ( yy_rs__get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_rs__did_buffer_switch_on_eof = 0; if ( yy_rs_wrap() ) { /* Note: because we've taken care in * yy_rs__get_next_buffer() to have set up * yy_rs_text, we can now set up * yy_rs__c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_rs__NULL, it'll still work - another * YY_rs__NULL will get returned. */ yy_rs__c_buf_p = yy_rs_text_ptr + YY_rs__MORE_ADJ; yy_rs__act = YY_rs__STATE_EOF(YY_rs__START); goto do_action; } else { if ( ! yy_rs__did_buffer_switch_on_eof ) YY_rs__NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yy_rs__c_buf_p = yy_rs_text_ptr + yy_rs__amount_of_matched_text; yy_rs__current_state = yy_rs__get_previous_state(); yy_rs__cp = yy_rs__c_buf_p; yy_rs__bp = yy_rs_text_ptr + YY_rs__MORE_ADJ; goto yy_rs__match; case EOB_ACT_LAST_MATCH: yy_rs__c_buf_p = &yy_rs__current_buffer->yy_rs__ch_buf[yy_rs__n_chars]; yy_rs__current_state = yy_rs__get_previous_state(); yy_rs__cp = yy_rs__c_buf_p; yy_rs__bp = yy_rs_text_ptr + YY_rs__MORE_ADJ; goto yy_rs__find_action; } break; } default: YY_rs__FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yy_rs_lex */ /* yy_rs__get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_rs__get_next_buffer() { register char *dest = yy_rs__current_buffer->yy_rs__ch_buf; register char *source = yy_rs_text_ptr; register int number_to_move, i; int ret_val; if ( yy_rs__c_buf_p > &yy_rs__current_buffer->yy_rs__ch_buf[yy_rs__n_chars + 1] ) YY_rs__FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( yy_rs__current_buffer->yy_rs__fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yy_rs__c_buf_p - yy_rs_text_ptr - YY_rs__MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yy_rs__c_buf_p - yy_rs_text_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_rs__current_buffer->yy_rs__buffer_status == YY_rs__BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ yy_rs__current_buffer->yy_rs__n_chars = yy_rs__n_chars = 0; else { int num_to_read = yy_rs__current_buffer->yy_rs__buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ #ifdef YY_rs__USES_REJECT_rs_ YY_rs__FATAL_ERROR( "input_rs_ buffer overflow, can't enlarge buffer because scanner uses REJECT_rs_" ); #else /* just a shorter name for the current buffer */ YY_rs__BUFFER_STATE b = yy_rs__current_buffer; int yy_rs__c_buf_p_offset = (int) (yy_rs__c_buf_p - b->yy_rs__ch_buf); if ( b->yy_rs__is_our_buffer ) { int new_size = b->yy_rs__buf_size * 2; if ( new_size <= 0 ) b->yy_rs__buf_size += b->yy_rs__buf_size / 8; else b->yy_rs__buf_size *= 2; b->yy_rs__ch_buf = (char *) /* Include room in for 2 EOB chars. */ yy_rs__flex_realloc( (void *) b->yy_rs__ch_buf, b->yy_rs__buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_rs__ch_buf = 0; if ( ! b->yy_rs__ch_buf ) YY_rs__FATAL_ERROR( "fatal error - scanner input_rs_ buffer overflow" ); yy_rs__c_buf_p = &b->yy_rs__ch_buf[yy_rs__c_buf_p_offset]; num_to_read = yy_rs__current_buffer->yy_rs__buf_size - number_to_move - 1; #endif } if ( num_to_read > YY_rs__READ_BUF_SIZE ) num_to_read = YY_rs__READ_BUF_SIZE; /* Read in more data. */ YY_rs__INPUT( (&yy_rs__current_buffer->yy_rs__ch_buf[number_to_move]), yy_rs__n_chars, num_to_read ); yy_rs__current_buffer->yy_rs__n_chars = yy_rs__n_chars; } if ( yy_rs__n_chars == 0 ) { if ( number_to_move == YY_rs__MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yy_rs_restart( yy_rs_in ); } else { ret_val = EOB_ACT_LAST_MATCH; yy_rs__current_buffer->yy_rs__buffer_status = YY_rs__BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; yy_rs__n_chars += number_to_move; yy_rs__current_buffer->yy_rs__ch_buf[yy_rs__n_chars] = YY_rs__END_OF_BUFFER_CHAR; yy_rs__current_buffer->yy_rs__ch_buf[yy_rs__n_chars + 1] = YY_rs__END_OF_BUFFER_CHAR; yy_rs_text_ptr = &yy_rs__current_buffer->yy_rs__ch_buf[0]; return ret_val; } /* yy_rs__get_previous_state - get the state just before the EOB char was reached */ static yy_rs__state_type yy_rs__get_previous_state() { register yy_rs__state_type yy_rs__current_state; register char *yy_rs__cp; yy_rs__current_state = yy_rs__start; for ( yy_rs__cp = yy_rs_text_ptr + YY_rs__MORE_ADJ; yy_rs__cp < yy_rs__c_buf_p; ++yy_rs__cp ) { register YY_rs__CHAR yy_rs__c = (*yy_rs__cp ? yy_rs__ec[YY_rs__SC_TO_UI(*yy_rs__cp)] : 1); if ( yy_rs__accept[yy_rs__current_state] ) { yy_rs__last_accepting_state = yy_rs__current_state; yy_rs__last_accepting_cpos = yy_rs__cp; } while ( yy_rs__chk[yy_rs__base[yy_rs__current_state] + yy_rs__c] != yy_rs__current_state ) { yy_rs__current_state = (int) yy_rs__def[yy_rs__current_state]; if ( yy_rs__current_state >= 230 ) yy_rs__c = yy_rs__meta[(unsigned int) yy_rs__c]; } yy_rs__current_state = yy_rs__nxt[yy_rs__base[yy_rs__current_state] + (unsigned int) yy_rs__c]; } return yy_rs__current_state; } /* yy_rs__try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_rs__try_NUL_trans( current_state ); */ #ifdef YY_rs__USE_PROTOS static yy_rs__state_type yy_rs__try_NUL_trans( yy_rs__state_type yy_rs__current_state ) #else static yy_rs__state_type yy_rs__try_NUL_trans( yy_rs__current_state ) yy_rs__state_type yy_rs__current_state; #endif { register int yy_rs__is_jam; register char *yy_rs__cp = yy_rs__c_buf_p; register YY_rs__CHAR yy_rs__c = 1; if ( yy_rs__accept[yy_rs__current_state] ) { yy_rs__last_accepting_state = yy_rs__current_state; yy_rs__last_accepting_cpos = yy_rs__cp; } while ( yy_rs__chk[yy_rs__base[yy_rs__current_state] + yy_rs__c] != yy_rs__current_state ) { yy_rs__current_state = (int) yy_rs__def[yy_rs__current_state]; if ( yy_rs__current_state >= 230 ) yy_rs__c = yy_rs__meta[(unsigned int) yy_rs__c]; } yy_rs__current_state = yy_rs__nxt[yy_rs__base[yy_rs__current_state] + (unsigned int) yy_rs__c]; yy_rs__is_jam = (yy_rs__current_state == 229); return yy_rs__is_jam ? 0 : yy_rs__current_state; } #ifndef YY_rs__NO_UNPUT #ifdef YY_rs__USE_PROTOS static void yy_rs_unput_rs_( int c, register char *yy_rs__bp ) #else static void yy_rs_unput_rs_( c, yy_rs__bp ) int c; register char *yy_rs__bp; #endif { register char *yy_rs__cp = yy_rs__c_buf_p; /* undo effects of setting up yy_rs_text */ *yy_rs__cp = yy_rs__hold_char; if ( yy_rs__cp < yy_rs__current_buffer->yy_rs__ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = yy_rs__n_chars + 2; register char *dest = &yy_rs__current_buffer->yy_rs__ch_buf[ yy_rs__current_buffer->yy_rs__buf_size + 2]; register char *source = &yy_rs__current_buffer->yy_rs__ch_buf[number_to_move]; while ( source > yy_rs__current_buffer->yy_rs__ch_buf ) *--dest = *--source; yy_rs__cp += (int) (dest - source); yy_rs__bp += (int) (dest - source); yy_rs__current_buffer->yy_rs__n_chars = yy_rs__n_chars = yy_rs__current_buffer->yy_rs__buf_size; if ( yy_rs__cp < yy_rs__current_buffer->yy_rs__ch_buf + 2 ) YY_rs__FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_rs__cp = (char) c; yy_rs_text_ptr = yy_rs__bp; yy_rs__hold_char = *yy_rs__cp; yy_rs__c_buf_p = yy_rs__cp; } #endif /* ifndef YY_rs__NO_UNPUT */ #ifdef __cplusplus static int yy_rs_input_rs_() #else static int input_rs_() #endif { int c; *yy_rs__c_buf_p = yy_rs__hold_char; if ( *yy_rs__c_buf_p == YY_rs__END_OF_BUFFER_CHAR ) { /* yy_rs__c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yy_rs__c_buf_p < &yy_rs__current_buffer->yy_rs__ch_buf[yy_rs__n_chars] ) /* This was really a NUL. */ *yy_rs__c_buf_p = '\0'; else { /* need more input_rs_ */ int offset = yy_rs__c_buf_p - yy_rs_text_ptr; ++yy_rs__c_buf_p; switch ( yy_rs__get_next_buffer() ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_rs__g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input_rs_(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yy_rs_restart( yy_rs_in ); /* fall through */ case EOB_ACT_END_OF_FILE: { if ( yy_rs_wrap() ) return EOF; if ( ! yy_rs__did_buffer_switch_on_eof ) YY_rs__NEW_FILE; #ifdef __cplusplus return yy_rs_input_rs_(); #else return input_rs_(); #endif } case EOB_ACT_CONTINUE_SCAN: yy_rs__c_buf_p = yy_rs_text_ptr + offset; break; } } } c = *(unsigned char *) yy_rs__c_buf_p; /* cast for 8-bit char's */ *yy_rs__c_buf_p = '\0'; /* preserve yy_rs_text */ yy_rs__hold_char = *++yy_rs__c_buf_p; return c; } #ifdef YY_rs__USE_PROTOS void yy_rs_restart( FILE *input_rs__file ) #else void yy_rs_restart( input_rs__file ) FILE *input_rs__file; #endif { if ( ! yy_rs__current_buffer ) yy_rs__current_buffer = yy_rs__create_buffer( yy_rs_in, YY_rs__BUF_SIZE ); yy_rs__init_buffer( yy_rs__current_buffer, input_rs__file ); yy_rs__load_buffer_state(); } #ifdef YY_rs__USE_PROTOS void yy_rs__switch_to_buffer( YY_rs__BUFFER_STATE new_buffer ) #else void yy_rs__switch_to_buffer( new_buffer ) YY_rs__BUFFER_STATE new_buffer; #endif { if ( yy_rs__current_buffer == new_buffer ) return; if ( yy_rs__current_buffer ) { /* Flush out information for old buffer. */ *yy_rs__c_buf_p = yy_rs__hold_char; yy_rs__current_buffer->yy_rs__buf_pos = yy_rs__c_buf_p; yy_rs__current_buffer->yy_rs__n_chars = yy_rs__n_chars; } yy_rs__current_buffer = new_buffer; yy_rs__load_buffer_state(); /* We don't actually know whether we did this switch during * EOF (yy_rs_wrap()) processing, but the only time this flag * is looked at is after yy_rs_wrap() is called, so it's safe * to go ahead and always set it. */ yy_rs__did_buffer_switch_on_eof = 1; } #ifdef YY_rs__USE_PROTOS void yy_rs__load_buffer_state( void ) #else void yy_rs__load_buffer_state() #endif { yy_rs__n_chars = yy_rs__current_buffer->yy_rs__n_chars; yy_rs_text_ptr = yy_rs__c_buf_p = yy_rs__current_buffer->yy_rs__buf_pos; yy_rs_in = yy_rs__current_buffer->yy_rs__input_rs__file; yy_rs__hold_char = *yy_rs__c_buf_p; } #ifdef YY_rs__USE_PROTOS YY_rs__BUFFER_STATE yy_rs__create_buffer( FILE *file, int size ) #else YY_rs__BUFFER_STATE yy_rs__create_buffer( file, size ) FILE *file; int size; #endif { YY_rs__BUFFER_STATE b; b = (YY_rs__BUFFER_STATE) yy_rs__flex_alloc( sizeof( struct yy_rs__buffer_state ) ); if ( ! b ) YY_rs__FATAL_ERROR( "out of dynamic memory in yy_rs__create_buffer()" ); b->yy_rs__buf_size = size; /* yy_rs__ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_rs__ch_buf = (char *) yy_rs__flex_alloc( b->yy_rs__buf_size + 2 ); if ( ! b->yy_rs__ch_buf ) YY_rs__FATAL_ERROR( "out of dynamic memory in yy_rs__create_buffer()" ); b->yy_rs__is_our_buffer = 1; yy_rs__init_buffer( b, file ); return b; } #ifdef YY_rs__USE_PROTOS void yy_rs__delete_buffer( YY_rs__BUFFER_STATE b ) #else void yy_rs__delete_buffer( b ) YY_rs__BUFFER_STATE b; #endif { if ( ! b ) return; if ( b == yy_rs__current_buffer ) yy_rs__current_buffer = (YY_rs__BUFFER_STATE) 0; if ( b->yy_rs__is_our_buffer ) yy_rs__flex_free( (void *) b->yy_rs__ch_buf ); yy_rs__flex_free( (void *) b ); } #ifndef YY_rs__ALWAYS_INTERACTIVE #ifndef YY_rs__NEVER_INTERACTIVE extern int isatty YY_rs__PROTO(( int )); #endif #endif #ifdef YY_rs__USE_PROTOS void yy_rs__init_buffer( YY_rs__BUFFER_STATE b, FILE *file ) #else void yy_rs__init_buffer( b, file ) YY_rs__BUFFER_STATE b; FILE *file; #endif { yy_rs__flush_buffer( b ); b->yy_rs__input_rs__file = file; b->yy_rs__fill_buffer = 1; #if YY_rs__ALWAYS_INTERACTIVE b->yy_rs__is_interactive = 1; #else #if YY_rs__NEVER_INTERACTIVE b->yy_rs__is_interactive = 0; #else b->yy_rs__is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; #endif #endif } #ifdef YY_rs__USE_PROTOS void yy_rs__flush_buffer( YY_rs__BUFFER_STATE b ) #else void yy_rs__flush_buffer( b ) YY_rs__BUFFER_STATE b; #endif { if ( ! b ) return; b->yy_rs__n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_rs__ch_buf[0] = YY_rs__END_OF_BUFFER_CHAR; b->yy_rs__ch_buf[1] = YY_rs__END_OF_BUFFER_CHAR; b->yy_rs__buf_pos = &b->yy_rs__ch_buf[0]; b->yy_rs__at_bol = 1; b->yy_rs__buffer_status = YY_rs__BUFFER_NEW; if ( b == yy_rs__current_buffer ) yy_rs__load_buffer_state(); } #ifndef YY_rs__NO_SCAN_BUFFER #ifdef YY_rs__USE_PROTOS YY_rs__BUFFER_STATE yy_rs__scan_buffer( char *base, yy_rs__size_t size ) #else YY_rs__BUFFER_STATE yy_rs__scan_buffer( base, size ) char *base; yy_rs__size_t size; #endif { YY_rs__BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_rs__END_OF_BUFFER_CHAR || base[size-1] != YY_rs__END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_rs__BUFFER_STATE) yy_rs__flex_alloc( sizeof( struct yy_rs__buffer_state ) ); if ( ! b ) YY_rs__FATAL_ERROR( "out of dynamic memory in yy_rs__scan_buffer()" ); b->yy_rs__buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_rs__buf_pos = b->yy_rs__ch_buf = base; b->yy_rs__is_our_buffer = 0; b->yy_rs__input_rs__file = 0; b->yy_rs__n_chars = b->yy_rs__buf_size; b->yy_rs__is_interactive = 0; b->yy_rs__at_bol = 1; b->yy_rs__fill_buffer = 0; b->yy_rs__buffer_status = YY_rs__BUFFER_NEW; yy_rs__switch_to_buffer( b ); return b; } #endif #ifndef YY_rs__NO_SCAN_STRING #ifdef YY_rs__USE_PROTOS YY_rs__BUFFER_STATE yy_rs__scan_string( yy_rs_const char *yy_rs__str ) #else YY_rs__BUFFER_STATE yy_rs__scan_string( yy_rs__str ) yy_rs_const char *yy_rs__str; #endif { int len; for ( len = 0; yy_rs__str[len]; ++len ) ; return yy_rs__scan_bytes( yy_rs__str, len ); } #endif #ifndef YY_rs__NO_SCAN_BYTES #ifdef YY_rs__USE_PROTOS YY_rs__BUFFER_STATE yy_rs__scan_bytes( yy_rs_const char *bytes, int len ) #else YY_rs__BUFFER_STATE yy_rs__scan_bytes( bytes, len ) yy_rs_const char *bytes; int len; #endif { YY_rs__BUFFER_STATE b; char *buf; yy_rs__size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) yy_rs__flex_alloc( n ); if ( ! buf ) YY_rs__FATAL_ERROR( "out of dynamic memory in yy_rs__scan_bytes()" ); for ( i = 0; i < len; ++i ) buf[i] = bytes[i]; buf[len] = buf[len+1] = YY_rs__END_OF_BUFFER_CHAR; b = yy_rs__scan_buffer( buf, n ); if ( ! b ) YY_rs__FATAL_ERROR( "bad buffer in yy_rs__scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_rs__is_our_buffer = 1; return b; } #endif #ifndef YY_rs__NO_PUSH_STATE #ifdef YY_rs__USE_PROTOS static void yy_rs__push_state( int new_state ) #else static void yy_rs__push_state( new_state ) int new_state; #endif { if ( yy_rs__start_stack_ptr >= yy_rs__start_stack_depth ) { yy_rs__size_t new_size; yy_rs__start_stack_depth += YY_rs__START_STACK_INCR; new_size = yy_rs__start_stack_depth * sizeof( int ); if ( ! yy_rs__start_stack ) yy_rs__start_stack = (int *) yy_rs__flex_alloc( new_size ); else yy_rs__start_stack = (int *) yy_rs__flex_realloc( (void *) yy_rs__start_stack, new_size ); if ( ! yy_rs__start_stack ) YY_rs__FATAL_ERROR( "out of memory expanding start-condition stack" ); } yy_rs__start_stack[yy_rs__start_stack_ptr++] = YY_rs__START; BEGIN_rs_(new_state); } #endif #ifndef YY_rs__NO_POP_STATE static void yy_rs__pop_state() { if ( --yy_rs__start_stack_ptr < 0 ) YY_rs__FATAL_ERROR( "start-condition stack underflow" ); BEGIN_rs_(yy_rs__start_stack[yy_rs__start_stack_ptr]); } #endif #ifndef YY_rs__NO_TOP_STATE static int yy_rs__top_state() { return yy_rs__start_stack[yy_rs__start_stack_ptr - 1]; } #endif #ifndef YY_rs__EXIT_FAILURE #define YY_rs__EXIT_FAILURE 2 #endif #ifdef YY_rs__USE_PROTOS static void yy_rs__fatal_error( yy_rs_const char msg[] ) #else static void yy_rs__fatal_error( msg ) char msg[]; #endif { (void) fprintf( stderr, "%s\n", msg ); exit( YY_rs__EXIT_FAILURE ); } /* Redefine yy_rs_less() so it works in section 3 code. */ #undef yy_rs_less #define yy_rs_less(n) \ do \ { \ /* Undo effects of setting up yy_rs_text. */ \ yy_rs_text[yy_rs_leng] = yy_rs__hold_char; \ yy_rs__c_buf_p = yy_rs_text + n; \ yy_rs__hold_char = *yy_rs__c_buf_p; \ *yy_rs__c_buf_p = '\0'; \ yy_rs_leng = n; \ } \ while ( 0 ) /* Internal utility routines. */ #ifndef yy_rs_text_ptr #ifdef YY_rs__USE_PROTOS static void yy_rs__flex_strncpy( char *s1, yy_rs_const char *s2, int n ) #else static void yy_rs__flex_strncpy( s1, s2, n ) char *s1; yy_rs_const char *s2; int n; #endif { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_rs__NEED_STRLEN #ifdef YY_rs__USE_PROTOS static int yy_rs__flex_strlen( yy_rs_const char *s ) #else static int yy_rs__flex_strlen( s ) yy_rs_const char *s; #endif { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #ifdef YY_rs__USE_PROTOS static void *yy_rs__flex_alloc( yy_rs__size_t size ) #else static void *yy_rs__flex_alloc( size ) yy_rs__size_t size; #endif { return (void *) malloc( size ); } #ifdef YY_rs__USE_PROTOS static void *yy_rs__flex_realloc( void *ptr, yy_rs__size_t size ) #else static void *yy_rs__flex_realloc( ptr, size ) void *ptr; yy_rs__size_t size; #endif { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } #ifdef YY_rs__USE_PROTOS static void yy_rs__flex_free( void *ptr ) #else static void yy_rs__flex_free( ptr ) void *ptr; #endif { free( ptr ); } #if YY_rs__MAIN int main() { yy_rs_lex(); return 0; } #endif #line 129 "run_str.l" clif-0.93/rs-parser.c100644 1750 1750 70075 6646150114 13237 0ustar korenkoren /* A Bison parser, made from run_str.y by GNU Bison version 1.25 */ #define YY_rs_BISON 1 /* Identify Bison output_rs_. */ #define NUMBER 258 #define STRING 259 #define BGC 260 #define HELP 261 #define COMPILE 262 #define WARNING 263 #define WARRANTY 264 #define COPYING 265 #define VERBOSE 266 #define VERSION 267 #define WARNING_INHIBIT 268 #define WARNING_COMMENT 269 #define WARNING_FORMAT 270 #define WARNING_IMPLICIT 271 #define WARNING_RETURN_TYPE 272 #define WARNING_TRIGRAPHS 273 #define WARNING_UNUSED 274 #define WARNING_UNINITIAL_rs_IZED 275 #define WARNING_EXTRA 276 #define WARNING_AGGREGATE_RETURN 277 #define WARNING_ERROR 278 #define HANDLE_MAIN 279 #define CALL_BY_REFERENCE 280 #define CALL_BY_VALUE 281 #define NO_CALL_BY_REFERENCE 282 #define NO_CALL_BY_VALUE 283 #define DUMP_YACC 284 #define DBG_INFO 285 #line 27 "run_str.y" typedef union { int myy_rs_int; char *myy_rs_string; } YY_rs_STYPE; #line 51 "run_str.y" #include #include "flags.h" int argc_counter = 0; extern int bc; char *argvv[100]; #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif extern int help PROTO((int)); int yy_rs_lex PROTO((void)); void error_message PROTO((int)); int yy_rs_error PROTO((char *)); int yy_rs_error (s) char *s; { return (0); } #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YY_rs_FINAL 34 #define YY_rs_FLAG -32768 #define YY_rs_NTBASE 32 #define YY_rs_TRANSLATE(x) ((unsigned)(x) <= 285 ? yy_rs_translate[x] : 34) static const char yy_rs_translate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }; #if YY_rs_DEBUG != 0 static const short yy_rs_prhs[] = { 0, 0, 3, 4, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60 }; static const short yy_rs_rhs[] = { 32, 33, 0, 0, 5, 13, 3, 0, 26, 0, 28, 0, 27, 0, 29, 0, 7, 0, 10, 0, 30, 0, 31, 0, 25, 0, 6, 0, 4, 0, 11, 0, 12, 0, 8, 0, 23, 0, 15, 0, 24, 0, 22, 0, 16, 0, 17, 0, 14, 0, 18, 0, 19, 0, 21, 0, 20, 0, 9, 0, 1, 0 }; #endif #if YY_rs_DEBUG != 0 static const short yy_rs_rline[] = { 0, 80, 82, 85, 88, 90, 92, 94, 96, 99, 104, 110, 113, 116, 122, 125, 131, 137, 140, 143, 146, 149, 152, 155, 158, 161, 164, 167, 170, 173, 179 }; #endif #if YY_rs_DEBUG != 0 || defined (YY_rs_ERROR_VERBOSE) static const char * const yy_rs_tname[] = { "$","error","$undefined.","NUMBER", "STRING","BGC","HELP","COMPILE","WARNING","WARRANTY","COPYING","VERBOSE","VERSION", "'='","WARNING_INHIBIT","WARNING_COMMENT","WARNING_FORMAT","WARNING_IMPLICIT", "WARNING_RETURN_TYPE","WARNING_TRIGRAPHS","WARNING_UNUSED","WARNING_UNINITIAL_rs_IZED", "WARNING_EXTRA","WARNING_AGGREGATE_RETURN","WARNING_ERROR","HANDLE_MAIN","CALL_BY_REFERENCE", "CALL_BY_VALUE","NO_CALL_BY_REFERENCE","NO_CALL_BY_VALUE","DUMP_YACC","DBG_INFO", "list_stat_0","stat_0", NULL }; #endif static const short yy_rs_r1[] = { 0, 32, 32, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33 }; static const short yy_rs_r2[] = { 0, 2, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; static const short yy_rs_defact[] = { 2, 0, 30, 14, 0, 13, 8, 17, 29, 9, 15, 16, 24, 19, 22, 23, 25, 26, 28, 27, 21, 18, 20, 12, 4, 6, 5, 7, 10, 11, 1, 0, 3, 0, 0 }; static const short yy_rs_defgoto[] = { 1, 30 }; static const short yy_rs_pact[] = {-32768, 0,-32768,-32768, -11,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 10,-32768, 3,-32768 }; static const short yy_rs_pgoto[] = {-32768, -32768 }; #define YY_rs_LAST 31 static const short yy_rs_table[] = { 33, 2, 31, 34, 3, 4, 5, 6, 7, 8, 9, 10, 11, 32, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }; static const short yy_rs_check[] = { 0, 1, 13, 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 3, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/share/misc/bison.simple" /* Skeleton output_rs_ parser for bison, Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output_rs_ file, you may use that output_rs_ file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ #ifndef alloca #ifdef __GNUC__ #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) #include #else /* not sparc */ #if defined (MSDOS) && !defined (__TURBOC__) #include #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) #include #pragma alloca #else /* not MSDOS, __TURBOC__, or _AIX */ #ifdef __hpux #ifdef __cplusplus extern "C" { void *alloca (unsigned int); }; #else /* not __cplusplus */ void *alloca (); #endif /* not __cplusplus */ #endif /* __hpux */ #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc. */ #endif /* not GNU C. */ #endif /* alloca not defined. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the switch. */ #define yy_rs_errok (yy_rs_errstatus = 0) #define yy_rs_clearin (yy_rs_char = YY_rs_EMPTY) #define YY_rs_EMPTY -2 #define YY_rs_EOF 0 #define YY_rs_ACCEPT return(0) #define YY_rs_ABORT return(1) #define YY_rs_ERROR goto yy_rs_errlab1 /* Like YY_rs_ERROR except do call yy_rs_error. This remains here temporarily to ease the transition to the new meaning of YY_rs_ERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YY_rs_FAIL goto yy_rs_errlab #define YY_rs_RECOVERING() (!!yy_rs_errstatus) #define YY_rs_BACKUP(token, value) \ do \ if (yy_rs_char == YY_rs_EMPTY && yy_rs_len == 1) \ { yy_rs_char = (token), yy_rs_lval = (value); \ yy_rs_char1 = YY_rs_TRANSLATE (yy_rs_char); \ YY_rs_POPSTACK; \ goto yy_rs_backup; \ } \ else \ { yy_rs_error ("syntax error: cannot back up"); YY_rs_ERROR; } \ while (0) #define YY_rs_TERROR 1 #define YY_rs_ERRCODE 256 #ifndef YY_rs_PURE #define YY_rs_LEX yy_rs_lex() #endif #ifdef YY_rs_PURE #ifdef YY_rs_LSP_NEEDED #ifdef YY_rs_LEX_PARAM #define YY_rs_LEX yy_rs_lex(&yy_rs_lval, &yy_rs_lloc, YY_rs_LEX_PARAM) #else #define YY_rs_LEX yy_rs_lex(&yy_rs_lval, &yy_rs_lloc) #endif #else /* not YY_rs_LSP_NEEDED */ #ifdef YY_rs_LEX_PARAM #define YY_rs_LEX yy_rs_lex(&yy_rs_lval, YY_rs_LEX_PARAM) #else #define YY_rs_LEX yy_rs_lex(&yy_rs_lval) #endif #endif /* not YY_rs_LSP_NEEDED */ #endif /* If nonreentrant, generate the variables here */ #ifndef YY_rs_PURE int yy_rs_char; /* the lookahead symbol */ YY_rs_STYPE yy_rs_lval; /* the semantic value of the */ /* lookahead symbol */ #ifdef YY_rs_LSP_NEEDED YY_rs_LTYPE yy_rs_lloc; /* location data for the lookahead */ /* symbol */ #endif int yy_rs_nerrs; /* number of parse errors so far */ #endif /* not YY_rs_PURE */ #if YY_rs_DEBUG != 0 int yy_rs_debug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* YY_rs_INITDEPTH indicates the initial size of the parser's stacks */ #ifndef YY_rs_INITDEPTH #define YY_rs_INITDEPTH 200 #endif /* YY_rs_MAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ #if YY_rs_MAXDEPTH == 0 #undef YY_rs_MAXDEPTH #endif #ifndef YY_rs_MAXDEPTH #define YY_rs_MAXDEPTH 10000 #endif /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ int yy_rs_parse (void); #endif #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_rs__memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_rs__memcpy (to, from, count) char *to; char *from; int count; { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_rs__memcpy (char *to, char *from, int count) { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif #line 196 "/usr/share/misc/bison.simple" /* The user can define YY_rs_PARSE_PARAM as the name of an argument to be passed into yy_rs_parse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef YY_rs_PARSE_PARAM #ifdef __cplusplus #define YY_rs_PARSE_PARAM_ARG void *YY_rs_PARSE_PARAM #define YY_rs_PARSE_PARAM_DECL #else /* not __cplusplus */ #define YY_rs_PARSE_PARAM_ARG YY_rs_PARSE_PARAM #define YY_rs_PARSE_PARAM_DECL void *YY_rs_PARSE_PARAM; #endif /* not __cplusplus */ #else /* not YY_rs_PARSE_PARAM */ #define YY_rs_PARSE_PARAM_ARG #define YY_rs_PARSE_PARAM_DECL #endif /* not YY_rs_PARSE_PARAM */ int yy_rs_parse(YY_rs_PARSE_PARAM_ARG) YY_rs_PARSE_PARAM_DECL { register int yy_rs_state; register int yy_rs_n; register short *yy_rs_ssp; register YY_rs_STYPE *yy_rs_vsp; int yy_rs_errstatus; /* number of tokens to shift before error messages enabled */ int yy_rs_char1 = 0; /* lookahead token as an internal (translated) token number */ short yy_rs_ssa[YY_rs_INITDEPTH]; /* the state stack */ YY_rs_STYPE yy_rs_vsa[YY_rs_INITDEPTH]; /* the semantic value stack */ short *yy_rs_ss = yy_rs_ssa; /* refer to the stacks thru separate pointers */ YY_rs_STYPE *yy_rs_vs = yy_rs_vsa; /* to allow yy_rs_overflow to reallocate them elsewhere */ #ifdef YY_rs_LSP_NEEDED YY_rs_LTYPE yy_rs_lsa[YY_rs_INITDEPTH]; /* the location stack */ YY_rs_LTYPE *yy_rs_ls = yy_rs_lsa; YY_rs_LTYPE *yy_rs_lsp; #define YY_rs_POPSTACK (yy_rs_vsp--, yy_rs_ssp--, yy_rs_lsp--) #else #define YY_rs_POPSTACK (yy_rs_vsp--, yy_rs_ssp--) #endif int yy_rs_stacksize = YY_rs_INITDEPTH; #ifdef YY_rs_PURE int yy_rs_char; YY_rs_STYPE yy_rs_lval; int yy_rs_nerrs; #ifdef YY_rs_LSP_NEEDED YY_rs_LTYPE yy_rs_lloc; #endif #endif YY_rs_STYPE yy_rs_val; /* the variable used to return */ /* semantic values from the action */ /* routines */ int yy_rs_len; #if YY_rs_DEBUG != 0 if (yy_rs_debug) fprintf(stderr, "Starting parse\n"); #endif yy_rs_state = 0; yy_rs_errstatus = 0; yy_rs_nerrs = 0; yy_rs_char = YY_rs_EMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yy_rs_ssp = yy_rs_ss - 1; yy_rs_vsp = yy_rs_vs; #ifdef YY_rs_LSP_NEEDED yy_rs_lsp = yy_rs_ls; #endif /* Push a new state, which is found in yy_rs_state . */ /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yy_rs_newstate: *++yy_rs_ssp = yy_rs_state; if (yy_rs_ssp >= yy_rs_ss + yy_rs_stacksize - 1) { /* Give user a chance to reallocate the stack */ /* Use copies of these so that the &'s don't force the real ones into memory. */ YY_rs_STYPE *yy_rs_vs1 = yy_rs_vs; short *yy_rs_ss1 = yy_rs_ss; #ifdef YY_rs_LSP_NEEDED YY_rs_LTYPE *yy_rs_ls1 = yy_rs_ls; #endif /* Get the current used size of the three stacks, in elements. */ int size = yy_rs_ssp - yy_rs_ss + 1; #ifdef yy_rs_overflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ #ifdef YY_rs_LSP_NEEDED /* This used to be a conditional around just the two extra args, but that might be undefined if yy_rs_overflow is a macro. */ yy_rs_overflow("parser stack overflow", &yy_rs_ss1, size * sizeof (*yy_rs_ssp), &yy_rs_vs1, size * sizeof (*yy_rs_vsp), &yy_rs_ls1, size * sizeof (*yy_rs_lsp), &yy_rs_stacksize); #else yy_rs_overflow("parser stack overflow", &yy_rs_ss1, size * sizeof (*yy_rs_ssp), &yy_rs_vs1, size * sizeof (*yy_rs_vsp), &yy_rs_stacksize); #endif yy_rs_ss = yy_rs_ss1; yy_rs_vs = yy_rs_vs1; #ifdef YY_rs_LSP_NEEDED yy_rs_ls = yy_rs_ls1; #endif #else /* no yy_rs_overflow */ /* Extend the stack our own way. */ if (yy_rs_stacksize >= YY_rs_MAXDEPTH) { yy_rs_error("parser stack overflow"); return 2; } yy_rs_stacksize *= 2; if (yy_rs_stacksize > YY_rs_MAXDEPTH) yy_rs_stacksize = YY_rs_MAXDEPTH; yy_rs_ss = (short *) alloca (yy_rs_stacksize * sizeof (*yy_rs_ssp)); __yy_rs__memcpy ((char *)yy_rs_ss, (char *)yy_rs_ss1, size * sizeof (*yy_rs_ssp)); yy_rs_vs = (YY_rs_STYPE *) alloca (yy_rs_stacksize * sizeof (*yy_rs_vsp)); __yy_rs__memcpy ((char *)yy_rs_vs, (char *)yy_rs_vs1, size * sizeof (*yy_rs_vsp)); #ifdef YY_rs_LSP_NEEDED yy_rs_ls = (YY_rs_LTYPE *) alloca (yy_rs_stacksize * sizeof (*yy_rs_lsp)); __yy_rs__memcpy ((char *)yy_rs_ls, (char *)yy_rs_ls1, size * sizeof (*yy_rs_lsp)); #endif #endif /* no yy_rs_overflow */ yy_rs_ssp = yy_rs_ss + size - 1; yy_rs_vsp = yy_rs_vs + size - 1; #ifdef YY_rs_LSP_NEEDED yy_rs_lsp = yy_rs_ls + size - 1; #endif #if YY_rs_DEBUG != 0 if (yy_rs_debug) fprintf(stderr, "Stack size increased to %d\n", yy_rs_stacksize); #endif if (yy_rs_ssp >= yy_rs_ss + yy_rs_stacksize - 1) YY_rs_ABORT; } #if YY_rs_DEBUG != 0 if (yy_rs_debug) fprintf(stderr, "Entering state %d\n", yy_rs_state); #endif goto yy_rs_backup; yy_rs_backup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yy_rs_resume: */ /* First try to decide what to do without reference to lookahead token. */ yy_rs_n = yy_rs_pact[yy_rs_state]; if (yy_rs_n == YY_rs_FLAG) goto yy_rs_default; /* Not known => get a lookahead token if don't already have one. */ /* yy_rs_char is either YY_rs_EMPTY or YY_rs_EOF or a valid token in external form. */ if (yy_rs_char == YY_rs_EMPTY) { #if YY_rs_DEBUG != 0 if (yy_rs_debug) fprintf(stderr, "Reading a token: "); #endif yy_rs_char = YY_rs_LEX; } /* Convert token to internal form (in yy_rs_char1) for indexing tables with */ if (yy_rs_char <= 0) /* This means end of input_rs_. */ { yy_rs_char1 = 0; yy_rs_char = YY_rs_EOF; /* Don't call YY_rs_LEX any more */ #if YY_rs_DEBUG != 0 if (yy_rs_debug) fprintf(stderr, "Now at end of input_rs_.\n"); #endif } else { yy_rs_char1 = YY_rs_TRANSLATE(yy_rs_char); #if YY_rs_DEBUG != 0 if (yy_rs_debug) { fprintf (stderr, "Next token is %d (%s", yy_rs_char, yy_rs_tname[yy_rs_char1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ #ifdef YY_rs_PRINT YY_rs_PRINT (stderr, yy_rs_char, yy_rs_lval); #endif fprintf (stderr, ")\n"); } #endif } yy_rs_n += yy_rs_char1; if (yy_rs_n < 0 || yy_rs_n > YY_rs_LAST || yy_rs_check[yy_rs_n] != yy_rs_char1) goto yy_rs_default; yy_rs_n = yy_rs_table[yy_rs_n]; /* yy_rs_n is what to do for this token type in this state. Negative => reduce, -yy_rs_n is rule number. Positive => shift, yy_rs_n is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yy_rs_n < 0) { if (yy_rs_n == YY_rs_FLAG) goto yy_rs_errlab; yy_rs_n = -yy_rs_n; goto yy_rs_reduce; } else if (yy_rs_n == 0) goto yy_rs_errlab; if (yy_rs_n == YY_rs_FINAL) YY_rs_ACCEPT; /* Shift the lookahead token. */ #if YY_rs_DEBUG != 0 if (yy_rs_debug) fprintf(stderr, "Shifting token %d (%s), ", yy_rs_char, yy_rs_tname[yy_rs_char1]); #endif /* Discard the token being shifted unless it is eof. */ if (yy_rs_char != YY_rs_EOF) yy_rs_char = YY_rs_EMPTY; *++yy_rs_vsp = yy_rs_lval; #ifdef YY_rs_LSP_NEEDED *++yy_rs_lsp = yy_rs_lloc; #endif /* count tokens shifted since error; after three, turn off error status. */ if (yy_rs_errstatus) yy_rs_errstatus--; yy_rs_state = yy_rs_n; goto yy_rs_newstate; /* Do the default action for the current state. */ yy_rs_default: yy_rs_n = yy_rs_defact[yy_rs_state]; if (yy_rs_n == 0) goto yy_rs_errlab; /* Do a reduction. yy_rs_n is the number of a rule to reduce with. */ yy_rs_reduce: yy_rs_len = yy_rs_r2[yy_rs_n]; if (yy_rs_len > 0) yy_rs_val = yy_rs_vsp[1-yy_rs_len]; /* implement default value of the action */ #if YY_rs_DEBUG != 0 if (yy_rs_debug) { int i; fprintf (stderr, "Reducing via rule %d (line %d), ", yy_rs_n, yy_rs_rline[yy_rs_n]); /* Print the symbols being reduced, and their result. */ for (i = yy_rs_prhs[yy_rs_n]; yy_rs_rhs[i] > 0; i++) fprintf (stderr, "%s ", yy_rs_tname[yy_rs_rhs[i]]); fprintf (stderr, " -> %s\n", yy_rs_tname[yy_rs_r1[yy_rs_n]]); } #endif switch (yy_rs_n) { case 3: #line 86 "run_str.y" {bc = yy_rs_vsp[0].myy_rs_int;; break;} case 4: #line 89 "run_str.y" {call_by_reference = 1;; break;} case 5: #line 91 "run_str.y" {call_by_reference = 0;; break;} case 6: #line 93 "run_str.y" {call_by_value = 1;; break;} case 7: #line 95 "run_str.y" {call_by_value = 0;; break;} case 8: #line 97 "run_str.y" {no_compile_only = 0;; break;} case 9: #line 100 "run_str.y" { if (help (2) == -1) return (-1); ; break;} case 10: #line 105 "run_str.y" { extern void dump_yacc PROTO((void)); dump_yacc (); ; break;} case 11: #line 111 "run_str.y" {dbg_symbols = 1;; break;} case 12: #line 114 "run_str.y" {handle_main = 1;; break;} case 13: #line 117 "run_str.y" { if (help (1) == -1) return (-1); ; break;} case 14: #line 123 "run_str.y" {argvv[++argc_counter] = yy_rs_vsp[0].myy_rs_string;; break;} case 15: #line 126 "run_str.y" { if (help (4) == -1) return (-1); ; break;} case 16: #line 132 "run_str.y" { if (help (5) == -1) return (-1); ; break;} case 17: #line 138 "run_str.y" {warning_yes = 1;; break;} case 18: #line 141 "run_str.y" {warning_aggregate_return = 1;; break;} case 19: #line 144 "run_str.y" {warning_comment = 1;; break;} case 20: #line 147 "run_str.y" {warnings_are_errors = 1;; break;} case 21: #line 150 "run_str.y" {warning_extra = 1;; break;} case 22: #line 153 "run_str.y" {warning_format = 1;; break;} case 23: #line 156 "run_str.y" {warning_implicit = 1;; break;} case 24: #line 159 "run_str.y" {warning_inhibit = 1;; break;} case 25: #line 162 "run_str.y" {warning_return_type = 1;; break;} case 26: #line 165 "run_str.y" {warning_trigraphs = 1;; break;} case 27: #line 168 "run_str.y" {warning_uninitialized = 1;; break;} case 28: #line 171 "run_str.y" {warning_unused = 1;; break;} case 29: #line 174 "run_str.y" { if (help (3) == -1) return (-1); ; break;} case 30: #line 180 "run_str.y" { error_message (7000); return (-1); ; break;} } /* the action file gets copied in in place of this dollarsign */ #line 498 "/usr/share/misc/bison.simple" yy_rs_vsp -= yy_rs_len; yy_rs_ssp -= yy_rs_len; #ifdef YY_rs_LSP_NEEDED yy_rs_lsp -= yy_rs_len; #endif #if YY_rs_DEBUG != 0 if (yy_rs_debug) { short *ssp1 = yy_rs_ss - 1; fprintf (stderr, "state stack now"); while (ssp1 != yy_rs_ssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif *++yy_rs_vsp = yy_rs_val; #ifdef YY_rs_LSP_NEEDED yy_rs_lsp++; if (yy_rs_len == 0) { yy_rs_lsp->first_line = yy_rs_lloc.first_line; yy_rs_lsp->first_column = yy_rs_lloc.first_column; yy_rs_lsp->last_line = (yy_rs_lsp-1)->last_line; yy_rs_lsp->last_column = (yy_rs_lsp-1)->last_column; yy_rs_lsp->text = 0; } else { yy_rs_lsp->last_line = (yy_rs_lsp+yy_rs_len-1)->last_line; yy_rs_lsp->last_column = (yy_rs_lsp+yy_rs_len-1)->last_column; } #endif /* Now "shift" the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yy_rs_n = yy_rs_r1[yy_rs_n]; yy_rs_state = yy_rs_pgoto[yy_rs_n - YY_rs_NTBASE] + *yy_rs_ssp; if (yy_rs_state >= 0 && yy_rs_state <= YY_rs_LAST && yy_rs_check[yy_rs_state] == *yy_rs_ssp) yy_rs_state = yy_rs_table[yy_rs_state]; else yy_rs_state = yy_rs_defgoto[yy_rs_n - YY_rs_NTBASE]; goto yy_rs_newstate; yy_rs_errlab: /* here on detecting error */ if (! yy_rs_errstatus) /* If not already recovering from an error, report this error. */ { ++yy_rs_nerrs; #ifdef YY_rs_ERROR_VERBOSE yy_rs_n = yy_rs_pact[yy_rs_state]; if (yy_rs_n > YY_rs_FLAG && yy_rs_n < YY_rs_LAST) { int size = 0; char *msg; int x, count; count = 0; /* Start X at -yy_rs_n if nec to avoid negative indexes in yy_rs_check. */ for (x = (yy_rs_n < 0 ? -yy_rs_n : 0); x < (sizeof(yy_rs_tname) / sizeof(char *)); x++) if (yy_rs_check[x + yy_rs_n] == x) size += strlen(yy_rs_tname[x]) + 15, count++; msg = (char *) malloc(size + 15); if (msg != 0) { strcpy(msg, "parse error"); if (count < 5) { count = 0; for (x = (yy_rs_n < 0 ? -yy_rs_n : 0); x < (sizeof(yy_rs_tname) / sizeof(char *)); x++) if (yy_rs_check[x + yy_rs_n] == x) { strcat(msg, count == 0 ? ", expecting `" : " or `"); strcat(msg, yy_rs_tname[x]); strcat(msg, "'"); count++; } } yy_rs_error(msg); free(msg); } else yy_rs_error ("parse error; also virtual memory exceeded"); } else #endif /* YY_rs_ERROR_VERBOSE */ yy_rs_error("parse error"); } goto yy_rs_errlab1; yy_rs_errlab1: /* here on error raised explicitly by an action */ if (yy_rs_errstatus == 3) { /* if just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input_rs_ */ if (yy_rs_char == YY_rs_EOF) YY_rs_ABORT; #if YY_rs_DEBUG != 0 if (yy_rs_debug) fprintf(stderr, "Discarding token %d (%s).\n", yy_rs_char, yy_rs_tname[yy_rs_char1]); #endif yy_rs_char = YY_rs_EMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yy_rs_errstatus = 3; /* Each real token shifted decrements this */ goto yy_rs_errhandle; yy_rs_errdefault: /* current state does not do anything special for the error token. */ #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ yy_rs_n = yy_rs_defact[yy_rs_state]; /* If its default is to accept any token, ok. Otherwise pop it.*/ if (yy_rs_n) goto yy_rs_default; #endif yy_rs_errpop: /* pop the current state because it cannot handle the error token */ if (yy_rs_ssp == yy_rs_ss) YY_rs_ABORT; yy_rs_vsp--; yy_rs_state = *--yy_rs_ssp; #ifdef YY_rs_LSP_NEEDED yy_rs_lsp--; #endif #if YY_rs_DEBUG != 0 if (yy_rs_debug) { short *ssp1 = yy_rs_ss - 1; fprintf (stderr, "Error: state stack now"); while (ssp1 != yy_rs_ssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif yy_rs_errhandle: yy_rs_n = yy_rs_pact[yy_rs_state]; if (yy_rs_n == YY_rs_FLAG) goto yy_rs_errdefault; yy_rs_n += YY_rs_TERROR; if (yy_rs_n < 0 || yy_rs_n > YY_rs_LAST || yy_rs_check[yy_rs_n] != YY_rs_TERROR) goto yy_rs_errdefault; yy_rs_n = yy_rs_table[yy_rs_n]; if (yy_rs_n < 0) { if (yy_rs_n == YY_rs_FLAG) goto yy_rs_errpop; yy_rs_n = -yy_rs_n; goto yy_rs_reduce; } else if (yy_rs_n == 0) goto yy_rs_errpop; if (yy_rs_n == YY_rs_FINAL) YY_rs_ACCEPT; #if YY_rs_DEBUG != 0 if (yy_rs_debug) fprintf(stderr, "Shifting error token, "); #endif *++yy_rs_vsp = yy_rs_lval; #ifdef YY_rs_LSP_NEEDED *++yy_rs_lsp = yy_rs_lloc; #endif yy_rs_state = yy_rs_n; goto yy_rs_newstate; } #line 185 "run_str.y" clif-0.93/rs-parser.h100644 1750 1750 1451 6646150114 13214 0ustar korenkorentypedef union { int myy_rs_int; char *myy_rs_string; } YY_rs_STYPE; #define NUMBER 258 #define STRING 259 #define BGC 260 #define HELP 261 #define COMPILE 262 #define WARNING 263 #define WARRANTY 264 #define COPYING 265 #define VERBOSE 266 #define VERSION 267 #define WARNING_INHIBIT 268 #define WARNING_COMMENT 269 #define WARNING_FORMAT 270 #define WARNING_IMPLICIT 271 #define WARNING_RETURN_TYPE 272 #define WARNING_TRIGRAPHS 273 #define WARNING_UNUSED 274 #define WARNING_UNINITIAL_rs_IZED 275 #define WARNING_EXTRA 276 #define WARNING_AGGREGATE_RETURN 277 #define WARNING_ERROR 278 #define HANDLE_MAIN 279 #define CALL_BY_REFERENCE 280 #define CALL_BY_VALUE 281 #define NO_CALL_BY_REFERENCE 282 #define NO_CALL_BY_VALUE 283 #define DUMP_YACC 284 #define DBG_INFO 285 extern YY_rs_STYPE yy_rs_lval; clif-0.93/run_str.h100444 1750 1750 2271 6343265610 12773 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * run_str.h */ #ifndef _RUN_STR_H #define _RUN_STR_H #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif extern char *argvv[]; extern int argc_counter; int yy_rs_parse PROTO((void)); /* Initialization of the run string compiler. */ void init_rs PROTO((int, char *[])); #endif clif-0.93/run_str.l100444 1750 1750 7420 6646147775 13021 0ustar korenkoren%{ /* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * run_str.l * * lex source for run string analysis */ #include #include #ifdef input #undef input #undef yywrap #endif #include"buf.h" #include"rs-parser.h" #include"init_rs.c" #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif #ifdef FLEX_SCANNER #define YY_NO_UNPUT #endif extern char *string PROTO((char *)); %} cifra [0-9] number {cifra}+ newline [\n] tab [ \t] becka [Bb] cecka [Cc] h [Hh] e [Ee] l [Ll] p [Pp] v [Vv] w [Ww] copying [Cc][Oo][Pp][Yy][Ii][Nn][Gg] warranty [Ww][Aa][Rr][Rr][Aa][Nn][Tt][Yy] verbose [Vv][Ee][Rr][Bb][Oo][Ss][Ee] version [Vv][Ee][Rr][Ss][Ii][Oo][Nn] alfa [A-Z_a-z0-9\.\/\\~] alfars {alfa}({alfa}|\-)* %% {tab} {} {newline} {;} {number} {sscanf (yytext, "%d", &yylval.myyint); return (NUMBER); /* * Matches an integer number. */} \-{becka}{cecka} {return (BGC);} \/{becka}{cecka} {return (BGC); /* * Redefining of size of framework memory. */} \-dy {return (DUMP_YACC);} \-fcall\-by\-reference {return (CALL_BY_REFERENCE);} \-fno\-call\-by\-reference {return (NO_CALL_BY_REFERENCE);} \-fcall\-by\-value {return (CALL_BY_VALUE);} \-fno\-call\-by\-value {return (NO_CALL_BY_VALUE);} \-fhandle\-main {return (HANDLE_MAIN);} \-g {return (DBG_INFO);} \--{h}{e}{l}{p} {return (HELP);} \-{h}{e}{l}{p} {return (HELP);} \/{h}{e}{l}{p} {return (HELP); /* * Starts a help. */} \-{h} {return (HELP); /* Starts a help. */} \/{h} {return (HELP); /* Starts a help. */} \-\? {return (HELP); /* Starts a help */} \/\? {return (HELP); /* Starts a help */} \/{cecka} {return (COPYING); /* Starts copying policy */} \--{copying} {return (COPYING);} \-{copying} {return (COPYING);} \-w {return (WARNING_INHIBIT); /* Starts warranty */} \/{w} {return (WARRANTY); /* Starts warranty */} \--{warranty} {return (WARRANTY);} \-{warranty} {return (WARRANTY);} \-c {return (COMPILE); /* Starts compiling only */} \-W {return (WARNING_EXTRA);} \-Waggregate\-return {return (WARNING_AGGREGATE_RETURN);} \-Wcomment {return (WARNING_COMMENT);} \-Werror {return (WARNING_ERROR);} \-Wformat {return (WARNING_FORMAT);} \-Wimplicit {return (WARNING_IMPLICIT);} \-Wreturn\-type {return (WARNING_RETURN_TYPE);} \-Wtrigraphs {return (WARNING_TRIGRAPHS);} \-Wunitialized {return (WARNING_UNINITIALIZED);} \-Wunused {return (WARNING_UNUSED);} \-Wall {return (WARNING); /* Prints warnings as well */} \--{v} {return (VERSION); /* Prints version number */} \-{v} {return (VERSION); /* Prints version number */} \--{version} {return (VERSION); /* Prints version number */} \-{version} {return (VERSION); /* Prints version number */} \--{verbose} {return (VERBOSE); /* Prints message about environment */} \-{verbose} {return (VERBOSE); /* Prints message about environment */} {alfars} {/* * Other run string parameters. */ yylval.myystring = string (yytext); return(STRING);} . {return (*yytext);} %% clif-0.93/run_str.y100444 1750 1750 6554 6646150107 13024 0ustar korenkoren/* -*-c-*- Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * run_str_y * * grammar for run string parsing (yacc specification) */ %union { int myyint; char *myystring; } %token NUMBER /* integer constant */ %token STRING %token BGC HELP %token COMPILE WARNING %token WARRANTY COPYING %token VERBOSE VERSION %token '=' %token WARNING_INHIBIT %token WARNING_COMMENT WARNING_FORMAT WARNING_IMPLICIT WARNING_RETURN_TYPE %token WARNING_TRIGRAPHS %token WARNING_UNUSED WARNING_UNINITIALIZED %token WARNING_EXTRA WARNING_AGGREGATE_RETURN %token WARNING_ERROR %token HANDLE_MAIN %token CALL_BY_REFERENCE CALL_BY_VALUE %token NO_CALL_BY_REFERENCE NO_CALL_BY_VALUE %token DUMP_YACC DBG_INFO %start list_stat_0 %{ #include #include "flags.h" int argc_counter = 0; extern int bc; char *argvv[100]; #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif extern int help PROTO((int)); int yylex PROTO((void)); void error_message PROTO((int)); int yyerror PROTO((char *)); int yyerror (s) char *s; { return (0); } %} %% /* beginnig of rules section */ list_stat_0 : list_stat_0 stat_0 | ; stat_0 : BGC '=' NUMBER {bc = $3;} | CALL_BY_REFERENCE {call_by_reference = 1;} | NO_CALL_BY_REFERENCE {call_by_reference = 0;} | CALL_BY_VALUE {call_by_value = 1;} | NO_CALL_BY_VALUE {call_by_value = 0;} | COMPILE {no_compile_only = 0;} | COPYING { if (help (2) == -1) return (-1); } | DUMP_YACC { extern void dump_yacc PROTO((void)); dump_yacc (); } | DBG_INFO {dbg_symbols = 1;} | HANDLE_MAIN {handle_main = 1;} | HELP { if (help (1) == -1) return (-1); } | STRING {argvv[++argc_counter] = $1;} | VERBOSE { if (help (4) == -1) return (-1); } | VERSION { if (help (5) == -1) return (-1); } | WARNING {warning_yes = 1;} | WARNING_AGGREGATE_RETURN {warning_aggregate_return = 1;} | WARNING_COMMENT {warning_comment = 1;} | WARNING_ERROR {warnings_are_errors = 1;} | WARNING_EXTRA {warning_extra = 1;} | WARNING_FORMAT {warning_format = 1;} | WARNING_IMPLICIT {warning_implicit = 1;} | WARNING_INHIBIT {warning_inhibit = 1;} | WARNING_RETURN_TYPE {warning_return_type = 1;} | WARNING_TRIGRAPHS {warning_trigraphs = 1;} | WARNING_UNINITIALIZED {warning_uninitialized = 1;} | WARNING_UNUSED {warning_unused = 1;} | WARRANTY { if (help (3) == -1) return (-1); } | error { error_message (7000); return (-1); } ; %% clif-0.93/running_notes100644 1750 1750 4226 7130607462 13745 0ustar korenkoren----- now ----- [13.5] in function point error_message (1000) can be issued with bad variable name. [13.4] there is a problem with line number reporting in error message for the following code: int main () { struct a { int a; double b; }; int ; struct a b; return 0; } there is the following error message: tests/test62.ci:11: warning: useless keyword or type name in empty declaration tests/test62.ci:11: warning: empty declaration Instead of line 11 line 9 should be reported. [13.3] semantic for instruction MOV minor for a pointer type. Extern function with a pointer return type. [13.2] add semantic for static functions. It should be only one table ident_tab and ident_tab_loc. Put there everything you need. Update point_call. [13.1] compare2trees - extend to new fields in internal_type [12.] conditional_expression - check if both parts have the same type [10.] checking the alignment of the kodp after declaration of global variables. [10.1] add semantic for all definitions and declarations in . [8.] no more than 257 labels in one switch statement (excluding those for any nested switch statements). [7.] add nesting scope, tables should be connected as double pointed list. Never free the table, just make it not valid. [6.] add chain for local variables to simplify clear_has_tab() function. Only entries will be cleared, not whole table. (a possibility is to delete identtab_loc of the exited scope (identtab_loc = identtab_loc->previous) and then deallocate (BLOCK) when scope_level == 0) [5.] Library flag not fully supported yet. [4.] goto supported. But we have to check whole table on returning to level zero each time. [4.1] create new hash table for the goto labels this is checked when the compiler is returning to the level zero. all addresses at the label are fixed. [4.2] see standard for the size of the table [4.3] goto is not supported in the level zero [3.] types not fully supported yet. [2.] ANSI 6.1.7 Header names skipped. [1.] switch case can be reimplemented using hashing. problem is what to postpone for hashing. Whole arithmetic part of label? How fix it, save source parts in fix structure? clif-0.93/rw.c100444 1750 1750 6370 6354716100 11723 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * rw.c * * This program is started when graphical window is opened. * It controls window events. If it is ExposureMask it redraws * whole window. It is suitable for window managers which these * events cannot process. */ #include #include #include XGCValues value; XEvent event; XWindowAttributes root_window_att; XSetWindowAttributes mywin_att; GC default_gc,set_gc; Window root,mywin; Pixmap mypix; Display *disp; int screen; int width, height; int x=0,y=0; unsigned int width_w, height_w,border=3; unsigned long bord=1L,back=0L; char znak; #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif int main PROTO((int, char **, char**)); extern void mysigignore PROTO((void)); int main (argc, argv, envp) int argc; char **argv, **envp; { #if 0 int cnt; printf (" starts in fork\n"); #endif /* * Function for ignoring interrupts. */ mysigignore (); /* * Parameters from parent process. */ mywin = atol (argv[1]); mypix = atol (argv[2]); if ((disp = XOpenDisplay (NULL)) == NULL) { printf (" XOpen fails \n"); return (-1); } #if 0 XSynchronize (disp, 1); #endif root = XDefaultRootWindow (disp); screen = XDefaultScreen (disp); if (!XGetWindowAttributes (disp, mywin, &root_window_att)) { printf ("get window att failed \n"); abort (); } width = XDisplayWidth (disp, screen); height = XDisplayHeight (disp, screen); #if 0 printf ("w: %d, h: %d \n", width, height); #endif default_gc = XDefaultGC (disp, screen); #if 0 XSetState (disp, default_gc, 0L, 0L, GXcopy, 0xffffffffL); printf ("xsetstate in fork\n"); #endif /* * Event selection. */ XSelectInput (disp, mywin, ExposureMask|StructureNotifyMask|SubstructureNotifyMask|KeyPressMask); #if 0 printf ("xselectinput in fork\n"); #endif while (1) { /* * Processing of events. */ XWindowEvent (disp, mywin, ExposureMask|SubstructureNotifyMask|StructureNotifyMask, &event); #if 0 printf ("cnt = %d\n", cnt); printf ("%d\n", event.type); #endif if (event.type == 12) { XCopyArea (disp, mypix, mywin, default_gc, 0, 0, root_window_att.width, root_window_att.height, 0, 0); #if 0 printf ("xcopyarea\n"); #endif } if (event.type == 17) { #if 0 printf("destroynotify\n"); #endif exit (0); } } } clif-0.93/s-conv.c100444 1750 1750 33644 7130604240 12516 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1998, 2000 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* s-conv.c parsing of format strings and error checking. */ #define BACKSLASH '\\' #define SP ' ' #define ALERT '\a' #define BS '\b' #define FF '\f' #define NL '\n' #define CR '\r' #define HT '\t' #define VT '\v' #define HASH '#' #define DOT '.' #define STAR '*' #define CIRCUMFLEX '^' #define TICK '\'' extern int yyleng; #include "global.h" #include "allocx.h" #include "type.h" #include "struct.h" #include "comp_maint.h" #include "s-conv.h" #include "flags.h" extern FILEATTR spf[]; int num_args[256]; /* Number of arguments for function (extern or local). */ int args[256]; /* Counter for number of arguments for function (extern or local). Used when parsing a call. */ FORMAT_ARGS format_args[256][256]; static void alloc_type PROTO((struct internal_type **)); static void store_arg_type PROTO((int, int)); void s_conv (yytext) char *yytext; { int i, j, help, wide_string = 0; if (yytext[0] == 'L') { yytext++; wide_string = 1; } if (proc) num_args[proc] = args[proc] + 1; for (i = 1, j = 0; i < yyleng - 1; i++, j++) { if (BACKSLASH == yytext[i]) { switch (yytext[i + 1]) { case 'a': yytext[j] = ALERT; i++; break; case 'b': yytext[j] = BS; i++; break; case 'f': yytext[j] = FF; i++; break; case 'n': yytext[j] = NL; i++; break; case 'r': yytext[j] = CR; i++; break; case 't': yytext[j] = HT; i++; break; case 'v': yytext[j] = VT; i++; break; /* * Control characters */ case BACKSLASH : yytext[j] = BACKSLASH; i++; break; case NL : spf[s].line_counter++; yytext[j] = SP; i++; /* * Changes \new-line sequence * to space */ break; case 'x' : sscanf (&yytext[i + 2], "%2x", &help); i += 3; yytext[j] = help; break; case TICK: yytext[j] = TICK; i++; break; case '\"': yytext[j] = '\"'; /* " */ i++; break; } } else if ('%' == yytext[i] && '%' != yytext[i + 1]) { num_args[proc]++; if (! warning_yes && ! warning_comment) { yytext[j] = yytext[i]; continue; } yytext[j++] = yytext[i++]; if (wide_string == 1) { error_message (6018); wide_string++; } while (1) { if ('-' == yytext[i] || '+' == yytext[i] || HASH == yytext[i]) { yytext[j++] = yytext[i++]; continue; } else if (SP == yytext[i]) { if (SP == yytext[j - 1]) error_message (6020); else yytext[j++] = yytext[i++]; continue; } else if ('0' <= yytext[i] && '9' >= yytext[i]) { yytext[j++] = yytext[i++]; continue; } else if (DOT == yytext[i]) { yytext[j++] = yytext[i++]; continue; } else if (STAR == yytext[i]) { yytext[j++] = yytext[i++]; continue; } else if ('h' == yytext[i]) { yytext[j++] = yytext[i++]; continue; } else if ('l' == yytext[i] || 'L' == yytext[i]) { yytext[j++] = yytext[i++]; continue; } else if (0 == yytext[i]) { if ('%' == yytext[j - 1]) error_message (6018); else error_message (6021); break; } else if ('d' == yytext[i] || 'i' == yytext[i]) { alloc_type (&typeh[++type_spec_count]); typeh[type_spec_count]->attribute.arit_class = INTEGER; if ('l' == yytext[j - 1]) typeh[type_spec_count]->attribute.arit_class += LONG_AC; else if ('L' == yytext[j - 1]) error_message (6015, num_args[proc]); else if ('h' == yytext[j - 1]) typeh[type_spec_count]->attribute.arit_class += SHORT_AC; store_arg_type (proc, num_args[proc]); yytext[j] = yytext[i]; break; } else if ('o' == yytext[i] || 'u' == yytext[i] || 'x' == yytext[i] || 'X' == yytext[i]) { alloc_type (&typeh[++type_spec_count]); typeh[type_spec_count]->attribute.arit_class = INTEGER; typeh[type_spec_count]->attribute.arit_class += UNSIGNED_AC; if ('l' == yytext[j - 1]) typeh[type_spec_count]->attribute.arit_class += LONG_AC; else if ('L' == yytext[j - 1]) error_message (6016, num_args[proc]); else if ('h' == yytext[j - 1]) typeh[type_spec_count]->attribute.arit_class += SHORT_AC; store_arg_type (proc, num_args[proc]); yytext[j] = yytext[i]; break; } else if ('f' == yytext[i]) { alloc_type (&typeh[++type_spec_count]); typeh[type_spec_count]->attribute.arit_class = FLT; if (('l' == yytext[j - 1] || 'h' == yytext[j - 1]) && PRINTF_P) error_message (6014, yytext[j - 1], yytext[i]); else if ('l' == yytext[j - 1] && SCANF_P) typeh[type_spec_count]->attribute.arit_class = DOUB; else if ('L' == yytext[j - 1]) typeh[type_spec_count]->attribute.arit_class += LONG_AC; store_arg_type (proc, num_args[proc]); yytext[j] = yytext[i]; break; } else if ('e' == yytext[i] || 'E' == yytext[i] || 'g' == yytext[i] || 'G' == yytext[i]) { alloc_type (&typeh[++type_spec_count]); typeh[type_spec_count]->attribute.arit_class = DOUB; if ('l' == yytext[j - 1] || 'h' == yytext[j - 1]) error_message (6014, yytext[j - 1], yytext[i]); else if ('L' == yytext[j - 1]) typeh[type_spec_count]->attribute.arit_class += LONG_AC; store_arg_type (proc, num_args[proc]); yytext[j] = yytext[i]; break; } else if ('c' == yytext[i]) { alloc_type (&typeh[++type_spec_count]); typeh[type_spec_count]->attribute.arit_class = CHR; typeh[type_spec_count]->attribute.arit_class += UNSIGNED_AC; if ('l' == yytext[j - 1] || 'L' == yytext[j - 1]) error_message (6014, yytext[j - 1], yytext[i]); else if ('h' == yytext[j - 1]) typeh[type_spec_count]->attribute.arit_class += SHORT_AC; store_arg_type (proc, num_args[proc]); yytext[j] = yytext[i]; break; } else if ('s' == yytext[i]) { struct internal_type *array; alloc_type (&array); array->attribute.arit_class = CHR; array->attribute.arit_class += UNSIGNED_AC; if ('l' == yytext[j - 1]) { struct internal_type *error_type; alloc_type (&error_type); error_type->attribute.arit_class = INTEGER; error_message (6017, error_type, num_args[proc]); } else if ('L' == yytext[j - 1]) error_message (6014, yytext[j - 1], yytext[i]); else if ('h' == yytext[j - 1]) array->attribute.arit_class += SHORT_AC; alloc_type (&typeh[++type_spec_count]); typeh[type_spec_count]->attribute.function_class = ARRAY; typeh[type_spec_count]->output = array; store_arg_type (proc, num_args[proc]); yytext[j] = yytext[i]; break; } else if ('p' == yytext[i]) { struct internal_type *pointer; alloc_type (&pointer); pointer->attribute.arit_class = VID; if ('l' == yytext[j - 1] || 'L' == yytext[j - 1] || 'h' == yytext[j - 1]) error_message (6014, yytext[j - 1], yytext[i]); alloc_type (&typeh[++type_spec_count]); typeh[type_spec_count]->attribute.function_class = POINTER; typeh[type_spec_count]->output = pointer; store_arg_type (proc, num_args[proc]); yytext[j] = yytext[i]; break; } else if ('n' == yytext[i]) { struct internal_type *pointer; alloc_type (&pointer); pointer->attribute.arit_class = INTEGER; if ('l' == yytext[j - 1]) pointer->attribute.arit_class += LONG_AC; else if ('L' == yytext[j - 1]) error_message (6014, yytext[j - 1], yytext[i]); else if ('h' == yytext[j - 1]) pointer->attribute.arit_class += SHORT_AC; alloc_type (&typeh[++type_spec_count]); typeh[type_spec_count]->attribute.function_class = POINTER; typeh[type_spec_count]->output = pointer; store_arg_type (proc, num_args[proc]); yytext[j] = yytext[i]; break; } else if ('[' == yytext[i] && SCANF_P) { struct internal_type *array; alloc_type (&array); array->attribute.arit_class = CHR; array->attribute.arit_class += UNSIGNED_AC; yytext[j++] = yytext[i++]; if (']' == yytext[i]) yytext[j++] = yytext[i++]; else if (CIRCUMFLEX == yytext[i] && ']' == yytext[i + 1]) { yytext[j++] = yytext[i++]; yytext[j++] = yytext[i++]; } while (']' != yytext[i] && '\0' != yytext[i]) yytext[j++] = yytext[i++]; alloc_type (&typeh[++type_spec_count]); typeh[type_spec_count]->attribute.function_class = ARRAY; typeh[type_spec_count]->output = array; store_arg_type (proc, num_args[proc]); yytext[j] = yytext[i]; break; } else { error_message (6019); break; } } } else if ('%' == yytext[i] && '%' == yytext[i + 1]) { yytext[j++] = yytext[i++]; yytext[j] = yytext[i]; } else if ('?' == yytext[i] && '?' == yytext[i + 1]) { error_message (6032); /* Brain-damaged trihraphs handling. */ switch (yytext[i + 2]) { case '=': yytext[j] = HASH; i += 2; break; case '(': yytext[j] = '['; i += 2; break; case '/': yytext[j] = BACKSLASH; i += 2; if ('\0' != yytext[i + 1]) { register int k; /* We have to re-process the escape characters. First, copy string to the new location. (We have replaced the trigraph '??/' already.) Then, all control variables (i, j, yyleng) must be reset. */ yytext[j + 1] = yytext[++i]; for (k = j + 2, i++; '\0' != yytext[i]; k++, i++) yytext[k] = yytext[i]; /* Should be null all the time. */ yytext[k] = yytext[i]; /* We have to change the yyleng, because the string shrunk. */ yyleng = k; j--; i = j; } break; case ')': yytext[j] = ']'; i += 2; break; case TICK: yytext[j] = CIRCUMFLEX; i += 2; break; case '<': yytext[j] = '{'; i += 2; break; case '!': yytext[j] = '|'; i += 2; break; case '>': yytext[j] = '}'; i += 2; break; case '-': yytext[j] = '~'; i += 2; break; default: yytext[j] = yytext[i]; } } else if ('"' == yytext[i]) { char *buf = NULL; while ('"' != yytext[++i]) if ('L' == yytext[i] && '"' == yytext[i + 1]) wide_string++; else if (' ' == yytext[i] || '\t' == yytext[i] || '\v' == yytext[i] || '\b' == yytext[i] || '\f' == yytext[i]) ; else if ('\n' == yytext[i] || '\r' == yytext[i]) { extern int s; extern FILEATTR spf[]; spf[s].line_counter++; } else if ('\0' == yytext[i]) break; else { buf = yytext + i; break; } if (buf) { while (' ' != yytext[i] && '\t' != yytext[i] && '\n' != yytext[i] && '\r' != yytext[i] && '\f' != yytext[i] && '\v' != yytext[i] && '\0' != yytext[i] && '\"' != yytext[i]) i++; yytext[i] = '\0'; error_message (1004, buf); } j--; } else yytext[j] = yytext[i]; } if (proc && wide_string) error_message (6023); yytext[j] = '\0'; } static void alloc_type (type) struct internal_type **type; { *type = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)*type, sizeof(struct internal_type)); (*type)->attribute.function_class = SIMPLE; (*type)->attribute.type_qualifier = UNDEF_TQ; } /* Types of arguments are stored in the array for later checking. */ static void store_arg_type (proc, num) int proc, num; { format_args[proc][num] = typeh[type_spec_count]; typeh[type_spec_count--] = NULL; } /* Checks if the argument is compatible with the specified format. */ void compare_format_args (type1, type2, type) struct internal_type *type1, *type2; enum intern_arit_class type; { if (NULL == type1 && NULL == type2) return; else if (NULL == type1 && NULL != type2) { if (! ARRAY_P(type2) || ! CHAR_P(type2->output)) error_message (6022); return; } else if (NULL != type1 && NULL == type2) { error_message (6021); return; } if (call_by_value && SCANF_P && POINTER_P(type2)) { type2 = type2->output; type = type2->attribute.arit_class; } if ((POINTER_P(type1) && POINTER_P(type2)) || (POINTER_P(type1) && ARRAY_P(type2)) || (ARRAY_P(type1) && POINTER_P(type2)) || (ARRAY_P(type1) && ARRAY_P(type2))) { if (! VOID_P(type1->output) && ! TYPES_EQ_P(type1->output, type2->output) && (! (CHAR_P(type1->output) && INTEGER_P(type2->output)) || (INTEGER_P(type1->output) && CHAR_P(type2->output)))) error_message (6017, type1, args[proc]); } else if (DOUBLE_P(type1) && (type & FLT)) { gen_cast_needed (); } else if (! (type1->attribute.arit_class & type) && ! (INTEGER_P(type1) && (type & CHR))) error_message (6017, type1, args[proc]); else if (! (ARRAY_P(type1) || POINTER_P(type1)) && (ARRAY_P(type2) || POINTER_P(type2))) error_message (6031, type1, args[proc]); } clif-0.93/s-conv.h100444 1750 1750 1301 6505736254 12504 0ustar korenkoren#ifndef _S_CONV_H_ #define _S_CONV_H_ #define PRINTF_P (!strcmp (proc_name_text[proc], "printf") || \ !strcmp (proc_name_text[proc], "fprintf")) #define SCANF_P (!strcmp (proc_name_text[proc], "scanf") || \ !strcmp (proc_name_text[proc], "fscanf")) extern int num_args[]; /* Number of arguments for function (extern or local). */ extern int args[]; /* Counter for number of arguments for function (extern or local). Used when parsing a call. */ typedef struct internal_type *FORMAT_ARGS; extern FORMAT_ARGS format_args[][256]; extern void compare_format_args PROTO((struct internal_type *, struct internal_type *, enum intern_arit_class)); #endif clif-0.93/sig-bsd.c100444 1750 1750 6350 6520117247 12623 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * sig-bsd.c * * Functions for framework interrupt handling. */ #include "global.h" #include "config.h" #include #include #include #include #include #include #define OFF(x, y) (x) & (~(y)) #define ON(x, y) (x) | (y) #define SPACE 0x20 #define NL '\n' int handler = 0; int handle_fd; struct termio term, term_initial; struct sigvec vec, ovec; RETSIGTYPE (*interrupt_handler) PROTO((void)); RETSIGTYPE interrupt_service PROTO((void)); void interrupt_register PROTO((void)); void term_restore PROTO((void)); RETSIGTYPE fatal_handler PROTO((void)); void fatal_handler_register PROTO((void)); extern jmp_buf jmpbuf; extern int error_count; /* \verbatim{sig_bsd_c_interrupt_service.tex} */ /* * Asynchronous interrupt service. */ RETSIGTYPE interrupt_service () { #ifdef DEBUG_INTER printfx ("interrupt\n"); #endif if ((clif_interrupt_level > 0) || (!virtual_machine_suspended)) /* * Test of the virtual machine running and the level of interrupt. * An interrupt is only accepted if the virtual machine is running. */ { #ifdef DEBUG_INTER printfx ("virtual machine is running, interrupt accepted\n"); #endif handler = 1; #ifdef HAVE_TIOCSTI ioctl (handle_fd, TIOCSTI, "\n"); #endif } return; } /* \verbatim */ /* \verbatim{sig_bsd_c_interrupt_handler.tex} */ /* * Registers interrupt handler. */ void interrupt_register () { interrupt_handler = interrupt_service; handle_fd = fileno (stdin); ioctl (handle_fd, TCGETA, &term); term_initial = term; term.c_cc[0] = 0x14; /* DC4 */ term.c_cc[5] = 0x12; /* DC2 */ ioctl (handle_fd, TCSETA, &term); vec.sv_handler = interrupt_handler; sigvec (SIGINT, &vec, &ovec); } /* \verbatim */ /* * Synchronous interrupt service. */ void interrupt_service_sync () { handler = 1; } /* * Restores setting of the terminal at the termination of Clif session. */ void term_restore () { ioctl (handle_fd, TCSETA, &term_initial); } RETSIGTYPE fatal_handler () { if (error_count) longjmp (jmpbuf, 1); { struct sigvec vec, ovec; vec.sv_handler = SIG_DFL; sigvec (SIGFPE, &vec, &ovec); sigvec (SIGSEGV, &vec, &ovec); } } void fatal_handler_register () { struct sigvec vec, ovec; vec.sv_handler = fatal_handler; if (sigvec (SIGFPE, &vec, &ovec) < 0) error_message (4004); if (sigvec (SIGSEGV, &vec, &ovec) < 0) error_message (4004); } clif-0.93/sig-lin.c100444 1750 1750 6231 6520116645 12634 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * sig-lin.c * * Functions for framework interrupt handling. */ #include "global.h" #include "config.h" #include #include #include #include #include #include #define OFF(x, y) (x) & (~(y)) #define ON(x, y) (x) | (y) #define SPACE 0x20 #define NL '\n' int handler = 0; int handle_fd; struct termio term, term_initial; struct sigvec vec, ovec; RETSIGTYPE (*interrupt_handler) PROTO((int)); RETSIGTYPE interrupt_service PROTO((int)); void interrupt_register PROTO((void)); void term_restore PROTO((void)); RETSIGTYPE fatal_handler PROTO((int)); void fatal_handler_register PROTO((void)); extern jmp_buf jmpbuf; extern int error_count; /* * Registers interrupt handler. */ void interrupt_register () { interrupt_handler = interrupt_service; handle_fd = fileno (stdin); ioctl (handle_fd, TCGETA, &term); term_initial = term; term.c_cc[0] = 0x14; /* DC4 */ term.c_cc[5] = 0x12; /* DC2 */ ioctl (handle_fd, TCSETA, &term); vec.sv_handler = interrupt_handler; sigvec (SIGINT, &vec, &ovec); } /* * Asynchronous interrupt handler. */ RETSIGTYPE interrupt_service (signo) int signo; { #ifdef DEBUG_INTER printfx ("interrupt\n"); #endif if ((clif_interrupt_level > 0) || (!virtual_machine_suspended)) /* * Test of the virtual machine running and the level of a interrupt. * Interrupt is only accepted if the virtual machine is running. */ { #ifdef DEBUG_INTER printfx ("virtual machine is running, interrupt accepted\n"); #endif handler = 1; #ifdef HAVE_TIOCSTI ioctl (handle_fd, TIOCSTI, "\n"); #endif } return; } /* * Synchronous interrupt service. */ void interrupt_service_sync () { handler = 1; } /* * Restores setting of the terminal at the termination of Clif session. */ void term_restore () { ioctl (handle_fd, TCSETA, &term_initial); } RETSIGTYPE fatal_handler (signo) int signo; { if (signo != SIGFPE && signo != SIGSEGV) return; if (error_count) longjmp (jmpbuf, 1); { struct sigvec vec, ovec; vec.sv_handler = SIG_DFL; sigvec (signo, &vec, &ovec); } } void fatal_handler_register () { struct sigvec vec, ovec; vec.sv_handler = fatal_handler; if (sigvec (SIGFPE, &vec, &ovec) < 0) error_message (4004); if (sigvec (SIGSEGV, &vec, &ovec) < 0) error_message (4004); } clif-0.93/sig-posix.c100444 1750 1750 6571 6520117320 13212 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992 - 1998 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * inter_handl_posix.c * * Functions for framework interrupt handling. */ #include "global.h" #include "config.h" #include #include #include #include #define OFF(x, y) (x) & (~(y)) #define ON(x, y) (x) | (y) #define NL '\n' int handler = 0; static int handle_fd; static struct termios term, term_initial; static struct sigaction act, oact; RETSIGTYPE (*interrupt_handler) PROTO((int)); RETSIGTYPE interrupt_service PROTO((int)); void interrupt_register PROTO((void)); void term_restore PROTO((void)); RETSIGTYPE fatal_handler PROTO((int)); void fatal_handler_register PROTO((void)); extern jmp_buf jmpbuf; extern int error_count; /* * Asynchronous interrupt service. */ RETSIGTYPE interrupt_service (signo) int signo; { #ifdef DEBUG_INTER printfx ("interrupt\n"); #endif if (clif_interrupt_level || ! virtual_machine_suspended) /* * Test of the virtual machine running and the level of interrupt. * An interrupt is only accepted if the virtual machine is running. */ { #ifdef DEBUG_INTER printfx ("virtual machine is running, interrupt accepted\n"); #endif handler = 1; } return; } /* * Registers interrupt handler. */ void interrupt_register () { interrupt_handler = interrupt_service; handle_fd = fileno (stdin); if (tcgetattr (handle_fd, &term) != 0) perror ("tcgetattr"); term_initial = term; term.c_cc[0] = 0x14; /* DC4 */ term.c_cc[5] = 0x12; /* DC2 */ if (tcsetattr (handle_fd, TCSANOW, &term) != 0) perror ("tcsetattr"); act.sa_handler = interrupt_handler; sigemptyset (&act.sa_mask); act.sa_flags = 0; #ifdef SA_INTERRUPT /* SunOS */ act.sa_flags |= SA_INTERRUPT; #endif if (sigaction (SIGINT, &act, &oact) < 0) error_message (4004); } /* * Synchronous interrupt service. */ void interrupt_service_sync () { handler = 1; } /* * Restores setting of the terminal at the termination of Clif session. */ void term_restore () { tcsetattr (handle_fd, TCSANOW, &term_initial); } RETSIGTYPE fatal_handler (signo) int signo; { if (signo != SIGFPE && signo != SIGSEGV) return; if (error_count) longjmp (jmpbuf, 1); { struct sigaction act, oact; act.sa_handler = SIG_DFL; sigemptyset (&act.sa_mask); act.sa_flags = SA_RESETHAND; sigaction (signo, &act, &oact); } } void fatal_handler_register () { struct sigaction act, oact; act.sa_handler = fatal_handler; sigemptyset (&act.sa_mask); act.sa_flags = 0; if (sigaction (SIGFPE, &act, &oact) < 0) error_message (4004); if (sigaction (SIGSEGV, &act, &oact) < 0) error_message (4004); } clif-0.93/sig-svr3.c100444 1750 1750 6346 6520117011 12742 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * sig-svr3.c * * Functions for framework interrupt handling and fatal error * handling. */ #include #include "global.h" #include "config.h" /* \verbatim{sig_svr3_c_interrupt_handler.tex} */ #include #include #include #include #define OFF(x, y) (x) & (~(y)) #define ON(x, y) (x) | (y) #define SPACE 0x20 #define NL '\n' int handler = 0; int handle_fd; struct termio term,term_initial; RETSIGTYPE (*interrupt_handler) (void); RETSIGTYPE interrupt_service PROTO((void)); void interrupt_register PROTO((void)); void term_restore PROTO((void)); RETSIGTYPE fatal_handler PROTO((void)); void fatal_handler_register PROTO((void)); extern jmp_buf jmpbuf; extern int error_count; /* * Registers interrupt handler. */ void interrupt_register () { interrupt_handler = interrupt_service; handle_fd = fileno (stdin); ioctl (handle_fd, TCGETA, &term); term_initial = term; term.c_cc[0] = 0x14; /* DC4 */ term.c_cc[5] = 0x12; /* DC2 */ term.c_lflag = OFF(term.c_lflag, LNEW_CTLECH); /* dalsi flag ktory ma pre nas vyznam je : term.c_lflag=ON(term.c_lflag,NOFLSH);*/ ioctl (handle_fd, TCSETA, &term); sigset (SIGINT, interrupt_handler); } /* \verbatim */ /* \verbatim{sig_svr3_c_interrupt_service.tex} */ /* * Asynchronous interrupt handler. */ void interrupt_service () { #ifdef DEBUG_INTER printfx ("interrupt\n"); #endif if ((clif_interrupt_level > 0) || (!virtual_machine_suspended)) /* * Test of the virtual machine running and the level of interrupt. * Interrupt is only accepted if the virtual machine is running. */ { #ifdef DEBUG_INTER printfx ("virtual machine is running, interrupt accepted\n"); #endif handler = 1; } return; } /* \verbatim */ /* \verbatim{sig_svr3_c_interrupt_service_sync.tex} */ /* * Synchronous interrupt service. */ void interrupt_service_sync () { handler = 1; } /* \verbatim */ /* \verbatim{sig_svr3_c_term_restore.tex} */ /* * Restores setting of the terminal at the termination of Clif session. */ void term_restore () { ioctl (handle_fd, TCSETA, &term_initial); } /* \verbatim */ RETSIGTYPE fatal_handler () { if (error_count) longjmp (jmpbuf, 1); sigset (SIGFPE, SIG_DFL); sigset (SIGSEGV, SIG_DFL); } void fatal_handler_register () { if (sigset (SIGFPE, fatal_handler) < 0) error_message (4004); if (sigset (SIGSEGV, fatal_handler) < 0) error_message (4004); } clif-0.93/sig-svr4.c100444 1750 1750 5632 6520117126 12747 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * sig-svr4.c * * Functions for framework interrupt handling and fatal error * handling. */ #include "global.h" #include "config.h" #include #include #include #include #include #include #define OFF(x, y) (x) & (~(y)) #define ON(x, y) (x) | (y) #define NL '\n' int handler = 0; int handle_fd; struct termio term,term_initial; RETSIGTYPE (*interrupt_handler) PROTO((int)); RETSIGTYPE interrupt_service PROTO((int)); void interrupt_register PROTO((void)); void term_restore PROTO((void)); RETSIGTYPE fatal_handler PROTO((int)); void fatal_handler_register PROTO((void)); extern jmp_buf jmpbuf; extern int error_count; /* * Asynchronous interrupt service. */ RETSIGTYPE interrupt_service (signo) int signo; { #ifdef DEBUG_INTER printfx("interrupt\n"); #endif if((clif_interrupt_level > 0) || (!virtual_machine_suspended)) /* * Test of the virtual machine running and the level of interrupt. * An interrupt is only accepted if the virtual machine is running. */ { #ifdef DEBUG_INTER printfx("virtual machine is running, interrupt accepted\n"); #endif handler = 1; } return; } /* * Registers interrupt handler. */ void interrupt_register () { interrupt_handler = interrupt_service; handle_fd = fileno(stdin); ioctl(handle_fd,TCGETA,&term); term_initial = term; term.c_cc[0] = 0x14; /* DC4 */ term.c_cc[5] = 0x12; /* DC2 */ ioctl (handle_fd,TCSETA,&term); (void) sigset (SIGINT, interrupt_handler); } /* * Synchronous interrupt service. */ void interrupt_service_sync () { handler = 1; } /* * Restores setting of the terminal at the termination of Clif session. */ void term_restore () { ioctl (handle_fd, TCSETA, &term_initial); } RETSIGTYPE fatal_handler (signo) int signo; { if (signo != SIGFPE && signo != SIGSEGV) return; if (error_count) longjmp (jmpbuf, 1); sigset (signo, SIG_DFL); } void fatal_handler_register () { if (sigset (SIGFPE, fatal_handler) < 0) error_message (4004); if (sigset (SIGSEGV, fatal_handler) < 0) error_message (4004); } clif-0.93/sigig.c100444 1750 1750 533 6400047670 12351 0ustar korenkoren/* * sigig.c * * Ignores interrupts in a fork-ed process. * It is used from rw.c file. */ #include #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif void mysigignore PROTO((void)); void mysigignore () { sigignore (SIGINT); } clif-0.93/sigig_bsd.c100444 1750 1750 663 6400056044 13200 0ustar korenkoren/* * sigig_bsd.c * * Ignores interrupts in a fork-ed process. * It is used from rw.c file. */ #include struct sigvec vec_fork,ovec_fork; #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif void mysigignore PROTO((void)); void mysigignore() { vec_fork.sv_handler = SIG_IGN; sigvec(SIGINT, &vec_fork, &ovec_fork); } clif-0.93/sigig_lin.c100444 1750 1750 675 6400047024 13213 0ustar korenkoren/* * sigig_lin.c * * Ignores interrupts in a fork-ed process. * It is used from rw.c file. */ #include struct sigvec vec_fork, ovec_fork; #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif void mysigignore PROTO((void)); void mysigignore () { vec_fork.sv_handler = SIG_IGN; sigvec (SIGINT, &vec_fork, &ovec_fork); } clif-0.93/sigig_posix.c100444 1750 1750 2457 6461676124 13633 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992 - 1998 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * sigig_posix.c * * Ignores interrupts in a fork-ed process. * It is used from rw.c file. */ #include #include static struct sigaction act, oact; #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif void mysigignore PROTO((void)); void mysigignore() { act.sa_handler = SIG_IGN; sigemptyset(&act.sa_mask); act.sa_flags = 0; if (sigaction (SIGINT, &act, &oact) < 0) perror ("sigaction"); } clif-0.93/small.hlp100444 1750 1750 501 6023076730 12713 0ustar korenkoren Call program by: clif . When called without parameters standard input is opened otherwise file is opened as input. You can use upto 100 of files separated by . Output is always standard output. To leave the environment type "exit;" For more details see user guide or ask authors clif-0.93/stamp-h.in100644 1750 1750 12 6521626353 12763 0ustar korenkorentimestamp clif-0.93/store_cont.c100444 1750 1750 4620 6514363546 13460 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * store_cont.c * * Stores and restores a context by context switching. */ #include #include "global.h" #include "mystdio.h" #include "allocx.h" #include "lex_t.h" #include "input.h" #include "store_cont.h" #ifndef NOT_MSWIN_AND_YES_DOS #ifdef FLEX_SCANNER extern void *store_buffer_state (); extern void flush_buffer (); #endif void store_context () { struct CONTEXT *arch; if (NULL == (arch = (struct CONTEXT *) callocx(1,sizeof(struct CONTEXT)))) { error_message (4002); return; } arch->previous = context; context = arch; context->bp = bp; context->frame = frame; context->kodp = kodp; context->kodp1 = kodp1; context->kodp2 = kodp2; context->kodp3 = kodp3; context->pc = pc; context->stack = stack; #ifdef FLEX_SCANNER context->state = store_buffer_state (); #else context->input = input; #endif context->tmp = tmp; context->tmph = tmph; tmph = tmp; kodp1 = kodp; kodp2 = kodp; kodp3 = NULL; kodp4 = NULL; } void restore_context () { struct CONTEXT *arch; if (context != NULL) { if (kodp2 == kodp1) { kodp = context->kodp; kodp1 = context->kodp1; kodp2 = context->kodp2; kodp3 = context->kodp3; kodp4 = context->kodp4; } arch = context; bp = context->bp; frame = context->frame; pc = context->pc; stack = context->stack; tmp = context->tmp; tmph = context->tmph; #ifdef FLEX_SCANNER flush_buffer (context->state); #else input = context->input; #endif context = context->previous; free (arch); } } #endif clif-0.93/store_cont.h100444 1750 1750 2327 6514204160 13451 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992-1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * store_context.h */ #ifndef _STORE_CONT_H #define _STORE_CONT_H /* \verbatim{store_cont_h_CONTEXT.tex} */ struct CONTEXT { char *bp; char *frame; char *kodp; char *kodp1; char *kodp2; char *kodp3; char *kodp4; char *pc; char *stack; char *tmp; char *tmph; #ifdef FLEX_SCANNER void *state; #else int (*input) PROTO((void)); #endif struct CONTEXT *previous; }; /* \verbatim */ #endif clif-0.93/struct.h100444 1750 1750 10515 6554173146 12651 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * struct.h */ #ifndef _STRUCT_H #define _STRUCT_H /* \verbatim{struct_h_tab.tex} */ struct tab /* Hash table structure. */ { char *name; int def; /* Position in the hash table. */ int count; /* Is the variable used at all? */ int use_line_number; /* The first use of the variable. */ int l_value_flag; /* Is the variable initialized before the use? */ int declaration_line; /* Variable declaration line number. */ struct tab *next; }; /* \verbatim */ /* \verbatim{struct_h_dim.tex} */ struct range { int lower; int upper; }; /* \verbatim */ /* \verbatim{struct_h_FIX.tex} */ struct FIX /* List of addresses where to backpatch * undefined function. */ { char *address; struct FIX *next; }; /* \verbatim */ /* \verbatim{struct_h_attr.tex} */ /* Type attribute. */ struct attr { enum intern_func_class function_class; int export_type; enum type_qual type_qualifier; enum storage_class_specifier storage_class_specifier; enum intern_arit_class arit_class; int memory_size; char *domain; }; /* \verbatim */ /* \verbatim{struct_h_internal_type.tex} */ /* Internal type structure. */ struct internal_type { struct internal_type *input; struct internal_type *arity; char *field_name; int offset; struct attr attribute; struct internal_type *output; }; /* \verbatim */ struct ident_list_str { char *ident; struct ident_list_str *next; } ; /* \verbatim{struct_h_ident_tab.tex} */ struct ident_tab /* Table of identifiers. */ { struct internal_type *type; int body; struct ident_list_str *list_formal_param; struct FIX *next; char *adr; }; /* \verbatim */ /* \verbatim{struct_h_ident_tab_loc.tex} */ struct ident_tab_header { int scope_level; int pi_loc; int offset; char *file_scope; struct ident_tab_header *previous_level; struct ident_tab_loc *all; struct tab *hastab_loc; struct ident_tab_loc *table; }; struct ident_tab_loc /* Table of local identifiers. */ { struct internal_type *type; int body; int offset; char *adr; struct ident_list_str *list_formal_param; struct ident_tab_loc *previous; }; /* \verbatim */ /* \verbatim{struct_h_return1.tex} */ struct return1 /* List of addresses where to backpatch * returns from a function. */ { char *adr; struct return1 *next; }; /* \verbatim */ /* \verbatim{struct_h_remote_tab.tex} */ struct remote_tab /* Hash table structure for intrinsic * functions. */ { char *name; void (*adr) PROTO((char **)); struct remote_tab *next; }; /* \verbatim */ /* \verbatim{struct_h_remote_has_tab.tex} */ struct remote_has_tab /* Hash table structure for intrinsic * functions. */ { char *name; int offset; struct remote_has_tab *next; }; /* \verbatim */ /* \verbatim{struct_h_goto_tab.tex} */ struct goto_adr /* List of addresses with goto statements for the current label. */ { char *adr; /* Address of the goto statement. */ int line_number; /* Line number of the goto statement. */ struct goto_adr *gnext; }; struct goto_tab /* Hash table structure for goto labels. */ { char *name; /* Name of the label. */ char *label_adr; /* Address of the label in the generated code. */ int line_number; /* Line number of the label in the source file. */ struct goto_adr *gnext; /* List of goto's to the label. */ struct goto_tab *next; }; /* \verbatim */ #endif /* _STRUCT_H */ clif-0.93/symbols.c100444 1750 1750 4206 6344311154 12756 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* symbols.c saving a copy of each string */ #include #include "allocx.h" #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif #define SIZE_HAS 1999 #define PAGE 1024 #define K 4 static unsigned int hash PROTO((char *)); char *string PROTO((char *)); static struct string { char *str; int len; struct string *next; } *buckets[SIZE_HAS + 1]; static unsigned int hash (s) char *s; { int c = 0; while (*s) { c = c << 1 ^ (*s); s++; } if (0 > c) c = (-c); return (c % SIZE_HAS); } char * string (s) char *s; { int len = strlen (s); unsigned int h; struct string *p; char *end = s + len; h = hash (s); for (p = buckets[h]; p; p = p->next) if (p->len == len) { char *s1 = s, *s2 = p->str; do { if (s1 == end) return p->str; } while (*s1++ == *s2++); } { static char *next, *limit; if (next + len + 1 >= limit) { int n = len + K * PAGE; next = allocate (n, PERM); limit = next + n; } p = (struct string *)allocate (sizeof (*p), PERM); p->len = len; for (p->str = next; s < end;) *next++ = *s++; *next++ = '\0'; p->next = buckets[h]; buckets[h] = p; return p->str; } } clif-0.93/tables.c100444 1750 1750 177563 6643633561 12634 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * tables.c * * functions working on symbol tables */ #include #include #include "global.h" /* Header of global variables */ #include "config.h" #if STDC_HEADERS #include #include #else #ifndef HAVE_ISALPHA #define isalpha(a) \ (((a) >= 'a' && (a) <= 'z') || ((a) >= 'A' && (a) <= 'Z')) #endif #endif #include "cast.h" /* Header of used cast operators */ #include "type.h" /* Header of internal representation of types */ #include "struct.h" /* Header of globally used structures */ #include "define.h" /* Clif's memory regions */ #include "mystdio.h" /* Redefining NULL */ #include "token.h" /* Header of tokens */ #include "instr.h" /* Header of structures. Defines size of virtual machine instructions. */ #include "allocx.h" #include "comp_maint.h" #include "tables.h" #include "printfx.h" #include "flags.h" #define ANSI_NUMBER_OF_LOCALS 127 #define ANSI_NUMBER_OF_PARAMS 31 extern FILEATTR spf[]; extern int main_defined; static struct tab *allocate_hastab_loc PROTO((void)); static struct ident_tab_header * allocate_loc_tables PROTO((struct ident_tab_header *)); /* Clears hash table of local */ /* variables for structure member next */ /* in declaration. */ static void clear_hash_tab_next_declaration PROTO((struct tab *)); /* Clears hash table of local */ /* variables for structure member next. */ static void clear_hash_tab_next PROTO((struct ident_tab_header *, struct tab *)); /* * Saves useful information about variables and connect the information with * the variable name. */ static void putstruct PROTO((struct tab *)); /* * Saves information into hash table when body of a function is defined. */ static void putstruct_body PROTO((struct tab *)); /* * Saves useful information about local variables and connect the information * with the variable name. */ static void putstruct_loc PROTO((struct tab *, int)); /* Looks up the hash table. */ static struct tab *lookup PROTO((char *)); /* Looks up the hash table. */ static struct tab *lookup_tag PROTO((char *)); /* Hash function. */ static unsigned int hash_code PROTO((char *, unsigned int)); /* Looks up the hash table. */ static struct tab *lookup_loc PROTO((char *, struct ident_tab_header *)); /* Looks up the hash table of labels. */ static struct goto_tab *lookup_goto_table PROTO((char *)); /* * Saves useful information about tags. */ static void putstruct_tag PROTO((struct tab *)); /* * Saves information into hash table when body of a function is defined. */ static void putstruct_tag_body PROTO((struct tab *)); /* Function allocates space for variables */ static int allocate_var PROTO((struct internal_type *, char **)); /* \verbatim{tables_c_hastab.tex} */ static struct tab *hastab; /* Pointer to the hash table. */ /* \verbatim */ /* \verbatim{tables_c_hastab_goto.tex} */ static struct goto_tab *hastab_goto; /* Pointer to the hash table. */ /* \verbatim */ /* \verbatim{tables_c_typetab.tex} */ static struct ident_tab_header *tagtab; /* Pointer to the table of tags. */ /* \verbatim */ /* \verbatim{tables_c_identtab.tex} */ static struct ident_tab *identtab; /* Pointer to the table of identifiers. */ /* \verbatim */ /* \verbatim{tables_c_identtab_loc.tex} */ static struct ident_tab_header *identtab_loc; /* Pointer to the table of local identifiers. */ /* \verbatim */ static int pi; /* Type of an operand in an expression. Length of an expression is limited to * 256 operands. */ enum intern_arit_class type_ac[256]; void clear_internal_type PROTO((struct internal_type *)); void put_array_subscript PROTO((struct internal_type **)); static void move_offset_aligned PROTO((int *, int)); /* Return offset in the current structure, or -1 if name is not a member. */ static int find_member PROTO((char *, struct internal_type *)); static int allocate_struct PROTO((struct internal_type *)); static int allocate_aggregate PROTO((struct internal_type *)); /* Static variables are put into tables. */ static void putstruct_static PROTO((struct ident_tab_loc *)); static int memory_size PROTO((int *, struct internal_type *)); static void check_init_bracket PROTO((int *, struct internal_type *, char *)); int hastab_init () { hastab = (struct tab *) callocx (SIZE_HAS, sizeof (struct tab)); if (NULL == hastab) { error_message (4000); return (0); } #ifdef DEBUG printfx ("Hash table allocated\n\n"); #endif return 1; } int hastab_goto_init () { hastab_goto = (struct goto_tab *) callocx (SIZE_HAS_GOTO, sizeof (struct goto_tab)); if (NULL == hastab_goto) { error_message (4000); return (0); } #ifdef DEBUG printfx ("Hash table for goto's allocated\n\n"); #endif return 1; } int identtab_init () { identtab = (struct ident_tab *) callocx (MAX_IDENT, sizeof (struct ident_tab)); if (NULL == identtab) { error_message (4000); return (0); } pi = 0; return 1; } static struct tab * allocate_hastab_loc () { struct tab *hastab_loc; hastab_loc = (struct tab *) allocate (SIZE_HAS_LOC * sizeof (struct tab), scope_level > PERM ? BLOCK : PERM); if (NULL == hastab_loc) { error_message (4000); return (0); } #ifdef DEBUG printfx ("Hash table for local variables allocated\n\n"); #endif return hastab_loc; } static struct ident_tab_header * allocate_loc_tables (previous) struct ident_tab_header *previous; { struct ident_tab_header *identtab_loc; identtab_loc = (struct ident_tab_header *) allocate (MAX_IDENT_LOC * sizeof (struct ident_tab_loc) + sizeof (struct ident_tab_header), scope_level > PERM ? BLOCK : PERM); init_zero ((char *) identtab_loc, MAX_IDENT_LOC * sizeof (struct ident_tab_loc) + sizeof (struct ident_tab_header)); identtab_loc->scope_level = scope_level; identtab_loc->pi_loc = 0; identtab_loc->offset = 0; identtab_loc->previous_level = previous; identtab_loc->hastab_loc = allocate_hastab_loc (); identtab_loc->table = (struct ident_tab_loc *)identtab_loc + sizeof (struct ident_tab_header); return identtab_loc; } /* * Clears hash table of local variables. */ void clear_hash_tab_declaration () { int i; for (i = 0; i < SIZE_HAS_LOC; i++) { if (NULL != identtab_loc->hastab_loc[i].name) { #if 0 free (identtab_loc->hastab_loc[i].name); #endif identtab_loc->hastab_loc[i].name = NULL; identtab_loc->hastab_loc[i].def = 0; if (NULL != identtab_loc->hastab_loc[i].next) clear_hash_tab_next_declaration (identtab_loc->hastab_loc[i].next); } } identtab_loc->pi_loc = 0; return; } void clear_hash_tab () { int i; if (!identtab_loc || identtab_loc->scope_level < scope_level) return; for (i = 0; i < SIZE_HAS_LOC; i++) { if (NULL != identtab_loc->hastab_loc[i].name) { if (!identtab_loc->hastab_loc[i].count) { text = identtab_loc->hastab_loc[i].name; error_message (6003); } if ((0 == identtab_loc->hastab_loc[i].l_value_flag) && (0 != identtab_loc->hastab_loc[i].count)) { text = identtab_loc->hastab_loc[i].name; error_message (6006); } #if 0 free (identtab_loc->hastab_loc[i].name); #endif identtab_loc->hastab_loc[i].name = NULL; clear_internal_type ((identtab_loc->table + identtab_loc->hastab_loc[i].def)->type); identtab_loc->hastab_loc[i].def = 0; identtab_loc->hastab_loc[i].count = 0; identtab_loc->hastab_loc[i].use_line_number = 0; identtab_loc->hastab_loc[i].l_value_flag = 0; if (NULL != identtab_loc->hastab_loc[i].next) clear_hash_tab_next (identtab_loc, identtab_loc->hastab_loc[i].next); } } identtab_loc->pi_loc = 0; identtab_loc = identtab_loc->previous_level; return; } static void clear_hash_tab_next_declaration (def) struct tab *def; { #if 0 free (def->name); #endif if (NULL != def->next) { clear_hash_tab_next_declaration (def->next); } #if 0 free (def); #endif return; } static void clear_hash_tab_next (tab, def) struct ident_tab_header *tab; struct tab *def; { if (!def->count) { text = def->name; error_message (6003); } if ((0 == def->l_value_flag) && (0 != def->count)) { text = def->name; error_message (6006); } #if 0 free (def->name); #endif clear_internal_type ((tab->table + def->def)->type); if (NULL != def->next) clear_hash_tab_next (tab, def->next); #if 0 free (def); #endif return; } void clear_tag_tab () { int i; if (! tagtab || tagtab->scope_level < scope_level) return; for (i = 0; i < SIZE_HAS_LOC; i++) { if (NULL != tagtab->hastab_loc[i].name) { #if 0 free (tagtab->hastab_loc[i].name); #endif tagtab->hastab_loc[i].name = NULL; clear_internal_type ((tagtab->table + tagtab->hastab_loc[i].def)->type); tagtab->hastab_loc[i].def = 0; tagtab->hastab_loc[i].count = 0; tagtab->hastab_loc[i].use_line_number = 0; tagtab->hastab_loc[i].l_value_flag = 0; if (NULL != tagtab->hastab_loc[i].next) clear_hash_tab_next (tagtab, tagtab->hastab_loc[i].next); } } tagtab->pi_loc = 0; tagtab = tagtab->previous_level; return; } /* * Returns address of a global variable. */ struct ident_tab * point (var_name) char *var_name; { struct tab *pa; if (NULL == (pa = lookup (var_name))) { error_message (1000); return (NULL); } else { pa->count++; return (identtab + pa->def); } } /* * Backpatches call of an undefined function during compilation. */ int point_call (func_name) char *func_name; { struct tab *pa; struct FIX *arch; #if 0 struct tab *pa_loc = NULL; struct ident_tab_header *walk = identtab_loc; if (walk) { while (walk && walk->file_scope != spf[s].name) walk = walk->previous_level; if (NULL != walk) pa_loc = lookup_loc (func_name, walk); if (pa_loc != NULL) { if (walk->table[pa_loc->def].body); } } #endif if (NULL == (pa = lookup (func_name))) { error_message (1000); return (-1); } else { if (!identtab[pa->def].body) { if (NULL == (arch = identtab[pa->def].next)) { arch = (struct FIX *) allocate (sizeof (struct FIX), BLOCK); arch->address = kodp; arch->next = NULL; identtab[pa->def].next = arch; } else { while (NULL != arch->next) arch = arch->next; arch->next = (struct FIX *) allocate (sizeof (struct FIX), BLOCK); arch->next->address = kodp; arch->next->next = NULL; } } return (1); } } /* * Checks table if a variable is in. If not it saves all needed information. */ int has (var_name) char *var_name; { struct tab *np, *arch; if (NULL == (np = lookup (var_name))) { /* The variable is not in the table. */ #ifdef DEBUG printfx ("New variable included\n"); printfx ("hash code:%u\n", hash_code (var_name, SIZE_HAS)); #endif np = hastab + hash_code (var_name, SIZE_HAS); if (NULL == np->name) { /* There is no list. */ np->name = var_name; np->declaration_line = spf[s].line_counter; putstruct (np); } else { /* There is a list. */ #ifdef HASH_DEBUG fprintfx (stderr, "variable table chain\n"); #endif do { arch = np; np = np->next; } while (NULL != np); np = (struct tab *) allocate (sizeof (struct tab), PERM); arch->next = np; np->name = var_name; np->declaration_line = spf[s].line_counter; putstruct (np); } pi++; arch = NULL; return (1); } else { /* The variable is in the table. */ if (identtab[np->def].body) { error_message (1001); /* Cannot be twice defined. */ return (-1); } else { putstruct_body (np); /* Function body is now * defined. */ if (! strcmp (var_name, "main")) main_defined = 1; return 1; } } } /* * Saves useful information about variables and connect the information with * the variable name. */ static void putstruct (np) struct tab *np; { #ifdef DEBUG printfx ("variable name %s is stored\n", np->name); #endif np->def = pi; #ifdef DEBUG printfx ("local pointer:%u is in table\n", np->def); #endif identtab[pi].body = body_flag; identtab[pi].next = NULL; identtab[pi].adr = NULL; identtab[pi].type = typeh[type_spec_count]; /* If it is a typedef, just put it in the table, do not allocate. */ if (TYPEDEF_P(typeh[type_spec_count])) { if (ARRAY_P(typeh[type_spec_count]->output)) put_array_subscript (&(identtab[pi].type->output)); return; } switch (typeh[type_spec_count]->attribute.function_class) { case LOCAL: case REMOTE_F: if (! identtab[pi].type->output->attribute.memory_size) allocate_aggregate (identtab[pi].type->output); break; case SIMPLE: switch (typeh[type_spec_count]->attribute.type_qualifier) { case CONST_TQ: identtab[pi].adr = identtab[pi].type->attribute.domain; break; case VOLATILE_TQ: fprintfx (stderr, "VOLATILE not supported in bookkeeping\n"); break; default: break; } identtab[pi].type->attribute.memory_size = allocate_var (identtab[pi].type, &(identtab[pi].adr)); break; case ARRAY: /* Variables of type array. */ put_array_subscript (&(identtab[pi].type)); identtab[pi].body = allocate_aggregate (identtab[pi].type); identtab[pi].adr = kodp; { int i; for (i = 0; i < identtab[pi].type->attribute.memory_size; i++) *kodp++ = 0; } break; case ENUM_FC: identtab[pi].type->attribute.memory_size = allocate_var (identtab[pi].type, &(identtab[pi].adr)); break; case UNION_FC: /* Fall through. */ case STRUCT_FC: if (!identtab[pi].body) identtab[pi].body = body_flag = allocate_aggregate (identtab[pi].type); identtab[pi].adr = kodp; { int i; for (i = 0; i < identtab[pi].type->attribute.memory_size; i++) *kodp++ = 0; } break; case POINTER: identtab[pi].adr = kodp; identtab[pi].type->attribute.memory_size = POINTER_SIZE; kodp += POINTER_SIZE; *(char **)identtab[pi].adr = NULL; break; case LIB: fprintfx (stderr, "LIB not fully supported in book-keeping\n"); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5002); abort (); } #ifdef DEBUG printfx ("address %u is in table\n", identtab[pi].adr); #endif } /* * Saves information into hash table when body of a function is defined. */ static void putstruct_body (np) struct tab *np; { struct FIX *arch, *tmp; switch (identtab[np->def].type->attribute.function_class) { case LOCAL: identtab[np->def].adr = kodp1; identtab[np->def].body = body_flag; arch = identtab[np->def].next; while (NULL != arch) { ((struct OPERAND_1_mi *) (arch->address))->adr = identtab[np->def].adr; tmp = arch; arch = arch->next; #if 0 free (tmp); #endif } identtab[np->def].next = NULL; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } #ifdef DEBUG printfx ("address %u is in table\n", identtab[pi].adr); #endif } /* * Looks up the hash table. */ static struct tab * lookup (s) char *s; { struct tab *ps; ps = hastab + hash_code (s, SIZE_HAS); if (0 == *(int *) ps) return (NULL); while (ps->name != s && (NULL != ps->next)) ps = ps->next; if ((NULL == ps->next) && ps->name != s) return (NULL); else return (ps); } /* \verbatim{tables_c_hash_code.tex} */ /* * Hash function. */ static unsigned int hash_code (s, size) char *s; unsigned int size; { int c = 0; while (*s) { c = c << 1 ^ (*s); s++; } if (0 > c) c = (-c); return (c % size); } /* \verbatim */ /* * Returns address of a local variable. */ struct ident_tab_loc * point_loc (var_name) char *var_name; { struct tab *pa = NULL; struct ident_tab_header *walk = identtab_loc; struct var_s { char *adr; int offset; char *name; }; extern struct var_s variable[]; register int count = 0; if (identtab_loc) { /* Walk through all tables of locals. */ while (NULL == (pa = lookup_loc (var_name, walk))) { if (walk->previous_level) walk = walk->previous_level; else break; } } if (pa) { struct ident_tab_header *count_walk = walk->previous_level; /* First try to find offset of the variable. Only if the level > 0 */ while (count_walk) { count += count_walk->offset; count_walk = count_walk->previous_level; } pa->count++; pa->use_line_number = spf[s].line_counter; variable[++set].offset = count; return walk->table + pa->def; } else return NULL; } /* * Checks table if a local variable is in. If not it saves all needed * information. */ int has_loc (type, var_name) int type; char *var_name; { struct tab *np, *arch; if (! identtab_loc || identtab_loc->scope_level < scope_level) identtab_loc = allocate_loc_tables (identtab_loc); if (NULL == (np = lookup_loc (var_name, identtab_loc))) { /* The variable is not in the table. */ #ifdef DEBUG printfx ("New local variable included\n"); printfx ("hash code:%u\n", hash_code (var_name, SIZE_HAS_LOC)); #endif np = identtab_loc->hastab_loc + hash_code (var_name, SIZE_HAS_LOC); if (NULL == np->name) { /* There is no list. */ np->name = var_name; np->declaration_line = spf[s].line_counter; putstruct_loc (np, type); } else { /* There is a list. */ #ifdef HASH_DEBUG fprintfx (stderr, "local variable table chain\n"); #endif do { arch = np; np = np->next; } while (NULL != np); np = (struct tab *) allocate (sizeof (struct tab), BLOCK); arch->next = np; np->name = var_name; np->declaration_line = spf[s].line_counter; putstruct_loc (np, type); } identtab_loc->pi_loc++; if (identtab_loc->pi_loc > ANSI_NUMBER_OF_LOCALS) error_message (6007); arch = NULL; return 1; } else { /* The variable is in the table. */ error_message (1003); return -1; } } /* * Saves useful information about local variables and connect the information * with the variable name. */ static void putstruct_loc (np, type) struct tab *np; int type; { #ifdef DEBUG printfx ("local variable name %s is stored\n", np->name); #endif np->def = identtab_loc->pi_loc; #ifdef DEBUG printfx ("local pointer:%u is in table\n", np->def); #endif identtab_loc->table[identtab_loc->pi_loc].type = typeh[type_spec_count]; /* If it is a typedef, just put it in the table, do not allocate. */ if (TYPEDEF_P(typeh[type_spec_count])) return; if (STATIC_P(typeh[type_spec_count]) && type == VAR) putstruct_static (&(identtab_loc->table[identtab_loc->pi_loc])); switch (typeh[type_spec_count]->attribute.function_class) { case SIMPLE: if (!typeh[type_spec_count]->attribute.memory_size) typeh[type_spec_count]->attribute.memory_size = allocate_struct (typeh[type_spec_count]); switch (typeh[type_spec_count]->attribute.type_qualifier) { case CONST_TQ: identtab_loc->table[identtab_loc->pi_loc].adr = identtab_loc->table[identtab_loc->pi_loc].type->attribute.domain; np->l_value_flag++; np->count++; return; break; case VOLATILE_TQ: fprintfx (stderr, "VOLATILE not supported in bookkeeping\n"); break; default: break; } switch (type) { case PAR: if (call_by_reference) { identtab_loc->table[identtab_loc->pi_loc].offset = -count[proc]; count[proc] -= sizeof (char *); } else if (call_by_value) { if (VOID_P(identtab_loc->table[identtab_loc->pi_loc].type)) error_message (1012); identtab_loc->table[identtab_loc->pi_loc].offset = -count[proc]; move_offset_aligned (&count[proc], - identtab_loc->table[identtab_loc->pi_loc].type->attribute.memory_size); } /* Parameters are always initialized. */ np->l_value_flag = 1; if (identtab_loc->pi_loc > ANSI_NUMBER_OF_PARAMS) error_message (6008); break; case VAR: if (VOID_P(identtab_loc->table[identtab_loc->pi_loc].type)) error_message (1012); move_offset_aligned (&count[proc], - allocate_struct (identtab_loc->table[identtab_loc->pi_loc].type)); identtab_loc->table[identtab_loc->pi_loc].offset = count[proc]; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5002); abort (); } identtab_loc->table[identtab_loc->pi_loc].type->attribute.function_class = SIMPLE; break; case ARRAY: /* Local variable of type array. */ put_array_subscript (&(identtab_loc->table[identtab_loc->pi_loc].type)); switch (type) { case PAR: identtab_loc->table[identtab_loc->pi_loc].offset = -count[proc]; /* Parameters are always initialized. */ np->l_value_flag = 1; count[proc] -= sizeof (char *); break; case VAR: if (SIMPLE == identtab_loc->table[identtab_loc->pi_loc].type->output->attribute.function_class) switch (typeh[type_spec_count]->output->attribute.arit_class) { case INTEGER: case SIGNED_AC | INTEGER: count[proc] -= sizeof (int) * count_arr; break; case UNSIGNED_AC | INTEGER: count[proc] -= sizeof (unsigned int) * count_arr; break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: count[proc] -= sizeof (long int) * count_arr; break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: count[proc] -= sizeof (short int) * count_arr; break; case LONG_AC | UNSIGNED_AC | INTEGER: count[proc] -= sizeof (long unsigned int) * count_arr; break; case SHORT_AC | UNSIGNED_AC | INTEGER: count[proc] -= sizeof (short unsigned int) * count_arr; break; case DOUB: count[proc] -= sizeof (double) * count_arr; break; case LONG_AC | DOUB: count[proc] -= sizeof (long double) * count_arr; break; case FLT: count[proc] -= sizeof (float) * count_arr; break; case CHR: /* Moze byt este problem so zarovnanim */ count[proc] -= sizeof (char) * count_arr; break; case SIGNED_AC | CHR: count[proc] -= sizeof (signed char) * count_arr; break; case UNSIGNED_AC | CHR: count[proc] -= sizeof (unsigned char) * count_arr; break; case VID: error_message (1012); return; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } else { if (!allocate_aggregate (identtab_loc->table[identtab_loc->pi_loc].type)) error_message (1024); count[proc] -= identtab_loc->table[identtab_loc->pi_loc].type->attribute.memory_size; } identtab_loc->table[identtab_loc->pi_loc].offset = count[proc]; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5002); abort (); } identtab_loc->table[identtab_loc->pi_loc].type->attribute.function_class = ARRAY; break; case ENUM_FC: if (!typeh[type_spec_count]->attribute.memory_size && type == PAR) error_message (1024); else if (!typeh[type_spec_count]->attribute.memory_size) typeh[type_spec_count]->attribute.memory_size = allocate_struct (typeh[type_spec_count]); switch (type) { case PAR: identtab_loc->table[identtab_loc->pi_loc].offset = -count[proc]; /* Parameters are always initialized. */ np->l_value_flag = 1; count[proc] -= sizeof (char *); if (identtab_loc->pi_loc > ANSI_NUMBER_OF_PARAMS) error_message (6008); break; case VAR: move_offset_aligned (&count[proc], -sizeof (int)); break; } break; case UNION_FC: /* Fall through. */ case STRUCT_FC: if (!typeh[type_spec_count]->attribute.memory_size) allocate_aggregate (typeh[type_spec_count]); switch (type) { case PAR: if (!identtab_loc->table[identtab_loc->pi_loc].type->attribute.memory_size) { text = np->name; error_message (1024); } else { identtab_loc->table[identtab_loc->pi_loc].offset = -count[proc]; /* Parameters are always initialized. */ np->l_value_flag = 1; count[proc] -= sizeof (char *); if (identtab_loc->pi_loc > ANSI_NUMBER_OF_PARAMS) error_message (6008); } break; case VAR: if (!body_flag) { text = np->name; error_message (1023); } else { count[proc] -= identtab_loc->table[identtab_loc->pi_loc].type->attribute.memory_size; count[proc] -= sizeof(double) - count[proc] % sizeof(double); identtab_loc->table[identtab_loc->pi_loc].offset = count[proc]; } break; } break; case POINTER: if (!typeh[type_spec_count]->attribute.memory_size) typeh[type_spec_count]->attribute.memory_size = POINTER_SIZE; switch (type) { case PAR: identtab_loc->table[identtab_loc->pi_loc].offset = -count[proc]; /* Parameters are always initialized. */ np->l_value_flag = 1; count[proc] -= sizeof (char *); if (identtab_loc->pi_loc > ANSI_NUMBER_OF_PARAMS) error_message (6008); break; case VAR: if (!body_flag) { text = np->name; error_message (1023); } else { move_offset_aligned (&count[proc], -POINTER_SIZE); identtab_loc->table[identtab_loc->pi_loc].offset = count[proc]; } break; } break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5002); abort (); } identtab_loc->table[identtab_loc->pi_loc].previous = identtab_loc->all; identtab_loc->all = &(identtab_loc->table[identtab_loc->pi_loc]); #ifdef DEBUG printfx ("loc. address %u is in table\n", identtab_loc->table[identtab_loc->pi_loc].offset); #endif } /* * Looks up the hash table of local variables. */ static struct tab * lookup_loc (s, identtab_loc) char *s; struct ident_tab_header *identtab_loc; { struct tab *ps; ps = identtab_loc->hastab_loc + hash_code (s, SIZE_HAS_LOC); if (0 == *(int *) ps) return NULL; while (ps->name != s && NULL != ps->next) ps = ps->next; if (NULL == ps->next && ps->name != s) return NULL; else return ps; } /* * Adding information about type specifiers of formal parameters to the hash * table. If it was done during declaration checking if it matches the * definition. */ int add_spec_to_has () { struct tab *pa; if (NULL == (pa = lookup (proc_name_text[proc]))) { error_message (1000); return (-1); } else if (NULL == identtab[pa->def].type->input) { identtab[pa->def].type->input = l_type_spec; l_type_spec = NULL; } else if (-1 == compare2trees (identtab[pa->def].type->input, l_type_spec)) return (-1); return (0); } /* * Adding identifiers of formal parameters to the hash table. If it was done * during declaration checking if it matches the definition. */ int add_ident_to_has () { struct tab *pa; struct ident_list_str *tmp, *tmp1; if (NULL == (pa = lookup (proc_name_text[proc]))) { error_message (1000); return (-1); } else if (NULL == identtab[pa->def].list_formal_param) { identtab[pa->def].list_formal_param = ident_list; ident_list = NULL; } else { tmp = identtab[pa->def].list_formal_param; while ((NULL != ident_list) && (NULL != tmp)) { if (!strcmp (ident_list->ident, tmp->ident)) { tmp = tmp->next; tmp1 = ident_list; ident_list = ident_list->next; #if 0 free (tmp1); #endif } else { error_message (2005); return (-1); } } if ((NULL != tmp) || (NULL != ident_list)) { error_message (2004); return (-1); } } return (0); } void link_function (i) int i; { struct tab *np; if (NULL != (np = lookup (text))) { #ifdef DEBUG printfx ("New variable included\n"); printfx ("hash code:%u\n", hash_code (text, SIZE_HAS)); #endif np = hastab + hash_code (text, SIZE_HAS); while (NULL != np->name) { if (!strcmp (np->name, text)) { if (REMOTE_F == identtab[np->def].type->attribute.function_class) { identtab[np->def].adr = (char *) allocate (sizeof (int), PERM); *(int *) identtab[np->def].adr = i; identtab[np->def].body = 1; break; } else { error_message (6000); return; } } np = np->next; } } } void set_value (var_name) char *var_name; { struct tab *pa; struct ident_tab_header *walk = identtab_loc; if (identtab_loc) { while (NULL == (pa = lookup_loc (var_name, walk))) { if (walk->previous_level) walk = walk->previous_level; else break; } if (pa) { if ((0 == pa->l_value_flag) && (pa->use_line_number != spf[s].line_counter)) error_message (6006); pa->l_value_flag++; } } } void fix_and_clear_goto_table () { int i; extern int error_line_number; for (i = 0; i < SIZE_HAS_GOTO; i++) { if (NULL != hastab_goto[i].name) { struct goto_adr *arch, *arch_o; struct goto_tab *arch_goto, *arch_goto_o; arch_goto = hastab_goto + i; arch_goto_o = NULL; while (NULL != arch_goto) { if (NULL == arch_goto->gnext) { text = arch_goto->name; error_line_number = arch_goto->line_number; error_message (6004); error_line_number = 0; } if (NULL == arch_goto->label_adr) { text = arch_goto->name; error_line_number = arch_goto->line_number; error_message (3005); error_line_number = 0; return; } arch = arch_goto->gnext; while (NULL != arch) { ((struct OPERAND_1_ma *)arch->adr)->adr = arch_goto->label_adr; arch_o = arch; arch = arch->gnext; #if 0 free (arch_o); #endif } /* First time false (special case), any other times true. */ if (NULL != arch_goto_o) { arch_goto_o = arch_goto; arch_goto = arch_goto->next; /*free (arch_goto_o);*/ } else { /*free (arch_goto->name); free (arch_goto->label_adr);*/ arch_goto->name = NULL; arch_goto->label_adr = NULL; arch_goto->line_number = 0; arch_goto->gnext = NULL; arch_goto_o = arch_goto; arch_goto = arch_goto->next; } } } } } /* * Add a label into hash table if it was not already in. Add address * of the goto to the list of goto's. */ int has_goto (label_name) char *label_name; { struct goto_tab *np; if (NULL == (np = lookup_goto_table (label_name))) { /* The label is not in the table. */ #ifdef DEBUG printfx ("New label included\n"); printfx ("hash code:%u\n", hash_code (label_name, SIZE_HAS_GOTO)); #endif np = hastab_goto + hash_code (label_name, SIZE_HAS_GOTO); if (NULL == np->name) { /* There is no list. */ np->name = label_name; np->gnext = (struct goto_adr *) allocate (sizeof (struct goto_adr), PERM); np->gnext->adr = kodp; np->gnext->line_number = spf[s].line_counter; } else { /* There is a list. */ struct goto_tab *arch; #ifdef HASH_DEBUG fprintfx (stderr, "label table chain\n"); #endif do { arch = np; np = np->next; } while (NULL != np); np = (struct goto_tab *) allocate (sizeof (struct goto_tab), PERM); arch->next = np; np->name = label_name; np->gnext = (struct goto_adr *) allocate (sizeof (struct goto_adr), PERM); np->gnext->adr = kodp; np->gnext->line_number = spf[s].line_counter; arch = NULL; } return (1); } else { /* The label is in the table. */ if (NULL != np->gnext) { struct goto_adr *arch, *arch_o; arch = np->gnext; do { arch_o = arch; arch = arch->gnext; } while (NULL != arch); arch = (struct goto_adr *) allocate (sizeof (struct goto_adr), PERM); arch_o->gnext = arch; arch->adr = kodp; arch->line_number = spf[s].line_counter; arch_o = NULL; } else { np->gnext = (struct goto_adr *) allocate (sizeof (struct goto_adr), PERM); np->gnext->adr = kodp; np->gnext->line_number = spf[s].line_counter; } return (1); } } /* * Add a label into hash table. If it was in, produce error * message. Add address of the label to the structure. */ int has_label (label_name) char *label_name; { struct goto_tab *np; if (NULL == (np = lookup_goto_table (label_name))) { /* The label is not in the table. */ #ifdef DEBUG printfx ("New label included\n"); printfx ("hash code:%u\n", hash_code (label_name, SIZE_HAS_GOTO)); #endif np = hastab_goto + hash_code (label_name, SIZE_HAS_GOTO); if (NULL == np->name) { /* There is no list. */ np->name = text; np->label_adr = kodp; np->line_number = spf[s].line_counter; } else { /* There is a list. */ struct goto_tab *arch; #ifdef HASH_DEBUG fprintfx (stderr, "label table chain\n"); #endif do { arch = np; np = np->next; } while (NULL != np); np = (struct goto_tab *) allocate (sizeof (struct goto_tab), PERM); arch->next = np; np->name = text; np->label_adr = kodp; np->line_number = spf[s].line_counter; arch = NULL; } return (1); } else { /* The label is in the table. */ if (NULL == np->label_adr) { np->label_adr = kodp; np->line_number = spf[s].line_counter; return (1); } else { error_message (3004); return (-1); } } } /* * Looks up the hash table of labels. */ static struct goto_tab * lookup_goto_table (s) char *s; { struct goto_tab *ps; ps = hastab_goto + hash_code (s, SIZE_HAS_GOTO); if (0 == *(int *) ps) return (NULL); while (ps->name != s && NULL != ps->next) ps = ps->next; if (NULL == ps->next && ps->name != s) return (NULL); else return (ps); } /* * Adjust memory position for a type. */ void align_memory (p, n) char **p; int n; { #ifdef HAVE_ASSERT_H assert ((n > 0 ? n : -n) <= MAX_CELL_MEMORY_SIZE); #endif while ((long)*p % n) (n > 0) ? (*p += sizeof (char)) : (*p -= sizeof (char)); } int scope_offset_get () { if (identtab_loc && !proc) return -identtab_loc->offset; return 0; } int scope_offset_set (off) int off; { if (identtab_loc) { #ifdef HAVE_ASSERT_H assert (off < 0); #endif identtab_loc->offset = off; /* It must be aligned because of the stack. */ identtab_loc->offset -= -off % sizeof(double) > 0 ? sizeof(double) - (-off % sizeof (double)) : 0; return -identtab_loc->offset; } return 0; } static void move_offset_aligned (what, size) int *what, size; { #ifdef HAVE_ASSERT_H assert ((size > 0 ? size : -size) <= MAX_CELL_MEMORY_SIZE); #endif while ((long) *what % size) size > 0 ? (*what += sizeof (char)) : (*what -= sizeof (char)); *what += size; } /* * Looks up the hash table. */ static struct tab * lookup_tag (s) char *s; { struct tab *ps; ps = tagtab->hastab_loc + hash_code (s, SIZE_HAS_LOC); if (0 == *(int *) ps) return NULL; while (ps->name != s && NULL != ps->next) ps = ps->next; if ((NULL == ps->next) && ps->name != s) return NULL; else return ps; } int has_tag (tag_only, tag_name) int tag_only; char *tag_name; { struct tab *pa = NULL, *arch; struct ident_tab_header *walk; if (! tagtab || tagtab->scope_level < scope_level) tagtab = allocate_loc_tables (tagtab); walk = tagtab; if (tag_only) { while (NULL == (pa = lookup_loc (tag_name, walk))) { if (walk->previous_level) walk = walk->previous_level; else break; } } else pa = lookup_loc (tag_name, walk); if (! pa) { /* The variable is not in the table. */ #ifdef DEBUG printfx ("New tag included\n"); printfx ("hash code:%u\n", hash_code (tag_name, SIZE_HAS_LOC)); #endif pa = walk->hastab_loc + hash_code (tag_name, SIZE_HAS_LOC); if (NULL == pa->name) { /* There is no list. */ pa->name = tag_name; putstruct_tag (pa); } else { /* There is a list. */ #ifdef HASH_DEBUG fprintfx (stderr, "tag table chain\n"); #endif do { arch = pa; pa = pa->next; } while (NULL != pa); pa = (struct tab *) allocate (sizeof (struct tab), PERM); arch->next = pa; pa->name = tag_name; putstruct_tag (pa); } walk->pi_loc++; arch = NULL; return 0; } else if (walk->table[pa->def].body && !tag_only) /* The variable is in the table. */ { /* Cannot be twice defined. */ if (walk->table[pa->def].type->attribute.function_class != typeh[type_spec_count]->attribute.function_class) error_message (1026); else if (STRUCT_P(walk->table[pa->def].type)) error_message (1017); else if (UNION_P(walk->table[pa->def].type)) error_message (1018); else if (ENUM_P(walk->table[pa->def].type)) error_message (1019); return -1; } else if (! tag_only) { if (walk == tagtab) { putstruct_tag_body (pa); /* Function body is now * defined. */ return walk->table[pa->def].body; } else return 0; } else { body_flag = walk->table[pa->def].body; if (! walk->table[pa->def].body && struct_union_enum_name[suen_count] != tag_name) error_message (1023); typeh[type_spec_count] = walk->table[pa->def].type; return 1; } } static void putstruct_tag (np) struct tab *np; { #ifdef DEBUG printfx ("tag name %s is stored\n", np->name); #endif np->def = tagtab->pi_loc; #ifdef DEBUG printfx ("local pointer:%u is in table\n", np->def); #endif tagtab->table[np->def].body = body_flag; tagtab->table[np->def].adr = NULL; tagtab->table[np->def].type = typeh[type_spec_count]; } static void putstruct_tag_body (np) struct tab *np; { if (COMPILE_P) return; tagtab->table[np->def].body = body_flag = allocate_aggregate (tagtab->table[np->def].type); } /* Adding information about tag specifiers of struct, union or enum * fields to the hash table. */ int add_spec_to_tag () { struct tab *pa; if (NULL == (pa = lookup_tag (proc_name_text[proc]))) { error_message (1000); return -1; } else if (TYPEDEF_P(tagtab->table[pa->def].type) && NULL == tagtab->table[pa->def].type->input) { tagtab->table[pa->def].type->output->input = l_type_spec; l_type_spec = NULL; } else if (! TYPEDEF_P(tagtab->table[pa->def].type) && NULL == tagtab->table[pa->def].type->input) { tagtab->table[pa->def].type->input = l_type_spec; l_type_spec = NULL; } else { text = proc_name_text[proc]; switch (tagtab->table[pa->def].type->attribute.function_class) { case STRUCT_FC: error_message (1017); break; case UNION_FC: error_message (1018); break; case ENUM_FC: error_message (1019); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } return -1; } return 0; } /* Adding identifiers of struct, union or enum fields to the hash * table. */ int add_ident_to_tag () { struct tab *pa; if (NULL == (pa = lookup_tag (proc_name_text[proc]))) { error_message (1000); return (-1); } else if (NULL == tagtab->table[pa->def].list_formal_param) { tagtab->table[pa->def].list_formal_param = ident_list; ident_list = NULL; } else { text = proc_name_text[proc]; switch (tagtab->table[pa->def].type->attribute.function_class) { case STRUCT_FC: error_message (1017); break; case UNION_FC: error_message (1018); break; case ENUM_FC: error_message (1019); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } return -1; } return 0; } /* Allocates place for a variable in the Clif's main memory. Semantic for all combinations of variables permitted by ANSI standard. */ static int allocate_var (type, address) struct internal_type *type; char **address; { int char_array_size, count_help = 0; if (CONST_TQ == type->attribute.type_qualifier) { switch (type->attribute.arit_class) { case INTEGER: case SIGNED_AC | INTEGER: return (sizeof (int)); break; case UNSIGNED_AC | INTEGER: return (sizeof (unsigned int)); break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: return (sizeof (long int)); break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: return (sizeof (short int)); break; case LONG_AC | UNSIGNED_AC | INTEGER: return (sizeof (long unsigned int)); break; case SHORT_AC | UNSIGNED_AC | INTEGER: return (sizeof (short unsigned int)); break; case DOUB: return (sizeof (double)); break; case LONG_AC | DOUB: return (sizeof (long double)); break; case FLT: return (sizeof (float)); break; case CHR: return (sizeof (char)); break; case SIGNED_AC | CHR: return (sizeof (signed char)); break; case UNSIGNED_AC | CHR: return (sizeof (unsigned char)); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } } switch (type->attribute.function_class) { case SIMPLE: switch (type->attribute.arit_class) { case INTEGER: case SIGNED_AC | INTEGER: align_memory (&kodp, sizeof(int)); *address = kodp; /* Integer variable. */ CCI kodp = (int) 0; kodp += sizeof (int); return (sizeof (int)); break; case UNSIGNED_AC | INTEGER: align_memory (&kodp, sizeof(unsigned int)); *address = kodp; CCUI kodp = (unsigned int) 0; kodp += sizeof (unsigned int); return (sizeof (unsigned int)); break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: align_memory (&kodp, sizeof(long int)); *address = kodp; CCLI kodp = (long int) 0; kodp += sizeof (long int); return (sizeof (long int)); break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: align_memory (&kodp, sizeof(short int)); *address = kodp; CCSI kodp = (short int) 0; kodp += sizeof (short int); return (sizeof (short int)); break; case LONG_AC | UNSIGNED_AC | INTEGER: align_memory (&kodp, sizeof(long unsigned int)); *address = kodp; CCLUI kodp = (long unsigned int) 0; kodp += sizeof (long unsigned int); return (sizeof (long unsigned int)); break; case SHORT_AC | UNSIGNED_AC | INTEGER: align_memory (&kodp, sizeof(short unsigned int)); *address = kodp; CCSUI kodp = (short unsigned int) 0; kodp += sizeof (short unsigned int); return (sizeof (short unsigned int)); break; case DOUB: align_memory (&kodp, sizeof(double)); *address = kodp; /* Double variable. */ CCD kodp = (double) 0; kodp += sizeof (double); return (sizeof (double)); break; case LONG_AC | DOUB: align_memory (&kodp, sizeof(long double)); *address = kodp; CCLD kodp = (long double) 0; kodp += sizeof (long double); return (sizeof (long double)); break; case FLT: align_memory (&kodp, sizeof(float)); *address = kodp; /* Float variable. */ CCF kodp = (float) 0; kodp += sizeof (float); return (sizeof (float)); break; case CHR: *address = kodp; /* Variable of type char. */ CCC kodp = (char) 0; kodp += sizeof (char); return (sizeof (char)); break; case SIGNED_AC | CHR: *address = kodp; CCSC kodp = (signed char) 0; kodp += sizeof (signed char); return (sizeof (signed char)); break; case UNSIGNED_AC | CHR: *address = kodp; CCUC kodp = (unsigned char) 0; kodp += sizeof (unsigned char); return (sizeof (unsigned char)); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } break; case ARRAY: switch (type->output->attribute.arit_class) { case INTEGER: case SIGNED_AC | INTEGER: *address = kodp; count_help = count_arr - 1; while (count_help) { CCI(kodp + count_help * sizeof (int)) = (int) 0; count_help--; } kodp += count_arr * sizeof (int); return (count_arr * sizeof (int)); break; case UNSIGNED_AC | INTEGER: *address = kodp; count_help = count_arr - 1; while (count_help) { CCUI(kodp + count_help * sizeof (unsigned int)) = (unsigned int) 0; count_help--; } kodp += count_arr * sizeof (unsigned int); return (count_arr * sizeof (unsigned int)); break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: *address = kodp; count_help = count_arr - 1; while (count_help) { CCLI(kodp + count_help * sizeof (long int)) = (long int) 0; count_help--; } kodp += count_arr * sizeof (long int); return (count_arr * sizeof (long int)); break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: *address = kodp; count_help = count_arr - 1; while (count_help) { CCSI(kodp + count_help * sizeof (short int)) = (short int) 0; count_help--; } kodp += count_arr * sizeof (short int); return (count_arr * sizeof (short int)); break; case LONG_AC | UNSIGNED_AC | INTEGER: *address = kodp; count_help = count_arr - 1; while (count_help) { CCLUI(kodp + count_help * sizeof (long unsigned int)) = (long unsigned int) 0; count_help--; } kodp += count_arr * sizeof (long unsigned int); return (count_arr * sizeof (long unsigned int)); break; case SHORT_AC | UNSIGNED_AC | INTEGER: *address = kodp; count_help = count_arr - 1; while (count_help) { CCSUI(kodp + count_help * sizeof (short unsigned int)) = (short unsigned int) 0; count_help--; } kodp += count_arr * sizeof (short unsigned int); return (count_arr * sizeof (short unsigned int)); break; case DOUB: *address = kodp; count_help = count_arr - 1; while (count_help) { CCD(kodp + count_help * sizeof (double)) = (double) 0; count_help--; } kodp += count_arr * sizeof (double); return (count_arr * sizeof (double)); break; case LONG_AC | DOUB: *address = kodp; count_help = count_arr - 1; while (count_help) { CCLD(kodp + count_help * sizeof (long double)) = (long double) 0; count_help--; } kodp += count_arr * sizeof (long double); return (count_arr * sizeof (long double)); case FLT: *address = kodp; count_help = count_arr - 1; while (count_help) { CCF(kodp + count_help * sizeof (float)) = (float) 0; count_help--; } kodp += count_arr * sizeof (float); return (count_arr * sizeof (float)); break; case CHR: *address = kodp; count_help = count_arr - 1; while (count_help) { CCC(kodp + count_help * sizeof (char)) = (char) 0; count_help--; } char_array_size = count_arr * sizeof (char); /* * Alignment of char array size. */ if (char_array_size & MASKA) { kodp += (4 - (char_array_size & MASKA) + char_array_size); return (4 - (char_array_size & MASKA) + char_array_size); } else { kodp += char_array_size; return (char_array_size); } break; case SIGNED_AC | CHR: *address = kodp; count_help = count_arr - 1; while (count_help) { CCSC(kodp + count_help * sizeof (signed char)) = (signed char) 0; count_help--; } char_array_size = count_arr * sizeof (signed char); /* * Alignment of char array size. */ if (char_array_size & MASKA) { kodp += (4 - (char_array_size & MASKA) + char_array_size); return (4 - (char_array_size & MASKA) + char_array_size); } else { kodp += char_array_size; return (char_array_size); } break; case UNSIGNED_AC | CHR: *address = kodp; count_help = count_arr - 1; while (count_help) { CCUC(kodp + count_help * sizeof (unsigned char)) = (unsigned char) 0; count_help--; } char_array_size = count_arr * sizeof (unsigned char); /* * Alignment of char array size. */ if (char_array_size & MASKA) { kodp += (4 - (char_array_size & MASKA) + char_array_size); return (4 - (char_array_size & MASKA) + char_array_size); } else { kodp += char_array_size; return (char_array_size); } break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } break; case ENUM_FC: if (INTEGER == type->attribute.arit_class) { align_memory (&kodp, sizeof(int)); *address = kodp; CCI kodp = (int) 0; kodp += sizeof (int); return (sizeof (int)); } else { fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } return (0); } static int allocate_struct (type) struct internal_type *type; { int char_array_size; switch (type->attribute.function_class) { case SIMPLE: switch (type->attribute.arit_class) { case INTEGER: case SIGNED_AC | INTEGER: return (sizeof (int)); break; case UNSIGNED_AC | INTEGER: return (sizeof (unsigned int)); break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: return (sizeof (long int)); break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: return (sizeof (short int)); break; case LONG_AC | UNSIGNED_AC | INTEGER: return (sizeof (long unsigned int)); break; case SHORT_AC | UNSIGNED_AC | INTEGER: return (sizeof (short unsigned int)); break; case DOUB: return (sizeof (double)); case LONG_AC | DOUB: return (sizeof (long double)); break; case FLT: return (sizeof (float)); case CHR: return (sizeof (char)); case SIGNED_AC | CHR: return (sizeof (signed char)); break; case UNSIGNED_AC | CHR: return (sizeof (unsigned char)); break; case VID: return 0; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } break; case ARRAY: switch (type->output->attribute.arit_class) { case INTEGER: case SIGNED_AC | INTEGER: return (count_arr * sizeof (int)); break; case UNSIGNED_AC | INTEGER: return (count_arr * sizeof (unsigned int)); break; case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: return (count_arr * sizeof (long int)); break; case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: return (count_arr * sizeof (short int)); break; case LONG_AC | UNSIGNED_AC | INTEGER: return (count_arr * sizeof (long unsigned int)); break; case SHORT_AC | UNSIGNED_AC | INTEGER: return (count_arr * sizeof (short unsigned int)); break; case DOUB: return (count_arr * sizeof (double)); case LONG_AC | DOUB: return (count_arr * sizeof (long double)); break; case FLT: return (count_arr * sizeof (float)); case CHR: char_array_size = count_arr * sizeof (char); /* * Alignment of char array size. */ if (char_array_size & MASKA) return (4 - (char_array_size & MASKA) + char_array_size); else return (char_array_size); break; case SIGNED_AC | CHR: char_array_size = count_arr * sizeof (signed char); /* * Alignment of char array size. */ if (char_array_size & MASKA) return (4 - (char_array_size & MASKA) + char_array_size); else return (char_array_size); break; case UNSIGNED_AC | CHR: char_array_size = count_arr * sizeof (unsigned char); /* * Alignment of char array size. */ if (char_array_size & MASKA) return (4 - (char_array_size & MASKA) + char_array_size); else return (char_array_size); break; case VID: return 0; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } break; case ENUM_FC: return (sizeof (int)); break; case POINTER: return (POINTER_SIZE); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } return 0; } /* Return offset in the current structure, or -1 if name is not a member. */ static int find_member (name, type_to_find) char *name; struct internal_type *type_to_find; { int offset = 0; for (; type_to_find != NULL && strcmp (name, type_to_find->field_name); type_to_find = type_to_find->arity) ; if (NULL == type_to_find) { text = name; error_message (2008); return (-1); } offset = type_to_find->offset; type_com[set] = type_to_find; if (POINTER_P(type_com[set])) type_ac[set] = LONG_AC | INTEGER; else type_ac[set] = type_to_find->attribute.arit_class; return (offset); } int offset_aggregate_ident () { return (find_member (text, type_com[set])); } static int allocate_aggregate (type) struct internal_type *type; { struct internal_type *walk = type->input; int size = 0; int first_align =0; if (TYPEDEF_P(type) && ! type->attribute.memory_size) { type->attribute.memory_size = allocate_aggregate (type->output); return 1; } if (SIMPLE_P(type) && ! type->attribute.memory_size) { type->attribute.memory_size = allocate_struct (type); return 1; } if (ENUM_P(type) && ! type->attribute.memory_size) { type->attribute.memory_size = allocate_struct (type); return 1; } if (NULL == walk) return 0; switch (type->attribute.function_class) { case ARRAY: { if (!type->output->attribute.memory_size) allocate_aggregate (type->output); size = 1; if (0 >= ((struct range *)walk->attribute.domain)->upper) return 0; while (walk) { size *= (((struct range *) walk->attribute.domain)->upper - ((struct range *) walk->attribute.domain)->lower); walk->attribute.memory_size = size * type->output->attribute.memory_size; walk = walk->arity; } type->attribute.memory_size = size * type->output->attribute.memory_size; } break; case STRUCT_FC: while (walk) { if (!walk->attribute.memory_size) { if (ARRAY_P(walk) || STRUCT_P(walk)) allocate_aggregate (walk); else walk->attribute.memory_size += allocate_struct (walk); } type->attribute.memory_size += walk->attribute.memory_size; /* First structure member must be always aligned. */ if (!first_align) first_align = walk->attribute.memory_size > MAX_ALIGNMENT ? MAX_ALIGNMENT : walk->attribute.memory_size; /* We have to find out if the alignment occured. */ if (walk->attribute.memory_size <= MAX_ALIGNMENT) size = type->attribute.memory_size % walk->attribute.memory_size; else size = type->attribute.memory_size % MAX_ALIGNMENT; if (size > 0 && walk->attribute.memory_size <= MAX_ALIGNMENT) type->attribute.memory_size += walk->attribute.memory_size - size; else if (size > 0) type->attribute.memory_size += MAX_ALIGNMENT - size; walk->offset = type->attribute.memory_size - walk->attribute.memory_size; walk = walk->arity; } size = type->attribute.memory_size % first_align; if (size > 0) /* If the size of the structure is not aligned according to the first structure member, do it now. If it wouldn't be aligned, then it cannot be in the array. */ type->attribute.memory_size += first_align - size; break; case UNION_FC: while (walk) { if (!walk->attribute.memory_size) { if (ARRAY_P(walk) || STRUCT_P(walk)) allocate_aggregate (walk); else walk->attribute.memory_size = allocate_struct (walk); } if (type->attribute.memory_size < walk->attribute.memory_size) { type->attribute.memory_size = walk->attribute.memory_size; /* We have to find out if the alignment occured. */ if (walk->attribute.memory_size <= MAX_ALIGNMENT) size = type->attribute.memory_size % walk->attribute.memory_size; else size = type->attribute.memory_size % MAX_ALIGNMENT; if (size > 0 && walk->attribute.memory_size <= MAX_ALIGNMENT) type->attribute.memory_size += walk->attribute.memory_size - size; else if (size > 0) type->attribute.memory_size += MAX_ALIGNMENT - size; } walk = walk->arity; } break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5002); abort (); break; } return 1; } /* Static variables are put into tables. */ static void putstruct_static (type) struct ident_tab_loc *type; { switch (type->type->attribute.function_class) { case LOCAL: case REMOTE_F: break; case SIMPLE: switch (type->type->attribute.type_qualifier) { case CONST_TQ: type->adr = type->type->attribute.domain; break; case VOLATILE_TQ: fprintfx (stderr, "VOLATILE not supported in bookkeeping\n"); break; default: break; } type->type->attribute.memory_size = allocate_var (type->type, &(type->adr)); break; case ARRAY: /* Variables of type array. */ put_array_subscript (&(type->type)); type->body = allocate_aggregate (type->type); type->adr = kodp; { int i; for (i = 0; i < type->type->attribute.memory_size; i++) *kodp++ = 0; } break; case ENUM_FC: type->type->attribute.memory_size = allocate_var (type->type, &(type->adr)); break; case STRUCT_FC: if (!type->body) type->body = body_flag = allocate_aggregate (type->type); type->adr = kodp; { int i; for (i = 0; i < type->type->attribute.memory_size; i++) *kodp++ = 0; } break; case UNION_FC: if (!type->body) type->body = body_flag = allocate_aggregate (type->type); type->adr = kodp; { int i; for (i = 0; i < type->type->attribute.memory_size; i++) *kodp++ = 0; } break; case POINTER: type->adr = kodp; kodp += POINTER_SIZE; *(char **)type->adr = NULL; break; case LIB: fprintfx (stderr, "LIB not fully supported in book-keeping\n"); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5002); abort (); } } /* The enter_file_scope and exit_file_scope have special meaning. They are used in file scope static variables. */ void enter_file_scope () { if (!identtab_loc) identtab_loc = allocate_loc_tables (identtab_loc); if (identtab_loc->file_scope != spf[s].name) identtab_loc->file_scope = spf[s].name; } void exit_file_scope () { if (identtab_loc && identtab_loc->file_scope == spf[s].name) identtab_loc->file_scope = NULL; } /* If the name is declared as typedef return it as TYPENAME token - true (1); IDENT - false (0), otherwise. */ int typedef_p (name) char *name; { struct tab *pa = NULL; struct ident_tab_header *walk = identtab_loc; if (! typedef_f) return 0; if (identtab_loc) { /* Walk through all tables of locals. */ while (NULL == (pa = lookup_loc (name, walk))) { if (walk->previous_level) walk = walk->previous_level; else break; } } if (pa && TYPEDEF_P((walk->table + pa->def)->type)) return 1; else if (NULL == pa) { pa = lookup (name); if (pa && TYPEDEF_P((identtab + pa->def)->type)) return 1; } return 0; } /* Returns the declaration line of a variable. Called from error_message function. */ int get_declaration_line (name) char *name; { struct tab *pa = NULL; struct ident_tab_header *walk = identtab_loc; if (identtab_loc) { /* Walk through all tables of locals. */ while (NULL == (pa = lookup_loc (name, walk))) { if (walk->previous_level) walk = walk->previous_level; else break; } } if (pa) return pa->declaration_line; pa = lookup (name); if (pa) return pa->declaration_line; return 0; } /* Walk recursively through the type tree. Return the size of the subtype. */ static int memory_size (level, walk) int *level; struct internal_type *walk; { int result = 0; if (! *level && walk->attribute.memory_size) return walk->attribute.memory_size; if (*level && ! result && walk->output) { *level -= 1; result = memory_size (level, walk->output); if (ARRAY_P(walk) && ! (STRUCT_P(walk->output) || UNION_P(walk->output))) { /* If the array has as fields structures or unions, we must walk down the subtypes to know the sizes. */ *level += 1; result = 0; } } if (*level && ! result && walk->input) { if (! ARRAY_P(walk)) *level -= 1; result = memory_size (level, walk->input); } if (*level && ! result && walk->arity) { *level -= 1; result = memory_size (level, walk->arity); } return result; } /* Find out if the number of brackets is equal to the number of subtypes declared in the type, i.e. the initialization expression is fully bracketed. */ static void check_init_bracket (level, walk, buf) int *level; struct internal_type *walk; char *buf; { /* Trying to reconstruct the initializer in the case of an error. */ if (STRUCT_P(walk) && (strlen (walk->input->field_name) + strlen (buf) < BUFSIZ - 1)) { strcat (buf, "."); strcat (buf, walk->input->field_name); } else if ((ARRAY_P(walk) || walk->arity) && (strlen (buf) + 4 < BUFSIZ)) strcat (buf, "[0]"); if (walk->output) { *level += 1; check_init_bracket (level, walk->output, buf); if (ARRAY_P(walk)) { int i = strlen (buf) - 1; if (']' == buf[i]) buf[i - 2] = '\0'; *level -= 1; } } if (walk->input) { *level += 1; check_init_bracket (level, walk->input, buf); if (walk->arity) *level -= 1; } if (walk->arity) { *level += 1; check_init_bracket (level, walk->arity, buf); } } /* Wrapper to error reporting and memory size. */ int get_memory_size (level, walk, initializer_number) int level; struct internal_type *walk; int initializer_number; { char buf[BUFSIZ]; static int aggregate_level; int j; if (1 == initializer_number) { aggregate_level = 0; if (strncpy (buf, text, BUFSIZ)) check_init_bracket (&aggregate_level, walk, buf); if (aggregate_level > level) error_message (6030, buf); } if (1 == level) j = 1; else j = aggregate_level - level; return memory_size (&j, walk); } /* Recursive funtion. Returns the size of the field in struct or union. Called during variable initialization. */ int get_field_size (pos, walk) int *pos; struct internal_type *walk; { int result = 0; if (SIMPLE_P(walk) && walk->attribute.memory_size) { result = walk->attribute.memory_size; (*pos)--; } if (*pos && !SIMPLE_P(walk) && walk->output) result = get_field_size (pos, walk->output); if (*pos && (STRUCT_P(walk) || UNION_P(walk)) && walk->input) result = get_field_size (pos, walk->input); return result; } /* If the local variable was not initialized, usage counter is reset. */ void noninitialized_loc (var_name) char *var_name; { struct tab *pa = NULL; if (identtab_loc) pa = lookup_loc (var_name, identtab_loc); if (pa) { pa->count--; pa->use_line_number = 0; } } clif-0.93/tables.h100444 1750 1750 6752 6637002526 12562 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * tables.h */ #ifndef _TABLES_H #define _TABLES_H #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif extern int hastab_init PROTO((void)); extern int identtab_init PROTO((void)); extern int hastab_goto_init PROTO((void)); extern enum intern_arit_class integer_cons; extern enum intern_arit_class doub_cons; extern enum intern_arit_class flt_cons; extern enum intern_arit_class chr_cons; extern enum intern_arit_class vid_cons; /* Type of an operand in an expression. Length of an expression is limited to * 256 operands. */ extern enum intern_arit_class type_ac[]; extern int has PROTO((char *)); extern int point_call PROTO((char *)); extern int has_loc PROTO((int, char *)); extern int has_goto PROTO((char *)); extern int has_label PROTO((char *)); extern int has_tag PROTO((int, char *)); extern void fix_and_clear_goto_table PROTO((void)); extern void clear_hash_tab PROTO((void)); extern void clear_tag_tab PROTO((void)); /* Returns address of a global variable. */ extern struct ident_tab *point PROTO((char *)); /* Returns address of a local variable. */ extern struct ident_tab_loc *point_loc PROTO((char *)); extern void set_value PROTO((char *)); /* Adding information about type specifiers of formal parameters to the hash table. If it was done during declaration checking if it matches the definition. */ extern int add_spec_to_has PROTO((void)); /* Adding identifiers of formal parameters to the hash table. If it was done during declaration checking if it matches the definition. */ extern int add_ident_to_has PROTO((void)); /* Adding information about type specifiers of struct, union or enum fields to the hash table. */ extern int add_spec_to_tag PROTO((void)); /* Adding identifiers of struct, union or enum fields to the hash table. */ extern int add_ident_to_tag PROTO((void)); extern void link_function PROTO((int)); /* Clears hash table of local variables. */ extern void clear_hash_tab_declaration PROTO((void)); extern void init_zero PROTO((char *, unsigned)); extern int scope_offset_get PROTO((void)); extern int scope_offset_set PROTO((int)); extern int offset_aggregate_ident PROTO((void)); /* Adjust memory position for a type. */ extern void align_memory PROTO((char **, int)); extern void enter_file_scope PROTO((void)); extern void exit_file_scope PROTO((void)); extern int typedef_p PROTO((char *)); extern int get_declaration_line PROTO((char *)); extern int get_memory_size PROTO((int, struct internal_type *, int)); extern int get_field_size PROTO((int *, struct internal_type *)); extern void noninitialized_loc PROTO((char *)); #endif clif-0.93/token.h100644 1750 1750 3220 7130600325 12403 0ustar korenkorentypedef union { int myint; unsigned int myuint; long int mylint; long unsigned int myluint; double mydouble; long double myldouble; float myfloat; char *mystring; wchar_t *mywstring; char mychar; } YYSTYPE; #define NUMBERI 257 #define NUMBERUI 258 #define NUMBERLI 259 #define NUMBERLUI 260 #define NUMBERD 261 #define NUMBERLD 262 #define NUMBERF 263 #define STRINGC 264 #define WSTRINGC 265 #define NUMBERC 266 #define AUTO 267 #define STATIC 268 #define REGISTER 269 #define EXTERN 270 #define REMOTE 271 #define UNLOAD 272 #define INTRINSIC 273 #define RPC 274 #define IDENT 275 #define INT 276 #define DOUBLE 277 #define FLOAT 278 #define CHAR 279 #define VOID 280 #define LONG 281 #define SHORT 282 #define SIGNED 283 #define UNSIGNED 284 #define CONST 285 #define VOLATILE 286 #define ENUM 287 #define STRUCT 288 #define UNION 289 #define EXIT 290 #define IF 291 #define ELSE 292 #define SIZEOF 293 #define SWITCH 294 #define WHILE 295 #define FOR 296 #define DO 297 #define CONTINUE 298 #define BREAK 299 #define RETURN 300 #define GOTO 301 #define CASE 302 #define DEFAULT 303 #define CSUSPEND 304 #define RESUME 305 #define EXPORT_T 306 #define TYPEDEF 307 #define TYPENAME 308 #define MUL_ASSIGN 309 #define DIV_ASSIGN 310 #define MOD_ASSIGN 311 #define ADD_ASSIGN 312 #define SUB_ASSIGN 313 #define LEFT_ASSIGN 314 #define RIGHT_ASSIGN 315 #define AND_ASSIGN 316 #define XOR_ASSIGN 317 #define OR_ASSIGN 318 #define OR_A 319 #define AND_A 320 #define EQ_A 321 #define NE_A 322 #define LQ 323 #define GQ 324 #define SHIL 325 #define SHIR 326 #define NEG_T 327 #define NEG_B 328 #define PP 329 #define MM 330 #define PTR 331 extern YYSTYPE yylval; clif-0.93/type.h100444 1750 1750 12601 6630060614 12272 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * type.h * * Internal compiler representation of types. */ #ifndef TYPE_H #define TYPE_H #define INTERNAL_TYPE(SYMBOL, VALUE) SYMBOL=VALUE, enum intern_arit_class { INTERNAL_TYPE(UNUSED_AC, 0) INTERNAL_TYPE(VID, 0x1) /* Void */ INTERNAL_TYPE(CHR, 0x2) /* Char */ INTERNAL_TYPE(SHORT_AC, 0x4) /* Short */ INTERNAL_TYPE(INTEGER, 0x8) /* Integer */ INTERNAL_TYPE(LONG_AC, 0x10) /* Long */ INTERNAL_TYPE(FLT, 0x20) /* Float */ INTERNAL_TYPE(DOUB, 0x40) /* Double */ INTERNAL_TYPE(SIGNED_AC, 0x80) /* Signed */ INTERNAL_TYPE(UNSIGNED_AC, 0x100) /* Unsigned */ LAST_AND_UNUSED_ARIT_CLASS }; #define PAR 512 /* Formal parameter. */ #define VAR 768 /* Local variable. */ enum intern_func_class { INTERNAL_TYPE(SIMPLE, 1024) INTERNAL_TYPE(ARRAY, 1025) INTERNAL_TYPE(LIB, 1026) INTERNAL_TYPE(TYPE, 1027) /* Flag for typedef. */ INTERNAL_TYPE(POINTER, 1028) /* Pointer flag. */ INTERNAL_TYPE(STRUCT_FC, 1029) /* Structure flag. */ INTERNAL_TYPE(UNION_FC, 1030) /* Union flag. */ INTERNAL_TYPE(ENUM_FC, 1031) /* Enum flag. */ INTERNAL_TYPE(LOCAL, 2048) /* Local functions or variables. */ INTERNAL_TYPE(REMOTE_F, 2049) /* Remote functions. */ LAST_AND_UNUSED_FUNC_CLASS }; #define YES 2050 #define NOT_DEFINED -2 /* Not defined range for arrays. */ /* * Global types */ enum global_type { #define GLOBAL_TYPE(SYMBOL, VALUE) SYMBOL=VALUE, GLOBAL_TYPE(INTEGERS, 1280) /* Simple integer */ GLOBAL_TYPE(UINTEGERS, 1281) GLOBAL_TYPE(LINTEGERS, 1282) GLOBAL_TYPE(LUINTEGERS, 1283) GLOBAL_TYPE(SINTEGERS, 1284) GLOBAL_TYPE(SUINTEGERS, 1285) GLOBAL_TYPE(DOUBS, 1286) /* Simple double */ GLOBAL_TYPE(LDOUBS, 1287) GLOBAL_TYPE(FLTS, 1288) /* Simple float */ GLOBAL_TYPE(CHRS, 1289) /* Simple char */ GLOBAL_TYPE(SCHRS, 1290) GLOBAL_TYPE(UCHRS, 1291) GLOBAL_TYPE(INTEGERAR, 1536) /* Array of integers */ GLOBAL_TYPE(DOUBAR, 1537) /* Array of doubles */ GLOBAL_TYPE(FLTAR, 1538) /* Array of floats */ GLOBAL_TYPE(CHRAR, 1539) /* Array of chars */ LAST_AND_UNUSED_GLOBAL_TYPE #undef GLOBAL_TYPE }; enum type_qual { #define TYPE_QUAL(SYMBOL, VALUE) SYMBOL=VALUE, TYPE_QUAL(CONST_TQ, 4096) TYPE_QUAL(VOLATILE_TQ, 4097) TYPE_QUAL(UNDEF_TQ, 4098) LAST_AND_UNUSED_TYPE_QUAL #undef TYPE_QUAL }; enum storage_class_specifier { #define SC_SPEC(SYMBOL, VALUE) SYMBOL=VALUE, SC_SPEC(TYPEDEF_SC, 8192) SC_SPEC(EXTERN_SC, 8193) SC_SPEC(EXPORT_SC, 8194) SC_SPEC(STATIC_SC, 8195) SC_SPEC(AUTO_SC, 8196) SC_SPEC(REGISTER_SC, 8197) SC_SPEC(UNSPEC_SC, 8198) LAST_AND_UNUSED_SC_SPEC #undef SC_SPEC }; #define POINTER_P(a) (POINTER == (a)->attribute.function_class) #define STRUCT_P(a) (STRUCT_FC == (a)->attribute.function_class) #define UNION_P(a) (UNION_FC == (a)->attribute.function_class) #define ENUM_P(a) (ENUM_FC == (a)->attribute.function_class) #define ARRAY_P(a) (ARRAY == (a)->attribute.function_class) #define SIMPLE_P(a) (SIMPLE == (a)->attribute.function_class) #define LOCAL_P(a) (LOCAL == (a)->attribute.function_class) #define REMOTE_P(a) (REMOTE_F == (a)->attribute.function_class) #define TYPEDEF_P(type) \ (TYPEDEF_SC == (type)->attribute.storage_class_specifier) #define EXTERN_P(type) \ (EXTERN_SC == (type)->attribute.storage_class_specifier) #define EXPORT_P(type) \ (EXPORT_SC == (type)->attribute.storage_class_specifier) #define STATIC_P(type) \ (STATIC_SC == (type)->attribute.storage_class_specifier) #define AUTO_P(type) \ (AUTO_SC == (type)->attribute.storage_class_specifier) #define REGISTER_P(type) \ (REGISTER_SC == (type)->attribute.storage_class_specifier) #define UNSPEC_P(type) \ (UNSPEC_SC == (type)->attribute.storage_class_specifier) #define VOID_P(type) (VID & (type)->attribute.arit_class) #define CHAR_P(type) (CHR & (type)->attribute.arit_class) #define SHORT_P(type) (SHORT_AC & (type)->attribute.arit_class) #define INTEGER_P(type) (INTEGER & (type)->attribute.arit_class) #define LONG_P(type) (LONG_AC & (type)->attribute.arit_class) #define FLOAT_P(type) (FLT & (type)->attribute.arit_class) #define DOUBLE_P(type) (DOUB & (type)->attribute.arit_class) #define SIGNED_P(type) (SIGNED_AC & (type)->attribute.arit_class) #define UNSIGNED_P(type) (UNSIGNED_AC & (type)->attribute.arit_class) #define UNUSED_P(type) (UNUSED_AC == (type)->attribute.arit_class) #define TYPES_EQ_P(type1, type2) \ ((type1)->attribute.arit_class & (type2)->attribute.arit_class) #define CONST_P(type) (CONST_TQ == (type)->attribute.type_qualifier) #define UNDEF_P(type) (UNDEF_TQ == (type)->attribute.type_qualifier) #endif /* TYPE_H */ clif-0.93/version.h100444 1750 1750 33 7130610203 12701 0ustar korenkorenchar version[] = {"0.93"}; clif-0.93/virtual_machine.c100444 1750 1750 620374 6560552273 14523 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * virtual_machine.c * * Virtual stack machine. */ #include #include #include "global.h" /* Global variables. */ #include "config.h" #include "cast.h" /* Header of used cast operators. */ #include "instr.h" /* * Header of structures. * Defines size of virtual machine instructions. */ #include "input.h" /* Redefining of input function. */ #include "virtual_machine.h" #include "printfx.h" #include "tables.h" #include "lex_t.h" #include "dbg-out.h" #define MASK 3 /* Mask for aligning strings in the stack of temporaries. */ static int exe PROTO((char *)); static void mod_yes PROTO((void)); static void div_yes PROTO((void)); static void divui_yes PROTO((void)); static void divli_yes PROTO((void)); static void divlui_yes PROTO((void)); static void divd_yes PROTO((void)); static void divld_yes PROTO((void)); static void divf_yes PROTO((void)); #if 0 static void divc_yes PROTO((void)); #endif static void vtrue PROTO((void)); static void vfalse PROTO((void)); static void move_stack_aligned PROTO((char **, int)); #ifndef FLEX_SCANNER extern int input_std PROTO((void)); #else extern void switch_to_stdin PROTO((void)); #endif extern FILE *cop; extern void (*(f[]))(); extern void store_context PROTO((void)); extern int dbg_symbols; int exec() /* Code execution. */ { int a; do { #ifdef DEBUG printfx ("\nvirt.pc = %u\n",pc); #endif if (dbg_symbols) dbg_print (pc); a = exe (pc); #ifndef NOT_MSWIN_AND_YES_DOS if (HANDLER_TEST) { store_context (); fprintfx (stderr, "\nclif interrupt level %d\n", CLIF_INTERRUPT_LEVEL_INCREMENT); /* * Interrupt is accepted only if virtual machine is running. * Virtual machine instruction is not interruptible. * Interrupts are only accepted between two virtual machine * instructions (not in a virtual machine instruction). */ #ifdef FLEX_SCANNER switch_to_stdin (); #else input = input_std; #endif HANDLER_SET; break; } #endif } while (a == 0); if (a == -2) return (0); /* End of interpreter session. */ else return (1); } static int exe (pc1) /* Simulation of virtual stack machine. */ char *pc1; { int binar, counter; unsigned int binaru; long int binarl; long unsigned int binarlu; #if 0 short int binars; short unsigned int binarsu; #endif double binard; long double binarld; float binarf; #if 0 char binarc; signed char binarcs; unsigned char binarcu; #endif /*struct {*/ static char *adr_arg[256]; /* Addresses of remote functions. */ /* } A;*/ switch (((struct OPERAND_0_ma *)pc1)->major) { case MOV: switch (((struct OPERAND_1_mi *)pc1)->minor) { /* [ADR] <- [[AST]] */ case 0: CCI CS (ast + sizeof (char *)) = CCI CS ast; #ifdef DEBUG printfx ("MOV to address = %u,ast\n", (CS (ast + sizeof (char *)))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address = %u value %d\n", (CS (ast + sizeof (char *))), CCI CS (ast + sizeof (char *))); #endif ast += sizeof (char *); pc += sizeof (struct OPERAND_0_mi); break; /* BP <- STACK */ case 1: bp = stack; #ifdef DEBUG printfx ("MOV bp <- stack\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV bp <- stack\n"); #endif pc += sizeof (struct OPERAND_0_mi); break; /* STACK <- BP */ case 2: stack = bp; #ifdef DEBUG printfx ("MOV stack <- bp \n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV stack <- bp\n"); #endif pc += sizeof (struct OPERAND_0_mi); break; /* TMPH <- TMP */ case 3: tmph = tmp; #ifdef DEBUG printfx ("MOV tmph <- tmp \n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV tmph <- tmp\n"); #endif pc += sizeof (struct OPERAND_0_mi); break; /* FRAME <- STACK */ case 4: frame = stack; #ifdef DEBUG printfx ("MOV frame <- stack \n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV frame <- stack\n"); #endif pc += sizeof (struct OPERAND_0_mi); break; /* STACK <- FRAME */ case 5: stack = frame; #ifdef DEBUG printfx ("MOV stack <- frame \n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV stack <- frame \n"); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [AST] <- [AST] */ case 6: ast -= sizeof (char *); CS ast = CS (ast + sizeof (char *)); #ifdef DEBUG printfx ("MOV ast <- ast \n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV ast <- ast \n"); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [AST] <- [[AST]] */ case 7: CS ast = (void *) CCLI CS ast; #ifdef DEBUG printfx ("MOV ast <- [ast] \n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV ast <- [ast] \n"); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [AST] <- [AST] */ case 8: move_stack_aligned (&tmp, -POINTER_SIZE); CCLI tmp = (long int) CS ast; CS ast = tmp; #ifdef DEBUG printfx ("MOV ast <- [ast] \n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV ast <- [ast] \n"); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [AST] <- [(AST - 1) + [AST]] */ case 9: CS (ast + sizeof (char *)) = (void *) (CS (ast + sizeof (char *)) + CCI CS ast); #ifdef DEBUG printfx ("MOV ast <- [(ast - 1) + [ast]] \n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV ast <- [(ast - 1) + [ast]]\n"); #endif ast += sizeof (char *); pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- [[AST]] */ case 10: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = CCI CS ast; ast -= sizeof (char *); CS ast = tmp; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address=%u value %d\n", CS ast, CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [(AST - 2)] <- [(AST - 1) + [AST]] */ case 11: CCC (CS (ast + 2 * sizeof (char *)) + CCI CS ast) = CCC (CS (ast + sizeof (char *)) + CCI CS ast); #ifdef DEBUG printfx ("MOV [(ast - 2)] <- [(ast - 1) + [ast]] \n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV [(ast - 2)] <- [(ast - 1) + [ast]]\n"); #endif ast += sizeof (char *); pc += sizeof (struct OPERAND_0_mi); break; /* [ADR] <- [[AST]] */ case 12: CCUI CS (ast + sizeof (char *)) = CCUI CS ast; #ifdef DEBUG printfx ("MOV to address = %u,ast\n", (CS (ast + sizeof (char *)))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address = %u value %u\n", (CS (ast + sizeof (char *))), CCUI CS (ast + sizeof (char *))); #endif ast += sizeof (char *); pc += sizeof (struct OPERAND_0_mi); break; /* [ADR] <- [[AST]] */ case 13: CCLI CS (ast + sizeof (char *)) = CCLI CS ast; #ifdef DEBUG printfx ("MOV to address = %u,ast\n", (CS (ast + sizeof (char *)))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address = %u value %ld\n", (CS (ast + sizeof (char *))), CCLI CS (ast + sizeof (char *))); #endif ast += sizeof (char *); pc += sizeof (struct OPERAND_0_mi); break; /* [ADR] <- [[AST]] */ case 14: CCLUI CS (ast + sizeof (char *)) = CCLUI CS ast; #ifdef DEBUG printfx ("MOV to address = %u,ast\n", (CS (ast + sizeof (char *)))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address = %u value %lu\n", (CS (ast + sizeof (char *))), CCLUI CS (ast + sizeof (char *))); #endif ast += sizeof (char *); pc += sizeof (struct OPERAND_0_mi); break; /* [ADR] <- [[AST]] */ case 15: CCSI CS (ast + sizeof (char *)) = CCSI CS ast; #ifdef DEBUG printfx ("MOV to address = %u,ast\n", (CS (ast + sizeof (char *)))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address = %u value %hd\n", (CS (ast + sizeof (char *))), CCSI CS (ast + sizeof (char *))); #endif ast += sizeof (char *); pc += sizeof (struct OPERAND_0_mi); break; /* [ADR] <- [[AST]] */ case 16: CCSUI CS (ast + sizeof (char *)) = CCSUI CS ast; #ifdef DEBUG printfx ("MOV to address = %u,ast\n", (CS (ast + sizeof (char *)))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address = %u value %hu\n", (CS (ast + sizeof (char *))), CCSUI CS (ast + sizeof (char *))); #endif ast += sizeof (char *); pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- [[AST]] */ case 17: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = CCUI CS ast; ast -= sizeof (char *); CS ast = tmp; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address=%u value %u\n", CS ast, CCUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- [[AST]] */ case 18: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = CCLI CS ast; ast -= sizeof (char *); CS ast = tmp; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address=%u value %ld\n", CS ast, CCLI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- [[AST]] */ case 19: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = CCLUI CS ast; ast -= sizeof (char *); CS ast = tmp; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address=%u value %lu\n", CS ast, CCLUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- [[AST]] */ case 20: move_stack_aligned (&tmp, -sizeof (short int)); CCSI tmp = CCSI CS ast; ast -= sizeof (char *); CS ast = tmp; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address=%u value %hd\n", CS ast, CCSI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- [[AST]] */ case 21: move_stack_aligned (&tmp, -sizeof (short unsigned int)); CCSUI tmp = CCSUI CS ast; ast -= sizeof (char *); CS ast = tmp; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address=%u value %hu\n", CS ast, CCSUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [ADR] <- [[AST]] */ case 256: CCD CS (ast + sizeof (char *)) = CCD CS ast; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS(ast + sizeof (char *))); #endif #ifdef CODE fprintfx (cop, "\n%u ",pc1); fprintfx (cop, "MOV to address=%u value %lf\n", CS (ast + sizeof (char *)), CCD CS (ast + sizeof (char *))); #endif ast += sizeof (char *); pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- [[AST]] */ case 257: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = CCD CS ast; ast -= sizeof (char *); CS ast = tmp; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address=%u value %lf\n", CS ast, CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [ADR] <- [[AST]] */ case 258: CCLD CS (ast + sizeof (char *)) = CCLD CS ast; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS(ast + sizeof (char *))); #endif #ifdef CODE fprintfx (cop, "\n%u ",pc1); fprintfx (cop, "MOV to address=%u value %lf\n", CS (ast + sizeof (char *)), CCLD CS (ast + sizeof (char *))); #endif ast += sizeof (char *); pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- [[AST]] */ case 259: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = CCLD CS ast; ast -= sizeof (char *); CS ast = tmp; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address=%u value %lf\n", CS ast, CCLD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [ADR] <- [[AST]] */ case 512: CCF CS (ast + sizeof (char *)) = CCF CS ast; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS (ast + sizeof (char *))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address=%u value %lf\n", CS (ast + sizeof (char *)), CCF CS (ast + sizeof (char *))); #endif ast += sizeof (char *); pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- [[AST]] */ case 513: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = CCF CS ast; ast -= sizeof (char *); CS ast = tmp; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address=%u value %lf\n", CS ast, CCF CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [ADR] <- [[AST]] */ case 768: CCC CS (ast + sizeof (char *)) = CCC CS ast; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS (ast + sizeof (char *))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address=%u value %d\n", CS (ast + sizeof (char *)), CCC CS (ast + sizeof (char *))); #endif ast += sizeof (char *); pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- [[AST]] */ case 769: move_stack_aligned (&tmp, -sizeof (char)); CCC tmp = CCC CS ast; ast -= sizeof (char *); CS ast = tmp; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address=%u value %d\n", CS ast, CCC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [ADR] <- [[AST]] */ case 770: CCSC CS (ast + sizeof (char *)) = CCSC CS ast; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS (ast + sizeof (char *))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address=%u value %d\n", CS (ast + sizeof (char *)), CCSC CS (ast + sizeof (char *))); #endif ast += sizeof (char *); pc += sizeof (struct OPERAND_0_mi); break; /* [ADR] <- [[AST]] */ case 771: CCUC CS (ast + sizeof (char *)) = CCUC CS ast; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS (ast + sizeof (char *))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address=%u value %u\n", CS (ast + sizeof (char *)), CCUC CS (ast + sizeof (char *))); #endif ast += sizeof (char *); pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- [[AST]] */ case 772: move_stack_aligned (&tmp, -sizeof (signed char)); CCSC tmp = CCSC CS ast; ast -= sizeof (char *); CS ast = tmp; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address=%u value %d\n", CS ast, CCSC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- [[AST]] */ case 773: move_stack_aligned (&tmp, -sizeof (unsigned char)); CCUC tmp = CCUC CS ast; ast -= sizeof (char *); CS ast = tmp; #ifdef DEBUG printfx ("MOV to address=%u,ast\n", CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOV to address=%u value %u\n", CS ast, CCUC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; default : fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; /* TMP <- TMPH */ case CLRT: tmp = tmph; pc += sizeof (struct OPERAND_0_ma); #ifdef DEBUG printfx ("temporary stack cleared"); #endif #ifdef CODE fprintfx (cop,"\n%u ",pc1); fprintfx (cop,"CLRT\n"); #endif break; case CVT: switch (((struct OPERAND_0_mi *)pc1)->minor) { /* integer -> double */ case 0: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("integer converted to double on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT integer to double on the top %lf\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* integer -> double */ case 1: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("integer converted to double at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT integer to double at the bottom %lf\n", CCD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* double -> integer */ case 2: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = (int)CCD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("double converted to integer\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT double to integer %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* integer -> float */ case 3: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("integer converted to float on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT integer to float on the top %g\n", CCF CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* integer -> float */ case 4: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("integer converted to float at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT integer to float at the bottom %g\n", CCF CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* float -> integer */ case 5: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = (int)CCF CS ast; CS ast = tmp; #ifdef DEBUG printfx ("float converted to integer\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT float to integer %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* float -> double */ case 6: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCF CS ast; CS ast = tmp; #ifdef DEBUG printfx ("float converted to double on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT float to double on the top %lf\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* float -> double */ case 7: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCF CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("float converted to double at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT float to double at the bottom %lf\n", CCD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* double -> float */ case 8: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("double converted to float\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT double to float %g\n", CCF CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* char -> integer */ case 9: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = (int)CCC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("char converted to integer on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT char to integer on the top %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* char -> integer */ case 10: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = (int)CCC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("char converted to integer at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT char to integer at the botttom %d\n", CCI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* integer -> char */ case 11: move_stack_aligned (&tmp, -sizeof (int)); CCC tmp = (char)CCI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("integer converted to char\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT integer to char %d\n", CCC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* char -> double */ case 12: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("char converted to double on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT char to double on the top %lf\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* char -> double */ case 13: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("char converted to double at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT char to double at the bottom %lf\n", CCD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* double -> char */ case 14: move_stack_aligned (&tmp, -sizeof (int)); CCC tmp = (char)CCD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("double converted to char\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT double to char %d\n", CCC CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* char -> float */ case 15: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("char converted to float\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT char to float on the top %g\n", CCF CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* char -> float */ case 16: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("char converted to float at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT char to float at the bottom %g\n", CCF CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* float -> char */ case 17: move_stack_aligned (&tmp, -sizeof (int)); CCC tmp = (char)CCF CS ast; CS ast = tmp; #ifdef DEBUG printfx ("float converted to char\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT float to char %d\n", CCC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned int -> double */ case 18: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned int' converted to `double'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned int' to `double' on the top %g\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned int -> double */ case 19: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCUI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`unsigned int' converted to `double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned int' to `double' at the bottom %g\n", CCD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned int -> float */ case 20: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned int' converted to `float' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned int' to `float' on the top %g\n", CCF CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned int -> float */ case 21: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCUI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`unsigned int' converted to `float' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned int' to `float' at the bottom %g\n", CCF CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned int -> long int */ case 22: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned int' converted to `long int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned int' to `long int' on the top %ld\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned int -> long int */ case 23: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCUI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`unsigned int' converted to `long int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned int' to `long int' at the bottom %ld\n", CCLI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef UINT_EQ_ULONG /* unsigned int -> long unsigned int */ case 24: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned int' converted to `long unsigned int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned int' to `long unsigned int' on the top %lu\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned int -> long unsigned int */ case 25: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCUI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`unsigned int' converted to `long unsigned int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned int' to `long unsigned int' at the bottom %lu\n", CCLUI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* unsigned int -> int */ case 26: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = (int)CCUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned int' converted to `int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned int' to `int' %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef SHORT_EQ_INT /* unsigned int -> short int */ case 27: move_stack_aligned (&tmp, -sizeof (short int)); CCSI tmp = (short int)CCUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned int' converted to `short int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned int' to `short int' %hd\n", CCSI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_USHORT /* unsigned int -> short unsigned int */ case 28: move_stack_aligned (&tmp, -sizeof (short unsigned int)); CCSUI tmp = (short unsigned int)CCUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned int' converted to `short unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned int' to `short unsigned int' %hu\n", CCSUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* unsigned int -> char */ case 29: move_stack_aligned (&tmp, -sizeof (char)); CCC tmp = (char)CCUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned int' converted to `char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned int' to `char' %d\n", CCC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned int -> signed char */ case 30: move_stack_aligned (&tmp, -sizeof (signed char)); CCSC tmp = (signed char)CCUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned int' converted to `signed char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned int' to `signed char' %d\n", CCSC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned int -> signed char */ case 31: move_stack_aligned (&tmp, -sizeof (unsigned char)); CCUC tmp = (unsigned char)CCUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned int' converted to `unsigned char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned int' to `unsigned char' %d\n", CCUC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef LONG_EQ_INT /* long int -> double */ case 32: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCLI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long int' converted to `double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long int' to `double' %g on the top\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long int -> double */ case 33: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCLI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`long int' converted to `double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long int' to `double' %g at the bottom\n", CCD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long int -> float */ case 34: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCLI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long int' converted to `float' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long int' to `float' %g on the top\n", CCF CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long int -> float */ case 35: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCLI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`long int' converted to `float' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long int' to `float' %g at the bottom\n", CCF CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long int -> long unsigned int */ case 36: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCLI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long int' converted to `long unsigned int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long int' to `long unsigned int' %lu on the top\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long int -> float */ case 37: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCLI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`long int' converted to `long unsigned int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long int' to `long unsigned int' %lu at the bottom\n", CCLUI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long int -> int */ case 38: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = (int)CCLI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long int' converted to `int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long int' to `int' %d \n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long int -> unsigned int */ case 39: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCLI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long int' converted to `unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long int' to `unsigned int' %u\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef SHORT_EQ_INT /* long int -> short int */ case 40: move_stack_aligned (&tmp, -sizeof (short int)); CCSI tmp = (short int)CCLI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long int' converted to `short int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long int' to `short int' %hd\n", CCSI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* long int -> short unsigned int */ case 41: move_stack_aligned (&tmp, -sizeof (short unsigned int)); CCSUI tmp = (short unsigned int)CCLI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long int' converted to `short unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long int' to `short unsigned int' %hu\n", CCSUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long int -> char */ case 42: move_stack_aligned (&tmp, -sizeof (char)); CCC tmp = (char)CCLI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long int' converted to `char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long int' to `char' %d\n", CCC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long int -> signed char */ case 43: move_stack_aligned (&tmp, -sizeof (signed char)); CCSC tmp = (signed char)CCLI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long int' converted to `signed char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long int' to `signed char' %d\n", CCSC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long int -> unsigned char */ case 44: move_stack_aligned (&tmp, -sizeof (unsigned char)); CCUC tmp = (unsigned char)CCLI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long int' converted to `unsigned char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long int' to `unsigned char' %d\n", CCUC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_ULONG /* long unsigned int -> double */ case 45: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCLUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long unsigned int' converted to `double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long unsigned int' to `double' %g on the top\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long unsigned int -> double */ case 46: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCLUI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`long unsigned int' converted to `double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long unsigned int' to `double' %g at the bottom\n", CCD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long unsigned int -> float */ case 47: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCLUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long unsigned int' converted to `float' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long unsigned int' to `float' %g on the top\n", CCF CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long unsigned int -> float */ case 48: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCLUI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`long unsigned int' converted to `float' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long unsigned int' to `float' %g at the bottom\n", CCF CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long unsigned int -> long int */ case 49: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCLUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long unsigned int' converted to `long int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long unsigned int' to `long int' %ld\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long unsigned int -> unsigned int */ case 50: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCLUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long unsigned int' converted to `unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long unsigned int' to `unsigned int' %u\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long unsigned int -> int */ case 51: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = (int)CCLUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long unsigned int' converted to `int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long unsigned int' to `int' %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long unsigned int -> short unsigned int */ case 52: move_stack_aligned (&tmp, -sizeof (short unsigned int)); CCSUI tmp = (short unsigned int)CCLUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long unsigned int' converted to `short unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long unsigned int' to `short unsigned int' %hu\n", CCSUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long unsigned int -> short int */ case 53: move_stack_aligned (&tmp, -sizeof (short int)); CCSI tmp = (short int)CCLUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long unsigned int' converted to `short int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long unsigned int' to `short int' %hd\n", CCSI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long unsigned int -> char */ case 54: move_stack_aligned (&tmp, -sizeof (char)); CCC tmp = (char)CCLUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long unsigned int' converted to `char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long unsigned int' to `char' %d\n", CCC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long unsigned int -> signed char */ case 55: move_stack_aligned (&tmp, -sizeof (signed char)); CCSC tmp = (signed char)CCLUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long unsigned int' converted to `signed char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long unsigned int' to `signed char' %d\n", CCSC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long unsigned int -> unsigned char */ case 56: move_stack_aligned (&tmp, -sizeof (unsigned char)); CCUC tmp = (unsigned char)CCLUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long unsigned int' converted to `unsigned char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long unsigned int' to `unsigned char' %d\n", CCUC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef SHORT_EQ_INT /* short int -> double */ case 57: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCSI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short int' converted to `double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `double' %g on the top\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short int -> double */ case 58: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCSI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`short int' converted to `double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `double' %g at the bottom\n", CCD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short int -> float */ case 59: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCSI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short int' converted to `float' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `float' %g on the top\n", CCF CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short int -> float */ case 60: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCSI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`short int' converted to `float' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `float' %g at the bottom\n", CCF CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef LONG_EQ_INT /* short int -> long int */ case 61: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCSI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short int' converted to `long int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `long int' %ld on the top\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short int -> long int */ case 62: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCSI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`short int' converted to `long int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `long int' %ld at the bottom\n", CCLI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* short int -> long unsigned int */ case 63: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCSI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short int' converted to `long unsigned int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `long unsigned int' %lu on the top\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short int -> long unsigned int */ case 64: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCSI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`short int' converted to `long unsigned int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `long unsigned int' %lu at the bottom\n", CCLUI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short int -> int */ case 65: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = (int)CCSI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short int' converted to `int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `int' %d on the top\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short int -> int */ case 66: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = (int)CCSI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`short int' converted to `int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `int' %d at the bottom\n", CCI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short int -> unsigned int */ case 67: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCSI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short int' converted to `unsigned int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `unsigned int' %u on the top\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short int -> unsigned int */ case 68: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCSI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`short int' converted to `unsigned int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `unsigned int' %u at the bottom\n", CCUI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short int -> short unsigned int */ case 69: move_stack_aligned (&tmp, -sizeof (short unsigned int)); CCSUI tmp = (short unsigned int)CCSI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short int' converted to `short unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `short unsigned int' %hu\n", CCSUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short int -> char */ case 70: move_stack_aligned (&tmp, -sizeof (int)); CCC tmp = (char)CCSI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short int' converted to `char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `char' %d\n", CCC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short int -> unsigned char */ case 71: move_stack_aligned (&tmp, -sizeof (int)); CCUC tmp = (unsigned char)CCSI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short int' converted to `unsigned char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `unsigned char' %u\n", CCUC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short int -> signed char */ case 72: move_stack_aligned (&tmp, -sizeof (int)); CCSC tmp = (signed char)CCSI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short int' converted to `signed char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `signed char' %d\n", CCSC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_USHORT /* short unsigned int -> double */ case 73: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCSUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `double' %g on the top\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short unsigned int -> double */ case 74: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCSUI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `double' %g at the bottom\n", CCD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short unsigned int -> float */ case 75: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCSUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `float' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `float' %g on the top\n", CCF CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short unsigned int -> float */ case 76: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCSUI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `float' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `float' %g at the bottom\n", CCF CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short unsigned int -> long int */ case 77: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCSUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `long int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `long int' %ld on the top\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short unsigned int -> long int */ case 78: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCSUI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `long int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `long int' %ld at the bottom\n", CCLI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short unsigned int -> long unsigned int */ case 79: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCSUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `long unsigned int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `long unsigned int' %lu on the top\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short unsigned int -> long unsigned int */ case 80: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCSUI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `long unsigned int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `long unsigned int' %lu at the bottom\n", CCLUI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short unsigned int -> int */ case 81: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = (int)CCSUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `int' %d on the top\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short unsigned int -> int */ case 82: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = (int)CCSUI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `int' %d at the bottom\n", CCI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short unsigned int -> unsigned int */ case 83: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCSUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `unsigned int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `unsigned int' %u on the top\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short unsigned int -> unsigned int */ case 84: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCSUI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `unsigned int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `unsigned int' %u at the bottom\n", CCUI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short unsigned int -> short int */ case 85: move_stack_aligned (&tmp, -sizeof (short int)); CCSI tmp = (short int)CCSUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `short int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `short int' %hu\n", CCSI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short unsigned int -> char */ case 86: move_stack_aligned (&tmp, -sizeof (int)); CCC tmp = (char)CCSUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `char' %d\n", CCC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short unsigned int -> unsigned char */ case 87: move_stack_aligned (&tmp, -sizeof (int)); CCUC tmp = (unsigned char)CCSUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `unsigned char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `unsigned char' %u\n", CCUC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short unsigned int -> signed char */ case 88: move_stack_aligned (&tmp, -sizeof (int)); CCSC tmp = (signed char)CCSUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `signed char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `signed char' %d\n", CCSC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef LONG_EQ_INT /* char -> long int */ case 89: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`char' converted to `long int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `char' to `long int' %ld on the top\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* char -> long int */ case 90: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`char' converted to `long int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `char' to `long int' %ld at the bottom\n", CCLI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_ULONG /* char -> long unsigned int */ case 91: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`char' converted to `long unsigned int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `char' to `long unsigned int' %lu on the top\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* char -> long unsigned int */ case 92: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`char' converted to `long unsigned int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `char' to `long unsigned int' %lu at the bottom\n", CCLUI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* char -> unsigned int */ case 93: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`char' converted to `unsigned int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `char' to `unsigned int' %u on the top\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* char -> unsigned int */ case 94: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`char' converted to `unsigned int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `char' to `unsigned int' %u at the bottom\n", CCUI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef SHORT_EQ_INT /* char -> short int */ case 95: move_stack_aligned (&tmp, -sizeof (short int)); CCSI tmp = (short int)CCC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`char' converted to `short int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `char' to `short int' %hd\n", CCSI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_USHORT /* char -> short unsigned int */ case 96: move_stack_aligned (&tmp, -sizeof (short unsigned int)); CCSUI tmp = (short unsigned int)CCC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`char' converted to `short unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `char' to `short unsigned int' %hu\n", CCSUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* char -> signed char */ case 97: move_stack_aligned (&tmp, -sizeof (int)); CCSC tmp = (signed char)CCC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`char' converted to `signed char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `char' to `signed char' %d\n", CCSC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* char -> unsigned char */ case 98: move_stack_aligned (&tmp, -sizeof (int)); CCUC tmp = (unsigned char)CCC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`char' converted to `unsigned char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `char' to `unsigned char' %u\n", CCUC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* signed char -> double */ case 99: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCSC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`signed char' converted to `double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `double' %g on the top\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* signed char -> double */ case 100: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCSC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`signed char' converted to `double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `double' %g at the bottom\n", CCD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* signed char -> float */ case 101: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCSC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`signed char' converted to `float' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `float' %g on the top\n", CCF CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* signed char -> float */ case 102: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCSC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`signed char' converted to `float' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `float' %g at the bottom\n", CCF CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef LONG_EQ_INT /* signed char -> long int */ case 103: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCSC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`signed char' converted to `long int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `long int' %ld on the top\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* signed char -> long int */ case 104: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCSC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`signed char' converted to `long int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `long int' %ld at the bottom\n", CCLI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_ULONG /* signed char -> long unsigned int */ case 105: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCSC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`signed char' converted to `long unsigned int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `long unsigned int' %lu on the top\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* signed char -> long unsigned int */ case 106: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCSC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`signed char' converted to `long unsigned int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `long unsigned int' %lu at the bottom\n", CCLUI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* signed char -> int */ case 107: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = (int)CCSC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`signed char' converted to `int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `int' %d on the top\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* signed char -> int */ case 108: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = (int)CCSC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`signed char' converted to `int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `int' %d at the bottom\n", CCI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* signed char -> unsigned int */ case 109: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCSC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`signed char' converted to `unsigned int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `unsigned int' %u on the top\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* signed char -> unsigned int */ case 110: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCSC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`signed char' converted to `unsigned int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `unsigned int' %u at the bottom\n", CCUI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef SHORT_EQ_INT /* signed char -> short int */ case 111: move_stack_aligned (&tmp, -sizeof (short int)); CCSI tmp = (short int)CCSC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`signed char' converted to `short int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `short int' %hd\n", CCSI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_USHORT /* signed char -> short unsigned int */ case 112: move_stack_aligned (&tmp, -sizeof (short unsigned int)); CCSUI tmp = (short unsigned int)CCSC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`signed char' converted to `short unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `short unsigned int' %hu\n", CCSUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* signed char -> char */ case 113: move_stack_aligned (&tmp, -sizeof (int)); CCC tmp = (char)CCSC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`signed char' converted to `char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `char' %d\n", CCC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* signed char -> unsigned char */ case 114: move_stack_aligned (&tmp, -sizeof (int)); CCUC tmp = (unsigned char)CCSC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`signed char' converted to `unsigned char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `unsigned char' %d\n", CCUC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned char -> double */ case 115: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCUC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `double' %g on the top\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned char -> double */ case 116: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCUC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `double' %g at the bottom\n", CCD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned char -> float */ case 117: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCUC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `float' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `float' %g on the top\n", CCF CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned char -> float */ case 118: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCUC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `float' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `float' %g at the bottom\n", CCF CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef LONG_EQ_INT /* unsigned char -> long int */ case 119: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCUC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `long int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `long int' %ld on the top\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned char -> long int */ case 120: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCUC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `long int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `long int' %ld at the bottom\n", CCLI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_ULONG /* unsigned char -> long unsigned int */ case 121: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCUC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `long unsigned int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `long unsigned int' %lu on the top\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned char -> long unsigned int */ case 122: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCUC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `long unsigned int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `long unsigned int' %lu at the bottom\n", CCLUI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* unsigned char -> int */ case 123: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = (int)CCUC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `int' %d on the top\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned char -> int */ case 1124: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = (int)CCUC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `int' %d at the bottom\n", CCI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned char -> unsigned int */ case 125: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCUC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `unsigned int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `unsigned int' %u on the top\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned char -> unsigned int */ case 126: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCUC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `unsigned int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `unsigned int' %u at the bottom\n", CCUI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef SHORT_EQ_INT /* unsigned char -> short int */ case 127: move_stack_aligned (&tmp, -sizeof (short int)); CCSI tmp = (short int)CCUC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `short int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `short int' %hd\n", CCSI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_USHORT /* unsigned char -> short unsigned int */ case 128: move_stack_aligned (&tmp, -sizeof (short unsigned int)); CCSUI tmp = (short unsigned int)CCUC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `short unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `short unsigned int' %hu\n", CCSUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* unsigned char -> char */ case 129: move_stack_aligned (&tmp, -sizeof (int)); CCC tmp = (char)CCUC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `char' %d\n", CCC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned char -> signed char */ case 130: move_stack_aligned (&tmp, -sizeof (int)); CCSC tmp = (signed char)CCUC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `signed char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `signed char' %d\n", CCSC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef LONG_EQ_INT /* double -> long int */ case 131: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`double' converted to `long int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `double' to `long int' %ld\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_ULONG /* double -> long unsigned int */ case 132: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`double' converted to `long unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `double' to `long unsigned int' %lu\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* double -> unsigned int */ case 133: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`double' converted to `unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `double' to `unsigned int' %u\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef SHORT_EQ_INT /* double -> short int */ case 134: move_stack_aligned (&tmp, -sizeof (short int)); CCSI tmp = (short int)CCD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`double' converted to `short int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `double' to `short int' %hd\n", CCSI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_USHORT /* double -> short unsigned int */ case 135: move_stack_aligned (&tmp, -sizeof (short unsigned int)); CCSUI tmp = (short unsigned int)CCD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`double' converted to `short unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `double' to `short unsigned int' %hu\n", CCSUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* double -> signed char */ case 136: move_stack_aligned (&tmp, -sizeof (signed char)); CCSC tmp = (signed char)CCD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`double' converted to `signed char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `double' to `signed char' %d\n", CCSC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* double -> unsigned char */ case 137: move_stack_aligned (&tmp, -sizeof (unsigned char)); CCUC tmp = (unsigned char)CCD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`double' converted to `unsigned char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `double' to `unsigned char' %u\n", CCUC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef LONG_EQ_INT /* float -> long int */ case 138: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCF CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`float' converted to `long int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `float' to `long int' %ld\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_ULONG /* float -> long unsigned int */ case 139: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCF CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`float' converted to `long unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `float' to `long unsigned int' %lu\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* float -> unsigned int */ case 140: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCF CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`float' converted to `unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `float' to `unsigned int' %u\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef SHORT_EQ_INT /* float -> short int */ case 141: move_stack_aligned (&tmp, -sizeof (short int)); CCSI tmp = (short int)CCF CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`float' converted to `short int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `float' to `short int' %hd\n", CCSI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_USHORT /* float -> short unsigned int */ case 142: move_stack_aligned (&tmp, -sizeof (short unsigned int)); CCSUI tmp = (short unsigned int)CCF CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`float' converted to `short unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `float' to `short unsigned int' %hu\n", CCSUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* float -> signed char */ case 143: move_stack_aligned (&tmp, -sizeof (signed char)); CCSC tmp = (signed char)CCF CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`float' converted to `signed char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `float' to `signed char' %d\n", CCSC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* float -> unsigned char */ case 144: move_stack_aligned (&tmp, -sizeof (unsigned char)); CCUC tmp = (unsigned char)CCF CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`float' converted to `unsigned char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `float' to `unsigned char' %u\n", CCUC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef LONG_EQ_INT /* int -> long int */ case 145: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`int' converted to `long int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `int' to `long int' %ld on the top\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* int -> long int */ case 146: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`int' converted to `long int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `int' to `long int' %ld at the bottom\n", CCLI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_ULONG /* int -> long unsigned int */ case 147: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`int' converted to `long unsigned int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `int' to `long unsigned int' %lu on the top\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* int -> long unsigned int */ case 148: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`int' converted to `long unsigned int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `int' to `long unsigned int' %lu at the bottom\n", CCLUI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* int -> unsigned int */ case 149: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`int' converted to `unsigned int' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `int' to `unsigned int' %u on the top\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* int -> unsigned int */ case 150: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`int' converted to `unsigned int' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `int' to `unsigned int' %u at the bottom\n", CCUI CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef SHORT_EQ_INT /* int -> short int */ case 151: move_stack_aligned (&tmp, -sizeof (short int)); CCSI tmp = (short int)CCI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`int' converted to `short int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `int' to `short int' %hd\n", CCSI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_USHORT /* int -> short unsigned int */ case 152: move_stack_aligned (&tmp, -sizeof (short unsigned int)); CCSUI tmp = (short unsigned int)CCI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`int' converted to `short unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `int' to `short unsigned int' %hu\n", CCSUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* int -> signed char */ case 153: move_stack_aligned (&tmp, -sizeof (int)); CCSC tmp = (signed char)CCI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`int' converted to `signed char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `int' to `signed char' %u\n", CCSC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* int -> unsigned char */ case 154: move_stack_aligned (&tmp, -sizeof (int)); CCUC tmp = (unsigned char)CCI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`int' converted to `unsigned char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `int' to `unsigned char' %u\n", CCUC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef LDOUBLE_EQ_DOUBLE /* long double -> double */ case 155: move_stack_aligned (&tmp, -sizeof (double)); CCD tmp = (double)CCLD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long double' converted to `double'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long double' to `double' %g\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long double -> float */ case 156: move_stack_aligned (&tmp, -sizeof (float)); CCF tmp = (float)CCLD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long double' converted to `float'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long double' to `float' %g\n", CCF CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef LONG_EQ_INT /* long double -> long int */ case 157: move_stack_aligned (&tmp, -sizeof (long int)); CCLI tmp = (long int)CCLD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long double' converted to `long int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long double' to `long int' %ld\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_ULONG /* long double -> long unsigned int */ case 158: move_stack_aligned (&tmp, -sizeof (long unsigned int)); CCLUI tmp = (long unsigned int)CCLD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long double' converted to `long unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long double' to `long unsigned int' %lu\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* long double -> int */ case 159: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp = (int)CCLD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long double' converted to `int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long double' to `int' %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long double -> unsigned int */ case 160: move_stack_aligned (&tmp, -sizeof (unsigned int)); CCUI tmp = (unsigned int)CCLD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long double' converted to `unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long double' to `unsigned int' %d\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef SHORT_EQ_INT /* long double -> short int */ case 161: move_stack_aligned (&tmp, -sizeof (short int)); CCSI tmp = (short int)CCLD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long double' converted to `short int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long double' to `short int' %hd\n", CCSI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_USHORT /* long double -> short unsigned int */ case 162: move_stack_aligned (&tmp, -sizeof (short unsigned int)); CCSUI tmp = (short unsigned int)CCLD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long double' converted to `short unsigned int'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long double' to `short unsigned int' %hu\n", CCSUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* long double -> char */ case 163: move_stack_aligned (&tmp, -sizeof (char)); CCC tmp = (char)CCLD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long double' converted to `char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long double' to `char' %d\n", CCC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long double -> unsigned char */ case 164: move_stack_aligned (&tmp, -sizeof (unsigned char)); CCUC tmp = (unsigned char)CCLD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long double' converted to `unsigned char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long double' to `unsigned char' %u\n", CCUC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long double -> signed char */ case 165: move_stack_aligned (&tmp, -sizeof (signed char)); CCSC tmp = (signed char)CCLD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long double' converted to `signed char'\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long double' to `signed char' %d\n", CCSC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* int -> long double */ case 166: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`int' converted to `long double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `int' to `long double' %g on the top\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* int -> long double */ case 167: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`int' converted to `long double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `int' to `long double' %g at the bottom\n", CCLD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned int -> long double */ case 168: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned int' converted to `long double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned int' to `long double' %g on the top\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned int -> long double */ case 169: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCUI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`unsigned int' converted to `long double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned int' to `long double' %g at the bottom\n", CCLD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #ifndef LONG_EQ_INT /* long int -> long double */ case 170: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCLI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long int' converted to `long double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long int' to `long double' %g on the top\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long int -> long double */ case 171: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCLI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`long int' converted to `long double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long int' to `long double' %g at the bottom\n", CCLD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef SHORT_EQ_INT /* short int -> long double */ case 172: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCSI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short int' converted to `long double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `long double' %g on the top\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short int -> long double */ case 173: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCSI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`short int' converted to `long double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short int' to `long double' %g at the bottom\n", CCLD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_ULONG /* long unsigned int -> long double */ case 174: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCLUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`long unsigned int' converted to `long double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long unsigned int' to `long double' %g on the top\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* long unsigned int -> long double */ case 175: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCLUI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`long unsigned int' converted to `long double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `long unsigned int' to `long double' %g at the bottom\n", CCLD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif #ifndef UINT_EQ_USHORT /* short unsigned int -> long double */ case 176: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCSUI CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `long double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `long double' %g on the top\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* short unsigned int -> long double */ case 177: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCSUI CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`short unsigned int' converted to `long double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `short unsigned int' to `long double' %g at the bottom\n", CCLD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* double -> long double */ case 178: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCD CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`double' converted to `long double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `double' to `long double' %g on the top\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* double -> long double */ case 179: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCD CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`double' converted to `long double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `double' to `long double' %g at the bottom\n", CCLD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* float -> long double */ case 180: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCF CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`float' converted to `long double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `float' to `long double' %g on the top\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* float -> long double */ case 181: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCF CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`float' converted to `long double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `float' to `long double' %g at the bottom\n", CCLD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* char -> long double */ case 182: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`char' converted to `long double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `char' to `long double' %g on the top\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* char -> long double */ case 183: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`char' converted to `long double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `char' to `long double' %g at the bottom\n", CCLD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* signed char -> long double */ case 184: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCSC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`signed char' converted to `long double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `long double' %g on the top\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* signed char -> long double */ case 185: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCSC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`signed char' converted to `long double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `signed char' to `long double' %g at the bottom\n", CCLD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned char -> long double */ case 186: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCUC CS ast; CS ast = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `long double' on the top\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `long double' %g on the top\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* unsigned char -> long double */ case 187: move_stack_aligned (&tmp, -sizeof (long double)); CCLD tmp = (long double)CCUC CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; #ifdef DEBUG printfx ("`unsigned char' converted to `long double' at the bottom\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CVT `unsigned char' to `long double' %g at the bottom\n", CCLD CS (ast + sizeof (char *))); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case PUSHA: switch (((struct OPERAND_1_mi *)pc1)->minor) { /* [AST] <- [ADR] */ case 0: ast -= sizeof (char *); CS ast = (((struct OPERAND_1_mi *)pc1)->adr); #ifdef DEBUG printfx ("astu=%u\n", CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "PUSHA to address %u\n", CS ast); /* fprintfx (cop,"value of ast %x\n",ast);*/ #endif pc += sizeof (struct OPERAND_1_mi); break; /* [AST] <- [NUM+BP] */ case 1: ast -= sizeof (char *); CS ast = (((struct OPERAND_1_i *)pc1)->num + bp); #ifdef DEBUG printfx ("PUSHA abs. address=%u\n", (((struct OPERAND_1_i *)pc1)->num + bp)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "PUSHA to abs. address %u\n", (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* [AST] <- [[NUM+BP]] */ case 2: ast -= sizeof (char *); CS ast = CS (((struct OPERAND_1_i *)pc1)->num + bp); #ifdef DEBUG printfx ("PUSHA abs. address=%u\n", CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "PUSHA to abs. address %u\n", CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case POPA: switch (((struct OPERAND_1_mi *)pc1)->minor) { /* POPA empty - the stack is cleared */ case 0: ast += sizeof (char *); pc += sizeof (struct OPERAND_0_mi); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POPA\n"); #endif break; case 1: CS (((struct OPERAND_1_i *)pc)->num + stack) = CS ast; ast += sizeof (char *); #ifdef DEBUG printfx ("POPA to stack\n"); printfx ("value=%x\n", CS (((struct OPERAND_1_i *)pc)->num + stack)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POPA to stack value %x\n", CS (((struct OPERAND_1_i *)pc)->num + stack)); #endif pc += sizeof (struct OPERAND_1_i); break; case 2: CCI (((struct OPERAND_1_i *)pc)->num + stack) = CCI CS ast; ast += sizeof (char *); #ifdef DEBUG printfx ("POPA to stack\n"); printfx ("value=%d\n", CCI (((struct OPERAND_1_i *)pc)->num + stack)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POPA to stack value %d\n", CCI (((struct OPERAND_1_i *)pc)->num + stack)); #endif pc += sizeof (struct OPERAND_1_i); break; case 3: CCUI (((struct OPERAND_1_i *)pc)->num + stack) = CCUI CS ast; ast += sizeof (char *); #ifdef DEBUG printfx ("POPA to stack\n"); printfx ("value=%ud\n", CCUI (((struct OPERAND_1_i *)pc)->num + stack)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POPA to stack value %ud\n", CCUI (((struct OPERAND_1_i *)pc)->num + stack)); #endif pc += sizeof (struct OPERAND_1_i); break; case 4: CCLI (((struct OPERAND_1_i *)pc)->num + stack) = CCLI CS ast; ast += sizeof (char *); #ifdef DEBUG printfx ("POPA to stack\n"); printfx ("value=%ld\n", CCLI (((struct OPERAND_1_i *)pc)->num + stack)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POPA to stack value %ld\n", CCLI (((struct OPERAND_1_i *)pc)->num + stack)); #endif pc += sizeof (struct OPERAND_1_i); break; case 5: CCLUI (((struct OPERAND_1_i *)pc)->num + stack) = CCLUI CS ast; ast += sizeof (char *); #ifdef DEBUG printfx ("POPA to stack\n"); printfx ("value=%lud\n", CCLUI (((struct OPERAND_1_i *)pc)->num + stack)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POPA to stack value %lud\n", CCLUI (((struct OPERAND_1_i *)pc)->num + stack)); #endif pc += sizeof (struct OPERAND_1_i); break; case 6: CCSI (((struct OPERAND_1_i *)pc)->num + stack) = CCSI CS ast; ast += sizeof (char *); #ifdef DEBUG printfx ("POPA to stack\n"); printfx ("value=%hd\n", CCSI (((struct OPERAND_1_i *)pc)->num + stack)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POPA to stack value %hd\n", CCSI (((struct OPERAND_1_i *)pc)->num + stack)); #endif pc += sizeof (struct OPERAND_1_i); break; case 7: CCSUI (((struct OPERAND_1_i *)pc)->num + stack) = CCSUI CS ast; ast += sizeof (char *); #ifdef DEBUG printfx ("POPA to stack\n"); printfx ("value=%hud\n", CCSUI (((struct OPERAND_1_i *)pc)->num + stack)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POPA to stack value %hud\n", CCSUI (((struct OPERAND_1_i *)pc)->num + stack)); #endif pc += sizeof (struct OPERAND_1_i); break; case 256: CCD (((struct OPERAND_1_i *)pc)->num + stack) = CCD CS ast; ast += sizeof (char *); #ifdef DEBUG printfx ("POPA to stack\n"); printfx ("value=%g\n", CCD (((struct OPERAND_1_i *)pc)->num + stack)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POPA to stack value %g\n", CCD (((struct OPERAND_1_i *)pc)->num + stack)); #endif pc += sizeof (struct OPERAND_1_i); break; case 257: CCLD (((struct OPERAND_1_i *)pc)->num + stack) = CCLD CS ast; ast += sizeof (char *); #ifdef DEBUG printfx ("POPA to stack\n"); printfx ("value=%Lg\n", CCLD (((struct OPERAND_1_i *)pc)->num + stack)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POPA to stack value %Lg\n", CCLD (((struct OPERAND_1_i *)pc)->num + stack)); #endif pc += sizeof (struct OPERAND_1_i); break; case 512: CCF (((struct OPERAND_1_i *)pc)->num + stack) = CCF CS ast; ast += sizeof (char *); #ifdef DEBUG printfx ("POPA to stack\n"); printfx ("value=%g\n", CCF (((struct OPERAND_1_i *)pc)->num + stack)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POPA to stack value %g\n", CCF (((struct OPERAND_1_i *)pc)->num + stack)); #endif pc += sizeof (struct OPERAND_1_i); break; case 768: CCC (((struct OPERAND_1_i *)pc)->num + stack) = CCC CS ast; ast += sizeof (char *); #ifdef DEBUG printfx ("POPA to stack\n"); printfx ("value=%c\n", CCC (((struct OPERAND_1_i *)pc)->num + stack)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POPA to stack value %c\n", CCC (((struct OPERAND_1_i *)pc)->num + stack)); #endif pc += sizeof (struct OPERAND_1_i); break; case 769: CCSC (((struct OPERAND_1_i *)pc)->num + stack) = CCSC CS ast; ast += sizeof (char *); #ifdef DEBUG printfx ("POPA to stack\n"); printfx ("value=%c\n", CCSC (((struct OPERAND_1_i *)pc)->num + stack)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POPA to stack value %c\n", CCSC (((struct OPERAND_1_i *)pc)->num + stack)); #endif pc += sizeof (struct OPERAND_1_i); break; case 770: CCUC (((struct OPERAND_1_i *)pc)->num + stack) = CCUC CS ast; ast += sizeof (char *); #ifdef DEBUG printfx ("POPA to stack\n"); printfx ("value=%uc\n", CCUC (((struct OPERAND_1_i *)pc)->num + stack)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POPA to stack value %uc\n", CCUC (((struct OPERAND_1_i *)pc)->num + stack)); #endif pc += sizeof (struct OPERAND_1_i); break; case 771: CCC (((struct OPERAND_1_i *)pc)->num + stack) = CCC (CS ast + (((struct OPERAND_1_i *)pc)->num)); #ifdef DEBUG printfx ("POPA to stack\n"); printfx ("value=%c\n", CCC (((struct OPERAND_1_i *)pc)->num + stack)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POPA to stack value %c\n", CCC (((struct OPERAND_1_i *)pc)->num + stack)); #endif pc += sizeof (struct OPERAND_1_i); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case PUSH: switch (((struct OPERAND_0_mi *)pc1)->minor) { /* case 0 : stack -= sizeof (char *); check_stack(); CS stack = CS ast; #ifdef DEBUG printfx ("PUSH address from ast\n"); printfx ("value=%u\n",CS stack); #endif #ifdef CODE fprintfx (cop,"\n%u ",pc1); fprintfx (cop,"PUSH address %u from ast\n",CS stack); #endif ast += sizeof (char *); pc += sizeof (struct OPERAND_0_mi); break; */ /* [STACK] <- BP */ case 1: stack -= sizeof (char *); check_stack (); CS stack = bp; #ifdef DEBUG printfx ("PUSH address from bp\n"); printfx ("value = %u\n", CS stack); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "PUSH address %u from bp\n", CS stack); #endif pc += sizeof (struct OPERAND_0_mi); break; /* case 2 : stack -= sizeof (char *); check_stack(); CS stack=((struct OPERAND_1_mi *)pc1)->adr; #ifdef DEBUG printfx ("PUSH address\n"); printfx ("value=%u\n",CS stack); #endif #ifdef CODE fprintfx (cop,"\n%u ",pc1); fprintfx (cop,"PUSH address %u\n",CS stack); #endif pc += sizeof (struct OPERAND_1_mi); break; */ /* [STACK] <- TMPH */ case 3: stack -= sizeof (char *); check_stack (); CS stack = tmph; #ifdef DEBUG printfx ("PUSH tmph\n"); printfx ("value = %u\n", CS stack); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "PUSH tmph %u\n", CS stack); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [STACK] <- FRAME */ case 4: stack -= sizeof (char *); check_stack (); CS stack = frame; #ifdef DEBUG printfx ("PUSH frame\n"); printfx ("value = %u\n", CS stack); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "PUSH frame %u\n", CS stack); #endif pc += sizeof (struct OPERAND_0_mi); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case POP: switch (((struct OPERAND_0_mi *)pc1)->minor) { /* BP <- [STACK] */ case 0: bp = CS stack; stack += sizeof (char *); #ifdef DEBUG printfx ("POP to bp value %u\n", bp); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POP to bp value %u\n", bp); #endif pc += sizeof (struct OPERAND_0_mi); break; /* TMPH <- [STACK] */ case 1: tmph = CS stack; stack += sizeof (char *); #ifdef DEBUG printfx ("POP to tmph value %u\n", tmph); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POP to tmph value %u\n", tmph); #endif pc += sizeof (struct OPERAND_0_mi); break; /* FRAME <- [STACK] */ case 2: frame = CS stack; stack += sizeof (char *); #ifdef DEBUG printfx ("POP to frame value %u\n", frame); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "POP to frame value %u\n", frame); #endif pc += sizeof (struct OPERAND_0_mi); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; /* [ADR_STACK] <- [AST] */ /* case PUSHAD: adr_stack -= sizeof (char *); *adr_stack= CS ast; ast += sizeof (char *); #ifdef DEBUG printfx ("PUSHAD ast\n"); printfx ("value=%u\n",*adr_stack); #endif #ifdef CODE fprintfx (cop,"\n%u ",pc1); fprintfx (cop,"PUSHAD ast value %u\n",*adr_stack); #endif pc += sizeof (struct OPERAND_0_ma); break; */ /* [STACK] <- [ADR_STACK] */ /* case POPAD : stack -= sizeof (char *); check_stack(); CS stack= *adr_stack; adr_stack += sizeof (char *); #ifdef DEBUG printfx ("POPAD to stack"); #endif #ifdef CODE fprintfx (cop,"\n%u ",pc1); fprintfx (cop,"POPAD to stack %u\n",CS stack); #endif pc += sizeof (struct OPERAND_0_ma); break; */ case ADD: switch (((struct OPERAND_0_mi *)pc1)->minor) { /* [[AST-1]] <- [[AST]] + [[AST-1]] */ case 0: binar = CCI CS ast + CCI CS (ast + sizeof (char *)); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef DEBUG printfx ("result = %d\n", CCI CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "ADD result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* STACK <- STACK-NUM */ case 1: stack += ((struct OPERAND_1_i *)pc1)->num; #ifdef DEBUG printfx ("ADD to stack\n"); printfx ("value = %u\n", stack); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "ADD to stack, result %u\n", stack); #endif pc += sizeof (struct OPERAND_1_i); break; /* [[AST-1]] <- [[AST]] + [[AST-1]] */ case 2: binaru = CCUI CS ast + CCUI CS (ast + sizeof (char *)); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (unsigned int)); CS ast = tmp; CCUI CS ast = binaru; #ifdef DEBUG printfx ("result = %u\n", CCUI CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "ADD result %u\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST]] + [[AST-1]] */ case 3: binarl = CCLI CS ast + CCLI CS (ast + sizeof (char *)); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (long int)); CS ast = tmp; CCLI CS ast = binarl; #ifdef DEBUG printfx ("result = %ld\n", CCLI CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "ADD result %ld\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #if 0 /* [[AST-1]] <- [[AST]] + [[AST-1]] */ case 4: binars = CCSI CS ast + CCSI CS (ast + sizeof (char *)); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (short int)); CS ast = tmp; CCSI CS ast = binars; #ifdef DEBUG printfx ("result = %d\n", CCSI CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "ADD result %d\n", CCSI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* [[AST-1]] <- [[AST]] + [[AST-1]] */ case 5: binarlu = CCLUI CS ast + CCLUI CS (ast + sizeof (char *)); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (long unsigned int)); CS ast = tmp; CCLUI CS ast = binarlu; #ifdef DEBUG printfx ("result = %u\n", CCLUI CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "ADD result %u\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #if 0 /* [[AST-1]] <- [[AST]] + [[AST-1]] */ case 6: binarsu = CCSUI CS ast + CCSUI CS (ast + sizeof (char *)); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (short unsigned int)); CS ast = tmp; CCSUI CS ast = binarsu; #ifdef DEBUG printfx ("result = %u\n", CCSUI CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "ADD result %u\n", CCSUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif /* [[AST-1]] <- [[AST]] + [[AST-1]] */ case 256: binard = CCD CS ast + CCD CS (ast + sizeof (char *)); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (double)); CS ast = tmp; CCD CS ast = binard; #ifdef DEBUG printfx ("result = %g\n", CCD CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "ADD result %lf\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST]] + [[AST-1]] */ case 257: binarld = CCLD CS ast + CCLD CS (ast + sizeof (char *)); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (long double)); CS ast = tmp; CCLD CS ast = binarld; #ifdef DEBUG printfx ("result = %g\n", CCLD CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "ADD result %lf\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST]] + [[AST-1]] */ case 512: binarf = CCF CS ast + CCF CS (ast + sizeof (char *)); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (float)); CS ast = tmp; CCF CS ast = binarf; #ifdef DEBUG printfx ("result = %g\n", CCF CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "ADD result %lf\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #if 0 /* [[AST-1]] <- [[AST]] + [[AST-1]] */ case 768: binarc = CCC CS ast + CCC CS (ast + sizeof (char *)); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCC CS ast = binarc; #ifdef DEBUG printfx ("result = %d\n", CCC CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "ADD result %d, %c\n", CCC CS ast, CCC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST]] + [[AST-1]] */ case 769: binarcs = CCSC CS ast + CCSC CS (ast + sizeof (char *)); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCSC CS ast = binarcs; #ifdef DEBUG printfx ("result = %d\n", CCSC CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "ADD result %d, %c\n", CCSC CS ast, CCSC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST]] + [[AST-1]] */ case 770: binarcu = CCUC CS ast + CCUC CS (ast + sizeof (char *)); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCUC CS ast = binarcu; #ifdef DEBUG printfx ("result = %u\n", CCUC CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "ADD result %u, %c\n", CCUC CS ast, CCUC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case SUB: switch (((struct OPERAND_0_mi *)pc1)->minor) { /* [[AST-1]] <- [[AST-1]] - [[AST]] */ case 0: binar = CCI CS (ast + sizeof (char *)) - CCI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef DEBUG printfx ("SUB in ast\n"); printfx ("value = %d\n", CCI CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "SUB result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* STACK <- STACK-NUM */ case 1: stack -= ((struct OPERAND_1_i *)pc1)->num; check_stack (); #ifdef DEBUG printfx ("SUB of stack\n"); printfx ("value = %u\n", stack); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "SUB of stack, result %u\n", stack); #endif pc += sizeof (struct OPERAND_1_i); break; /* [[AST-1]] <- [[AST-1]] - [[AST]] */ case 2: binaru = CCUI CS (ast + sizeof (char *)) - CCUI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (unsigned int)); CS ast = tmp; CCUI CS ast = binaru; #ifdef DEBUG printfx ("SUB in ast\n"); printfx ("value = %u\n", CCUI CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "SUB result %u\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] - [[AST]] */ case 3: binarl = CCLI CS (ast + sizeof (char *)) - CCLI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (long int)); CS ast = tmp; CCLI CS ast = binarl; #ifdef DEBUG printfx ("SUB in ast\n"); printfx ("value = %ld\n", CCLI CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "SUB result %ld\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] - [[AST]] */ case 4: binarlu = CCLUI CS (ast + sizeof (char *)) - CCLUI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (long unsigned int)); CS ast = tmp; CCLUI CS ast = binarlu; #ifdef DEBUG printfx ("SUB in ast\n"); printfx ("value = %lu\n", CCLUI CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "SUB result %lu\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] - [[AST]] */ case 256: binard = CCD CS (ast + sizeof (char *)) - CCD CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (double)); CS ast = tmp; CCD CS ast = binard; #ifdef DEBUG printfx ("SUB in ast\n"); printfx ("value = %lf\n", CCD CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "SUB result %lf\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] - [[AST]] */ case 257: binarld = CCLD CS (ast + sizeof (char *)) - CCLD CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (long double)); CS ast = tmp; CCLD CS ast = binarld; #ifdef DEBUG printfx ("SUB in ast\n"); printfx ("value = %lf\n", CCLD CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "SUB result %lf\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] - [[AST]] */ case 512: binarf = CCF CS (ast + sizeof (char *)) - CCF CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (float)); CS ast = tmp; CCF CS ast = binarf; #ifdef DEBUG printfx ("SUB in ast\n"); printfx ("value = %g\n", CCF CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "SUB result %g\n", CCF CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #if 0 /* [[AST-1]] <- [[AST-1]] - [[AST]] */ case 768: binarc = CCC CS (ast + sizeof (char *)) - CCC CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCC CS ast = binarc; #ifdef DEBUG printfx ("SUB in ast\n"); printfx ("value = %d\n", CCC CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "SUB result %d, %c\n", CCC CS ast, CCC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case MULT: switch (((struct OPERAND_0_mi *)pc1)->minor) { /* [[AST-1]] <- [[AST]] * [[AST-1]] */ case 0: binar = CCI CS ast * (CCI CS (ast + sizeof (char *))); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MULT result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST]] * [[AST-1]] */ case 1: binaru = CCUI CS ast * (CCUI CS (ast + sizeof (char *))); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (unsigned int)); CS ast = tmp; CCUI CS ast = binaru; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MULT result %u\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST]] * [[AST-1]] */ case 2: binarl = CCLI CS ast * (CCLI CS (ast + sizeof (char *))); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (long int)); CS ast = tmp; CCLI CS ast = binarl; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MULT result %ld\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST]] * [[AST-1]] */ case 3: binarlu = CCLUI CS ast * (CCLUI CS (ast + sizeof (char *))); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (long unsigned int)); CS ast = tmp; CCLUI CS ast = binarlu; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MULT result %lu\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST]] * [[AST-1]] */ case 256: binard = CCD CS ast * (CCD CS (ast + sizeof (char *))); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (double)); CS ast = tmp; CCD CS ast = binard; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MULT result %lf\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST]] * [[AST-1]] */ case 257: binarld = CCLD CS ast * (CCLD CS (ast + sizeof (char *))); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (long double)); CS ast = tmp; CCLD CS ast = binard; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MULT result %lf\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST]] * [[AST-1]] */ case 512: binarf = CCF CS ast * (CCF CS (ast + sizeof (char *))); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (float)); CS ast = tmp; CCF CS ast = binarf; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MULT result %g\n", CCF CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #if 0 /* [[AST-1]] <- [[AST]] * [[AST-1]] */ case 768: binarc = CCC CS ast * (CCC CS (ast + sizeof (char *))); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCC CS ast = binarc; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MULT result %d, %c\n", CCC CS ast, CCC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case MOD: if (CCI CS ast != 0) mod_yes (); else { fprintfx (stderr, "\ninterpreter: divide by zero \n\n"); return (-2); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MOD result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_ma); break; case DIV: switch (((struct OPERAND_0_mi *)pc1)->minor) { /* [[AST-1]] <- [[AST-1]] / [[AST]] */ case 0: if (CCI CS ast != 0) div_yes (); else { fprintfx (stderr, "\ninterpreter: divide by zero \n\n"); return (-2); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop,"DIV result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] / [[AST]] */ case 1: if (CCUI CS ast != 0) divui_yes (); else { fprintfx (stderr, "\ninterpreter: divide by zero \n\n"); return (-2); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop,"DIV result %u\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] / [[AST]] */ case 2: if (CCUI CS ast != 0) divli_yes (); else { fprintfx (stderr, "\ninterpreter: divide by zero \n\n"); return (-2); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop,"DIV result %ld\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] / [[AST]] */ case 3: if (CCLUI CS ast != 0) divlui_yes (); else { fprintfx (stderr, "\ninterpreter: divide by zero \n\n"); return (-2); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop,"DIV result %lu\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] / [[AST]] */ case 256: if (CCD CS ast != 0) divd_yes (); else { fprintfx (stderr, "\ninterpreter: divide by zero \n\n"); return (-2); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "DIV result %lf\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] / [[AST]] */ case 257: if (CCLD CS ast != 0) divld_yes (); else { fprintfx (stderr, "\ninterpreter: divide by zero \n\n"); return (-2); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "DIV result %lf\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] / [[AST]] */ case 512: if (CCF CS ast != 0) divf_yes (); else { fprintfx (stderr, "\ninterpreter: divide by zero \n\n"); return (-2); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "DIV result %g\n", CCF CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #if 0 /* [[AST-1]] <- [[AST-1]] / [[AST]] */ case 768: if (CCC CS ast != 0) divc_yes (); else { fprintfx (stderr, "\ninterpreter: divide by zero \n\n"); return (-2); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "DIV result %d, %c\n", CCC CS ast, CCC CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case OR: switch (((struct OPERAND_0_mi *)pc1)->minor) { /* [[AST-1]] <- [[AST-1]] OR [[AST]] */ case 0: binar = CCI CS (ast + sizeof (char *)) || CCI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] OR [[AST]] */ case 1: binar = CCUI CS (ast + sizeof (char *)) || CCUI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] OR [[AST]] */ case 2: binar = CCLI CS (ast + sizeof (char *)) || CCLI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] OR [[AST]] */ case 3: binar = CCLUI CS (ast + sizeof (char *)) || CCLUI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] OR [[AST]] */ case 256: binar = CCD CS (ast + sizeof (char *)) || CCD CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] OR [[AST]] */ case 257: binar = CCLD CS (ast + sizeof (char *)) || CCLD CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] OR [[AST]] */ case 512: binar = CCF CS (ast + sizeof (char *)) || CCF CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #if 0 /* [[AST-1]] <- [[AST-1]] OR [[AST]] */ case 768: binar = CCC CS (ast + sizeof (char *)) || CCC CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case AND: switch (((struct OPERAND_0_mi *)pc1)->minor) { /* [[AST-1]] <- [[AST-1]] AND [[AST]] */ case 0: binar = CCI CS (ast + sizeof (char *)) && CCI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "AND result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] AND [[AST]] */ case 1: binar = CCUI CS (ast + sizeof (char *)) && CCUI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "AND result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] AND [[AST]] */ case 2: binar = CCLI CS (ast + sizeof (char *)) && CCLI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "AND result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] AND [[AST]] */ case 3: binar = CCLUI CS (ast + sizeof (char *)) && CCLUI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "AND result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] AND [[AST]] */ case 256: binar = CCD CS (ast + sizeof (char *)) && CCD CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "AND result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] AND [[AST]] */ case 257: binar = CCLD CS (ast + sizeof (char *)) && CCLD CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "AND result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] AND [[AST]] */ case 512: binar = CCF CS (ast + sizeof (char *)) && CCF CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "AND result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #if 0 /* [[AST-1]] <- [[AST-1]] AND [[AST]] */ case 768: binar = CCC CS (ast + sizeof (char *)) && CCC CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "AND result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case ORB: binar = CCI CS (ast + sizeof (char *)) | CCI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "ORB result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_ma); break; case ANDB: binar = CCI CS (ast + sizeof (char *)) & CCI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "ANDB result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_ma); break; case EQ: switch (((struct OPERAND_0_mi *)pc1)->minor) { /* [[AST-1]] <- [[AST-1]] EQ [[AST]] */ case 0: if (CCI CS (ast + sizeof (char *)) == CCI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "EQ result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] EQ [[AST]] */ case 1: if (CCUI CS (ast + sizeof (char *)) == CCUI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "EQ result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] EQ [[AST]] */ case 2: if (CCLI CS (ast + sizeof (char *)) == CCLI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "EQ result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] EQ [[AST]] */ case 3: if (CCLUI CS (ast + sizeof (char *)) == CCLUI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "EQ result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] EQ [[AST]] */ case 256: if (CCD CS (ast + sizeof (char *)) == CCD CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "EQ result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] EQ [[AST]] */ case 257: if (CCLD CS (ast + sizeof (char *)) == CCLD CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "EQ result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] EQ [[AST]] */ case 512: if (CCF CS (ast + sizeof (char *)) == CCF CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "EQ result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #if 0 /* [[AST-1]] <- [[AST-1]] EQ [[AST]] */ case 768: if (CCC CS (ast + sizeof (char *)) == CCC CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "EQ result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case GR: switch (((struct OPERAND_0_mi *)pc1)->minor) { /* [[AST-1]] <- [[AST-1]] GR [[AST]] */ case 0: if (CCI CS (ast + sizeof (char *)) > CCI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "GR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] GR [[AST]] */ case 1: if (CCUI CS (ast + sizeof (char *)) > CCUI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "GR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] GR [[AST]] */ case 2: if (CCLI CS (ast + sizeof (char *)) > CCLI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "GR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] GR [[AST]] */ case 3: if (CCLUI CS (ast + sizeof (char *)) > CCLUI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "GR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] GR [[AST]] */ case 256: if (CCD CS (ast + sizeof (char *)) > CCD CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "GR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] GR [[AST]] */ case 257: if (CCLD CS (ast + sizeof (char *)) > CCLD CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "GR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] GR [[AST]] */ case 512: if (CCF CS (ast + sizeof (char *)) > CCF CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "GR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #if 0 /* [[AST-1]] <- [[AST-1]] GR [[AST]] */ case 768: if (CCC CS (ast + sizeof (char *)) > CCC CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "GR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case LO: switch (((struct OPERAND_0_mi *)pc1)->minor) { /* [[AST-1]] <- [[AST-1]] LO [[AST]] */ case 0: if (CCI CS (ast + sizeof (char *)) < CCI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "LO result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] LO [[AST]] */ case 1: if (CCUI CS (ast + sizeof (char *)) < CCUI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "LO result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] LO [[AST]] */ case 2: if (CCLI CS (ast + sizeof (char *)) < CCLI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "LO result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] LO [[AST]] */ case 3: if (CCLUI CS (ast + sizeof (char *)) < CCLUI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "LO result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] LO [[AST]] */ case 256: if (CCD CS (ast + sizeof (char *)) < CCD CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "LO result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] LO [[AST]] */ case 512: if (CCF CS (ast + sizeof (char *)) < CCF CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "LO result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #if 0 /* [[AST-1]] <- [[AST-1]] LO [[AST]] */ case 768: if (CCC CS (ast + sizeof (char *)) < CCC CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "LO result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case LE: switch (((struct OPERAND_0_mi *)pc1)->minor) { /* [[AST-1]] <- [[AST-1]] LE [[AST]] */ case 0: if (CCI CS (ast + sizeof (char *)) <= CCI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "LE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] LE [[AST]] */ case 1: if (CCUI CS (ast + sizeof (char *)) <= CCUI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "LE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] LE [[AST]] */ case 2: if (CCLI CS (ast + sizeof (char *)) <= CCLI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "LE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] LE [[AST]] */ case 3: if (CCLUI CS (ast + sizeof (char *)) <= CCLUI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "LE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] LE [[AST]] */ case 256: if (CCD CS (ast + sizeof (char *)) <= CCD CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "LE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] LE [[AST]] */ case 257: if (CCLD CS (ast + sizeof (char *)) <= CCLD CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "LE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] LE [[AST]] */ case 512: if (CCF CS (ast + sizeof (char *)) <= CCF CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "LE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #if 0 /* [[AST-1]] <- [[AST-1]] LE [[AST]] */ case 768: if (CCC CS (ast + sizeof (char *)) <= CCC CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "LE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case GE: switch (((struct OPERAND_0_mi *)pc1)->minor) { /* [[AST-1]] <- [[AST-1]] GE [[AST]] */ case 0: if (CCI CS (ast + sizeof (char *)) >= CCI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "GE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] GE [[AST]] */ case 1: if (CCUI CS (ast + sizeof (char *)) >= CCUI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "GE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] GE [[AST]] */ case 2: if (CCLI CS (ast + sizeof (char *)) >= CCLI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "GE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] GE [[AST]] */ case 3: if (CCLUI CS (ast + sizeof (char *)) >= CCLUI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "GE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] GE [[AST]] */ case 256: if (CCD CS (ast + sizeof (char *)) >= CCD CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "GE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] GE [[AST]] */ case 257: if (CCLD CS (ast + sizeof (char *)) >= CCLD CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "GE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] GE [[AST]] */ case 512: if (CCF CS (ast + sizeof (char *)) >= CCF CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "GE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #if 0 /* [[AST-1]] <- [[AST-1]] GE [[AST]] */ case 768: if (CCC CS (ast + sizeof (char *)) >= CCC CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "GE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case NE: switch (((struct OPERAND_0_mi *)pc1)->minor) { /* [[AST-1]] <- [[AST-1]] NE [[AST]] */ case 0: if (CCI CS (ast + sizeof (char *)) != CCI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] NE [[AST]] */ case 1: if (CCUI CS (ast + sizeof (char *)) != CCUI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] NE [[AST]] */ case 2: if (CCLI CS (ast + sizeof (char *)) != CCLI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] NE [[AST]] */ case 3: if (CCLUI CS (ast + sizeof (char *)) != CCLUI CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] NE [[AST]] */ case 256: if (CCD CS (ast + sizeof (char *)) != CCD CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] NE [[AST]] */ case 257: if (CCLD CS (ast + sizeof (char *)) != CCLD CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST-1]] <- [[AST-1]] NE [[AST]] */ case 512: if (CCF CS (ast + sizeof (char *)) != CCF CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #if 0 /* [[AST-1]] <- [[AST-1]] NE [[AST]] */ case 768: if (CCC CS (ast + sizeof (char *)) != CCC CS ast) vtrue (); else vfalse (); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NE result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case NEG: switch (((struct OPERAND_0_mi *)pc1)->minor) { /* [[AST]] <- NEG [[AST]] */ case 0: if ( ! CCI CS ast) { /* Hack for using vtrue () and vfalse (). */ ast -= sizeof (char *); vtrue (); } else { /* Hack for using vtrue () and vfalse (). */ ast -= sizeof (char *); vfalse (); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NEG result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- NEG [[AST]] */ case 1: if ( ! CCUI CS ast) { /* Hack for using vtrue () and vfalse (). */ ast -= sizeof (char *); vtrue (); } else { /* Hack for using vtrue () and vfalse (). */ ast -= sizeof (char *); vfalse (); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NEG result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- NEG [[AST]] */ case 2: if ( ! CCLI CS ast) { /* Hack for using vtrue () and vfalse (). */ ast -= sizeof (char *); vtrue (); } else { /* Hack for using vtrue () and vfalse (). */ ast -= sizeof (char *); vfalse (); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NEG result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- NEG [[AST]] */ case 3: if ( ! CCLUI CS ast) { /* Hack for using vtrue () and vfalse (). */ ast -= sizeof (char *); vtrue (); } else { /* Hack for using vtrue () and vfalse (). */ ast -= sizeof (char *); vfalse (); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NEG result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- NEG [[AST]] */ case 256: if ( ! CCD CS ast) { /* Hack for using vtrue () and vfalse (). */ ast -= sizeof (char *); vtrue (); } else { /* Hack for using vtrue () and vfalse (). */ ast -= sizeof (char *); vfalse (); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NEG result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- NEG [[AST]] */ case 257: if ( ! CCLD CS ast) { /* Hack for using vtrue () and vfalse (). */ ast -= sizeof (char *); vtrue (); } else { /* Hack for using vtrue () and vfalse (). */ ast -= sizeof (char *); vfalse (); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NEG result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; /* [[AST]] <- NEG [[AST]] */ case 512: if ( ! CCF CS ast) { /* Hack for using vtrue () and vfalse (). */ ast -= sizeof (char *); vtrue (); } else { /* Hack for using vtrue () and vfalse (). */ ast -= sizeof (char *); vfalse (); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NEG result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #if 0 /* [[AST]] <- NEG [[AST]] */ case 768: if ( ! CCC CS ast) { /* Hack for using vtrue () and vfalse (). */ ast -= sizeof (char *); vtrue (); } else { /* Hack for using vtrue () and vfalse (). */ ast -= sizeof (char *); vfalse (); } #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NEG result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_mi); break; #endif default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case NOT: move_stack_aligned (&tmp, -sizeof (int)); CCI tmp= ~(CCI CS ast); CS ast = tmp; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "NOT result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_ma); break; case SAL: binar = CCI CS (ast + sizeof (char *)) << CCI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "SAL result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_ma); break; case SAR: binar = CCI CS (ast + sizeof (char *)) >> CCI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "SAR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_ma); break; case XOR: binar = CCI CS (ast + sizeof (char *)) ^ CCI CS ast; ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XOR result %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_0_ma); break; case STOP: #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "STOP\n"); #endif pc += sizeof (struct OPERAND_0_ma); return (-1); break; case INTER: #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "INTER\n"); #endif #ifndef MSDOS interrupt_service_sync (); #endif pc += sizeof (struct OPERAND_0_ma); break; case IRET: #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IRET\n"); #endif pc += sizeof (struct OPERAND_0_ma); #ifndef NOT_MSWIN_AND_YES_DOS restore_context (); fprintfx (stderr, "\nclif interrupt level %d\n", CLIF_INTERRUPT_LEVEL_DECREMENT); #endif break; case PUSHAI: switch (((struct OPERAND_1_i *)pc1)->minor) { /* [AST] <- NUM */ case 0: ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = (((struct OPERAND_1_i *)pc1)->num); #ifdef DEBUG printfx ("saved number in ast:%u\n", CCI CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "PUSHAI to address %u value %d\n", CS ast, CCI CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* [AST] <- NUM */ case 1: ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (unsigned int)); CS ast = tmp; CCUI CS ast = (((struct OPERAND_1_ui *)pc1)->num); #ifdef DEBUG printfx ("saved number in ast:%u\n", CCUI CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "PUSHAI to address %u value %u\n", CS ast, CCUI CS ast); #endif pc += sizeof (struct OPERAND_1_ui); break; /* [AST] <- NUM */ case 2: ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (long int)); CS ast = tmp; CCLI CS ast = (((struct OPERAND_1_li *)pc1)->num); #ifdef DEBUG printfx ("saved number in ast:%ld\n", CCLI CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "PUSHAI to address %u value %ld\n", CS ast, CCLI CS ast); #endif pc += sizeof (struct OPERAND_1_li); break; /* [AST] <- NUM */ case 3: ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (long unsigned int)); CS ast = tmp; CCLUI CS ast = (((struct OPERAND_1_lui *)pc1)->num); #ifdef DEBUG printfx ("saved number in ast:%lu\n", CCLUI CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "PUSHAI to address %u value %lu\n", CS ast, CCLUI CS ast); #endif pc += sizeof (struct OPERAND_1_lui); break; /* [AST] <- NUM */ case 4: ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (short int)); CS ast = tmp; CCSI CS ast = (((struct OPERAND_1_si *)pc1)->num); #ifdef DEBUG printfx ("saved number in ast:%hd\n", CCSI CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "PUSHAI to address %u value %hd\n", CS ast, CCSI CS ast); #endif pc += sizeof (struct OPERAND_1_si); align_memory (&pc, sizeof (int)); break; /* [AST] <- NUM */ case 5: ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (short unsigned int)); CS ast = tmp; CCSUI CS ast = (((struct OPERAND_1_sui *)pc1)->num); #ifdef DEBUG printfx ("saved number in ast:%hu\n", CCSUI CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "PUSHAI to address %u value %hu\n", CS ast, CCSUI CS ast); #endif pc += sizeof (struct OPERAND_1_sui); align_memory (&pc, sizeof (int)); break; /* [AST] <- NUM */ case 256: ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (double)); CS ast = tmp; #ifdef CODE fprintfx (cop, "\n%u ", pc1); #endif pc1 += sizeof (struct OPERAND_0_mi); align_memory (&pc1, sizeof (double)); CCD CS ast = *(double *)pc1; #ifdef DEBUG printfx ("saved number in ast:%lf\n", CCD CS ast); #endif #ifdef CODE fprintfx (cop, "PUSHAI to address %u value %lf\n", CS ast, CCD CS ast); #endif pc1 += sizeof (double); pc = pc1; break; /* [AST] <- NUM */ case 257: ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (long double)); CS ast = tmp; #ifdef CODE fprintfx (cop, "\n%u ", pc1); #endif pc1 += sizeof (struct OPERAND_0_mi); align_memory (&pc1, sizeof (long double)); CCLD CS ast = *(long double *)pc1; #ifdef DEBUG printfx ("saved number in ast:%lf\n", CCLD CS ast); #endif #ifdef CODE fprintfx (cop, "PUSHAI to address %u value %lf\n", CS ast, CCLD CS ast); #endif pc1 += sizeof (long double); pc = pc1; break; /* [AST] <- NUM */ case 512: ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (float)); CS ast = tmp; #ifdef CODE fprintfx (cop, "\n%u ", pc1); #endif pc1 += sizeof (struct OPERAND_0_mi); align_memory (&pc1, sizeof (float)); CCF CS ast = *(float *)pc1; #ifdef DEBUG printfx ("saved number in ast:%g\n", CCF CS ast); #endif #ifdef CODE fprintfx (cop, "PUSHAI to address %u value %g\n", CS ast, CCF CS ast); #endif pc1 += sizeof (float); pc = pc1; break; /* [AST] <- NUM */ case 768: ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCC CS ast = (((struct OPERAND_1_ic *)pc1)->num); #ifdef DEBUG printfx ("saved number in ast:%c\n", CCC CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "PUSHAI to address %u value %c\n", CS ast, CCC CS ast); #endif pc += sizeof (struct OPERAND_1_ic); align_memory (&pc, sizeof (int)); break; /* [AST] <- STRING */ case 769: ast -= sizeof (char *); binar = strlen (((struct OPERAND_1_mi *)pc1)->adr) + 1; #if 0 if (binar & MASK) tmp -= (4 - (binar & MASK) + binar); else #endif tmp -= binar; CS ast = tmp; strcpy (CS ast, (((struct OPERAND_1_mi *)pc1)->adr)); #ifdef DEBUG printfx ("saved number in ast:%s\n", CCC CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "PUSHAI to address %u value %s\n", CS ast, *ast); #endif pc += sizeof (struct OPERAND_1_mi); break; /* [AST] <- NUM */ case 770: ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCSC CS ast = (((struct OPERAND_1_isc *)pc1)->num); #ifdef DEBUG printfx ("saved number in ast:%c\n", CCSC CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "PUSHAI to address %u value %c\n", CS ast, CCSC CS ast); #endif pc += sizeof (struct OPERAND_1_isc); align_memory (&pc, sizeof (int)); break; /* [AST] <- NUM */ case 771: ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCUC CS ast = (((struct OPERAND_1_iuc *)pc1)->num); #ifdef DEBUG printfx ("saved number in ast:%c\n", CCUC CS ast); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "PUSHAI to address %u value %c\n", CS ast, CCUC CS ast); #endif pc += sizeof (struct OPERAND_1_iuc); align_memory (&pc, sizeof (int)); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case OUT: switch (((struct OPERAND_1_mi *)pc1)->minor) { /* OUT [ADR] */ case 0: printfx ("%d\n", CCI (((struct OPERAND_1_mi *)pc1)->adr)); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %d\n", CCI (((struct OPERAND_1_mi *)pc1)->adr)); #endif pc += sizeof (struct OPERAND_1_mi); break; /* OUT [BP+NUM] */ case 1: printfx ("%d\n", CCI (((struct OPERAND_1_i *)pc1)->num + bp)); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %d\n", CCI (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* OUT [[BP+NUM]] */ case 2: printfx ("%d\n", CCI CS (((struct OPERAND_1_i *)pc1)->num + bp)); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %d\n", CCI CS (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* OUT [ADR+INDEX] */ case 3: printfx ("%d\n", CCI ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (int))); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %d\n", CCI ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (int))); #endif pc += sizeof (struct OPERAND_1_mi); break; /* OUT [BP+NUM+INDEX] */ case 4: printfx ("%d\n", CCI (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (int))); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %d\n", CCI (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (int))); #endif pc += sizeof (struct OPERAND_1_i); break; /* OUT [[BP+NUM+INDEX]] */ case 5: printfx ("%d\n", CCI (CS (((struct OPERAND_1_i *)pc1)->num + bp)+ CCI CS ast * sizeof (int))); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %d\n", CCI (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (int))); #endif pc += sizeof (struct OPERAND_1_i); break; /* OUT [ADR] */ case 256: printfx ("%lg\n", CCD (((struct OPERAND_1_mi *)pc1)->adr)); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop,"OUT %lg\n", CCD (((struct OPERAND_1_mi *)pc1)->adr)); #endif pc += sizeof (struct OPERAND_1_mi); break; /* OUT [BP+NUM] */ case 257: printfx ("%lg\n", CCD (((struct OPERAND_1_i *)pc1)->num + bp)); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %lg\n", CCD (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* OUT [[BP+NUM]] */ case 258: printfx ("%lg\n", CCD CS (((struct OPERAND_1_i *)pc1)->num + bp)); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %lg\n", CCD CS (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* OUT [ADR+INDEX] */ case 259: printfx ("%lg\n", CCD ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (double))); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %lg\n", CCD ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (double))); #endif pc += sizeof (struct OPERAND_1_mi); break; /* OUT [BP+NUM+INDEX] */ case 260: printfx ("%lg\n", CCD (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (double))); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %lg\n", CCD (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (double))); #endif pc += sizeof (struct OPERAND_1_i); break; /* OUT [[BP+NUM+INDEX]] */ case 261: printfx ("%lg\n", CCD (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (double))); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %lg\n", CCD (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (double))); #endif pc += sizeof (struct OPERAND_1_i); break; /* OUT [ADR] */ case 512: printfx ("%g\n", CCF (((struct OPERAND_1_mi *)pc1)->adr)); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %g\n", CCF (((struct OPERAND_1_mi *)pc1)->adr)); #endif pc += sizeof (struct OPERAND_1_mi); break; /* OUT [BP+NUM] */ case 513: printfx ("%g\n", CCF (((struct OPERAND_1_i *)pc1)->num + bp)); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %g\n", CCF (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* OUT [[BP+NUM]] */ case 514: printfx ("%g\n", CCF CS (((struct OPERAND_1_i *)pc1)->num + bp)); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %g\n", CCF CS (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* OUT [ADR+INDEX] */ case 515: printfx ("%g\n", CCF ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (float))); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %g\n", CCF ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (float))); #endif pc += sizeof (struct OPERAND_1_mi); break; /* OUT [BP+NUM+INDEX] */ case 516: printfx ("%g\n", CCF (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (float))); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %g\n", CCF (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (float))); #endif pc += sizeof (struct OPERAND_1_i); break; /* OUT [[BP+NUM+INDEX]] */ case 517: printfx ("%g\n", CCF (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (float))); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %g\n", CCF (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (float))); #endif pc += sizeof (struct OPERAND_1_i); break; /* OUT [ADR] */ case 768: printfx ("%d\n", CCC (((struct OPERAND_1_mi *)pc1)->adr)); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %d, %c\n", CCC (((struct OPERAND_1_mi *)pc1)->adr), CCC (((struct OPERAND_1_mi *)pc1)->adr)); #endif pc += sizeof (struct OPERAND_1_mi); break; /* OUT [BP+NUM] */ case 769: printfx ("%d\n", CCC (((struct OPERAND_1_i *)pc1)->num + bp)); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %d, %c\n", CCC (((struct OPERAND_1_i *)pc1)->num + bp), CCC (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* OUT [[BP+NUM]] */ case 770: printfx ("%d\n", CCC CS (((struct OPERAND_1_i *)pc1)->num + bp)); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %d, %c\n", CCC CS (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* OUT [ADR+INDEX] */ case 771: printfx ("%d\n", CCC ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (char))); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %d, %c\n", CCC ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (char)), CCC ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (char))); #endif pc += sizeof (struct OPERAND_1_mi); break; /* OUT [BP+NUM+INDEX] */ case 772: printfx ("%d\n", CCC (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (char))); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %d, %c\n", CCC (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (char)), CCC (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (char))); #endif pc += sizeof (struct OPERAND_1_i); break; /* OUT [[BP+NUM+INDEX]] */ case 773: printfx ("%d\n", CCC (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (char))); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "OUT %d, %c\n", CCC (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (char)), CCC (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (char))); #endif pc += sizeof (struct OPERAND_1_i); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case IN: switch (((struct OPERAND_1_mi *)pc1)->minor) { /* IN [ADR] */ case 0: scanf ("%d", (int *)(((struct OPERAND_1_mi *)pc1)->adr)); #ifdef DEBUG printfx ("saved :%d\n", CCI (((struct OPERAND_1_mi *)pc1)->adr)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %d\n", CCI (((struct OPERAND_1_mi *)pc1)->adr)); #endif pc += sizeof (struct OPERAND_1_mi); break; /* IN [BP+NUM] */ case 1: scanf ("%d", (int *)(((struct OPERAND_1_i *)pc1)->num + bp)); #ifdef DEBUG printfx ("saved :%d\n", CCI (((struct OPERAND_1_i *)pc1)->num + bp)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %d\n", CCI (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* IN [[BP+NUM]] */ case 2: scanf ("%d", ((int *) CS (((struct OPERAND_1_i *)pc1)->num + bp))); #ifdef DEBUG printfx ("saved :%d\n", CCI CS (((struct OPERAND_1_i *)pc1)->num + bp)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %d\n", CCI CS (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* IN [ADR+INDEX] */ case 3: scanf("%d", (int *)((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (int))); #ifdef DEBUG printfx ("saved :%d\n", CCI ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (int))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %d\n", CCI ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (int))); #endif pc += sizeof (struct OPERAND_1_mi); break; /* IN [BP+NUM+INDEX] */ case 4: scanf ("%d", (int *)(((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (int))); #ifdef DEBUG printfx ("saved :%d\n", CCI (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (int))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %d\n", CCI (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (int))); #endif pc += sizeof (struct OPERAND_1_i); break; /* IN [[BP+NUM+INDEX]] */ case 5: scanf("%d", ((int *) (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (int)))); #ifdef DEBUG printfx ("saved :%d\n", CCI (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (int))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %d\n", CCI (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (int))); #endif pc += sizeof (struct OPERAND_1_i); break; /* IN [ADR] */ case 256: scanf("%lf", (double *)(((struct OPERAND_1_mi *)pc1)->adr)); #ifdef DEBUG printfx ("saved :%lf\n", CCD (((struct OPERAND_1_mi *)pc1)->adr)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %lf\n", CCD (((struct OPERAND_1_mi *)pc1)->adr)); #endif pc += sizeof (struct OPERAND_1_mi); break; /* IN [BP+NUM] */ case 257: scanf ("%lf", (double *)(((struct OPERAND_1_i *)pc1)->num + bp)); #ifdef DEBUG printfx ("saved :%lf\n", CCD (((struct OPERAND_1_i *)pc1)->num + bp)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %lf\n", CCD (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* IN [[BP+NUM]] */ case 258: scanf ("%lf", ((double *) CS (((struct OPERAND_1_i *)pc1)->num + bp))); #ifdef DEBUG printfx ("saved :%lf\n", CCD CS (((struct OPERAND_1_i *)pc1)->num + bp)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %lf\n", CCD CS (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* IN [ADR+INDEX] */ case 259: scanf ("%lf", (double *)((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (double))); #ifdef DEBUG printfx ("saved :%lf\n", CCD ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (double))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %lf\n", CCD ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (double))); #endif pc += sizeof (struct OPERAND_1_mi); break; /* IN [BP+NUM+INDEX] */ case 260: scanf ("%lf", (double *)(((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (double))); #ifdef DEBUG printfx ("saved :%lf\n", CCD (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (double))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %lf\n", CCD (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (double))); #endif pc += sizeof (struct OPERAND_1_i); break; /* IN [[BP+NUM+INDEX]] */ case 261: scanf ("%lf", ((double *) (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (double)))); #ifdef DEBUG printfx ("saved :%lf\n", CCD (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (double))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %lf\n", CCD (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (double))); #endif pc += sizeof (struct OPERAND_1_i); break; /* IN [ADR] */ case 512: scanf("%f", (float *)(((struct OPERAND_1_mi *)pc1)->adr)); #ifdef DEBUG printfx ("saved :%g\n", CCF (((struct OPERAND_1_mi *)pc1)->adr)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %g\n", CCF (((struct OPERAND_1_mi *)pc1)->adr)); #endif pc += sizeof (struct OPERAND_1_mi); break; /* IN [BP+NUM] */ case 513: scanf ("%f", (float *)(((struct OPERAND_1_i *)pc1)->num + bp)); #ifdef DEBUG printfx ("saved :%f\n", CCF (((struct OPERAND_1_i *)pc1)->num + bp)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %g\n", CCF (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* IN [[BP+NUM]] */ case 514: scanf ("%f", ((float *) CS (((struct OPERAND_1_i *)pc1)->num + bp))); #ifdef DEBUG printfx ("saved :%g\n", CCF CS (((struct OPERAND_1_i *)pc1)->num + bp)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %g\n", CCF CS (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* IN [ADR+INDEX] */ case 515: scanf ("%f", (float *)((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (float))); #ifdef DEBUG printfx ("saved :%g\n", CCF ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (float))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %g\n", CCF ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (float))); #endif pc += sizeof (struct OPERAND_1_mi); break; /* IN [BP+NUM+INDEX] */ case 516: scanf ("%f", (float *)(((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (float))); #ifdef DEBUG printfx ("saved :%g\n", CCF (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (float))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %g\n", CCF (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (float))); #endif pc += sizeof (struct OPERAND_1_i); break; /* IN [[BP+NUM+INDEX]] */ case 517: scanf ("%f", ((float *) (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (float)))); #ifdef DEBUG printfx ("saved :%g\n", CCF (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (float))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %g\n", CCF (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (float))); #endif pc += sizeof (struct OPERAND_1_i); break; /* IN [ADR] */ case 768: scanf ("%1s", (char *)(((struct OPERAND_1_mi *)pc1)->adr)); #ifdef DEBUG printfx ("saved :%d\n", CCC (((struct OPERAND_1_mi *)pc1)->adr)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %d, %c\n", CCC (((struct OPERAND_1_mi *)pc1)->adr), CCC (((struct OPERAND_1_mi *)pc1)->adr)); #endif pc += sizeof (struct OPERAND_1_mi); break; /* IN [BP+NUM] */ case 769: scanf ("%1s", (char *)(((struct OPERAND_1_i *)pc1)->num + bp)); #ifdef DEBUG printfx ("saved :%d\n", CCC (((struct OPERAND_1_i *)pc1)->num + bp)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %d, %c\n", CCC (((struct OPERAND_1_i *)pc1)->num + bp), CCC (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* IN [[BP+NUM]] */ case 770: scanf ("%1s", ((char *) CS (((struct OPERAND_1_i *)pc1)->num + bp))); #ifdef DEBUG printfx ("saved :%d\n", CCC CS (((struct OPERAND_1_i *)pc1)->num + bp)); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %d, %c\n", CCC CS (((struct OPERAND_1_i *)pc1)->num + bp), CCC CS (((struct OPERAND_1_i *)pc1)->num + bp)); #endif pc += sizeof (struct OPERAND_1_i); break; /* IN [ADR+INDEX] */ case 771: scanf ("%1s", (char *)((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (char))); #ifdef DEBUG printfx ("saved :%d\n", CCC ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (char))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %d, %c\n", CCC ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (char)), CCC ((((struct OPERAND_1_mi *)pc1)->adr) + CCI CS ast * sizeof (char))); #endif pc += sizeof (struct OPERAND_1_mi); break; /* IN [BP+NUM+INDEX] */ case 772: scanf ("%1s", (char *)(((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (char))); #ifdef DEBUG printfx ("saved :%d\n", CCC (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (char))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %d, %c\n", CCC (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (char)), CCC (((struct OPERAND_1_i *)pc1)->num + bp + CCI CS ast * sizeof (char))); #endif pc += sizeof (struct OPERAND_1_i); break; /* IN [[BP+NUM+INDEX]] */ case 773: scanf ("%1s", ((char *) (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (char)))); #ifdef DEBUG printfx ("saved :%d\n", CCC (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (char))); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "IN %d, %c\n", CCC (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (char)), CCC (CS (((struct OPERAND_1_i *)pc1)->num + bp) + CCI CS ast * sizeof (char))); #endif pc += sizeof (struct OPERAND_1_i); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case MESS: printfx ("%s\n", ((struct OPERAND_1_ma *)pc1)->adr); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "MESS %s\n", ((struct OPERAND_1_ma *)pc1)->adr); #endif pc += sizeof (struct OPERAND_1_ma); break; case JMP: pc = (((struct OPERAND_1_ma *)pc1)->adr); #ifdef DEBUG printfx ("JMP jump to address=%u\n", pc); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "JMP to address %u\n", pc); #endif break; case JZ: if (CCI CS ast == 0) { pc = (((struct OPERAND_1_ma *)pc1)->adr); #ifdef DEBUG printfx ("JZ jump to address=%u\n", pc); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "JZ to address %u\n", pc); #endif } else pc += sizeof (struct OPERAND_1_ma); ast += sizeof (char *); break; case HALT: #ifdef DEBUG printfx ("HALT\n"); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "HALT\n"); #endif pc += sizeof (struct OPERAND_0_ma); return (-2); break; case JNZ: if (CCI CS ast != 0) { pc = (((struct OPERAND_1_ma *)pc1)->adr); #ifdef DEBUG printfx ("JNZ jump to address=%u\n", pc); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "JNZ to address %u\n", pc); #endif } else pc += sizeof (struct OPERAND_1_ma); ast += sizeof (char *); break; case CALLi: switch (((struct OPERAND_1_mi *)pc1)->minor) { /* CALL user function */ case 0: stack -= sizeof (char *); check_stack (); CS stack = (pc + sizeof (struct OPERAND_1_mi)); #ifdef DEBUG printfx ("in STACK is value of pc=%u\n", CS stack); #endif pc = ((struct OPERAND_1_mi *)pc1)->adr; #ifdef DEBUG printfx ("new value of pc=%u\n", pc); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "CALL %u\n", pc); #endif break; /* CALL intrinsic integer function */ case 1: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = CS (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = (CFI f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic double function */ case 2: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = CS (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (double)); CS ast = tmp; CCD CS ast = (CFD f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop,"\nreturn value = %g\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic float function */ case 3: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = CS (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (float)); CS ast = tmp; CCF CS ast = (CFF f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %g\n", CCF CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic char function */ case 4: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = CS (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCC CS ast = (CFC f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %d\n", CCC CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic void function */ case 5: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = CS (stack + counter * sizeof (char *)); (CFV f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic unsigned integer function */ case 6: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = CS (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (unsigned int)); CS ast = tmp; CCUI CS ast = (CFUI f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %u\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic long integer function */ case 7: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = CS (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (long int)); CS ast = tmp; CCLI CS ast = (CFLI f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %ld\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic long unsigned integer function */ case 8: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = CS (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (long unsigned int)); CS ast = tmp; CCLUI CS ast = (CFLUI f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %lu\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic short integer function */ case 9: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = CS (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (short int)); CS ast = tmp; CCSI CS ast = (CFSI f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %hd\n", CCSI CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic short unsigned integer function */ case 10: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = CS (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (short unsigned int)); CS ast = tmp; CCSUI CS ast = (CFSUI f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %hu\n", CCSUI CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic long double function */ case 11: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = CS (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (long double)); CS ast = tmp; CCLD CS ast = (CFLD f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop,"\nreturn value = %g\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic signed char function */ case 12: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = CS (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCSC CS ast = (CFSC f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %d\n", CCSC CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic unsigned char function */ case 13: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = CS (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCUC CS ast = (CFUC f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %u\n", CCUC CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic integer function */ case 14: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = (CFI f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %d\n", CCI CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic double function */ case 15: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (double)); CS ast = tmp; CCD CS ast = (CFD f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop,"\nreturn value = %g\n", CCD CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic float function */ case 16: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (float)); CS ast = tmp; CCF CS ast = (CFF f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %g\n", CCF CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic char function */ case 17: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCC CS ast = (CFC f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %d\n", CCC CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic void function */ case 18: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = (stack + counter * sizeof (char *)); (CFV f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic unsigned integer function */ case 19: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (unsigned int)); CS ast = tmp; CCUI CS ast = (CFUI f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %u\n", CCUI CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic long integer function */ case 20: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (long int)); CS ast = tmp; CCLI CS ast = (CFLI f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %ld\n", CCLI CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic long unsigned integer function */ case 21: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (long unsigned int)); CS ast = tmp; CCLUI CS ast = (CFLUI f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %lu\n", CCLUI CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic short integer function */ case 22: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (short int)); CS ast = tmp; CCSI CS ast = (CFSI f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %hd\n", CCSI CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic short unsigned integer function */ case 23: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (short unsigned int)); CS ast = tmp; CCSUI CS ast = (CFSUI f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %hu\n", CCSUI CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic long double function */ case 24: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (long double)); CS ast = tmp; CCLD CS ast = (CFLD f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop,"\nreturn value = %g\n", CCLD CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic signed char function */ case 25: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCSC CS ast = (CFSC f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %d\n", CCSC CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; /* CALL intrinsic unsigned char function */ case 26: for (counter = 0; counter < (frame - stack) / sizeof (char *); counter++) adr_arg[counter] = (stack + counter * sizeof (char *)); ast -= sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCUC CS ast = (CFUC f[((struct OPERAND_1_i *)pc)->num]) (adr_arg); #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "XCALL %u\n", ((struct OPERAND_1_i *)pc)->num); fprintfx (cop, "\nreturn value = %u\n", CCUC CS ast); #endif pc += sizeof (struct OPERAND_1_i); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } break; case RET: pc = CS stack; stack += sizeof (char *); #ifdef DEBUG printfx ("RET to value of pc=%u\n", pc); #endif #ifdef CODE fprintfx (cop, "\n%u ", pc1); fprintfx (cop, "RET to %u\n", pc); #endif break; case XCHG: { char *tmp = CS ast; CS ast = CS (ast + sizeof (char *)); CS (ast + sizeof (char *)) = tmp; pc += sizeof (struct OPERAND_0_ma); break; } default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5001); abort (); } return 0; } /* * Evaluation of logical expressions - true. */ static void vtrue () { ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = 1; } /* * Evaluation of logical expressions - false. */ static void vfalse () { ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = 0; } /* * Integer division. */ static void div_yes () { int binar; binar = CCI CS (ast + sizeof (char *)) / (CCI CS ast); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; } static void divui_yes () { unsigned int binar; binar = CCUI CS (ast + sizeof (char *)) / (CCUI CS ast); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (unsigned int)); CS ast = tmp; CCUI CS ast = binar; } static void divli_yes () { long int binar; binar = CCLI CS (ast + sizeof (char *)) / (CCLI CS ast); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (long int)); CS ast = tmp; CCLI CS ast = binar; } static void divlui_yes () { long unsigned int binar; binar = CCLUI CS (ast + sizeof (char *)) / (CCLUI CS ast); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (long unsigned int)); CS ast = tmp; CCLUI CS ast = binar; } /* * Double division. */ static void divd_yes () { double binard; binard = CCD CS (ast + sizeof (char *)) / (CCD CS ast); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (double)); CS ast = tmp; CCD CS ast = binard; } static void divld_yes () { long double binard; binard = CCLD CS (ast + sizeof (char *)) / (CCLD CS ast); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (long double)); CS ast = tmp; CCLD CS ast = binard; } /* * Float division. */ static void divf_yes () { float binarf; binarf = CCF CS (ast + sizeof (char *)) / (CCF CS ast); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (float)); CS ast = tmp; CCF CS ast = binarf; } #if 0 /* * Char division. */ static void divc_yes () { char binarc; binarc = CCC CS (ast + sizeof (char *)) / (CCC CS ast); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCC CS ast = binarc; } #endif /* * Modulus. */ static void mod_yes () { int binar; binar = CCI CS (ast + sizeof (char *)) % (CCI CS ast); ast += sizeof (char *); move_stack_aligned (&tmp, -sizeof (int)); CS ast = tmp; CCI CS ast = binar; } static void move_stack_aligned (p, n) char **p; int n; { #ifdef HAVE_ASSERT_H assert ((n > 0 ? n : -n) <= MAX_CELL_MEMORY_SIZE); #endif while ((long)*p % n) (n > 0) ? (*p += sizeof (char)) : (*p -= sizeof (char)); *p += n; } clif-0.93/virtual_machine.h100444 1750 1750 2140 6343252410 14436 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * virtual_machine.h */ #ifndef _VIRTUAL_MACHINE_H #define _VIRTUAL_MACHINE_H #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif int exec PROTO((void)); /* Code execution. */ #endif clif-0.93/warranty100444 1750 1750 2330 6023076540 12711 0ustar korenkoren NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. clif-0.93/wind.c100444 1750 1750 13707 6354736610 12266 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * wind.c * * Graphical window opening. */ #include #include XGCValues value; Window root; XWindowAttributes root_window_att; XSetWindowAttributes mywin_att; extern int errno; int screen; int width, height; int x=0,y=0; unsigned int width_w, height_w,border=3; unsigned long bord=1L,back=0L; int wind PROTO((void)); int wind () { int cnt; #ifdef FORK_YES char arg1[32],arg2[32]; #endif #if 0 printf(" starts \n"); #endif if ((disp = XOpenDisplay (NULL)) == NULL) { printf (" XOpen fails \n"); return (-1); } #if 0 XSynchronize(disp,1); #endif root = XDefaultRootWindow (disp); screen = XDefaultScreen (disp); #if 0 if (!XGetWindowAttributes (disp, root, &root_window_att)) { printf("get window att failed \n"); exit(0); } XSynchronize (disp, 1); #endif width = XDisplayWidth (disp, screen); #if 0 XSynchronize (disp, 1); #endif height = XDisplayHeight (disp, screen); #if 0 XSynchronize (disp, 1); printf ("w: %d, h: %d \n", width, height); #endif default_gc = XDefaultGC (disp, screen); #if 0 XSynchronize (disp, 1); #endif XSetState (disp, default_gc, 0L, 0L, GXcopy, 0xffffffffL); #if 0 XSynchronize (disp, 1); printf ("xsetstate\n"); #endif width_w = channel[channel_handle].w_resolution[0]; height_w = channel[channel_handle].w_resolution[1]; /* * Window attributes. */ mywin_att.background_pixmap = None; mywin_att.background_pixel = 0L; mywin_att.border_pixmap = CopyFromParent; mywin_att.border_pixel = 1L; mywin_att.bit_gravity = ForgetGravity; mywin_att.win_gravity = NorthWestGravity; mywin_att.backing_store = Always; mywin_att.backing_planes = 0xffffffffL; mywin_att.backing_pixel = 0L; mywin_att.save_under = True; mywin_att.event_mask = KeyPressMask|ExposureMask|ButtonPressMask|VisibilityChangeMask|SubstructureNotifyMask|StructureNotifyMask; mywin_att.do_not_propagate_mask = NoEventMask; mywin_att.override_redirect = False; mywin_att.colormap = CopyFromParent; mywin_att.cursor = None; /* * Creates a window. */ channel[channel_handle].mywin = XCreateWindow (disp, root, x, y, width_w, height_w, border, CopyFromParent, InputOutput, CopyFromParent, CWBackPixel|CWSaveUnder|CWBackingStore|CWEventMask|CWBackingPlanes|CWDontPropagate, &mywin_att); #ifdef FORK_YES /* * Creates a pixmap. * It is used when the exposure event occurs. */ channel[channel_handle].mypix = XCreatePixmap (disp, channel[channel_handle].mywin, width_w, height_w, XDefaultDepth (disp, screen)); #endif #if 0 XSynchronize (disp, 1); printf ("xcreatewindow\n"); #endif value.background = 0L; value.graphics_exposures = True; /* * Fills the structure. */ for (cnt = 0; cnt < channel[channel_handle].fields; cnt++) { value.foreground = channel[channel_handle].member[cnt].style; channel[channel_handle].member[cnt].set_gc = XCreateGC (disp, channel[channel_handle].mywin, GCForeground|GCBackground|GCGraphicsExposures, &value); if (channel[channel_handle].d_time == 0) window (channel_handle, cnt, channel[channel_handle].start_time, channel[channel_handle].member[cnt].lower, channel[channel_handle].start_time + channel[channel_handle].duration_time, channel[channel_handle].member[cnt].upper); else window (channel_handle, cnt, channel[channel_handle].start_time, channel[channel_handle].member[cnt].lower, LINEAR_WINDOW_CONSTANT * (channel[channel_handle].start_time + pow (channel[channel_handle].duration_time, 2.)), channel[channel_handle].member[cnt].upper); } #if 0 XSynchronize (disp, 1); printf ("xsetstate + window loop\n"); #endif XClearWindow (disp, channel[channel_handle].mywin); #ifdef FORK_YES XFillRectangle (disp, channel[channel_handle].mypix, default_gc, 0, 0, channel[channel_handle].w_resolution[0], channel[channel_handle].w_resolution[1]); #endif #if 0 XSynchronize (disp, 1); #endif /* * Name of the window. */ sprintf (window_name_tmp, "%d", channel_handle); strcat (window_name_cur, window_name_tmp); XStoreName (disp, channel[channel_handle].mywin, window_name_cur); strcpy (window_name_cur, window_name_init); #if 0 XSynchronize (disp, 1); printf ("xstorename\n"); #endif XMapWindow (disp, channel[channel_handle].mywin); #if 0 XSynchronize (disp, 1); printf ("xmapwindow\n"); XSynchronize (disp, 1); #endif XWindowEvent (disp, channel[channel_handle].mywin, ExposureMask, &event); #if 0 printf (" I am after \n"); XSynchronize (disp, 1); #endif /* * Fork for managers that cannot manage exposure events. */ #ifdef FORK_YES if ((channel[channel_handle].ch_pid = fork ()) < 0) printf ("could not fork %d\n", errno); else if(channel[channel_handle].ch_pid == 0) /* child */ { sprintf (arg1, "%ld", channel[channel_handle].mywin); sprintf (arg2, "%ld", channel[channel_handle].mypix); #if 0 printf ("fork child\n"); #endif execl("rw", "rw", arg1, arg2, (char *)0); printf ("errno %d\n", errno); printf ("bad exec\n"); } /* parent */ #endif /* FORK_YES */ return (channel_handle); } clif-0.93/wind_w.c100444 1750 1750 13577 6354737170 12623 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * wind_w.c * * Alphanumerical window opening. */ #include #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif extern char *callocx PROTO((unsigned, unsigned)); extern void error_message PROTO((int)); XGCValues value; XEvent event; char **list; char *path; int *act_cnt; int wind_w PROTO((void)); int wind_w () { #ifdef FORK_YES char arg1[32], arg2[32]; #endif if ((disp = XOpenDisplay (NULL)) == NULL) { printf (" XOpen fails write\n"); return (-1); } #if 0 XSynchronize(disp,1); #endif root = XDefaultRootWindow (disp); screen = XDefaultScreen (disp); #if 0 if (!XGetWindowAttributes (disp, root, &root_window_att)) { printf ("get window att failed \n"); exit (0); } XSynchronize (disp, 1); #endif width = XDisplayWidth (disp, screen); #if 0 XSynchronize (disp, 1); #endif height = XDisplayHeight (disp, screen); #if 0 XSynchronize (disp, 1); printf ("w: %d, h: %d \n", width, height); default_gc = XDefaultGC (disp, screen); XSynchronize (disp, 1); XSetState (disp, default_gc, 0xffffffL, 0L, GXcopy, 0xffffffffL); XSynchronize (disp, 1); printf ("xsetstate\n"); #endif width_w = 400; height_w = (((int)(channel[channel_handle].fields/5)) + 1) * 15; /* * Window attributes. */ mywin_att.background_pixmap = None; mywin_att.background_pixel = 0L; mywin_att.border_pixmap = CopyFromParent; mywin_att.border_pixel = 1L; mywin_att.bit_gravity = ForgetGravity; mywin_att.win_gravity = NorthWestGravity; mywin_att.backing_store = Always; mywin_att.backing_planes = 0xffffffffL; mywin_att.backing_pixel = 0L; mywin_att.save_under = True; mywin_att.event_mask = KeyPressMask|ExposureMask|ButtonPressMask|VisibilityChangeMask|SubstructureNotifyMask|StructureNotifyMask; mywin_att.do_not_propagate_mask = NoEventMask; mywin_att.override_redirect = False; mywin_att.colormap = CopyFromParent; mywin_att.cursor = None; /* * Creates a window. */ channel[channel_handle].mywin_write = XCreateWindow (disp, root, x, y, width_w, height_w, border, CopyFromParent, InputOutput, CopyFromParent, CWBackPixel|CWSaveUnder|CWBackingStore|CWEventMask|CWBackingPlanes|CWDontPropagate, &mywin_att); #ifdef FORK_YES /* * Creates a pixmap. * It is used when the exposure event occurs. */ channel[channel_handle].mypix_write = XCreatePixmap (disp, channel[channel_handle].mywin_write, width_w, height_w, XDefaultDepth (disp, screen)); #endif #if 0 XSynchronize (disp, 1); printf ("xcreatewritewindow\n"); #endif value.background = 0L; value.graphics_exposures = True; value.foreground = 0xffffffL; set_gc_write = XCreateGC (disp, channel[channel_handle].mywin_write, GCForeground|GCBackground|GCGraphicsExposures, &value); XClearWindow (disp, channel[channel_handle].mywin_write); #ifdef FORK_YES XFillRectangle (disp, channel[channel_handle].mypix_write, default_gc, 0, 0, channel[channel_handle].w_resolution[0], channel[channel_handle].w_resolution[1]); #endif #if 0 XSynchronize (disp, 1); #endif /* * Name of the window. */ sprintf (window_name_tmp, "%d", channel_handle); strcat (window_name_wr_cur, window_name_tmp); XStoreName (disp, channel[channel_handle].mywin_write, window_name_wr_cur); strcpy (window_name_wr_cur, window_name_wr_init); #if 0 XSynchronize (disp, 1); printf ("xstowriterename\n"); #endif XMapWindow (disp, channel[channel_handle].mywin_write); #if 0 XSynchronize (disp, 1); printf ("xmapwritewindow\n"); XSynchronize (disp, 1); channel[channel_handle].item.chars=" "; channel[channel_handle].item.nchars = strlen (channel[channel_handle].item.chars); #endif channel[channel_handle].item.delta = 1; channel[channel_handle].item.font = None; #if 0 printf ("item filled\n"); #endif /* * Managing fonts. */ XSetFontPath (disp, &path, 0); #if 0 printf ("xsetfontpath\n"); #endif if ((act_cnt = (int *) callocx (1, sizeof(int))) == NULL) { error_message (4002); return (-3); } while (*act_cnt == 0) list = XListFonts (disp, "*", 10, act_cnt); #if 0 printf ("xlistfonts\n"); #endif channel[channel_handle].item.font = XLoadFont (disp, list[0]); #if 0 printf ("xloadfont\n"); #endif channel[channel_handle].myfont = XQueryFont (disp, channel[channel_handle].item.font); #if 0 printf ("xqueryfont\n"); #endif /* * Fork for managers that cannot manage exposure events. */ #ifdef FORK_YES if ((channel[channel_handle].ch_pid_write = fork ()) < 0) printf ("could not fork %d\n", errno); else if(channel[channel_handle].ch_pid_write == 0) /* child */ { sprintf (arg1, "%ld", channel[channel_handle].mywin_write); sprintf (arg2, "%ld", channel[channel_handle].mypix_write); #if 0 printf ("fork child\n"); #endif execl ("rw", "rw", arg1, arg2, (char *)0); printf ("errno %d\n", errno); printf ("bad exec\n"); } /* parent */ #endif /* FORK_YES */ return (0); } clif-0.93/xwin.c100444 1750 1750 7601 6354737074 12273 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * xwin.c * * Hardware dependent graphical functions. */ #include "graph.c" int cur_x, cur_y; static void d_flush PROTO((void)); static void d_clear PROTO((int)); static void d_clear_text PROTO((int)); static void d_destroy_window PROTO((int)); static void d_destroy_window_write PROTO((int)); static void d_draw_text PROTO((int, int, int)); static void d_pause PROTO((int)); /* * Moves cursor to the specific position. */ static void d_move (d_x, d_y) int d_x, d_y; { cur_x = d_x; cur_y = d_y; } /* * Draws a line from the cursor position to the specified point. */ static void d_draw (d_handle, d_n, d_x, d_y) int d_handle, d_n, d_x, d_y; { #ifdef FORK_YES XDrawLine (disp, channel[d_handle].mypix, channel[d_handle].member[d_n].set_gc, cur_x, cur_y, d_x, d_y); #endif XDrawLine (disp, channel[d_handle].mywin, channel[d_handle].member[d_n].set_gc, cur_x, cur_y, d_x, d_y); } /* * Draws a point. */ static void d_point (d_handle, d_n, d_x, d_y) int d_handle, d_n, d_x, d_y; { #ifdef FORK_YES XDrawPoint (disp, channel[d_handle].mypix, channel[d_handle].member[d_n].set_gc, d_x, d_y); #endif XDrawPoint (disp, channel[d_handle].mywin, channel[d_handle].member[d_n].set_gc, d_x, d_y); } static void d_flush () { XSync (disp, 1); } /* * Clears a window. */ static void d_clear (d_handle) int d_handle; { XClearWindow (disp, channel[d_handle].mywin); #ifdef FORK_YES XFillRectangle (disp, channel[d_handle].mypix, default_gc, 0, 0, channel[d_handle].w_resolution[0], channel[d_handle].w_resolution[1]); #endif } /* * Clears an alphanumerical window. */ static void d_clear_text (d_handle) int d_handle; { XClearWindow (disp, channel[d_handle].mywin_write); #ifdef FORK_YES XFillRectangle (disp, channel[d_handle].mypix_write, default_gc, 0, 0, channel[d_handle].w_resolution[0], channel[d_handle].w_resolution[1]); #endif } /* * Destroys a graphical window. */ static void d_destroy_window (d_handle) int d_handle; { XDestroyWindow (disp, channel[d_handle].mywin); #ifdef FORK_YES XFreePixmap (disp, channel[d_handle].mypix); #endif XSync (disp, 1); } /* * Destroys an alphanumerical window. */ static void d_destroy_window_write (d_handle) int d_handle; { XDestroyWindow (disp, channel[d_handle].mywin_write); #ifdef FORK_YES XFreePixmap (disp, channel[d_handle].mypix_write); #endif XSync (disp, 1); } /* * Draws a text in an alphanumerical window. */ static void d_draw_text (d_handle, d_x, d_y) int d_handle, d_x, d_y; { XDrawText (disp, channel[d_handle].mywin_write, set_gc_write, d_x, d_y, &(channel[d_handle].item), 1); #ifdef FORK_YES XDrawText (disp, channel[d_handle].mypix_write, set_gc_write, d_x, d_y, &(channel[d_handle].item), 1); #endif } /* * Suspend graphical output and waits for a keystroke. */ static void d_pause (d_handle) int d_handle; { #if 0 printf ("d_pause\n"); #endif XSelectInput (disp, channel[d_handle].mywin, KeyPressMask); XWindowEvent (disp, channel[d_handle].mywin, KeyPressMask, &event); #if 0 printf ("event %d\n", event.type); #endif } clif-0.93/ys.h100444 1750 1750 2054 6343254670 11735 0ustar korenkoren/* Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * ys.h */ #ifndef _YS_H #define _YS_H #ifndef PROTO #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined(__STDC__) #define PROTO(ARGS) ARGS #else #define PROTO(ARGS) () #endif #endif int yyparse PROTO((void)); #endif /* _YS_H */ clif-0.93/ys.y100444 1750 1750 400704 7130600042 12001 0ustar korenkoren/* -*-c-*- Clif - A C-like Interpreter Framework Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 T. Hruz, L. Koren 1998, 1999, 2000 L. Koren This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * ys.y * * grammar for Clif's compiler (yacc specification) */ %{ #include #include "global.h" #include "config.h" #ifdef STDC_HEADERS #include #include #else #include #endif #include "instr.h" /* * Header of structures. * Defines size of virtual machine * instructions. */ #include "geninstr.h" /* * Header of macros. * Defines instruction set of the * virtual machine. */ #include "control.h" /* * Header of fixative structures */ #include "type.h" /* * Header of internal representation * of types. */ #include "struct.h" /* * Header of globally used structures */ #include "mystdio.h" /* * Defining NULL */ #include "ys.h" /* * Header of compiler maintenance functions. */ #include "allocx.h" #include "comp_maint.h" #include "load.h" #include "virtual_machine.h" #include "ls.h" #include "tables.h" #include "memmove.h" #include "remote_call.h" #include "printfx.h" #include "s-conv.h" #include "flags.h" #include "parser.h" /* * Header for parser specific variables. */ #include "pso.h" #define YYDEBUG 1 void dump_yacc PROTO((void)); %} %union { int myint; unsigned int myuint; long int mylint; long unsigned int myluint; double mydouble; long double myldouble; float myfloat; char *mystring; wchar_t *mywstring; char mychar; } %token NUMBERI /* integer constant */ %token NUMBERUI %token NUMBERLI %token NUMBERLUI %token NUMBERD /* double precision constant */ %token NUMBERLD %token NUMBERF /* float constant */ %token STRINGC /* string constant */ %token WSTRINGC /* wide string constant */ %token NUMBERC /* char constant */ %token AUTO STATIC REGISTER %token EXTERN REMOTE UNLOAD %token INTRINSIC RPC %token IDENT /* identifier type */ %token INT DOUBLE FLOAT CHAR VOID %token LONG SHORT SIGNED UNSIGNED %token CONST VOLATILE %token ENUM STRUCT UNION %token EXIT %token IF ELSE %token SIZEOF %token SWITCH WHILE FOR DO %token CONTINUE BREAK RETURN GOTO %token CASE DEFAULT %token CSUSPEND RESUME /* Interrupt statements. */ /* * Keywords */ %token EXPORT_T /* * Export_t for remote function * now only for cprintf */ %token TYPEDEF %token TYPENAME %token ':' '?' %token MUL_ASSIGN DIV_ASSIGN MOD_ASSIGN ADD_ASSIGN SUB_ASSIGN %token LEFT_ASSIGN RIGHT_ASSIGN AND_ASSIGN XOR_ASSIGN OR_ASSIGN %token '=' %token OR_A %token AND_A %token '|' %token '^' %token '&' %token EQ_A NE_A %token '<' LQ '>' GQ %token SHIL SHIR %token '+' '-' %token '*' '/' '%' %token NEG_T NEG_B PP MM %token '(' ')' '[' ']' %token '.' PTR %start list_stat_0 %% /* beginnig of rules section */ /* \verbatim{parser.tex} */ list_stat_0 : list_stat_0 stat_0 /* * Level zero */ { GEN_STOP; GENCODE; if (handle_main && ! no_compile_only) fix_and_clear_goto_table (); if (no_compile_only && (! handle_main || initialize_only)) { /* Code for initialization is executed even if the `main' function option was specified. */ fix_and_clear_goto_table (); #ifndef NOT_MSWIN_AND_YES_DOS VIRTUAL_MACHINE_SUSPENDED_RESET; #endif if (0 == exec ()) return 0; #ifndef NOT_MSWIN_AND_YES_DOS VIRTUAL_MACHINE_SUSPENDED_SET; #endif } else if (! s) return 0; initialize_only ? initialize_only-- : initialize_only; RESET_CODE_GENERATION_BEGINNING; #if 0 deallocate (BLOCK); #endif } | ; /* * Level one */ list_stat : list_stat stat_1 | ; /* * Statements of the level zero */ stat_0 : declarations | statement { if (handle_main) error_message (7003); } | RESUME ';' { if (handle_main) error_message (7003); GEN_IRET; GENCODE; } | ';' | error ';' { yyerrok; /* I changed ";" to text. I don't know, if parse error is always reported correctly. */ error_message (1004, text); } ; /* * Statements of the level one */ stat_1 : statement | GOTO IDENT ';' { if (no_compile_only) { has_goto ($2); GEN_JMP; GENCODE; } } | ';' | error '}' { yyerrok; error_message (1004, "}"); } | error ';' { yyerrok; error_message (1004, ";"); } ; /* * NO_ANSI */ jump_statement /* : GOTO IDENT ';' */ /* GOTO statement is separeted. It is moved to the stat_1 */ /* GOTO statement cannot be used in the level zero. */ /* There is no way to interpret a goto statement in */ /* the level zero, except goto back in the code (label */ /* must had been known if the goto statement appeared). */ /* This possibility we leaved out. */ : BREAK ';' { brfix (); GEN_JMP; GENCODE; } | CONTINUE ';' { cofix (); GEN_JMP; GENCODE; } | RETURN expression ';' { if (VID == type_ac[set - 1]) error_message (6002); if ((-1 == l_value_cast ()) && (2 < set)) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; if (NULL != kodp3) { memmovex (kodp3 + sizeof(struct OPERAND_0_ma), kodp3, (unsigned int)(kodp - kodp3)); GEN_CLRTr; GENCODE; kodp3 = NULL; } retfix (); GEN_JMP; GENCODE; is_address = 0; } | RETURN ';' { if (VID != type_ac[set]) error_message (6001); retfix (); GEN_JMP; GENCODE; } ; /* * Declaration of identifiers */ /* declaration : declaration_specifiers ';' | declaration_specifiers init_declarator_list ';' ; */ declaration_specifiers : storage_class_specifier | storage_class_specifier declaration_specifiers | type_specifier | type_specifier declaration_specifiers | type_qualifier | type_qualifier declaration_specifiers ; M : { typeh[++type_spec_count] = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)typeh[type_spec_count], sizeof(struct internal_type)); typeh[type_spec_count]->attribute.function_class = SIMPLE; typeh[type_spec_count]->attribute.type_qualifier = UNDEF_TQ; typeh[type_spec_count]->attribute.arit_class = UNUSED_AC; typeh[type_spec_count]->attribute.storage_class_specifier = UNSPEC_SC; body_flag = 1; } ; /* init_declarator_list : init_declarator | init_declarator_list ',' init_declarator ; init_declarator : declarator | declarator '=' initializer ; */ declarations : M declaration_specifiers first_dekl /* | M declaration_specifiers init_declarator_list*/ | REMOTE '{' INTRINSIC ',' STRINGC '}' IDENT ';' { typeh[++type_spec_count] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)typeh[type_spec_count], sizeof(struct internal_type)); /* typeh[type_spec_count]->attribute.arit_class = LIB;*/ typeh[type_spec_count]->attribute.function_class = LIB; body_flag = 1; if (-1 == has ($7)) COMPILE_ONLY; if (!load_new () && !load (&remote_ptr_C)) has_remote (remote_ptr_C); typeh[type_spec_count--] = NULL; } | REMOTE '{' RPC ',' STRINGC '}' IDENT ';' {} | UNLOAD IDENT ';' { body_flag = 0; unload (); } ; /* * Common statements for the level zero and * the level one. */ statement : labeled_statement | compound_statement { GEN_ADDss(scope_offset_get ()); GENCODE; exit_scope (); } | /* * Expressions, arithmetical stack is cleared */ expression ';' { if (! LOCAL_P(type_com[set]) && ! REMOTE_P(type_com[set]) && ! MOV_P && ! POPA_P) error_message (6027); switch (type_ac[set]) { /* No breaks here. */ case INTEGER: case SIGNED_AC | INTEGER: case UNSIGNED_AC | INTEGER: case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: case LONG_AC | UNSIGNED_AC | INTEGER: case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: case SHORT_AC | UNSIGNED_AC | INTEGER: case DOUB: case LONG_AC | DOUB: case FLT: case CHR: case SIGNED_AC | CHR: case UNSIGNED_AC | CHR: GEN_POPAe; GENCODE; break; case VID: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GEN_CLRT;GENCODE;kodp3 = NULL; is_address = 0; SET_ADDRESS; TYPE_CLEAR; } | selection_statement | iteration_statement | jump_statement | EXIT ';' { GEN_HALT; GENCODE; } /* * Leaving environment */ /* * Statement for synchronous interrupt */ | CSUSPEND ';' { GEN_INTER; GENCODE; } ; /* * Control flow statements */ /* The if then else ambiguity can be solved */ /* using the following grammar: */ /* -> */ /* | */ /* -> if then else */ /* | other */ /* -> if then */ /* | if then else */ selection_statement : IF '(' expression ')' { SET_ADDRESS; TYPE_CLEAR; kodp3 = NULL; GEN_CLRT; GENCODE; fixp++; #ifdef DEBUG printfx ("fixp=%u\n",fixp); #endif fixp->if1.major = IF; fixp->if1.jz = kodp; GEN_JZ;GENCODE; is_address = 0; } then | SWITCH '(' expression ')' { if (INTEGER != type_ac[set]) error_message (1013); kodp3 = NULL; fixp++; #ifdef DEBUG printfx ("fixp=%u\n",fixp); #endif fixp->switch1.major = SWITCH; fixp->switch1.jz = NULL; fixp->switch1.def_use.def_flag = 0; fixp->switch1.jmp = kodp; GEN_JMP; GENCODE; is_address = 0; } switch_body { search_duplicate_labels (); if (fixp->switch1.def_use.def_flag) /* Note: We have to backpatch the address for default label here because we don't know where the default label appeared. (In general case, it can be anywhere in the switch statement.) */ ((struct OPERAND_1_ma *)(fixp->switch1.jz))->adr = fixp->switch1.def_use.adr; else if (NULL != fixp->switch1.jz) ((struct OPERAND_1_ma *)(fixp->switch1.jz))->adr = kodp; fix_break_s (); SET_ADDRESS; TYPE_CLEAR; GEN_CLRT; GENCODE; fixp--; } ; iteration_statement : WHILE { fixp++; fixp->while1.major = WHILE; fixp->while1.jmp = kodp; #ifdef DEBUG printfx ("JMP jump to address=%u\n", fixp->while1.jmp); #endif } '(' expression ')' { promote_type (); SET_ADDRESS; TYPE_CLEAR; kodp3 = NULL; GEN_CLRT; GENCODE; fixp->while1.jz = kodp; GEN_JZ; GENCODE; is_address = 0; } while_stat | DO { fixp++; fixp->while1.major = WHILE; fixp->while1.jmp = kodp; #ifdef DEBUG printfx ("JMP jump to address=%u\n", fixp->while1.jmp); #endif } do_while_stat WHILE '(' expression ')' ';' { promote_type (); SET_ADDRESS; TYPE_CLEAR; kodp3 = NULL; GEN_CLRT; GENCODE; fixp->while1.jz = kodp; GEN_JZ; GENCODE; ((struct OPERAND_1_ma *)kodp)->adr = fixp->while1.jmp; GEN_JMP; GENCODE; ((struct OPERAND_1_ma *)(fixp->while1.jz))->adr = kodp; #ifdef DEBUG printfx ("JZ jump to address=%u\n",kodp); #endif fix_break_w (); fix_cont_w (); fixp--; is_address = 0; } | FOR for for_stat { ((struct OPERAND_1_ma *)kodp)->adr = fixp->for1.jmp3; GEN_JMP; GENCODE; if (NULL != fixp->for1.jn) ((struct OPERAND_1_ma *)(fixp->for1.jn))->adr = kodp; fix_break_f (); fix_cont_f (); fixp--; } ; /* * Parsing of while loop body. */ while_stat : stat_1 { ((struct OPERAND_1_ma *)kodp)->adr = fixp->while1.jmp; GEN_JMP; GENCODE; ((struct OPERAND_1_ma *)(fixp->while1.jz))->adr = kodp; #ifdef DEBUG printfx ("JZ jump to address=%u\n", kodp); #endif fix_break_w (); fix_cont_w (); fixp--; } ; do_while_stat : stat_1 ; /* * Parsing of for statement. */ for_stat : stat_1 ; for : '(' expression ';' { if (! LOCAL_P(type_com[set]) && ! REMOTE_P(type_com[set]) && ! MOV_P && ! POPA_P) error_message (6027); switch (type_ac[set]) { /* No breaks here. */ case INTEGER: case SIGNED_AC | INTEGER: case UNSIGNED_AC | INTEGER: case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: case LONG_AC | UNSIGNED_AC | INTEGER: case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: case SHORT_AC | UNSIGNED_AC | INTEGER: case DOUB: case LONG_AC | DOUB: case FLT: case CHR: case SIGNED_AC | CHR: case UNSIGNED_AC | CHR: GEN_POPAe; GENCODE; break; case VID: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } kodp3 = NULL; GEN_CLRT; GENCODE; fixp++; #ifdef DEBUG printfx ("fixp=%u\n", fixp); #endif fixp->for1.major = FOR; jmp1 = kodp; is_address = 0; SET_ADDRESS; TYPE_CLEAR; } for_expr1 | '(' ';' { fixp++; #ifdef DEBUG printfx ("fixp=%u\n", fixp); #endif fixp->for1.major = FOR; jmp1 = kodp; } for_expr1 ; for_expr1: expression ';' { promote_type (); SET_ADDRESS; TYPE_CLEAR; kodp3 = NULL; GEN_CLRT; GENCODE; fixp->for1.jn = kodp; GEN_JZ; GENCODE; fixp->for1.jmp2 = kodp; GEN_JMP; GENCODE; fixp->for1.jmp3 = kodp; is_address = 0; } for_expr2 | ';' { fixp->for1.jn = NULL; fixp->for1.jmp2 = NULL; fixp->for1.jmp3 = kodp; } for_expr2 ; for_expr2: expression ')' { if (! LOCAL_P(type_com[set]) && ! REMOTE_P(type_com[set]) && ! MOV_P && ! POPA_P) error_message (6027); switch (type_ac[set]) { /* No breaks here. */ case INTEGER: case SIGNED_AC | INTEGER: case UNSIGNED_AC | INTEGER: case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: case LONG_AC | UNSIGNED_AC | INTEGER: case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: case SHORT_AC | UNSIGNED_AC | INTEGER: case DOUB: case LONG_AC | DOUB: case FLT: case CHR: case SIGNED_AC | CHR: case UNSIGNED_AC | CHR: GEN_POPAe; GENCODE; break; case VID: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } kodp3 = NULL; GEN_CLRT; GENCODE; if (NULL != fixp->for1.jn) { ((struct OPERAND_1_ma *)kodp)->adr = jmp1; GEN_JMP; GENCODE; ((struct OPERAND_1_ma *)(fixp->for1.jmp2))->adr = kodp; } is_address = 0; SET_ADDRESS; TYPE_CLEAR; } | ')' { if (NULL != fixp->for1.jn) { fixp->for1.jmp3 = jmp1; ((struct OPERAND_1_ma *)(fixp->for1.jmp2))->adr = kodp; } else fixp->for1.jmp3 = kodp; } ; /* Type specifiers. */ /* * Internal types: */ type_specifier : INT { if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output->attribute.arit_class += INTEGER; else typeh[type_spec_count]->attribute.arit_class += INTEGER; typedef_f = 0; } | DOUBLE { if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output->attribute.arit_class += DOUB; else typeh[type_spec_count]->attribute.arit_class += DOUB; typedef_f = 0; } | FLOAT { if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output->attribute.arit_class += FLT; else typeh[type_spec_count]->attribute.arit_class += FLT; typedef_f = 0; } | CHAR { if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output->attribute.arit_class += CHR; else typeh[type_spec_count]->attribute.arit_class += CHR; typedef_f = 0; } | VOID { if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output->attribute.arit_class += VID; else typeh[type_spec_count]->attribute.arit_class += VID; typedef_f = 0; } | LONG { if (LONG_P(typeh[type_spec_count])) error_message (6025, "long"); if (TYPEDEF_P(typeh[type_spec_count])) { if (LONG_P(typeh[type_spec_count]->output)) error_message (6025, "long"); typeh[type_spec_count]->output->attribute.arit_class += LONG_AC; } else typeh[type_spec_count]->attribute.arit_class += LONG_AC; typedef_f = 0; } | SHORT { if (SHORT_P(typeh[type_spec_count])) error_message (6025, "short"); if (TYPEDEF_P(typeh[type_spec_count])) { if (SHORT_P(typeh[type_spec_count]->output)) error_message (6025, "short"); typeh[type_spec_count]->output->attribute.arit_class += SHORT_AC; } else typeh[type_spec_count]->attribute.arit_class += SHORT_AC; typedef_f = 0; } | SIGNED { if (SIGNED_P(typeh[type_spec_count])) error_message (6025, "signed"); if (TYPEDEF_P(typeh[type_spec_count])) { if (SIGNED_P(typeh[type_spec_count]->output)) error_message (6025, "signed"); typeh[type_spec_count]->output->attribute.arit_class += SIGNED_AC; } else typeh[type_spec_count]->attribute.arit_class += SIGNED_AC; typedef_f = 0; } | UNSIGNED { if (UNSIGNED_P(typeh[type_spec_count])) error_message (6025, "unsigned"); if (TYPEDEF_P(typeh[type_spec_count])) { if (UNSIGNED_P(typeh[type_spec_count]->output)) error_message (6025, "unsigned"); typeh[type_spec_count]->output->attribute.arit_class += UNSIGNED_AC; } else typeh[type_spec_count]->attribute.arit_class += UNSIGNED_AC; typedef_f = 0; } | struct_or_union_specifier | enum_specifier | TYPENAME { struct ident_tab_loc *ptr; int unused_p = UNUSED_P(typeh[type_spec_count]); if (! unused_p) { error_message (1001); COMPILE_ONLY; } ptr = point_loc ($1); if (NULL == ptr) { struct ident_tab *ptr1 = point ($1); if (NULL == ptr1) COMPILE_ONLY; if (unused_p) typeh[type_spec_count] = ptr1->type->output; else ptr1->type = typeh[type_spec_count]; } else if (unused_p) typeh[type_spec_count] = ptr->type->output; else ptr->type = typeh[type_spec_count]; typedef_f = 0; } ; type_qualifier : CONST { if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output->attribute.type_qualifier = CONST_TQ; else typeh[type_spec_count]->attribute.type_qualifier = CONST_TQ; } | VOLATILE { if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output->attribute.type_qualifier = VOLATILE_TQ; else typeh[type_spec_count]->attribute.type_qualifier = VOLATILE_TQ; } ; pointer : '*' { struct internal_type *help; help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; typeh[type_spec_count]->output->attribute.arit_class = POINTER; } else { help->output = typeh[type_spec_count]; typeh[type_spec_count] = help; typeh[type_spec_count]->attribute.function_class = POINTER; } } | '*' type_qualifier_list | '*' pointer | '*' type_qualifier_list pointer ; type_qualifier_list : type_qualifier | type_qualifier_list type_qualifier ; struct_or_union_specifier : struct_or_union IDENT { typedef_f = 0; body_flag = 0; if (-1 == has_tag (0, $2)) COMPILE_ONLY; struct_union_enum_name[++suen_count] = text; if (param_flag) error_message (6009); } '{' struct_declaration_list '}' { proc_name_text[++proc] = struct_union_enum_name[suen_count]; if (-1 == add_spec_to_tag ()) COMPILE_ONLY; if (-1 == add_ident_to_tag ()) COMPILE_ONLY; proc_name_text[proc--] = NULL; body_flag = 1; text = struct_union_enum_name[suen_count]; if (-1 == has_tag (0, text)) COMPILE_ONLY; struct_union_enum_name[suen_count--] = NULL; } | struct_or_union { typedef_f = 0; if (param_flag) error_message (6009); } '{' struct_declaration_list '}' { if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output->input = l_type_spec; else typeh[type_spec_count]->input = l_type_spec; l_type_spec = NULL; if (param_flag) error_message (6009); } | struct_or_union IDENT { typedef_f = 0; body_flag = 0; if (-1 == (body_flag = has_tag (1, $2))) COMPILE_ONLY; if (TYPEDEF_P(typeh[type_spec_count])) { if (0 == typeh[type_spec_count]->output->attribute.memory_size) struct_union_enum_name[++suen_count] = $2; } else { if (0 == typeh[type_spec_count]->attribute.memory_size) struct_union_enum_name[++suen_count] = $2; } } ; struct_or_union : STRUCT { if (TYPEDEF_P(typeh[type_spec_count])) { typeh[type_spec_count]->output->attribute.arit_class = INTEGER; typeh[type_spec_count]->output->attribute.function_class = STRUCT_FC; } else { typeh[type_spec_count]->attribute.arit_class = INTEGER; typeh[type_spec_count]->attribute.function_class = STRUCT_FC; } } | UNION { if (TYPEDEF_P(typeh[type_spec_count])) { typeh[type_spec_count]->output->attribute.arit_class = INTEGER; typeh[type_spec_count]->output->attribute.function_class = UNION_FC; } else { typeh[type_spec_count]->attribute.arit_class = INTEGER; typeh[type_spec_count]->attribute.function_class = UNION_FC; } } ; struct_declaration_list : struct_declaration { typeh[type_spec_count--] = NULL; } | struct_declaration_list struct_declaration { typeh[type_spec_count--] = NULL; } ; struct_declaration : M specifier_qualifier_list struct_declarator_list ';' { if (1 < suen_count) struct_union_enum_name[suen_count--] = NULL; } ; specifier_qualifier_list : type_specifier | type_specifier specifier_qualifier_list | type_qualifier | type_qualifier specifier_qualifier_list ; struct_declarator_list : struct_declarator | struct_declarator_list ',' struct_declarator ; struct_declarator : declarator | ':' constant_expression | declarator ':' constant_expression ; enum_specifier : ENUM '{' { if (TYPEDEF_P(typeh[type_spec_count])) { typeh[type_spec_count]->output->attribute.arit_class = INTEGER; typeh[type_spec_count]->output->attribute.function_class = ENUM_FC; } else { typeh[type_spec_count]->attribute.arit_class = INTEGER; typeh[type_spec_count]->attribute.function_class = ENUM_FC; } if (param_flag) error_message (6009); typedef_f = 0; } enumerator_list '}' { enum_value = 0; } | ENUM IDENT '{' { if (TYPEDEF_P(typeh[type_spec_count])) { typeh[type_spec_count]->output->attribute.arit_class = INTEGER; typeh[type_spec_count]->output->attribute.function_class = ENUM_FC; } else { typeh[type_spec_count]->attribute.arit_class = INTEGER; typeh[type_spec_count]->attribute.function_class = ENUM_FC; } body_flag = 0; if (-1 == has_tag (0, $2)) COMPILE_ONLY; struct_union_enum_name[++suen_count] = text; if (param_flag) error_message (6009); typedef_f = 0; } enumerator_list '}' { enum_value = 0; body_flag = 1; text = struct_union_enum_name[suen_count]; if (-1 == has_tag (0, text)) COMPILE_ONLY; struct_union_enum_name[suen_count--] = NULL; } | ENUM IDENT { if (TYPEDEF_P(typeh[type_spec_count])) { typeh[type_spec_count]->output->attribute.arit_class = INTEGER; typeh[type_spec_count]->output->attribute.function_class = ENUM_FC; } else { typeh[type_spec_count]->attribute.arit_class = INTEGER; typeh[type_spec_count]->attribute.function_class = ENUM_FC; } body_flag = 0; if (-1 == (body_flag = has_tag (1, $2))) COMPILE_ONLY; typedef_f = 0; } ; enumerator_list : enumerator | enumerator_list ',' enumerator ; enumerator : IDENT { typeh[++type_spec_count] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)typeh[type_spec_count], sizeof(struct internal_type)); typeh[type_spec_count]->attribute.arit_class = INTEGER; typeh[type_spec_count]->attribute.function_class = SIMPLE; typeh[type_spec_count]->attribute.type_qualifier = CONST_TQ; typeh[type_spec_count]->attribute.storage_class_specifier = UNSPEC_SC; typeh[type_spec_count]->attribute.domain = (char *) allocate (sizeof (int), PERM); init_zero ((char *)typeh[type_spec_count]->attribute.domain, sizeof(struct internal_type)); *(int *)typeh[type_spec_count]->attribute.domain = enum_value++; /* The enum_value++ has to be at the end. */ put2table ($1, typeh[type_spec_count]); typeh[type_spec_count--] = NULL; } | IDENT '=' constant_expression {fprintfx (stderr, "Assignment in an enumeration not supported yet\n");} ; declarator : pointer direct_declarator { /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(typeh[type_spec_count])) { typeh[type_spec_count] = typeh[type_spec_count]->output; } } | direct_declarator ; /* * NO_ANSI */ direct_declarator /* It has to be all <> here, but definitions of functions. */ : IDENT { struct internal_type *type = typeh[type_spec_count]; if (TYPEDEF_P(type)) type = type->output; if ((STRUCT_P (type) || UNION_P (type)) && suen_count > 1 && (0 == type->attribute.memory_size)) { error_message (1025); COMPILE_ONLY; } type->field_name = $1; if (-1 == add_to_spec_list ()) COMPILE_ONLY; type->field_name = NULL; if (-1 == add_to_ident_list ()) COMPILE_ONLY; } | IDENT list_dim { struct internal_type *help, *arch, *type = typeh[type_spec_count]; if (TYPEDEF_P(type)) type = type->output; if ((STRUCT_P (type) || UNION_P (type)) && suen_count > 1 && (0 == type->attribute.memory_size)) { error_message (1025); COMPILE_ONLY; } help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); help->output = type; help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; help->field_name = $1; arch = type; if (TYPEDEF_P(typeh[type_spec_count])) typeh[type_spec_count]->output = help; else typeh[type_spec_count] = help; if (-1 == add_to_spec_list ()) COMPILE_ONLY; help->field_name = NULL; if (-1 == add_to_ident_list ()) COMPILE_ONLY; count_arr = 1; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; DELETE_SUBSCRIPT; } ; initializer : assignment_expression | '{' { if (! initialize_only && ! full_bracketing) { GEN_MOVaa; GENCODE; } full_bracketing++; } initializer_list_complete ; initializer_list_complete : initializer_list '}' { int bracket_initializers; if (dim[poc] >= 0 && full_bracketing == poc) { bracket_initializers = initialize_only % dim[poc - 1]; if (bracket_initializers) initialize_only += (dim[poc - 1] - bracket_initializers); aggregate_memory_size[full_bracketing] = 0; } if (ARRAY_P(type_com[set])) { int i = initialize_only, j = get_field_size (&i, type_com[set]), k = aggregate_memory_size[full_bracketing]; i = j * initialize_only; while (0 != k && i >= k) k += aggregate_memory_size[full_bracketing]; for (; i < k; i++) { GEN_MOVaa; GENCODE; GEN_PUSHAIi(i); GENCODE; GEN_MOVar; GENCODE; GEN_PUSHAIc((char)0); GENCODE; GEN_MOVc; GENCODE; GEN_POPAe; GENCODE; } if (j * initialize_only < k) initialize_only = k / j; } if (full_bracketing > 1 && ! type_com[set]->attribute.memory_size ) type_com[set]->attribute.memory_size += 2 * aggregate_memory_size[full_bracketing]; aggregate_memory_size[full_bracketing] = 0; full_bracketing--; } | initializer_list ',' '}' { full_bracketing--; } ; initializer_list : initializer { if (set > 1) { initialize_only++; if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; move2lvalue (); GEN_POPAe; GENCODE; } if (ARRAY_P(type_com[set]) || STRUCT_P(type_com[set])) { aggregate_memory_size[full_bracketing] = get_memory_size (full_bracketing, type_com[set], initialize_only); } } | initializer_list ',' { int i = initialize_only, j = get_field_size (&i, type_com[set]); GEN_MOVaa; GENCODE; GEN_PUSHAIi(initialize_only * j); GENCODE; GEN_MOVar; GENCODE; } initializer { if (set > 1) { initialize_only++; if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; move2lvalue (); GEN_POPAe; GENCODE; } } ; type_name : M specifier_qualifier_list | M specifier_qualifier_list abstract_declarator ; abstract_declarator : pointer | direct_abstract_declarator | pointer direct_abstract_declarator ; direct_abstract_declarator : '(' abstract_declarator ')' | '[' ']' | direct_abstract_declarator '[' ']' | '[' constant_expression ']' | direct_abstract_declarator '[' constant_expression ']' | '(' ')' | direct_abstract_declarator '(' ')' | '(' list_type_spec ')' | direct_abstract_declarator '(' list_type_spec ')' ; storage_class_specifier : TYPEDEF { if (TYPEDEF_P(typeh[type_spec_count])) error_message (6025, "typedef"); else if (! UNSPEC_P(typeh[type_spec_count])) error_message (2017); typeh[type_spec_count]->attribute.storage_class_specifier = TYPEDEF_SC; typeh[++type_spec_count] = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)typeh[type_spec_count], sizeof(struct internal_type)); typeh[type_spec_count]->attribute.function_class = SIMPLE; typeh[type_spec_count]->attribute.type_qualifier = UNDEF_TQ; typeh[type_spec_count]->attribute.arit_class = UNUSED_AC; typeh[type_spec_count]->attribute.storage_class_specifier = UNSPEC_SC; typeh[type_spec_count - 1]->output = typeh[type_spec_count]; typeh[type_spec_count--] = NULL; } | EXTERN { /* * Internal types: */ if (EXTERN_P(typeh[type_spec_count])) error_message (6025, "extern"); else if (! UNSPEC_P(typeh[type_spec_count]) && ! EXPORT_P(typeh[type_spec_count])) error_message (2017); typeh[type_spec_count]->attribute.storage_class_specifier = EXTERN_SC; typeh[type_spec_count]->attribute.function_class = REMOTE_F; } | EXPORT_T { /* * Internal types: */ typeh[type_spec_count]->attribute.export_type = YES; typeh[type_spec_count]->attribute.storage_class_specifier = EXPORT_SC; typeh[type_spec_count]->attribute.function_class = REMOTE_F; } | STATIC { if (STATIC_P(typeh[type_spec_count])) error_message (6025, "static"); else if (! UNSPEC_P(typeh[type_spec_count])) error_message (2017); typeh[type_spec_count]->attribute.storage_class_specifier = STATIC_SC; } | AUTO { if (AUTO_P(typeh[type_spec_count])) error_message (6025, "auto"); else if (! UNSPEC_P(typeh[type_spec_count])) error_message (2017); typeh[type_spec_count]->attribute.storage_class_specifier = AUTO_SC; } | REGISTER { if (REGISTER_P(typeh[type_spec_count])) error_message (6025, "register"); else if (! UNSPEC_P(typeh[type_spec_count])) error_message (2017); typeh[type_spec_count]->attribute.storage_class_specifier = REGISTER_SC; } ; /* A list of type specifiers. */ list_type_spec : M declaration_specifiers { if (! UNSPEC_P(typeh[type_spec_count])) error_message (2018, "type name"); check_spec_constr (typeh[type_spec_count], "type name"); if (!body_flag) error_message (6009); if (-1 == add_to_spec_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; } | M declaration_specifiers ',' { if (! UNSPEC_P(typeh[type_spec_count])) error_message (2018, "type name"); check_spec_constr (typeh[type_spec_count], "type name"); if (!body_flag) error_message (6009); if (-1 == add_to_spec_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; } list_type_spec | M declaration_specifiers list_dim_or_pointer | M declaration_specifiers list_dim_or_pointer ',' list_type_spec ; list_dim_or_pointer : list_dim { struct internal_type *help; if (! UNSPEC_P(typeh[type_spec_count])) error_message (2018, "type name"); check_spec_constr (typeh[type_spec_count], "type name"); if (!body_flag) error_message (6009); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); help->output = typeh[type_spec_count]; typeh[type_spec_count] = help; typeh[type_spec_count]->attribute.function_class = ARRAY; if (-1 == add_to_spec_list ()) COMPILE_ONLY; count_arr = 1; typeh[type_spec_count--] = NULL; DELETE_SUBSCRIPT; } | pointer { check_spec_constr (typeh[type_spec_count], "type name"); if (!body_flag) error_message (6009); if (-1 == add_to_spec_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; } | '(' pointer ')' '(' ')' { typeh[type_spec_count]->attribute.function_class = LOCAL; check_spec_constr (typeh[type_spec_count], "type name"); if (!body_flag) error_message (6009); if (-1 == add_to_spec_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; } | '(' pointer ')' '(' list_type_spec ')' { check_spec_constr (typeh[type_spec_count], "type name"); if (!body_flag) error_message (6009); typeh[type_spec_count]->attribute.function_class = LOCAL; typeh[type_spec_count]->input = l_type_spec; l_type_spec = NULL; if (-1 == add_to_spec_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; } | '(' pointer ')' list_dim { struct internal_type *help; typeh[type_spec_count]->attribute.function_class = LOCAL; check_spec_constr (typeh[type_spec_count], "type name"); if (!body_flag) error_message (6009); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); help->output = typeh[type_spec_count]; typeh[type_spec_count] = help; typeh[type_spec_count]->attribute.function_class = ARRAY; if (-1 == add_to_spec_list ()) COMPILE_ONLY; count_arr = 1; typeh[type_spec_count--] = NULL; DELETE_SUBSCRIPT; } ; /* * Parsing of a list of identifiers, * simple, array or pointer. */ first_dekl : IDENT { if (VOID_P(typeh[type_spec_count])) error_message (1012); check_spec_constr (typeh[type_spec_count], $1); put2table ($1, typeh[type_spec_count]); align_memory (&kodp, sizeof(int)); SET_CODE_GENERATION_BEGINNING; body_flag = 0; lookup_tables ($1, variable); typedef_f = 1; } initializer_optional | IDENT list_dim { struct internal_type *help, *arch; if (VOID_P(typeh[type_spec_count])) error_message (1012); check_spec_constr (typeh[type_spec_count], $1); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; } help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; put2table ($1, typeh[type_spec_count]); count_arr = 1; SET_CODE_GENERATION_BEGINNING; body_flag = 0; lookup_tables ($1, variable); initialize_only = 0; typedef_f = 1; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; } initializer_optional | pointer IDENT { struct internal_type *type; check_spec_constr (typeh[type_spec_count], $2); put2table ($2, typeh[type_spec_count]); if (TYPEDEF_P(typeh[type_spec_count])) type = typeh[type_spec_count]->output; else type = typeh[type_spec_count]; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(type)) { type = type->output; } if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (type); else typeh[type_spec_count] = type; align_memory (&kodp, sizeof(int)); SET_CODE_GENERATION_BEGINNING; body_flag = 0; lookup_tables ($2, variable); typedef_f = 1; } initializer_optional | pointer IDENT list_dim { struct internal_type *help, *arch; check_spec_constr (typeh[type_spec_count], $2); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; } help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; put2table ($2, typeh[type_spec_count]); count_arr = 1; SET_CODE_GENERATION_BEGINNING; body_flag = 0; lookup_tables ($2, variable); if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(arch)) arch = arch->output; DELETE_SUBSCRIPT; typedef_f = 1; } initializer_optional | IDENT '(' { struct internal_type *help, *arch; /* * Internal types: */ check_spec_constr (typeh[type_spec_count], $1); if (STRUCT_P(typeh[type_spec_count]) || UNION_P(typeh[type_spec_count])) error_message (6034); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; if (REMOTE_P(typeh[type_spec_count]->output->output)) typeh[type_spec_count]->output->attribute.function_class = REMOTE_F; else typeh[type_spec_count]->output->attribute.function_class = LOCAL; typeh[type_spec_count]->output->attribute.export_type = typeh[type_spec_count]->output->output->attribute.export_type; type_ac[++set] = typeh[type_spec_count]->output->output->attribute.arit_class; type_com[set] = typeh[type_spec_count]->output; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; if (REMOTE_P(typeh[type_spec_count]->output)) typeh[type_spec_count]->attribute.function_class = REMOTE_F; else typeh[type_spec_count]->attribute.function_class = LOCAL; typeh[type_spec_count]->attribute.export_type = typeh[type_spec_count]->output->attribute.export_type; type_ac[++set] = typeh[type_spec_count]->output->attribute.arit_class; type_com[set] = typeh[type_spec_count]; } body_flag = 0; put2table ($1, typeh[type_spec_count]); variable[set].adr = kodp; variable[set].name = $1; count[++proc] = -(3 * sizeof (char *)); proc_name_text[proc] = text; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; param_flag = 1; enter_scope (); func_def_s (); typedef_f = 1; } func_first | pointer IDENT '(' { struct internal_type *help,*arch; /* * Internal types: */ check_spec_constr (typeh[type_spec_count], $2); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; if (REMOTE_P(typeh[type_spec_count]->output->output)) typeh[type_spec_count]->output->attribute.function_class = REMOTE_F; else typeh[type_spec_count]->output->attribute.function_class = LOCAL; typeh[type_spec_count]->output->attribute.export_type = typeh[type_spec_count]->output->output->attribute.export_type; type_ac[++set] = typeh[type_spec_count]->output->output->attribute.arit_class; type_com[set] = typeh[type_spec_count]->output; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; if (REMOTE_P(typeh[type_spec_count]->output)) typeh[type_spec_count]->attribute.function_class = REMOTE_F; else typeh[type_spec_count]->attribute.function_class = LOCAL; typeh[type_spec_count]->attribute.export_type = typeh[type_spec_count]->output->attribute.export_type; type_ac[++set] = typeh[type_spec_count]->output->attribute.arit_class; type_com[set] = typeh[type_spec_count]; } body_flag = 0; put2table ($2, typeh[type_spec_count]); variable[set].adr = kodp; variable[set].name = $2; count[++proc] = -(3 * sizeof (char *)); proc_name_text[proc] = text; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(arch)) arch = arch->output; param_flag = 1; enter_scope (); func_def_s (); typedef_f = 1; } func_first | ';' { if (!(ENUM_P (typeh[type_spec_count]) || UNION_P (typeh[type_spec_count]) || STRUCT_P (typeh[type_spec_count]))) { error_message (6010); error_message (6011); SET_ADDRESS; TYPE_CLEAR; } typeh[type_spec_count--] = NULL; typedef_f = 1; } ; func_first : ')' { count[proc] = 0; #if 0 SET_ADDRESS; TYPE_CLEAR; #endif #if 0 free (proc_name_text[proc--]); #else proc_name_text[proc--] = NULL; #endif param_flag = 0; func_def_r (); exit_scope (); typedef_f = 1; } initializer_optional | list_type_spec ')' { count[proc] = 0; if (-1 == add_spec_to_has ()) COMPILE_ONLY; #if 0 SET_ADDRESS; TYPE_CLEAR; #endif #if 0 free (proc_name_text[proc--]); #else proc_name_text[proc--] = NULL; #endif param_flag = 0; func_def_r (); exit_scope (); typedef_f = 1; } initializer_optional | list_form_param ')' { count[proc] = 0; if (-1 == add_spec_to_has ()) COMPILE_ONLY; if (-1 == add_ident_to_has ()) COMPILE_ONLY; clear_hash_tab_declaration (); #if 0 SET_ADDRESS; TYPE_CLEAR; #endif #if 0 free (proc_name_text[proc--]); #else proc_name_text[proc--] = NULL; #endif param_flag = 0; func_def_r (); exit_scope (); typedef_f = 1; } initializer_optional | list_form_param ')' { if (TYPEDEF_P(typeh[type_spec_count])) error_message (1036, "typedef"); else if (REGISTER_P(typeh[type_spec_count])) error_message (1036, "register"); else if (AUTO_P(typeh[type_spec_count])) error_message (1036, "auto"); if (-1 == add_spec_to_has ()) COMPILE_ONLY; if (-1 == add_ident_to_has ()) COMPILE_ONLY; FUNCTION_PROLOGUE; count[proc] = -count[proc]; count[proc] %= sizeof (double); count[proc] = -count[proc]; typeh[type_spec_count--] = NULL; param_flag = 0; typedef_f = 1; } compound_statement { text = proc_name_text[proc]; fix_ret (); FUNCTION_EPILOGUE; SET_ADDRESS; TYPE_CLEAR; body_flag = 1; put2table (text, NULL); body_flag = 0; SET_CODE_GENERATION_BEGINNING; exit_scope (); #if 0 free (proc_name_text[proc--]); #else proc_name_text[proc] = NULL; count[proc--] = 0; #endif } | ')' { if (TYPEDEF_P(typeh[type_spec_count])) error_message (1036, "typedef"); else if (REGISTER_P(typeh[type_spec_count])) error_message (1036, "register"); else if (AUTO_P(typeh[type_spec_count])) error_message (1036, "auto"); typeh[++type_spec_count] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)typeh[type_spec_count], sizeof(struct internal_type)); typeh[type_spec_count]->attribute.arit_class = VID; if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == add_spec_to_has ()) COMPILE_ONLY; FUNCTION_PROLOGUE; count[proc] = -count[proc]; count[proc] %= sizeof (double); count[proc] = -count[proc]; typeh[type_spec_count--] = NULL; param_flag = 0; typedef_f = 1; } compound_statement { text = proc_name_text[proc]; fix_ret (); FUNCTION_EPILOGUE; SET_ADDRESS; TYPE_CLEAR; body_flag = 1; put2table (text, NULL); body_flag = 0; SET_CODE_GENERATION_BEGINNING; exit_scope (); #if 0 free (proc_name_text[proc--]); #else proc_name_text[proc] = NULL; count[proc--] = 0; #endif typeh[type_spec_count--] = NULL; typedef_f = 1; } ; func_rest : ')' { count[proc] = 0; #if 0 free (proc_name_text[proc--]); #else proc_name_text[proc--] = NULL; #endif param_flag = 0; typedef_f = 1; } initializer_optional | list_type_spec ')' { count[proc] = 0; if (-1 == add_spec_to_has ()) COMPILE_ONLY; #if 0 free (proc_name_text[proc--]); #else proc_name_text[proc--] = NULL; #endif typedef_f = 1; } initializer_optional | list_form_param ')' { count[proc] = 0; if (-1 == add_spec_to_has ()) COMPILE_ONLY; if (-1 == add_ident_to_has ()) COMPILE_ONLY; clear_hash_tab_declaration (); #if 0 free (proc_name_text[proc--]); #else proc_name_text[proc--] = NULL; #endif param_flag = 0; typedef_f = 1; } initializer_optional | error '{' { yyerrok; proc--; error_message (1004, "{"); proc++; } ; list_dekl : IDENT { if (VOID_P(typeh[type_spec_count])) error_message (1012); check_spec_constr (typeh[type_spec_count], $1); body_flag = 1; put2table ($1, typeh[type_spec_count]); align_memory (&kodp, sizeof(int)); SET_CODE_GENERATION_BEGINNING; body_flag = 0; lookup_tables ($1, variable); typedef_f = 1; } initializer_optional | IDENT list_dim { struct internal_type *help,*arch; if (VOID_P(typeh[type_spec_count])) error_message (1012); check_spec_constr (typeh[type_spec_count], $1); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; } help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; body_flag = 1; put2table ($1, typeh[type_spec_count]); count_arr = 1; SET_CODE_GENERATION_BEGINNING; body_flag = 0; lookup_tables ($1, variable); if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; DELETE_SUBSCRIPT; typedef_f = 1; } initializer_optional | IDENT '(' { struct internal_type *help, *arch; /* * Internal types: */ check_spec_constr (typeh[type_spec_count], $1); if (STRUCT_P(typeh[type_spec_count]) || UNION_P(typeh[type_spec_count])) error_message (6034); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { typedef_copy (typeh[type_spec_count]->output); help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; if (REMOTE_P(typeh[type_spec_count]->output->output)) typeh[type_spec_count]->output->attribute.function_class = REMOTE_F; else typeh[type_spec_count]->output->attribute.function_class = LOCAL; typeh[type_spec_count]->output->attribute.export_type = typeh[type_spec_count]->output->output->attribute.export_type; type_ac[++set] = typeh[type_spec_count]->output->output->attribute.arit_class; type_com[set] = typeh[type_spec_count]->output; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; if (REMOTE_P(typeh[type_spec_count]->output)) typeh[type_spec_count]->attribute.function_class = REMOTE_F; else typeh[type_spec_count]->attribute.function_class = LOCAL; typeh[type_spec_count]->attribute.export_type = typeh[type_spec_count]->output->attribute.export_type; type_ac[++set] = typeh[type_spec_count]->output->attribute.arit_class; type_com[set] = typeh[type_spec_count]; } body_flag = 0; put2table ($1, typeh[type_spec_count]); variable[set].adr = kodp; variable[set].name = $1; count[++proc] = -(3 * sizeof (char *)); proc_name_text[proc] = text; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; typedef_f = 1; } func_rest | pointer IDENT { struct internal_type *type; check_spec_constr (typeh[type_spec_count], $2); body_flag = 1; put2table ($2, typeh[type_spec_count]); if (TYPEDEF_P(typeh[type_spec_count])) type = typeh[type_spec_count]->output; else type = typeh[type_spec_count]; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(type)) type = type->output; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (type); else typeh[type_spec_count] = type; align_memory (&kodp, sizeof(int)); SET_CODE_GENERATION_BEGINNING; body_flag = 0; lookup_tables ($2, variable); typedef_f = 1; } initializer_optional | pointer IDENT list_dim { struct internal_type *help,*arch; check_spec_constr (typeh[type_spec_count], $2); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; } help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; body_flag = 1; put2table ($2, typeh[type_spec_count]); count_arr = 1; SET_CODE_GENERATION_BEGINNING; body_flag = 0; lookup_tables ($2, variable); if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(arch)) arch = arch->output; DELETE_SUBSCRIPT; typedef_f = 1; } initializer_optional | pointer IDENT '(' { struct internal_type *help, *arch; /* * Internal types: */ check_spec_constr (typeh[type_spec_count], $2); help = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; if (REMOTE_P(typeh[type_spec_count]->output->output)) typeh[type_spec_count]->output->attribute.function_class = REMOTE_F; else typeh[type_spec_count]->output->attribute.function_class = LOCAL; typeh[type_spec_count]->output->attribute.export_type = typeh[type_spec_count]->output->output->attribute.export_type; type_ac[++set] = typeh[type_spec_count]->output->output->attribute.arit_class; type_com[set] = typeh[type_spec_count]->output; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; if (REMOTE_P(typeh[type_spec_count]->output)) typeh[type_spec_count]->attribute.function_class = REMOTE_F; else typeh[type_spec_count]->attribute.function_class = LOCAL; typeh[type_spec_count]->attribute.export_type = typeh[type_spec_count]->output->attribute.export_type; type_ac[++set] = typeh[type_spec_count]->output->attribute.arit_class; type_com[set] = typeh[type_spec_count]; } body_flag = 0; put2table ($2, typeh[type_spec_count]); variable[set].adr = kodp; variable[set].name = $2; count[++proc] = -(3 * sizeof (char *)); proc_name_text[proc] = text; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(arch)) arch = arch->output; typedef_f = 1; } func_rest ; initializer_optional : ';' R { typeh[type_spec_count--] = NULL; } | initialization ';' { typeh[type_spec_count--] = NULL; } | ',' R list_dekl | initialization { /* The following block looks like semantic of the list_stat_0 rule. The code for the initialization of the parsed variable must be executed. */ { GEN_STOP; GENCODE; if (no_compile_only && (! handle_main || initialize_only)) { #ifndef NOT_MSWIN_AND_YES_DOS VIRTUAL_MACHINE_SUSPENDED_RESET; #endif if (0 == exec ()) return 0; #ifndef NOT_MSWIN_AND_YES_DOS VIRTUAL_MACHINE_SUSPENDED_SET; #endif } else if (! s) return 0; initialize_only ? initialize_only-- : initialize_only; RESET_CODE_GENERATION_BEGINNING; } } ',' list_dekl ; R : { if (! LOCAL_P(type_com[set]) && ! REMOTE_P(type_com[set]) && ! TYPEDEF_P(type_com[set])) { switch (type_ac[set]) { /* No breaks here. */ case INTEGER: case SIGNED_AC | INTEGER: case UNSIGNED_AC | INTEGER: case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: case LONG_AC | UNSIGNED_AC | INTEGER: case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: case SHORT_AC | UNSIGNED_AC | INTEGER: case DOUB: case LONG_AC | DOUB: case FLT: case CHR: case SIGNED_AC | CHR: case UNSIGNED_AC | CHR: GEN_POPAe; GENCODE; break; case VID: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GEN_CLRT; GENCODE; } kodp3 = NULL; is_address = 0; SET_ADDRESS; TYPE_CLEAR; DELETE_SUBSCRIPT; } ; initialization : '=' initializer { if (TYPEDEF_P(typeh[type_spec_count])) error_message (1037, text); #if 0 if (! CONST_P(type_com[set])) error_message (); #endif if (SIMPLE_P(type_com[set])) { if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; move2lvalue (); } else if (ARRAY_P(type_com[set])) { DELETE_SUBSCRIPT; if (CONST_P(type_com[set])) { type_com[set - 1]->attribute.domain = type_com[set]->attribute.domain; if (! type_com[set - 1]->attribute.memory_size) type_com[set - 1]->attribute.memory_size = type_com[set]->attribute.memory_size; if (CHAR_P(type_com[set]->output)) { register int i; for (i = 0; i < type_com[set]->attribute.memory_size; i++) { GEN_PUSHAIi(i); GENCODE; GEN_MOVbv; GENCODE; } } if (! POINTER_P(type_com[set])) { GEN_POPAe; GENCODE; SET_ADDRESS; TYPE_CLEAR; } } else if (! type_com[set]->attribute.memory_size) { type_com[set]->attribute.memory_size = initialize_only * type_com[set]->output->attribute.memory_size; dim[++poc] = initialize_only; put_array_subscript (&type_com[set]); } kodp1 += type_com[set]->attribute.memory_size; align_memory (&kodp1, sizeof(int)); if (set > 1 && POINTER_P(type_com[set - 1])) { /* MOV two pointers as long ints. */ GEN_MOVli; GENCODE; SET_ADDRESS; TYPE_CLEAR; } } switch (type_ac[set]) { /* No breaks here. */ case INTEGER: case SIGNED_AC | INTEGER: case UNSIGNED_AC | INTEGER: case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: case LONG_AC | UNSIGNED_AC | INTEGER: case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: case SHORT_AC | UNSIGNED_AC | INTEGER: case DOUB: case LONG_AC | DOUB: case FLT: case CHR: case SIGNED_AC | CHR: case UNSIGNED_AC | CHR: GEN_POPAe; GENCODE; break; case VID: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return 0; } GEN_CLRT; GENCODE; kodp3 = NULL; is_address = 0; SET_ADDRESS; TYPE_CLEAR; if (handle_main) initialize_only = 1; } ; /* * Finishing up parsing of if statement */ then : stat_1 { fixp->if1.jmp = kodp; GEN_JMP; GENCODE; ((struct OPERAND_1_ma *)(fixp->if1.jz))->adr = kodp; } ELSE stat_1 { ((struct OPERAND_1_ma *)(fixp->if1.jmp))->adr = kodp; fixp--; } | stat_1 { ((struct OPERAND_1_ma *)(fixp->if1.jz))->adr = kodp; fixp--; } ; switch_body : stat_1 ; /* * NO_ANSI */ labeled_statement : IDENT ':' { if (no_compile_only) has_label ($1); } /* If we ommit then there can be construction label:} that is non ansi. */ stat_1 | CASE { char *help = fixp->switch1.jmp; /* If in the previous case label was not a break */ /* state jump over the next */ /* to the . */ fixp->switch1.jmp = kodp; GEN_JMP; GENCODE; if (fixp->switch1.jz != NULL) /* If previous case label was not successful jump here. */ ((struct OPERAND_1_ma *)(fixp->switch1.jz))->adr = kodp; if (help != NULL) /* Backpatch the address for the first case label. */ ((struct OPERAND_1_ma *)help)->adr = kodp; GEN_MOVaa; GENCODE; /* Reloading top of the arithmetical */ /* stack with the same value for */ /* the purpose of comparing. */ it_is_in_case = 1; } constant_expression { if ((CONST_TQ != type_com[set]->attribute.type_qualifier) || (INTEGER != type_ac[set])) error_message (1014); SET_ADDRESS; TYPE_CLEAR; GEN_EQi; GENCODE; GEN_CLRT; GENCODE; /* Clears arithmetical stack. */ /* We know that the value is */ /* still there. */ fixp->switch1.jz = kodp; GEN_JZ; GENCODE; /* Jump here if the next statements should apply. */ /* In the previous case label there was not */ /* the break statement. */ ((struct OPERAND_1_ma *)fixp->switch1.jmp)->adr = kodp; fixp->switch1.jmp = NULL; it_is_in_case = 0; } ':' stat_1 | DEFAULT ':' { add_default_to_fixp (); } stat_1 ; /* * NO_ANSI */ compound_statement /* The case '{' '}' is parsed via '{' list_stat '}'. */ /* list_stat has an empty production. */ : '{' N list_stat '}' /* The case '{' list_loc_dekl '}' is parsed by /* '{' list_loc_dekl list_stat '}' . */ /* list_stat has an empty production. */ | '{' N list_loc_dekl { ERROR_P; GEN_SUBss(scope_offset_set (count[proc])); GENCODE; count[proc] = 0; } list_stat '}' ; N : { enter_scope (); } ; /* * Parsing a list of formal parameters * of a procedure. */ list_form_param : M declaration_specifiers IDENT { if (TYPEDEF_P(typeh[type_spec_count])) error_message (2018, $3); else if (EXTERN_P(typeh[type_spec_count])) error_message (2018, $3); check_spec_constr (typeh[type_spec_count], $3); if (!body_flag) error_message (6009); if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == has_loc (PAR, $3)) COMPILE_ONLY; if (-1 == add_to_ident_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; typedef_f = 1; } | M declaration_specifiers IDENT ',' { if (TYPEDEF_P(typeh[type_spec_count])) error_message (2018, $3); else if (EXTERN_P(typeh[type_spec_count])) error_message (2018, $3); check_spec_constr (typeh[type_spec_count], $3); if (!body_flag) error_message (6009); if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == has_loc (PAR, $3)) COMPILE_ONLY; if (-1 == add_to_ident_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; typedef_f = 1; } list_form_param | M declaration_specifiers IDENT list_dim { struct internal_type *help; if (TYPEDEF_P(typeh[type_spec_count])) error_message (2018, $3); else if (EXTERN_P(typeh[type_spec_count])) error_message (2018, $3); check_spec_constr (typeh[type_spec_count], $3); help = (struct internal_type *) allocate (sizeof (struct internal_type), BLOCK); init_zero ((char *)help, sizeof(struct internal_type)); help->output = typeh[type_spec_count]; help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; typeh[type_spec_count] = help; if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == has_loc (PAR, $3)) COMPILE_ONLY; if (-1 == add_to_ident_list ()) COMPILE_ONLY; count_arr = 1; typeh[type_spec_count--] = NULL; DELETE_SUBSCRIPT; typedef_f = 1; } | M declaration_specifiers IDENT list_dim ',' { struct internal_type *help; if (TYPEDEF_P(typeh[type_spec_count])) error_message (2018, $3); else if (EXTERN_P(typeh[type_spec_count])) error_message (2018, $3); check_spec_constr (typeh[type_spec_count], $3); help = (struct internal_type *) allocate (sizeof (struct internal_type), BLOCK); init_zero ((char *)help, sizeof(struct internal_type)); help->output = typeh[type_spec_count]; help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; typeh[type_spec_count] = help; if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == has_loc (PAR, $3)) COMPILE_ONLY; while (-1 != dim[poc]) dim[poc--] = -1; if (-1 == add_to_ident_list ()) COMPILE_ONLY; count_arr = 1; typeh[type_spec_count--] = NULL; DELETE_SUBSCRIPT; typedef_f = 1; } list_form_param | M declaration_specifiers pointer IDENT { if (TYPEDEF_P(typeh[type_spec_count])) error_message (2018, $4); else if (EXTERN_P(typeh[type_spec_count])) error_message (2018, $4); check_spec_constr (typeh[type_spec_count], $4); if (!body_flag) error_message (6009); if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == has_loc (PAR, $4)) COMPILE_ONLY; if (-1 == add_to_ident_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; typedef_f = 1; } | M declaration_specifiers pointer IDENT ',' { if (TYPEDEF_P(typeh[type_spec_count])) error_message (2018, $4); else if (EXTERN_P(typeh[type_spec_count])) error_message (2018, $4); check_spec_constr (typeh[type_spec_count], $4); if (!body_flag) error_message (6009); if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == has_loc (PAR, $4)) COMPILE_ONLY; if (-1 == add_to_ident_list ()) COMPILE_ONLY; typeh[type_spec_count--] = NULL; typedef_f = 1; } list_form_param | M declaration_specifiers pointer IDENT list_dim { struct internal_type *help; if (TYPEDEF_P(typeh[type_spec_count])) error_message (2018, $4); else if (EXTERN_P(typeh[type_spec_count])) error_message (2018, $4); check_spec_constr (typeh[type_spec_count], $4); help = (struct internal_type *) allocate (sizeof (struct internal_type), BLOCK); init_zero ((char *)help, sizeof(struct internal_type)); help->output = typeh[type_spec_count]; help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; typeh[type_spec_count] = help; if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == has_loc (PAR, $4)) COMPILE_ONLY; if (-1 == add_to_ident_list ()) COMPILE_ONLY; count_arr = 1; typeh[type_spec_count--] = NULL; DELETE_SUBSCRIPT; typedef_f = 1; } | M declaration_specifiers pointer IDENT list_dim ',' { struct internal_type *help; if (TYPEDEF_P(typeh[type_spec_count])) error_message (2018, $4); else if (EXTERN_P(typeh[type_spec_count])) error_message (2018, $4); check_spec_constr (typeh[type_spec_count], $4); help = (struct internal_type *) allocate (sizeof (struct internal_type), BLOCK); init_zero ((char *)help, sizeof(struct internal_type)); help->output = typeh[type_spec_count]; help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; typeh[type_spec_count] = help; if (-1 == add_to_spec_list ()) COMPILE_ONLY; if (-1 == has_loc (PAR, $4)) COMPILE_ONLY; while (-1 != dim[poc]) dim[poc--] = -1; if (-1 == add_to_ident_list ()) COMPILE_ONLY; count_arr = 1; typeh[type_spec_count--] = NULL; DELETE_SUBSCRIPT; typedef_f = 1; } list_form_param ; /* * List of dimensions for locals */ list_dim : '[' ']' { dim[++poc] = NOT_DEFINED; } | '[' NUMBERI ']' { count_arr *= $2; dim[++poc] = $2; } | list_dim '[' NUMBERI ']' { count_arr *= $3; dim[++poc] = $3; } ; /* * Parsing a list of local variables */ list_loc_dekl : M declaration_specifiers list_loc_dekl_1 | M declaration_specifiers ';' { if (!(ENUM_P (typeh[type_spec_count]) || UNION_P (typeh[type_spec_count]) || STRUCT_P (typeh[type_spec_count]))) { error_message (6010); error_message (6011); } typeh[type_spec_count--] = NULL; } | M declaration_specifiers ';' { if (!(ENUM_P (typeh[type_spec_count]) || UNION_P (typeh[type_spec_count]) || STRUCT_P (typeh[type_spec_count]))) { error_message (6010); error_message (6011); } typeh[type_spec_count--] = NULL; } list_loc_dekl ; list_loc_dekl_1 : IDENT { check_spec_constr (typeh[type_spec_count], $1); if (VOID_P(typeh[type_spec_count])) error_message (1012); if (STATIC_P(typeh[type_spec_count])) { jmp1 = kodp; GEN_JMP; GENCODE; if (UNUSED_P(typeh[type_spec_count])) typeh[type_spec_count]->attribute.arit_class = INTEGER; } if (-1 == has_loc (VAR, $1)) COMPILE_ONLY; if (STATIC_P(typeh[type_spec_count])) ((struct OPERAND_1_ma *)jmp1)->adr = kodp; lookup_tables ($1, variable); } initializer_optional_loc | IDENT list_dim { struct internal_type *help, *arch; check_spec_constr (typeh[type_spec_count], $1); if (VOID_P(typeh[type_spec_count])) error_message (1012); help = (struct internal_type *) allocate (sizeof (struct internal_type), BLOCK); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; } help->attribute.function_class = ARRAY; if (STATIC_P(help->output)) { jmp1 = kodp; GEN_JMP; GENCODE; if (help->output->attribute.arit_class == UNUSED_AC) help->output->attribute.arit_class = INTEGER; help->attribute.storage_class_specifier = STATIC_SC; } if (-1 == has_loc (VAR, $1)) COMPILE_ONLY; if (STATIC_P(help->output)) ((struct OPERAND_1_ma *)jmp1)->adr = kodp; count_arr = 1; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; DELETE_SUBSCRIPT; lookup_tables ($1, variable); } initializer_optional_loc | IDENT '(' ')' {} initializer_optional_loc | IDENT '(' list_type_spec ')' {} initializer_optional_loc | IDENT '(' list_form_param ')' {} initializer_optional_loc | pointer IDENT { struct internal_type *type; check_spec_constr (typeh[type_spec_count], $2); if (STATIC_P(typeh[type_spec_count])) { jmp1 = kodp; GEN_JMP; GENCODE; if (typeh[type_spec_count]->attribute.arit_class == UNUSED_AC) typeh[type_spec_count]->attribute.arit_class = INTEGER; } if (-1 == has_loc (VAR, $2)) COMPILE_ONLY; if (STATIC_P(typeh[type_spec_count])) ((struct OPERAND_1_ma *)jmp1)->adr = kodp; if (TYPEDEF_P(typeh[type_spec_count])) { type = typeh[type_spec_count]->output; typedef_copy (typeh[type_spec_count]->output); } else type = typeh[type_spec_count]; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(type)) type = type->output; lookup_tables ($2, variable); } initializer_optional_loc | pointer IDENT list_dim { struct internal_type *help, *arch; check_spec_constr (typeh[type_spec_count], $2); help = (struct internal_type *) allocate (sizeof (struct internal_type), BLOCK); init_zero ((char *)help, sizeof(struct internal_type)); if (TYPEDEF_P(typeh[type_spec_count])) { help->output = typeh[type_spec_count]->output; arch = typeh[type_spec_count]->output; typeh[type_spec_count]->output = help; } else { help->output = typeh[type_spec_count]; arch = typeh[type_spec_count]; typeh[type_spec_count] = help; } help->attribute.function_class = ARRAY; help->attribute.storage_class_specifier = UNSPEC_SC; if (STATIC_P(typeh[type_spec_count])) { jmp1 = kodp; GEN_JMP; GENCODE; if (typeh[type_spec_count]->attribute.arit_class == UNUSED_AC) typeh[type_spec_count]->attribute.arit_class = INTEGER; } if (-1 == has_loc (VAR, $2)) COMPILE_ONLY; if (STATIC_P(typeh[type_spec_count])) ((struct OPERAND_1_ma *)jmp1)->adr = kodp; count_arr = 1; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (arch); else typeh[type_spec_count] = arch; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(typeh[type_spec_count]->output)) arch = arch->output; DELETE_SUBSCRIPT; lookup_tables ($2, variable); } initializer_optional_loc | pointer IDENT '(' ')' { struct internal_type *type; check_spec_constr (typeh[type_spec_count], $2); if (TYPEDEF_P(typeh[type_spec_count])) type = typeh[type_spec_count]->output; else type = typeh[type_spec_count]; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(type)) type = type->output; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (type); else typeh[type_spec_count] = type; param_flag = 0; lookup_tables ($2, variable); } initializer_optional_loc | pointer IDENT '(' list_type_spec ')' { struct internal_type *type; check_spec_constr (typeh[type_spec_count], $2); if (TYPEDEF_P(typeh[type_spec_count])) type = typeh[type_spec_count]->output; else type = typeh[type_spec_count]; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(type)) type = type->output; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (type); else typeh[type_spec_count] = type; param_flag = 0; lookup_tables ($2, variable); } initializer_optional_loc | pointer IDENT '(' list_form_param ')' { struct internal_type *type; check_spec_constr (typeh[type_spec_count], $2); if (TYPEDEF_P(typeh[type_spec_count])) type = typeh[type_spec_count]->output; else type = typeh[type_spec_count]; /* FIXME: here is a memory leakage in the following loop. */ while (POINTER_P(type)) type = type->output; if (TYPEDEF_P(typeh[type_spec_count])) typedef_copy (type); else typeh[type_spec_count] = type; param_flag = 0; lookup_tables ($2, variable); } initializer_optional_loc ; initializer_optional_loc : ';' P { typeh[type_spec_count--] = NULL; } | ';' P { typeh[type_spec_count--] = NULL; } list_loc_dekl | local_initialization ';' { typeh[type_spec_count--] = NULL; } | local_initialization ';' { typeh[type_spec_count--] = NULL; } list_loc_dekl | ',' P list_loc_dekl_1 | local_initialization ',' list_loc_dekl_1 ; P : { if (! LOCAL_P(type_com[set]) && ! REMOTE_P(type_com[set]) && ! TYPEDEF_P(type_com[set])) { switch (type_ac[set]) { /* No breaks here. */ case INTEGER: case SIGNED_AC | INTEGER: case UNSIGNED_AC | INTEGER: case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: case LONG_AC | UNSIGNED_AC | INTEGER: case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: case SHORT_AC | UNSIGNED_AC | INTEGER: case DOUB: case LONG_AC | DOUB: case FLT: case CHR: case SIGNED_AC | CHR: case UNSIGNED_AC | CHR: GEN_POPAe; GENCODE; break; case VID: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return 0; } GEN_CLRT; GENCODE; noninitialized_loc (variable[set].name); } is_address = 0; SET_ADDRESS; TYPE_CLEAR; DELETE_SUBSCRIPT; } ; local_initialization : '=' initializer { if (TYPEDEF_P(typeh[type_spec_count])) error_message (1037, text); #if 0 if (! CONST_P(type_com[set])) error_message (); #endif if (SIMPLE_P(type_com[set])) { if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; move2lvalue (); } else if (ARRAY_P(type_com[set])) { DELETE_SUBSCRIPT; if (CONST_P(type_com[set])) { type_com[set - 1]->attribute.domain = type_com[set]->attribute.domain; if (! type_com[set - 1]->attribute.memory_size) type_com[set - 1]->attribute.memory_size = type_com[set]->attribute.memory_size; { register int i; for (i = 0; i < type_com[set]->attribute.memory_size; i++) { GEN_PUSHAIi(i); GENCODE; GEN_MOVbv; GENCODE; } if (! POINTER_P(type_com[set - 1])) { GEN_POPAe; GENCODE; SET_ADDRESS; TYPE_CLEAR; } if (CHAR_P(type_com[set]->output) && proc) num_args[proc]--; } } else if (! type_com[set]->attribute.memory_size) { type_com[set]->attribute.memory_size = initialize_only * type_com[set]->output->attribute.memory_size; dim[++poc] = initialize_only; put_array_subscript (&type_com[set]); } if (set > 1 && POINTER_P(type_com[set - 1])) { /* MOV two pointers as long ints. */ GEN_MOVli; GENCODE; SET_ADDRESS; TYPE_CLEAR; } } switch (type_ac[set]) { /* No breaks here. */ case INTEGER: case SIGNED_AC | INTEGER: case UNSIGNED_AC | INTEGER: case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: case LONG_AC | UNSIGNED_AC | INTEGER: case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: case SHORT_AC | UNSIGNED_AC | INTEGER: case DOUB: case LONG_AC | DOUB: case FLT: case CHR: case SIGNED_AC | CHR: case UNSIGNED_AC | CHR: GEN_POPAe; GENCODE; break; case VID: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return 0; } GEN_CLRT; GENCODE; is_address = 0; if (handle_main) initialize_only = 1; if (STATIC_P(typeh[type_spec_count])) { /* If there is a static variable in block definition or function definition, we need to initialize it only once. The virtual machine must be triggered here. The variable jmp1 holds the start of the code generated by initialization. */ pc = ((struct OPERAND_1_ma *)jmp1)->adr; GEN_STOP; GENCODE; if (no_compile_only && (! handle_main || initialize_only)) { #ifndef NOT_MSWIN_AND_YES_DOS VIRTUAL_MACHINE_SUSPENDED_RESET; #endif if (0 == exec ()) return 0; #ifndef NOT_MSWIN_AND_YES_DOS VIRTUAL_MACHINE_SUSPENDED_SET; #endif } else if (! s) return 0; initialize_only ? initialize_only-- : initialize_only; if (ARRAY_P(type_com[set])) ((struct OPERAND_1_ma *)jmp1)->adr += type_com[set]->attribute.memory_size; kodp = ((struct OPERAND_1_ma *)jmp1)->adr; } set_value (variable[set].name); SET_ADDRESS; TYPE_CLEAR; } ; /* * List of actual parameters */ call : list_param | ')' { param_flag = 0; } ; /* The ANSI states this nonterminal as argument_expression_list. */ list_param : assignment_expression ')' { args[proc]++; if (PRINTF_P || SCANF_P) { #if 0 if (!ARRAY_P(type_com[set]) && !POINTER_P(type_com[set])) promote_type (); #endif compare_format_args (format_args[proc][args[proc]], type_com[set], type_ac[set]); format_args[proc][args[proc]] = NULL; } if (STRUCT_P(type_com[set]) || UNION_P(type_com[set])) error_message (6035); if (call_by_value) { if (ARRAY_P(type_com[set]) || (POINTER_P(type_com[set]) && PRINTF_P)) { GEN_POPAst(count[proc]); count[proc] += sizeof (char *); } else if (STRUCT_P(type_com[set]) || UNION_P(type_com[set])) { register int i; for (i = count[proc]; i < type_com[set]->attribute.memory_size; i++) { GEN_POPAb(i); GENCODE; } count[proc] += type_com[set]->attribute.memory_size; GEN_POPAe; } else { GEN_POPA(count[proc]); if (LOCAL_P(type_com[set]) || REMOTE_P(type_com[set])) count[proc] += type_com[set]->output->attribute.memory_size; else count[proc] += type_com[set]->attribute.memory_size; } if ((count[proc] % sizeof (int)) > 0) count[proc] += sizeof (int) - (count[proc] % sizeof (int)); } else if (call_by_reference) { GEN_POPAst(count[proc]); count[proc] += sizeof (char *); } GENCODE; param_flag = 0; /* * Internal types: */ if (YES == type_com[set - 1]->attribute.export_type) { GEN_PUSHAIi(type_transform (type_ac[set], type_com[set]->attribute.function_class, atom_type_flag)); GENCODE; if (call_by_value) { GEN_POPAi(count[proc]); count[proc] += sizeof (int); } else if (call_by_reference) { GEN_POPAst(count[proc]); count[proc] += sizeof (char *); } GENCODE; } atom_type_flag = 0; SET_ADDRESS; TYPE_CLEAR; is_address = 0; } | assignment_expression ',' { args[proc]++; if (PRINTF_P || SCANF_P) { #if 0 if (!ARRAY_P(type_com[set]) && !POINTER_P(type_com[set])) promote_type (); #endif compare_format_args (format_args[proc][args[proc]], type_com[set], type_ac[set]); format_args[proc][args[proc]] = NULL; } if (STRUCT_P(type_com[set]) || UNION_P(type_com[set])) error_message (6035); if (call_by_value) { if (ARRAY_P(type_com[set]) || (POINTER_P(type_com[set]) && PRINTF_P)) { GEN_POPAst(count[proc]); count[proc] += sizeof (char *); } else if (STRUCT_P(type_com[set]) || UNION_P(type_com[set])) { register int i; for (i = count[proc]; i < type_com[set]->attribute.memory_size; i++) { GEN_POPAb(i); GENCODE; } count[proc] += type_com[set]->attribute.memory_size; GEN_POPAe; } else { GEN_POPA(count[proc]); if (LOCAL_P(type_com[set]) || REMOTE_P(type_com[set])) count[proc] += type_com[set]->output->attribute.memory_size; else count[proc] += type_com[set]->attribute.memory_size; } if ((count[proc] % sizeof (int)) > 0) count[proc] += sizeof (int) - (count[proc] % sizeof (int)); } else if (call_by_reference) { GEN_POPAst(count[proc]); count[proc] += sizeof (char *); } GENCODE; if (YES == type_com[set-1]->attribute.export_type) { GEN_PUSHAIi(type_transform (type_ac[set], type_com[set]->attribute.function_class, atom_type_flag)); GENCODE; if (call_by_value) { GEN_POPA(count[proc]); count[proc] += sizeof (int); } else if (call_by_reference) { GEN_POPAst(count[proc]); count[proc] += sizeof (char *); } GENCODE; } atom_type_flag = 0; SET_ADDRESS; TYPE_CLEAR; is_address = 0; } list_param ; /* * Primary expressions */ /* * NO_ANSI */ primary_expression : ident { switch (type_com[set]->attribute.function_class) { case ENUM_FC: /* Fall through */ case SIMPLE: case ARRAY: case STRUCT_FC: case UNION_FC: case LOCAL: case REMOTE_F: case POINTER: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } } /* * Numeric constants */ | NUMBERI { GEN_PUSHAIi($1); GENCODE; type_ac[++set] = INTEGER; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.arit_class = INTEGER; type_com[set]->attribute.memory_size = sizeof (int); if (it_is_in_case && -1 == add_constant_to_list ($1)) return (0); else type_com[set]->attribute.domain = (char *) &(((struct OPERAND_1_i *) (kodp - sizeof (struct OPERAND_1_i)))->num); } | NUMBERUI { GEN_PUSHAIui($1); GENCODE; type_ac[++set] = UNSIGNED_AC | INTEGER; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.arit_class = type_ac[set]; type_com[set]->attribute.memory_size = sizeof (unsigned int); if (it_is_in_case && -1 == add_constant_to_list ($1)) return (0); else type_com[set]->attribute.domain = (char *) &(((struct OPERAND_1_ui *) (kodp - sizeof (struct OPERAND_1_ui)))->num); } | NUMBERLI { GEN_PUSHAIli($1); GENCODE; type_ac[++set] = LONG_AC | INTEGER; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.arit_class = type_ac[set]; type_com[set]->attribute.memory_size = sizeof (long int); if (it_is_in_case && -1 == add_constant_to_list ($1)) return (0); else type_com[set]->attribute.domain = (char *) &(((struct OPERAND_1_li *) (kodp - sizeof (struct OPERAND_1_li)))->num); } | NUMBERLUI { GEN_PUSHAIlui($1); GENCODE; type_ac[++set] = LONG_AC | UNSIGNED_AC | INTEGER; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.arit_class = type_ac[set]; type_com[set]->attribute.memory_size = sizeof (long unsigned int); if (it_is_in_case && -1 == add_constant_to_list ($1)) return (0); else type_com[set]->attribute.domain = (char *) &(((struct OPERAND_1_lui *) (kodp - sizeof (struct OPERAND_1_lui)))->num); } | NUMBERD { GEN_PUSHAId($1); GENCODE; type_ac[++set] = DOUB; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.arit_class = type_ac[set]; type_com[set]->attribute.memory_size = sizeof (double); type_com[set]->attribute.domain = (char *) &(((struct OPERAND_1_id *) (kodp - sizeof (struct OPERAND_1_id)))->num); } | NUMBERLD { GEN_PUSHAIld($1); GENCODE; type_ac[++set] = LONG_AC | DOUB; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.arit_class = type_ac[set]; type_com[set]->attribute.memory_size = sizeof (long double); type_com[set]->attribute.domain = (char *) &(((struct OPERAND_1_ild *) (kodp - sizeof (struct OPERAND_1_ild)))->num); } | NUMBERF { GEN_PUSHAIf($1); GENCODE; type_ac[++set] = FLT; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.arit_class = type_ac[set]; type_com[set]->attribute.memory_size = sizeof (float); type_com[set]->attribute.domain = (char *) &(((struct OPERAND_1_if *) (kodp - sizeof (struct OPERAND_1_if)))->num); } | STRINGC { GEN_PUSHAIst($1); GENCODE; type_ac[++set] = CHR; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof (struct internal_type)); type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.function_class = ARRAY; type_com[set]->output = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set]->output, sizeof (struct internal_type)); type_com[set]->output->attribute.arit_class = type_ac[set]; type_com[set]->attribute.domain = ((struct OPERAND_1_mi *) (kodp - sizeof (struct OPERAND_1_mi)))->adr; type_com[set]->attribute.memory_size = strlen ($1) + 1; SET_ADDRESS; } | WSTRINGC { type_com[++set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof (struct internal_type)); type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.function_class = ARRAY; type_com[set]->output = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set]->output, sizeof (struct internal_type)); if (ARRAY_P(type_com[set - 1]) && INTEGER_P(type_com[set - 1]->output)) { int i, j = strlen ($1); type_ac[set] = INTEGER; for (i = 1; i < j; i++) { GEN_MOVaa; GENCODE; GEN_PUSHAIi((i - 1) * sizeof (int)); GENCODE; GEN_MOVar; GENCODE; GEN_PUSHAIi($1[i]); GENCODE; move2lvalue (); GEN_POPAe; GENCODE; } type_com[set]->attribute.memory_size = j * sizeof (int); /* There is L at the beginning of the string; therefore &$1[1] */ type_com[set]->attribute.domain = &$1[1]; } else { /* There is L at the beginning of the string; therefore &$1[1] */ GEN_PUSHAIst(&$1[1]); GENCODE; type_ac[set] = CHR; type_com[set]->attribute.memory_size = strlen ($1) + 1; type_com[set]->attribute.domain = ((struct OPERAND_1_mi *) (kodp - sizeof (struct OPERAND_1_mi)))->adr; } type_com[set]->output->attribute.arit_class = type_ac[set]; SET_ADDRESS; } | NUMBERC { GEN_PUSHAIc($1); GENCODE; type_ac[++set] = CHR; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.arit_class = type_ac[set]; type_com[set]->attribute.memory_size = sizeof (char); type_com[set]->attribute.domain = (char *) &(((struct OPERAND_1_ic *) (kodp - sizeof (struct OPERAND_1_ic)))->num); } | '(' expression ')' ; ident : IDENT { lookup_tables ($1, variable); } ; postfix_expression : primary_expression | postfix_expression { if (subscript_flag[set]) /* * Flag for the first subscript */ { atom_type_flag = 1; if (1 == poc) { GEN_PUSHAIi(dim[poc]); GENCODE; GEN_MULTi; GENCODE; dim[poc--] = -1; } else if (1 < poc) { GEN_PUSHAIi(dim[poc]); GENCODE; GEN_MULTi; GENCODE; dim[poc--] = -1; } else if (! POINTER_P(type_com[set])) error_message (2000); } else { if (poc) dim[poc--] = -1; if (! ARRAY_P(type_com[set]) && ! POINTER_P(type_com[set])) error_message (2000); if (POINTER_P(type_com[set]) #if 0 && 0 < variable[set].offset #endif ) { GEN_MOVap; GENCODE; } } } '[' expression ']' { if (INTEGER != type_ac[set]) error_message (2002); else { if (subscript_flag[set - 1]) { GEN_ADDi; GENCODE; } subscript_flag[set - 1]++; } SET_ADDRESS; TYPE_CLEAR; if (! poc) { subscript_flag[set]--; GEN_PUSHAIi(type_com[set]->output->attribute.memory_size); GENCODE; GEN_MULTi; GENCODE; OFFSET_LAST_ADD_ARRAY; GEN_MOVar; GENCODE; kodp3 = kodp; type_com[set] = type_com[set]->output; if (POINTER_P(type_com[set])) type_ac[set] = LONG_AC | INTEGER; else type_ac[set] = type_com[set]->attribute.arit_class; } } | postfix_expression '.' IDENT {/* offset_aggregate_ident () calls find_member and this function changes the type_ac[set] accordingly. It generates appropriate instructions as well. */ int aggr_offset = 0; /* Not in subscript any more.*/ if ((STRUCT_P (type_com[set]) || UNION_P (type_com[set])) && NULL != type_com[set]->input) { type_com[set] = type_com[set]->input; aggr_offset = offset_aggregate_ident (); } else if (NULL != type_com[set]->output && (STRUCT_P (type_com[set]->output) || UNION_P (type_com[set]->output)) && NULL != type_com[set]->output->input) { if (subscript_flag[set]) { GEN_PUSHAIi(type_com[set]->output->attribute.memory_size); GENCODE; GEN_MULTi; GENCODE; } type_com[set] = type_com[set]->output->input; aggr_offset = offset_aggregate_ident (); if (ARRAY_P(type_com[set])) { array_subscript (type_com[set]->input); type_ac[set] = type_com[set]->output->attribute.arit_class; } else if (POINTER_P(type_com[set])) type_ac[set] = LONG_AC | INTEGER; } else { text = $3; error_message (2009); } GEN_PUSHAIi(aggr_offset); GENCODE; if (struct_union_field[set]) { GEN_ADDi; GENCODE; struct_union_field[set]--; } if (subscript_flag[set]) { GEN_ADDi; GENCODE; subscript_flag[set]--; } struct_union_field[set]++; } | postfix_expression PTR IDENT { int aggr_offset; if (POINTER_P(type_com[set])) { /* Not in subscript any more.*/ subscript_flag[set] > 0 ? subscript_flag[set]-- : subscript_flag[set]; if ((variable[set].adr != NULL || variable[set].offset != 0) && !(SIMPLE_P(type_com[set]->output))) { if (struct_union_field[set]) { GEN_MOVar; GENCODE; struct_union_field[set]--; } GEN_MOVap; GENCODE; } if (NULL != type_com[set]->output->input) { type_com[set] = type_com[set]->output->input; type_ac[set] = type_com[set]->attribute.arit_class; aggr_offset = offset_aggregate_ident (); GEN_PUSHAIi(aggr_offset); GENCODE; if (struct_union_field[set]) { GEN_ADDi; GENCODE; struct_union_field[set]--; } struct_union_field[set]++; if (type_ac[set] == UNUSED_AC) type_ac[set] = LONG_AC | INTEGER; } else fprintfx (stderr, "FIXME:%d\n", __LINE__); } else error_message (1021); } | postfix_expression PP { if (struct_union_field[set]) { OFFSET_LAST_ADD; GEN_MOVar; GENCODE; variable[set].adr = NULL; variable[set].offset = 0; } else if (POINTER_P(type_com[set])) { GEN_MOVvli; GENCODE; GEN_XCHG; GENCODE; GEN_MOVaa; GENCODE; GEN_PUSHAIli(type_com[set]->output->attribute.memory_size); GENCODE; GEN_ADDli; GENCODE; GEN_MOVli; GENCODE; GEN_POPAe; GENCODE; break; } if (! PUSHA_P && ! MOV_P) error_message (1035, "increment"); GEN_MOVv; GENCODE; GEN_XCHG; GENCODE; GEN_MOVaa; GENCODE; GEN_PUSHAI(1); GENCODE; GEN_ADD; GENCODE; GEN_MOV; GENCODE; GEN_POPAe; GENCODE; } | postfix_expression MM { if (struct_union_field[set]) { OFFSET_LAST_ADD; GEN_MOVar; GENCODE; variable[set].adr = NULL; variable[set].offset = 0; } else if (POINTER_P(type_com[set])) { GEN_MOVvli; GENCODE; GEN_XCHG; GENCODE; GEN_MOVaa; GENCODE; GEN_PUSHAIli(type_com[set]->output->attribute.memory_size); GENCODE; GEN_SUBli; GENCODE; GEN_MOVli; GENCODE; GEN_POPAe; GENCODE; break; } if (! PUSHA_P && ! MOV_P) error_message (1035, "decrement"); GEN_MOVv; GENCODE; GEN_XCHG; GENCODE; GEN_MOVaa; GENCODE; GEN_PUSHAI(1); GENCODE; GEN_SUB; GENCODE; GEN_MOV; GENCODE; GEN_POPAe; GENCODE; } /* * Procedure call */ | postfix_expression '(' { struct ident_tab *help; text = proc_name_text[proc]; help = point (text); if (NULL == help) COMPILE_ONLY; if (help->body) proc_name[proc] = help->adr; if (!num_args[proc]) num_args[proc] = get_num_args (help->type); param_flag = 1; /* * Internal types: */ switch (type_com[set]->attribute.function_class) { case REMOTE_F: GEN_PUSHf; GENCODE; GEN_MOVfs; GENCODE; /* type_com[set] = help->type->output->attribute.export_type;*/ break; default: /* FIXME: */ break; } call_fix[proc] = kodp; GEN_SUBss(0); GENCODE; } call { text = proc_name_text[proc]; if (num_args[proc] != 0) if (num_args[proc] > args[proc]) error_message (2010); else if (num_args[proc] < args[proc]) error_message (2011); if (-1 == point_call (text)) COMPILE_ONLY; if (LOCAL == type_com[set]->attribute.function_class) { GEN_CALL(proc_name[proc]); GENCODE; GEN_ADDss(count[proc]); GENCODE; } else { GEN_XCALL; GENCODE; GEN_MOVsf; GENCODE; GEN_POPf; GENCODE; } ((struct OPERAND_1_i *)call_fix[proc])->num = count[proc]; count[proc] = 0; #if 0 free (proc_name_text[proc--]); #else proc_name[proc] = NULL; num_args[proc] = 0; args[proc] = 0; proc_name_text[proc--] = NULL; #endif } ; /* * NO_ANSI */ unary_expression : postfix_expression { switch (type_com[set]->attribute.function_class) { case POINTER: case ENUM_FC: case SIMPLE: if (NULL != type_com[set]->field_name) { OFFSET_LAST_ADD; if (variable[set].offset != 0 || variable[set].adr != NULL) { GEN_MOVar; GENCODE; } kodp3 = kodp; } break; case ARRAY: if (param_flag && !subscript_flag[set]) { kodp3 = kodp; DELETE_SUBSCRIPT; } break; case STRUCT_FC: /* FIXME: */ case UNION_FC: break; case LOCAL: case REMOTE_F: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } } | '&' unary_expression { if (is_address) error_message (1022); else { struct internal_type *arch; kodp3 = kodp; is_address = 1; switch (type_com[set]->attribute.function_class) { case SIMPLE: case ARRAY: case STRUCT_FC: case UNION_FC: if ((NULL != type_com[set]->field_name || ARRAY_P(type_com[set])) && variable[set].adr == NULL && variable[set].offset == 0) { GEN_ADDi; GENCODE; } if (variable[set].adr != NULL || variable[set].offset != 0) { GEN_MOVpa; GENCODE; } arch = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)arch, sizeof(struct internal_type)); arch->attribute.function_class = POINTER; arch->attribute.type_qualifier = UNDEF_TQ; arch->attribute.memory_size = POINTER_SIZE; if (ARRAY_P(type_com[set])) arch->output = type_com[set]->output; else arch->output = type_com[set]; type_com[set] = arch; type_ac[set] = INTEGER; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); break; } } } | '*' unary_expression { if (POINTER_P(type_com[set])) { type_com[set] = type_com[set]->output; GEN_MOVap; GENCODE; type_ac[set] = type_com[set]->attribute.arit_class; } else if (ARRAY_P(type_com[set])) { type_com[set] = type_com[set]->output; type_ac[set] = type_com[set]->attribute.arit_class; } else error_message (1029); } | NEG_T unary_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { type_com[set] = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = UNDEF_TQ; type_com[set]->attribute.arit_class = INTEGER; } kodp3 = kodp; GEN_NEG; GENCODE; type_ac[set] = INTEGER; } | NEG_B unary_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (1030); if (INTEGER == type_ac[set]) { switch (type_ac[set]) { case INTEGER: kodp3 = kodp; GEN_NOT; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GENCODE; type_ac[set] = INTEGER; } else error_message (1005); } | '+' unary_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (1032); } | '-' { kodp3=kodp; GEN_PUSHAI(0); GENCODE; } unary_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (1031); GEN_SUB; GENCODE; } | PP unary_expression ae_empty { if (POINTER_P(type_com[set])) { GEN_PUSHAIli(type_com[set]->output->attribute.memory_size); GENCODE; GEN_ADDli; } else { GEN_PUSHAI(1); GENCODE; GEN_ADD; } GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } | MM unary_expression ae_empty { if (POINTER_P(type_com[set])) { GEN_PUSHAIli(type_com[set]->output->attribute.memory_size); GENCODE; GEN_SUBli; } else { GEN_PUSHAI(1); GENCODE; GEN_SUB; } GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } | SIZEOF unary_expression { if (NULL != kodp4) { kodp = kodp4; kodp4 = NULL; } if (type_com[set]->attribute.memory_size) { GEN_PUSHAIi(type_com[set]->attribute.memory_size); GENCODE; } else error_message (1027); type_ac[set] = INTEGER; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.memory_size = sizeof (int); } | SIZEOF '(' type_name ')' { if (typeh[type_spec_count]->attribute.memory_size) { GEN_PUSHAIi(typeh[type_spec_count]->attribute.memory_size); GENCODE; } else error_message (1027); type_ac[++set] = INTEGER; type_com[set] = (struct internal_type *) allocate (sizeof (struct internal_type), PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = CONST_TQ; type_com[set]->attribute.memory_size = sizeof (int); typeh[type_spec_count--] = NULL; } ; cast_expression : unary_expression | '(' type_name ')' cast_expression { check_spec_constr (typeh[type_spec_count], "type name"); typeh[type_spec_count]->attribute.memory_size = set_memory_size (typeh[type_spec_count]->attribute.arit_class); switch (typeh[type_spec_count]->attribute.function_class) { case SIMPLE: kodp3 = kodp; switch (typeh[type_spec_count]->attribute.arit_class) { case INTEGER: switch (type_ac[set]) { case INTEGER: break; case DOUB: GEN_CVTDI; GENCODE; break; case FLT: GEN_CVTFI; GENCODE; break; case CHR: GEN_CVTCIt; GENCODE; break; default: error_message (1005); } type_ac[set] = INTEGER; break; case DOUB: switch (type_ac[set]) { case INTEGER: GEN_CVTIDt; GENCODE; break; case DOUB: break; case FLT: GEN_CVTFDt; GENCODE; break; case CHR: GEN_CVTCDt; GENCODE; break; default: error_message (1005); } type_ac[set] = DOUB; break; case FLT: switch (type_ac[set]) { case INTEGER: GEN_CVTIFt; GENCODE; break; case DOUB: GEN_CVTDF; GENCODE; break; case FLT: break; case CHR: GEN_CVTCFt; GENCODE; break; default: error_message (1005); } type_ac[set] = FLT; break; case CHR: switch (type_ac[set]) { case INTEGER: GEN_CVTIC; GENCODE; break; case DOUB: GEN_CVTDC; GENCODE; break; case FLT: GEN_CVTFC; GENCODE; break; case CHR: break; default: error_message (1005); } type_ac[set] = CHR; break; case VID: switch (type_ac[set]) { /* Here are no breaks between. */ case INTEGER: case DOUB: case CHR: case VID: break; default: error_message (1005); } type_ac[set] = VID; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); abort (); } break; case ARRAY: case STRUCT_FC: case UNION_FC: error_message (1020); break; case POINTER: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5002); abort (); } type_com[set] = typeh[type_spec_count]; typeh[type_spec_count--] = NULL; } ; multiplicative_expression : cast_expression | multiplicative_expression '*' cast_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "*"); if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_MULT; GENCODE; } | multiplicative_expression '/' cast_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "/"); if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_DIV; GENCODE; } | multiplicative_expression '%' cast_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "%"); if (INTEGER == type_ac[set]) { switch (type_ac[--set]) { case INTEGER: kodp3 = kodp; GEN_MOD; GENCODE; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } } else error_message (1005); } ; additive_expression : multiplicative_expression | additive_expression '+' multiplicative_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { GEN_PUSHAIli(type_com[set]->output->attribute.memory_size); GENCODE; GEN_MULTli; GENCODE; type_com[set - 1] = type_com[set]; } else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) { GEN_PUSHAIli(type_com[set - 1]->output->attribute.memory_size); GENCODE; GEN_MULTli; GENCODE; } if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_ADD; GENCODE; } | additive_expression '-' multiplicative_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { GEN_PUSHAIli(type_com[set]->output->attribute.memory_size); GENCODE; GEN_MULTli; GENCODE; type_com[set - 1] = type_com[set]; } else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) { GEN_PUSHAIli(type_com[set - 1]->output->attribute.memory_size); GENCODE; GEN_MULTli; GENCODE; } if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_SUB; GENCODE; } ; shift_expression : additive_expression | shift_expression SHIL additive_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "<<"); ERROR_P; if (INTEGER == type_ac[set]) { switch (type_ac[--set]) { case INTEGER: kodp3 = kodp; GEN_SAL; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } } else error_message (1005); GENCODE; } | shift_expression SHIR additive_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, ">>"); if (INTEGER == type_ac[set]) { switch (type_ac[--set]) { case INTEGER: kodp3 = kodp; GEN_SAR; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } } else error_message (1005); GENCODE; } ; relational_expression : shift_expression | relational_expression '<' shift_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (6024, type_com[set], type_com[set - 1]); else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (6024, type_com[set - 1], type_com[set]); if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_LO; GENCODE; type_ac[set] = INTEGER; } | relational_expression '>' shift_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (6024, type_com[set], type_com[set - 1]); else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (6024, type_com[set - 1], type_com[set]); if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_GR; GENCODE; type_ac[set] = INTEGER; } | relational_expression LQ shift_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (6024, type_com[set], type_com[set - 1]); else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (6024, type_com[set - 1], type_com[set]); if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_LE; GENCODE; type_ac[set] = INTEGER; } | relational_expression GQ shift_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (6024, type_com[set], type_com[set - 1]); else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (6024, type_com[set - 1], type_com[set]); if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_GE; GENCODE; type_ac[set] = INTEGER; } ; equality_expression : relational_expression | equality_expression EQ_A relational_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (6024, type_com[set], type_com[set - 1]); else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (6024, type_com[set - 1], type_com[set]); if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_EQ; GENCODE; type_ac[set] = INTEGER; } | equality_expression NE_A relational_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) error_message (6024, type_com[set], type_com[set - 1]); else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (6024, type_com[set - 1], type_com[set]); if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_NE; GENCODE; type_ac[set] = INTEGER; } ; /* The ANSI specifies nonterminal AND_expression. */ /* I have added bit_ infront because of filter for */ /* grammar output in LaTeX. */ bit_AND_expression : equality_expression | bit_AND_expression '&' equality_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "&"); if (INTEGER == type_ac[set]) { switch (type_ac[--set]) { case INTEGER: kodp3 = kodp; GEN_ANDB; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } } else error_message (1005); GENCODE; } ; exclusive_OR_expression : bit_AND_expression | exclusive_OR_expression '^' bit_AND_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "^"); if (INTEGER == type_ac[set]) { switch (type_ac[--set]) { case INTEGER: kodp3 = kodp; GEN_XOR; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } } else error_message (1005); GENCODE; } ; inclusive_OR_expression : exclusive_OR_expression | inclusive_OR_expression '|' exclusive_OR_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "|"); if (INTEGER == type_ac[set]) { switch (type_ac[--set]) { case INTEGER: kodp3 = kodp; GEN_ORB; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } } else error_message (1005); GENCODE; } ; logical_AND_expression : inclusive_OR_expression | logical_AND_expression AND_A { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { type_com[set] = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = UNDEF_TQ; type_com[set]->attribute.arit_class = LONG_AC | INTEGER; } GEN_MOVaa; GENCODE; and_jmp[set] = kodp; GEN_JZ; GENCODE; } inclusive_OR_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { type_com[set] = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = UNDEF_TQ; type_com[set]->attribute.arit_class = LONG_AC | INTEGER; } if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_AND; GENCODE; type_ac[set] = INTEGER; ((struct OPERAND_1_ma *)and_jmp[set])->adr = kodp; } ; logical_OR_expression : logical_AND_expression | logical_OR_expression OR_A { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { type_com[set] = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = UNDEF_TQ; type_com[set]->attribute.arit_class = LONG_AC | INTEGER; } GEN_MOVaa; GENCODE; or_jmp[set] = kodp; GEN_JNZ; GENCODE; } logical_AND_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { type_com[set] = (struct internal_type *) allocate (sizeof(struct internal_type), scope_level > PERM ? BLOCK : PERM); init_zero ((char *)type_com[set], sizeof(struct internal_type)); type_com[set]->attribute.function_class = SIMPLE; type_com[set]->attribute.type_qualifier = UNDEF_TQ; type_com[set]->attribute.arit_class = LONG_AC | INTEGER; } if (-1 == implicit_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; kodp3 = kodp; GEN_OR; GENCODE; type_ac[set] = INTEGER; ((struct OPERAND_1_ma *)or_jmp[set])->adr = kodp; } ; conditional_expression : logical_OR_expression | logical_OR_expression '?' { SET_ADDRESS; TYPE_CLEAR; kodp3 = NULL; GEN_CLRT; GENCODE; fixp++; #ifdef DEBUG printfx ("fixp=%u\n",fixp); #endif fixp->if1.major = IF; fixp->if1.jz = kodp; GEN_JZ; GENCODE; } expression ':' { fixp->if1.jmp = kodp; GEN_JMP; GENCODE; ((struct OPERAND_1_ma *)(fixp->if1.jz))->adr = kodp; SET_ADDRESS; TYPE_CLEAR; } conditional_expression { ((struct OPERAND_1_ma *)(fixp->if1.jmp))->adr = kodp; fixp--; } ; /* * NO_ANSI */ assignment_expression : conditional_expression | unary_expression { if (POPA_P) error_message (1034); set_value (variable[set].name); switch (type_com[set]->attribute.function_class) { case SIMPLE: case ARRAY: case STRUCT_FC: case ENUM_FC: case POINTER: case UNION_FC: break; case LOCAL: case REMOTE_F: error_message (1034); break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } } '=' assignment_expression { if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; move2lvalue (); SET_ADDRESS; } | unary_expression assignment_operator ; /* * NO_ANSI */ ae_empty: { /* The lvalue just parsed is array, structure or union. We need the offset of the field twice. Once for lvalue and MOV instruction and once for right side value. (if there is a side effect in lvalue expression it is evaluated only once as the semantic should be (ANSI)) */ GEN_MOVaa; GENCODE; } ; assignment_operator : MUL_ASSIGN ae_empty assignment_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "*"); if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; GEN_MULT; GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } | DIV_ASSIGN ae_empty assignment_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "/"); if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; GEN_DIV; GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } | MOD_ASSIGN ae_empty assignment_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "%"); if (INTEGER == type_ac[set]) { SET_ADDRESS; TYPE_CLEAR; switch (type_ac[set]) { case INTEGER: GEN_MOD; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } else error_message (1005); } | ADD_ASSIGN ae_empty assignment_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { GEN_PUSHAIli(type_com[set]->output->attribute.memory_size); GENCODE; GEN_MULTli; GENCODE; type_com[set - 1] = type_com[set]; } else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) { GEN_PUSHAIli(type_com[set - 1]->output->attribute.memory_size); GENCODE; GEN_MULTli; GENCODE; type_com[set] = type_com[set - 1]; } if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; GEN_ADD; GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } | SUB_ASSIGN ae_empty assignment_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set])) { GEN_PUSHAIli(type_com[set]->output->attribute.memory_size); GENCODE; GEN_MULTli; GENCODE; type_com[set - 1] = type_com[set]; } else if (POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) { GEN_PUSHAIli(type_com[set - 1]->output->attribute.memory_size); GENCODE; GEN_MULTli; GENCODE; type_com[set] = type_com[set - 1]; } if (-1 == l_value_cast ()) COMPILE_ONLY; SET_ADDRESS; TYPE_CLEAR; GEN_SUB; GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } | LEFT_ASSIGN ae_empty assignment_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "<<"); if (INTEGER == type_ac[set]) { SET_ADDRESS; TYPE_CLEAR; switch (type_ac[set]) { case INTEGER: GEN_SAL; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } else error_message (1005); } | RIGHT_ASSIGN ae_empty assignment_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, ">>"); if (INTEGER == type_ac[set]) { SET_ADDRESS; TYPE_CLEAR; switch (type_ac[set]) { case INTEGER: GEN_SAR; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } else error_message (1005); } | AND_ASSIGN ae_empty assignment_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "&"); ERROR_P; if (INTEGER == type_ac[set]) { SET_ADDRESS; TYPE_CLEAR; switch (type_ac[set]) { case INTEGER: GEN_ANDB; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } else error_message (1005); } | XOR_ASSIGN ae_empty assignment_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "^"); ERROR_P; if (INTEGER == type_ac[set]) { SET_ADDRESS; TYPE_CLEAR; switch (type_ac[set]) { case INTEGER: GEN_XOR; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } else error_message (1005); } | OR_ASSIGN ae_empty assignment_expression { if (POINTER_P(type_com[set]) || ARRAY_P(type_com[set]) || POINTER_P(type_com[set - 1]) || ARRAY_P(type_com[set - 1])) error_message (1033, "|"); ERROR_P; if (INTEGER == type_ac[set]) { SET_ADDRESS; TYPE_CLEAR; switch (type_ac[set]) { case INTEGER: GEN_ORB; break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } GENCODE; kodp3 = kodp; move2lvalue (); SET_ADDRESS; } else error_message (1005); } ; expression : assignment_expression | expression ',' { #if 0 /* Exact copy of the top level expression. Now it is left-hand operand of comma expression for warning*/ if (! LOCAL_P(type_com[set]) && ! REMOTE_P(type_com[set]) && ! MOV_P && ! POPA_P) error_message (6027); #else if (! MOV_P) error_message (6029); #endif switch (type_ac[set]) { /* No breaks here. */ case INTEGER: case SIGNED_AC | INTEGER: case UNSIGNED_AC | INTEGER: case LONG_AC | INTEGER: case LONG_AC | SIGNED_AC | INTEGER: case LONG_AC | UNSIGNED_AC | INTEGER: case SHORT_AC | INTEGER: case SHORT_AC | SIGNED_AC | INTEGER: case SHORT_AC | UNSIGNED_AC | INTEGER: case DOUB: case LONG_AC | DOUB: case FLT: case CHR: case SIGNED_AC | CHR: case UNSIGNED_AC | CHR: GEN_POPAe; GENCODE; break; case VID: break; default: fprintfx (stderr, "%s:%d:\n", __FILE__, __LINE__); error_message (5000); return (0); } kodp3 = NULL; is_address = 0; SET_ADDRESS; TYPE_CLEAR; } assignment_expression ; constant_expression : conditional_expression ; /* \verbatim */ %% void dump_yacc () { #if YYDEBUG yydebug = 1; #else fprintfx (stderr, "YYDEBUG not defined\n"); #endif }