Font Size: a A A

The Design And Implementation Of An Arithmetic Expression Parsing Engine

Posted on:2013-04-26Degree:MasterType:Thesis
Country:ChinaCandidate:Z L ZhengFull Text:PDF
GTID:2248330374499304Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the increasing developmeng of Internet and enterprise information construction, the requiredments of application system based on Web are more and more urgent. Based on the actual business, this text designed and implemented a simply and efficient expression parsing engine for exterpreises as the based component.The expression parsing engine support a variety of date types (including NULL, Integer, Real Number, Data, Boolean, String, Collections and Object Type); support arithmetic operators (addition, subtraction, multiplication, division, negation), logical operators (logical and, logincal or, logincal not), relational operators (negated, greater than, greater than or equal to, less than, leas than or equal to) and select operator (?:); support variable operating; support functions and customed expansion.Lexical analysis, syntax analysis and semantic analysis are introduced in detail how to step-by-step analysis from a string expression to get a result by expression parsing engine. Many basic concepts and algorithms, such as finite automata, regular expression, context-free grammar, operator precedence algorithm, Reverse Polish Expression, etc, are be introduced and given the appropriate instance to illustrate. Follow the text of the design ideas, you will understand the complexity of compiler design. If combined with the implement of the source code, you can futher compile system and parsing engine with a new understanding.Especially variables and fuction, the implementation in Reverse Polish Notation are rarely mentioned on many articles of the same type. For readers who have the same goals, there are some inspiration and reference.
Keywords/Search Tags:Arithmetic expression, Lexical Analysis, Syntax Analysis, OperatorPrecedence Algorithm, Reverse Polish Expression
PDF Full Text Request
Related items