⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lexi.h

📁 这是一个完整的词法分析器
💻 H
字号:


// Nom Du Fichier      : lexi.h
// Fonction            : Programmation ent阾e  de  analyseur lexicographe
// Cadre               : TP Compilation
// Auteurs             : Wei zhou yue
// Date                : 12/02/2005

#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
       
#define  BMaxlen  10000     
#define  Maxlen  50     
#define  Motcle_No  14       
#define  Signsymbole_No  13     
#define  Limitsymbole_No  9      
#define  ERROR  -1   
    
using namespace std;

/******************************************************************************************************************************************/
char Str[BMaxlen];      
char FichierNom[100];      
int  pStr=-1;            
char *MOTCLE[Motcle_No]={"Si","Alors","Sinon","Finsi","Tantque","Faire","Fintantque","Pour","JUSQUA","De","A","Finpour","Lire","Ecrire"};	
char *SIGNSYMBOLE[Signsymbole_No]={"=","+","-","*","/",">","<",">=","<=","==","!=","++","--"};
char *LIMITSYMBOLE[Limitsymbole_No]={"(",")","[","]","{","}",",",":",";"};
char ch;                
int  Fbuffer;         
char Stoker[Maxlen];      
int Type_no; 
int Prevtype;                 
            
int Debut_chercher();        
void Ensource();          
int LireUs();           

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -