Question: 6. JH-Lisp is a simple programming language for evaluating arithmetic expressions. It is described from the following components: (a) The alphabet of JH-Lisp consists of


6. JH-Lisp is a simple programming language for evaluating arithmetic expressions. It is described from the following components: (a) The alphabet of JH-Lisp consists of the open and close' parentheses, the digits 0-9, the space character', and the symbols + - +/ (b) An operator is a substring in JH-Lisp containing one of the symbols + - * /. 2 (c) A number is a substring in JH-Lisp 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 parenthesis:'( ii. An operator iii. A space: iv. An expression V. A space: 3 vi. An expression vii. A close parenthesis:') (f) A string in the JH-Lisp language is a single list expression. Examples of JH-Lisp strings may include: ( 23) (+ (* 5 3) (/ 8 4)) (- 25 (+ 4 2)) Is JH-Lisp a regular language? Why or why not? If you think it is, provide a regular expression or finite automaton which recognizes the language. If you think it is not, provide an explanation as to why no regular expression or finite automaton should be able to recognize it
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
