Problem I am trying to implement an expression parser via the shunting yard algorithm about which I learnt here. I […]
Tag: math-expression-eval
Infix expression (with negative numbers) to postfix
Problem I am writing a class to evaluate an arithmetic expression, For now my class can convert an infix expression […]
Tokenize a mathematical statement string
Problem The function tokenize generates tokens from a mathematical string. It can chain characters together to form longer tokens. This […]
Simple lexical analysis – basic calculator
Problem I recently found an interesting series that describes the specifics of how interpreters and compilers work, explaining each step […]
Basic arithmetic operations for a programming language
Problem I have written a set of functions to compute basic mathematical operations for my own Java-based programming language. First […]
Arithmetic operation from string
Problem I have a string like str = ” 4+ 6 * 30″;. I have to perform an arithmetic operation […]
Math equation as string to reverse Polish notation parser
Problem I have created a console program where users type in a math equation such as 5+4-6 or (5+16(8-4))/16 that […]
Calculate the value of an arithmetic term written in Polish Notation
Problem I have to create a program which calculates the result of an arithmetic term written in Polish Notation. var […]
Shunting-yard Algorithm, implemented based on reference pseudocode
Problem I have a lot of problems making this code look more elegant or to reduce its size. The algorithm […]
Expression evaluator with Shunting-Yard algorithm
Problem I am especially concerned about: Correctness: Does my algorithm always output the correct answer given a correct input? Readability: […]