Question: a context-free grammar. Please ignore the first question. Please do this JH-lisp Question. Give context-free grammars that generate the following languages. In all parts, the

a context-free grammar.

Please ignore the first question.

a context-free grammar. Please ignore the first question. Please do this JH-lisp

Please do this JH-lisp Question.

Question. Give context-free grammars that generate the following languages. In all parts,

Give context-free grammars that generate the following languages. In all parts, the alphabet is {0,1} Aa. {w w contains at least three 15) b. {W w starts and ends with the same symboly C. {w the length of w is odd; Ad. {w/ the length wis odd and its middle symbollis ap} e.{ww = vam that is, w is a palindrome) f. Tbe empty set NO (a) The alphabet of JH-Lisp2 consists of the open '[' and close ']'square brackets, the digits 0-9, the underscore character', and the letters {a,b,d,i,1,m,o,s,u,v} (b) An operator is a substring in JH-Lisp2 containing one of the following strings: {add, sub, mul, div, mod}. (c) A number is a substring in JH-Lisp2 containing one or more of the digits 0-9 (d) An expression is defined as either a number or a list expression (e) A list expression is defined by the following, in order: i. An open bracket: '[' ii. An operator iii. An underscore: iv. An expression V. An underscore: vi. An expression vii. A close bracket: ']' (f) A string in the JH-Lisp2 language is a single list expression. An example string in this language might be [add_[mod_4_3] 21] Give a context-free grammar for JH-Lisp2. Give context-free grammars that generate the following languages. In all parts, the alphabet is {0,1} Aa. {w w contains at least three 15) b. {W w starts and ends with the same symboly C. {w the length of w is odd; Ad. {w/ the length wis odd and its middle symbollis ap} e.{ww = vam that is, w is a palindrome) f. Tbe empty set NO (a) The alphabet of JH-Lisp2 consists of the open '[' and close ']'square brackets, the digits 0-9, the underscore character', and the letters {a,b,d,i,1,m,o,s,u,v} (b) An operator is a substring in JH-Lisp2 containing one of the following strings: {add, sub, mul, div, mod}. (c) A number is a substring in JH-Lisp2 containing one or more of the digits 0-9 (d) An expression is defined as either a number or a list expression (e) A list expression is defined by the following, in order: i. An open bracket: '[' ii. An operator iii. An underscore: iv. An expression V. An underscore: vi. An expression vii. A close bracket: ']' (f) A string in the JH-Lisp2 language is a single list expression. An example string in this language might be [add_[mod_4_3] 21] Give a context-free grammar for JH-Lisp2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!