Font Size: a A A

Research On Syntax Analysis For Restricted Natural Language

Posted on:2011-01-16Degree:MasterType:Thesis
Country:ChinaCandidate:S Q ZhangFull Text:PDF
GTID:2178360308958138Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
The software system is based on the high-end professional programming language, the professional programmers do the research of need, system design and code system, test, the development of program and so on. Not only the cost of developing is high, but also the efficiency of software development is low, and have other problems, no computer professionals seldom can all understand or do not understand, and can not have a good communication with the programmers, so it can not ensure the quality of the software to meet requirements.For these reasons, the software automation technology can make code much standard and improve software development. The formal software development and the automation software are supposed to be overcome the crisis of software, and is a efficient method to improve software developers. Formal language is an important research area in computer science. Grammar is a very effective describing way to formal language .Because the grammar is a kind generative rule of language, and is a tool to explain the grammar .In this paper, designs a programming grammar based on the restricted nature Chinese. The keywords of the grammar are some keywords of C language, the programming body is written by restricted Chinese.To the design of the restricted nature language, in the paper, develop a parser based on dialog box. There are four components of the parser, word process, lexical analysis, syntax analysis and semantic preferences.Firstly, the original restricted Chinese language program are segmented processing, this part is mainly restricted Chinese statement on the original design under this sub-word dictionary and word processing methods; secondly, after word of the original procedure lexical analysis, lexical analysis can be thought of compiling the first stage of processing, such as the keyword is correct, and limited language word after word detection in detail, lexical analysis and the results of the detailed design, that is,the form of four-element scheme for later parsing; thirdly, after lexical analysis result is a series of token string parsing can be designed according to the procedures previously limited statement grammar rules, and parsing the source program; finally, the lexical analysis and parsing through the correct procedures for limited statement of the original pre-semantic terms, that statement kind words for the limited, automatically calls all existing pre-semantic terms, not only to speed up the code automatically generated, more important is to generate more standardized code.Therefore, that restricted natural language program is to comply with the rules of grammar, compiled by the design parser in the paper; lastly, for the living language program keep its existing programs structure, and make a meticulousness analysis of restricted statement, the preset semantic sequence code can be better to the C language, and do a step to the software automatically generates. After the test analysis, to a initial design.
Keywords/Search Tags:restricted Chinese, automatic segmentation, lexical analysis, grammatical analysis, semantic preferences
PDF Full Text Request
Related items