393 views
0 votes
0 votes
Define what one might mean by properly nested parenthesis structures involving two kinds of parentheses, say ( ) and [ ]. Intuitively, properly nested strings in this situation are ([ ]), ([[ ]])[( )], but not ([ )] or (( ]]. Using your definition, give a context-free grammar for generating all properly nested parentheses.

1 Answer

Related questions

0 votes
0 votes
0 answers
3
0 votes
0 votes
0 answers
4