6. The following is a description for “JH-Lisp2”, which is a modified version of the language previously described in homework 3, problem 6: (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,0,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.

Essay Writers

How it works

You are only 4-steps away from a perfect custom essay.

1. Make an order
2. Wait for response
3. Monitor the process
4. Download Paper


Price: $
Open chat