========================================================================
========================lab1.cpp========================================
#include<stdio.h>
#include<ctype.h>
#include<string.h>
#include<stdlib.h>
#include"lab1.h"
#define MAX 200
#define IF 1
#define ELSE 2
#define WHILE 3
#define THEN 4
#define DO 5
#define END 6
#define BEGIN 7
int lookhead;
int label=0;
int Temp=0;
int flag=0;
struct S_Attr
{
char pCode[MAX];
int iNext;
int iBegin;
};
struct C_Attr
{
char pCode[MAX];
int iTrue;
int iFalse;
};
struct E_Attr
{
char pCode[MAX];
char place[MAX];
};
struct B_Attr
{
char pCode[MAX];
int iNext;
};
struct T_Attr
{
char pCode[MAX];
char place[MAX];
};
struct F_Attr
{
char pCode[MAX];
char place[MAX];
};