write a simple calculator part2

The Tokens tokens are the basic blocks of an expression. In this part will show you How to group the different symbols to the tokens. token types Left parenthesis Right parenthesis Number Plus(+) Minus(-) Star(*) Slash(/) token scanner we will define a scanner struct to scan and collect the tokens. How the scan works Assume […]


Write a simple calculator with go

What is calculator Calculator – Wikipedia So basically, calculator is used to calculate the result after apply different operations on numbers. The things that made up the calculation expression assume we have an calculation expression: (1+2)*(10 / 5) – 3 we can see that there are serveral kinds of things: left parenthesis right parenthesis numbers […]