| Huahao OKSQL is the homemade Relational Database Management System (RDBMS) of Chengdu Huahao Wangjing Technique Corporation Ltd. In order to realize the procedure and function of server, the support for the database procedure language is added in the development process of OKSQL V2.0, on the base of OKSQL V1.2 which already supports most statements according to SQL92 elementary standard. In this thesis, surround the development of database procedure language interpreter which is to realize the procedure and function, the detailed discussion is made. Moreover, this thesis also makes some exploration and research on the relevant techniques of compile and interpret system. A common framework of compiler is abstracted during the research of the interpreter of procedure language. After that, the implementation schemes of the front end and back end are presented. And a thorough discussion is develop according to language design, syntax analysis, semantic analysis, the intermediate code generation and the virtual machine which is used to interpret and execute the intermediate codes and so on. In the aspect of syntax analysis, semantic analysis and the intermediate code generation of system front, an abstract syntax tree is built after syntax analysis and semantic analysis, and then this abstract syntax tree is traversed to generate the intermediate code. During the realization of virtual machine of system back, we consult the theory of JVM and .NET CLR. The virtual machine is used to maintain the run-time environment which is composed of code section, frame stack, function stack, constant section, instruction pointer, etc and control the executing of program. Through the special design, when parameters and local variables are visited, the visit of symbol... |