As far as my understanding in the SLR parser itself resolves the shift reduce conflict by using the handles and viable prefixes etc. So why should the shift reduce conflict bother me ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A conflict means that the parser generated may not accept the entire language described by the grammar, but rather a subset of that language. If you don’t care about not parsing some constructs that are legal according to the grammar, then you can ignore the shift/reduce and reduce/reduce conflicts.
Now sometimes the conflicts are due to ambiguities in the grammar, which means that there are multiple ways of parsing the same thing, and sometimes when that is the case, the conflict can be ignored, as the parser will still parse the entire language. But not always (in fact its the exception rather than the rule), so in general you need to look at why the grammar has a conflict and what effect that has on the parser.