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

Request the full text

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

  1. OCCL Compiler for Linux
  2. Using Lexical and Semantic Analysis for Ontology Integration
  3. Design and Implementation of SQL Compiler on Column-Oriented Database
    ZhenZhen ·South China University of Technology ·2012 ·Master's thesis
  4. The Research and Implementation of Embedded ECMA Interpreter
    ZhangJinBo ·Hohai University ·2006 ·Master's thesis
  5. Study and Implementation of the Parser for a General Modeling Language for Multi-domain System
  6. Research on spatial data manipulation language
    CuiJianJun ·Chang'an University ·2005 ·Master's thesis
  7. Research on the Chinese Interface of Speech Based Book Query
  8. The Design and Implementation of LL(1) Action Grammar Compiler’s Automatic Constructor in Java Language
    ZhangHongTao ·Jilin University ·2005 ·Master's thesis
  9. Design and Develop of Instrument Virtual Computer Assembly Language Based on DSP
    QuGuoDong ·Dalian Railway Institute ·2003 ·Master's thesis
  10. Research on SQL Complier of Database Engine
    ZouHui ·Wuhan University of Technology ·2010 ·Master's thesis
  11. Semantic Analysis of Chemical Knowledge Description in UDLC
    WeiTongMing ·Lanzhou University ·2010 ·Master's thesis
  12. The Design and Implementation of ANTLR-Based TTCN-3 Parser
    ZhaoLiJun ·Inner Mongolia University ·2010 ·Master's thesis
  13. Implementation of Visualization System on Uncertain Functions
  14. The Design and Implementation of Office Automation System for Sifang Chemical Co., Ltd.
    LiuZhongPing ·Northeastern University ·2012 ·Master's thesis
  15. Research on SPARQL Query Over Relational Databases Based on SQL Convertion
    ZhangLiLi ·Northeastern University ·2011 ·Master's thesis
  16. Research and Implementation of Key Technologies for YHFT-Matrix Compiler Based on GCC
  17. The Design and Implementation of a Complier for SCADA Based on C
  18. Backend Porting for CSKY Based on LLVM Compiler Infrastructure
    HuMin ·Zhejiang University ·2014 ·Master's thesis
  19. Design and Implementation of Materials Management System of Multi-level Educational Institutions
    PeiZhiChao ·Northeastern University ·2013 ·Master's thesis
  20. The Design and Implementation of the Hlgher Vocational College Graduates Employment Information System Based on B/S Structure
    ZhangJianHua ·Ocean University of China ·2013 ·Master's thesis