Join the social network of Tech Nerds, increase skill rank, get work, manage projects...

• # Parsing expression in Data structure

• 0
• 0
• 0
• 0
• 0
• 0
• 0
• 0
• 847
Comment on it

Firstly to understand the parsing expression in data structure we should know about the arithmetic notations.
There are three ways of writing arithmetic notations which are having same meaning:-
1. Infix Notation
2.Prefix Notation
3.Postfix Notation

• INFIX NOTATION:- In infix notation operators comes in between the operands. It is very easily understandable in infix notation only for us human beings. But in computing devices it is very difficult and consumes space and time.
e.g x+y

• PREFIX NOTATION:- In prefix notation operator comes before the operands. It is also known as Polish Notation
e.g- +xy (this is equivalent to the x+y)

• POSTFIX NOTATION:- In postfix notation operator comes after the operands. It is also known as Reversed Polish Notation.
e.g xy+ (this is also equivalent to x+y)

• Below table will clearly make u understand the difference:-  S.NO. Infix notation Prefix notation Postfix notation 1 (x + y) * z * + x y z x y + z * 2 x * (y + z) * x + y z x y z + * 3 (x + y) * (z + t) * + x y + z t x y + z t + *

PARSING EXPRESSION
To parse an infix notation we first convert the infix notation either into prefix notation or post fix notation after that it is computed.
Parsing of an arithmetic expression follows precedence and associativity.

• Precedence:- When an operand is in between two unlike operators then the precedence of an operator decides which operator will be executed first.

For e.g expression is x + y * z then x + (y * z)

Addition operation has less precedence so multiplication operation will be executed first.

• Associativity:- If the operators are having same precedence then associativity will describe the rule.

For e.g If expression is x + y - z then (x + y) - z

## 0 Comment(s)

OR
OR
Register

OR
Fill out the form below and instructions to reset your password will be emailed to you:
Fill out the form below and reset your password:

• Hire
• Post Projects

### Post Projects

• All at 0 Cost ....
• Post Tech Job
• Select Best Bidder
• Track the Project
• Approve Work and Pay safely
• Browse Nerds
• Work
• Find Projects Find Projects
• UI Design and UX
• Software Engineering
View more...
View less...
• Marketing
• General
• Manage
• Company Company

### Manage Company

• All at 0 Cost ....
• Manage Company and Employee Profiles
• Use Online Project Management Tools for Free
• Company wide Employee Productivity Reports
• Knowledge Sharing and Collaboration Tools
• Get Sales Lead and Bid for Tech Projects
• Send Invoices and Receive Payment Safely
• Learn
• Nerd Digest Nerd Digest
• UI Design and UX
• Software Engineering
View more...
View less...
• Marketing
• General
• Tech Q & A Tech Q & A
• UI Design and UX
• Software Engineering
View more...
View less...
• Marketing
• General