📄 lex.h
字号:
#ifndef _LEX_H_
#define _LEX_H_
#include "Globe.h"
#include <stdio.h>
//以下是一些实现词法分析的关键方法
void Error(char *reason); //处理词法分析中的错误
int insert(char s[], int tok);
int lookup(char s[]);
bool Recover(); //修复分析中出现的错误
bool Retract(); //回退一个字符
bool InitIdTable(); //将关键字表的所有关键字初始化到标志符数组中
bool FillWholeInputBuf(); //从源文件中读取字符到半个输入缓冲区
void OutputIdTable();
char NextChar(); //获取下一个字符
int fail();
int install_id();
void install_num();
void install_char();
void install_string();
int NextToken(); //获取下一个词素
bool Lex(char *filename); //对指定文件进行词法分析
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -