EOPL 3.9 and 3.10

180 views
Skip to first unread message

mitchel...@gmail.com

unread,
Oct 25, 2013, 7:20:55 AM10/25/13
to eo...@googlegroups.com


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




Marco Morazan

unread,
Oct 25, 2013, 9:18:22 PM10/25/13
to eo...@googlegroups.com
Start by defining a new expressed value(s) for lists. Don't confuse the specification for list values in the LET language with the specification of the LET language itself. After you have expanded the set of expressed values work on expanding the set of expressions.

Marco


--
You received this message because you are subscribed to the Google Groups "EOPL3" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eopl3+un...@googlegroups.com.
To post to this group, send email to eo...@googlegroups.com.
Visit this group at http://groups.google.com/group/eopl3.
For more options, visit https://groups.google.com/groups/opt_out.



--

Cheers,

Marco

Have a´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´ (¸.·´ * wonderful day! :)
Reply all
Reply to author
Forward
0 new messages