<a> ::= <b> <c>
<b> ::= <b> y | x
<c> ::= <d> | <d> y
<d> ::= z <b> | zxyz.xyz.Use Menhir and OCamllex to build a parser for S-expressions which targets string sexpr. Recall the ADT definition of sexpr:
type 'a sexpr = Atom of 'a | List of 'a sexpr listYou should use the following regular expression for atoms in your lexer:
let atom = [^ ' ' '\t' '\n' '\r' '(' ')']+This expression matches any nonempty sequence of non-whitespace non-parentheses characters.
Design an unambiguous grammar for Boolean expressions over the constants True and False in Python. When you're done, compare with the Python grammar for Boolean operators.
Challenge. Build a parser for these expressions using menhir and ocamllex.