Font Size: a A A

Design and implementation of a numeric parser in IBM VisualAge Java

Posted on:2001-05-29Degree:M.EngType:Thesis
University:University of LouisvilleCandidate:Nguyen, Thanh HuuFull Text:PDF
GTID:2468390014958294Subject:Computer Science
Abstract/Summary:
This thesis presents a design and implementation of a numeric parser using an object-oriented approach. The parser can evaluate an in-order (infix) expression of multiple variables. It is implemented in the IBM VisualAge Java with the aid of IBM VisualAge for Java version 3.0.; The numeric expression parser is designed and implemented consisting of a scanner, a parser, an evaluator, a symbol table, a queue, and a stack. The parser accepts an infix expression as its input. The scanner scans and tokenizes (breaks the expression into tokens) the expression. The parser requests tokens from the scanner, performs a parsing, then translates the expression into a post-order (postfix) representation. The postfix expression is then evaluated by the evaluator to produce a numeric result. The numeric expression parser can accept an expression that consists of one or more of the following operations: addition (+), subtraction (−), multiplication (*), division (/), modulo (%), exponentiation (), sin, cos, and tan. The parser also takescare of the negation of a variable or an expression.; The numeric parser is designed and implemented so that it can be reused as a complete existing software component to help the development of new Java applications. In other words, the reuse of the parser can reduce the development time and effort of new Java applications.
Keywords/Search Tags:Parser, IBM visualage, Java, Expression
Related items