Font Size: a A A

Design And Realization Of ASP-PHP Program Transformation System

Posted on:2007-04-17Degree:MasterType:Thesis
Country:ChinaCandidate:F W XiaoFull Text:PDF
GTID:2178360182460581Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Now vigorous development of network forms web develop technologies which take ASP,PHP, JSP as main stream. ASP is simple and practical, so it is a favorite of web developers. PHP program is faster when executing and it can run at different web server and different operating system without function changing. Due to the advantage many web developers try to transform ASP program into PHP program by hand. If ASP programs are too many or too long, transforming them by hand is either time-consuming or arduous. So it is urgent to find a tool which can transform these two programs automatically.In this paper ASP-PHP Program Transformation System based on compiler principles is designed and developed. And the system implements transformation from ASP program to PHP program. And efficiency of transforming ASP program into PHP program is improved.In the paper the principle of lexical parsing, syntax parsing and semantic parsing are analyzed in detail. And it is applied to the system that we designed: Lexical parsing scans every character of source program from left to right in turn and produces word sequences for syntax parsing; Syntax parsing groups tokenizers of source program farther and produces syntax tree to express the structure of ASP program; Semantic parsing walks syntax tree and looks for warehouse of rules for implementing mapping of ASP program to PHP program; At last code production walks syntax tree again and produces PHP program. Symbol table is data structure which has high arithmetic complexity from whole structure and items' attribute information, and it is inconvenient for users to interact with graphic interface. In this paper, on the base of researching process of compiler and combining characteristics of ASP with PHP program an idea of replacing symbol table as object is brought forward.Because object is simple and fit to express hiberarchy. And the interaction of users and graphic interface is implement using document customization of text discreteness. In addition, when creating syntax tree the paper adopts composite mode and when walking syntax tree visitor mode.At last the system is implemented using JBuilderX and other developing tools. It meets with certain requirements of maneuverability, practicability, versatility and extendability. And it obtains good effect.
Keywords/Search Tags:Compiler, ASP Program, PHP Program, Transformation System
PDF Full Text Request
Related items