I have started working on 3.9 and 3.10. Both require that you implement list operations within the LET language.
My thinking was that we had to create a separate grammar for lists, but then indicate that a list was a kind of expression.
However, I keep on getting the following kinds of errors:
parser-generation: grammar not LL(1): shift conflict detected for class "(" in nonterminal expression:
(("(") (string "(") (non-term expression) (non-term expression) (string ")") (reduce call-exp))
(("(") (string "(") (non-term list) (string ")") (reduce list-exp))
Simply the following three lines will generate this error:
(list () empty-list )
(list (number list) list-list )
(expression ("(" list ")" ) list-exp)
What am I doing/thinking wrong?
Thanks
Mitchell