International Journal of Computer Applications |
Foundation of Computer Science (FCS), NY, USA |
Volume 100 - Number 17 |
Year of Publication: 2014 |
Authors: R. D. Solomon Raju, Pawan Kumar |
10.5120/17616-8235 |
R. D. Solomon Raju, Pawan Kumar . State Merging in LR Parser under Count based Reduction. International Journal of Computer Applications. 100, 17 ( August 2014), 19-31. DOI=10.5120/17616-8235
An LR parser shows error only during scanning input symbol. Error is never shown during the reduction of a handle (substring of stack) into nonterminal. It is because a symbol is put into the stack only when it is guaranteed to be the correct one. If the method of reduction of a handle is known then errors can also be shown during reduction. Hence a wrong symbol can be shifted on the stack and error can be detected during reduce operation. It may permit the merging of few states. The simplest type of reduction scheme is to remove few symbols (the number of symbols equal to the length of the handle) from the top of the stack and push the corresponding nonterminal on the stack. In this paper, a state merging scheme is proposed under this method of reduction.