I gotta make a CFG and PDA for the grammar that has perfectly nested parentheses and brackets.
S -> [S]
S -> (S)
S -> SS
S -> Epsilon
Not sure if this is correct, or how to make the PDA from it?
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.
take a look at Spirit. It’s really worth a deep visit.
Otherwise, your grammar it’s so simple that a recursive LL(1) parser should be easy to write.