The Construction of Complier for SQL--Basing on Linux Operating System
- Author
- WuJiang
- Advisor
- ZhuWangGui
- School
- Beijing University of Chemical Technology
- Major
- Applied Computer Technology
- Classification
- TP314 Compiler,interpreter
- Degree
- Master's thesis
- Year
- 2002
- Downloads
- 354
- Citations
- 8
Abstract
SQL is a structure query language, which is a standard language for database, and almost all DBMS adopted it as programming language. SQL have kinds of different sentences, which all use an effective way to interact between user and database. What’ s so called the construction of SQL compiler is to implement a compiler for SQL.This paper describes an SQL-compiler basing on Linux OS. The compiler translates the query language SQL to the C++ programming language and integrates the pre-complier function to the GCC. SQL statements can be embedded in C++ code and compiled together with the C++ program.The paper explains why and how the compiler was developed. There are also a few examples and tutorial showings for the convenience of the reader. At the same time some middle results of every analysis phase was demonstrated for proving the availability and validity of the compiler.In this paper, author discusses the every section of a compiler;include scanner, parser, and semantic analyzer and code generator in detail.The compiler is just a prototype.
Table of contents
The first chapter 7-16
1.1 compiler principles outlined 8-12
1.2 compiler technology research past, present and future 12-15 <br / > 1.3 the main work content 15-16
Chapter SQL language precompiler design Overview 16-21
2.1 overall design 16-17
2.2 feasibility and technical analysis 17-19
2.3 compiler design 19-21
Chapter lexical analysis and design 21 - 32
3.1 analysis Review 21
3.2 regex 21-24
3.3 DFA 24-29
3.4 SQL scanner to achieve 29-32
Chapter parsing design 32-48
4.1 analysis Review 32-34
4.2 LR (k) and LALR (1) analysis 34-38
4.3 YACC principle 38-39
4.4 generate SQL syntax analysis table 39-43
4.5 parse error handling 43
4.6 generates a syntax tree 43-48
Chapter semantic analysis and design 48-55
5.1 attribute analysis 48-50
5.2 configuration symbol table 50-54
5.3 type checking 54-55
Chapter VI code generation 55-61
6.1 runtime environment 55
6.2 code generation 55-58
6.3 code optimization 58-60
6.4 calling convention 60-61
Chapter VII Conclusion 61-63
References 63-66
Thanks 66-67
studying degree of academic papers published during the directory 67
Related dissertations
- OCCL Compiler for Linux
- Using Lexical and Semantic Analysis for Ontology Integration
- Design and Implementation of SQL Compiler on Column-Oriented Database
- The Research and Implementation of Embedded ECMA Interpreter
- Study and Implementation of the Parser for a General Modeling Language for Multi-domain System
- Research on spatial data manipulation language
- Research on the Chinese Interface of Speech Based Book Query
- The Design and Implementation of LL(1) Action Grammar Compiler’s Automatic Constructor in Java Language
- Design and Develop of Instrument Virtual Computer Assembly Language Based on DSP
- Research on SQL Complier of Database Engine
- Semantic Analysis of Chemical Knowledge Description in UDLC
- The Design and Implementation of ANTLR-Based TTCN-3 Parser
- Implementation of Visualization System on Uncertain Functions
- The Design and Implementation of Office Automation System for Sifang Chemical Co., Ltd.
- Research on SPARQL Query Over Relational Databases Based on SQL Convertion
- Research and Implementation of Key Technologies for YHFT-Matrix Compiler Based on GCC
- The Design and Implementation of a Complier for SCADA Based on C
- Backend Porting for CSKY Based on LLVM Compiler Infrastructure
- Design and Implementation of Materials Management System of Multi-level Educational Institutions
- The Design and Implementation of the Hlgher Vocational College Graduates Employment Information System Based on B/S Structure