Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - all function in open
Search - all function in open - List
Pl/0.h文件:头文件主要定义了常量,另外还定义了比较重要的枚举值,还有两个重要的结构体类型,最后还对函数进行了声明,总的来说,头文件的主要工作就是声明或定义了.cpp文件中需要用到的变量。 Pl/0.cpp文件:按照程序从main()函数开始的原则,我们一一作分析。 首先,主函数提示输入要打开的pl/0文件,因为我们需要对一个pl/0语言进行分析。接着,程序提示是否列出token文件,然后提示是否列出目标代码,继续提示是否列出符号列表,最后将文件以只读的形式放在一个新的txt格式的fa1文件中,接下来就进行初始化函数。将err置为0,当函数中发生fatal error 时,返回-1告知调用它的函数,最终退出程序,然后将行,列计数器都初始化为0,虚拟机代码指针置为0。以只读的方式打开ftoken.txt文件,调用listtoken函数进行词法分析输出。最后将文件关闭。- Pl/0.h files: the main header file defines constants, in addition to the more important definition of the enumeration values, there are two important types of structures and, finally, a statement of function, in general, header files The main job is declared or defined. cpp files need to use variables. Pl/0.cpp file: According to the program from main () function begins the principle, we one by one for analysis. First of all, the main function prompted to open the pl/0 file because we need a pl/0 language analysis. Then, the program prompts the token file is listed, then prompts object code is listed, continue to prompt a list of symbols is listed, the last file read-only form on a new format fa1 txt file, then the conduct initialization function. To err is set to 0, when the function fatal error occurs, it returns-1 this function called it, eventually quit the program, then the row and column counters are initialized to 0, the virtual machine code pointer is set to 0. Ftoken.txt
Date : 2026-01-17 Size : 230kb User : 郭红斌
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.