Skip to content

Latest commit

 

History

History

Shunting_Yard_Algorithm

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

In computer science, the shunting-yard algorithm is a method for parsing mathematical expressions specified in infix notation. It can produce either a postfix notation string, also known as Reverse Polish notation (RPN) or an abstract syntax tree (AST). The algorithm was invented by Edsger Dijkstra and named the "shunting yard" algorithm because its operation resembles that of a railroad shunting yard. What I've already done is combining this algorithm with (Parentheses Checking). So, in this case, this code can also compute the arithmetic expressions which contain parentheses.

Reference: https://en.wikipedia.org/wiki/Shunting-yard_algorithm