Font Size: a A A

The Analysis And Design Of Gaussian Lexical-Analyzer And Syntax-Parser Based On ANTLR

Posted on:2010-07-04Degree:MasterType:Thesis
Country:ChinaCandidate:S X LiuFull Text:PDF
GTID:2178360275996050Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Major research project "web-based environment for scientific research activities," the focus of projects funded, "computational chemistry study of e-Science applications and demonstration" is supported by National Natural Science Foundation of China , the purpose is to build a computational chemistry e-Science (referred to as eSOC) System to make it into a grid based on existing standards of computational chemistry resource sharing and virtual platform for academic exchanges, in order to build a professional chemist chemistry problem solving environment. Chemical Script Editor is a very important content in eSOC System. It should have the code prompt, grammar checker, error identification, outline view, syntax coloring, code folding and other functions. Chemist can highly efficient and easily create, edit and submit chemical task script through its, using of shared grid resources.The lexical and syntax analyzer is an important aspect in the chemical scripting editor, therefore, analysis and design of lexical analyzer and syntax analyzer is a problem that must be solved in the chemical script editor, which is the paper mainly content. In this paper, analysed the commonly used chemical software Gaussian scripting language, designed and implemented the scripting language Gaussian lexical analyzer and parser using ANTLR tool in the chemical script editor,. Mainly includes the following:1. To learn and master the tools and ANTLRV3 edit ANTLRWorks environment to study the structure ANTLRV3 morphology and syntax in the parser design process and ANTLRWorks syntax editor and debugging environment for the design of steps.2. Through the study of analysis of Gaussian scripting language, the realization of the Gaussian lexical regular expressions, and grammatical rules.3. Gaussian regular expression of the lexical and grammar rules, design and realization of the Gaussian the lexical analyzer and parser.In process of the design Gaussian lexical analyzer and parser, this article analyzes the advantages and disadvantages of the LR and LL parsing. Finally, using an example to verify the feasibility of it, showing the lexical analyzer and syntax analyzer in the analysis of grammar and syntax analysis of the use of matching the virtual stack, the generated parse tree and AST.
Keywords/Search Tags:Lexer Parser, AST, parser-tree, Gaussian ANTLR
PDF Full Text Request
Related items