Fix the definition building when there is recursion and added tests.
Fixed the LISP grammar.