Can I use Shunting-yard algorithm to evaluate Expressions (arithmetic, relational, and logical) ?
Can I use Shunting-yard algorithm to evaluate Expressions (arithmetic, relational, and logical) ?
No, but you can use it as part of an algorithm to evaluate such expressions that are in infix notation.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Is this want you mean @laserlight? The accepted answer in the link..
parsing - Shunting yard algorithm for immediate evaluation - Stack Overflow
Yes.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Can I evaluate it with this expression?
Code:(1 + 2) > 3 && 1 < 3
What is the Shunting Yard algorithm?
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
I asked you what, so a yes/no answer does not make sense. Have you actually looked at the Shunting Yard algorithm? Try implementing it for simple arithmetic expressions (e.g., using the algorithm pseudocode given in the Wikipedia article for reference). When you have done so, then come back and ask these questions, if you haven't figured them out yourself.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Okay, thanks..