A PARSER CLASS IN JAVA TO EVALUATE ALGEBRAIC EXPRESSIONS
DOI:
https://doi.org/10.15381/idata.v9i1.5764Keywords:
Parser, lexical analyser, postfix expressions evaluation, operators algorithmAbstract
The article presents a Parser class in Java to evaluate algebraic expressions using fundamental algorithms for the construction of compilers, passing from the conversion of expressions from infix to postfix, the evaluation of postfix expressions, the evaluation for precedence of operators, parser algorithms of precedence and construction algorithm of precedence functions. The goal of the article is to write a lexical analyser in a conventional language of systems programming, using the possibilities of input and output of Java language in order to read expressions to evaluate from the input, to process them and to send the results to the output.
Downloads
Downloads
Published
Issue
Section
License
Copyright (c) 2006 Daisi Pereira Souto, Roberto Amaro Baldeón, Suzana Leitão Russo
![Creative Commons License](http://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png)
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
AUTHORS RETAIN THEIR RIGHTS:
a. Authors retain their trade mark rights and patent, and also on any process or procedure described in the article.
b. Authors retain their right to share, copy, distribute, perform and publicly communicate their article (eg, to place their article in an institutional repository or publish it in a book), with an acknowledgment of its initial publication in the INDUSTRIAL DATA.
c. Authors retain theirs right to make a subsequent publication of their work, to use the article or any part thereof (eg a compilation of his papers, lecture notes, thesis, or a book), always indicating the source of publication (the originator of the work, journal, volume, number and date).