?? cifa.h
字號:
#include "iostream.h"
#include "stdio.h"
#include "string.h"
#define ID 1
#define INT 2
#define ADD 16
#define SUB 17
#define MUL 18
#define DIV 19
#define SY 20
#define SS 21
#define XS 22
#define LT 23
#define LE 24
#define GT 25
#define GE 26
#define EQ 27
#define NE 28
#define FZ 29
#define FH 30
#define JH 31
#define DH 32
#define LKH 33
#define RKH 34
#define MH 35
struct KeyWord //關(guān)鍵字結(jié)構(gòu)
{
char word[20];
int id;
};
struct ReCode //標(biāo)識符結(jié)構(gòu)
{
char word[20];
int idaddr;
};
struct CifaResult
{
int type;//0:error,1:id,2:num,3-:keyword and operator,-1:end note
int value;//二元式中value值
char text[20];//單詞
int address;//源文件緩沖區(qū)中地址
};
class cifa
{
public:
KeyWord keyword[13];
FILE *fp;
ReCode recode[1000];
CifaResult cifaresult[10000];
cifa(FILE *fp1);
char token[20];
int idaddr;//
int huanhang;
int cur_ty;//當(dāng)前2員式的地址
void reporterrors(char errorch[20]);
void reporterror(char errorch);//報錯函數(shù);
int lookup(char *string);
int lookuprecode(char *string);
void out(int id ,char *string);
bool isalpha(char c) ;
bool isdigit(char c);
bool isalnum(char c);
void scanner();
};
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -