Professional Documents
Culture Documents
#include "stdafx.h"
#include <math.h>
#define MSDOS
#include "simbolo.hpp"
#define code(c1, c2) code(c1); code(c2);
#define code(c1, c2, c3) code(c1); code(c2); code(c3);
%}
%union {
Simbolo *simb;
Inst *inst;
}
#include <stdio.h>
#include <ctype.h>
#include <signal.h>
#include <setjmp.h>
jmp_buf begin;
char *progname;
int lineno = 1;
Tabla *tabla;
progname=argv[0];
tabla=new Tabla();
init();
setjmp(begin);
signal(SIGFPE, fpecatch);
for(initcode(); yyparse (); initcode())
execute(prog);
return 0;
}
void fpecatch(int e)
{
execerror("excepcion de punto flotante", (char *)0);
}
int yylex ()
{
int c;