Advantages and disadvantages of operator precedence parser
Answers
Answered by
20
Operator precedence parser
Efficient shift-reduce parsers can be produced by hand for small but important class of grammars. Some of the properties of these grammars are:
1. No production on the right side is null.
2. It does not have two adjacent non-terminals at the right side.
Advantages
1. It can easily be constructed by hand.
2. It is simple to implement this type of parsing.
Disadvantages
1. It is difficult to handle tokens like the minus sign because the operator like minus has two different precedence.
2. It is applicable only to small class of grammars.
Answered by
3
Operator precedence parser is actually used to interprets the operator precedence grammar it is small as well as the important class for grammar.
The major advantage of it is the simplicity. It is also easy to construct.It is also so powerfull that can be used for the programming language expressions.
The major disadvantage is the of it being the grammar of small class. In it it is also difficult to identify or decide that grammar recognized which language. It also not capable of handling the unary minus.
The major advantage of it is the simplicity. It is also easy to construct.It is also so powerfull that can be used for the programming language expressions.
The major disadvantage is the of it being the grammar of small class. In it it is also difficult to identify or decide that grammar recognized which language. It also not capable of handling the unary minus.
Similar questions