Is it true that all LR grammars can be converted to S-attributed grammar since they are all bottom-up grammars?
UPDATE
Is it true that all attributed grammars converted from LR grammars are S-attributed grammars?
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.
From what I can tell, “S-attributed” describes any attribute grammar that uses only synthesized attributes. Therefore any grammar that can be parsed bottom up (say an LR grammar that can be parsed using an LR parser) should also be capable of passing synthesized attributes back up, and could therefore be considered an S-attributed grammar if you attached attributes to it.