k-user AT lists.cs.illinois.edu
Subject: K-user mailing list
List archive
- From: "Rosu, Grigore" <grosu AT illinois.edu>
- To: "Radoi, Cosmin A" <cos AT illinois.edu>, "k-user AT cs.uiuc.edu" <k-user AT cs.uiuc.edu>
- Subject: Re: [K-user] Problem with lists
- Date: Sat, 3 Dec 2011 20:58:09 +0000
- Accept-language: en-US
- List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user>
- List-id: <k-user.cs.uiuc.edu>
How did you define <cell> in the configuration? What is its contents? For below, I assume it is
<cell> .Map </cell>
First, the K maps currently take only bindings of the form K |-> K, so N |-> .List cannot work since .List is the unit of the List sort, which is disjoint from K.
Second, you are only allowed to use List{#Int} or List{AnySort} once in a definition, when you alias it. Something like this:
syntax Ints ::= List{#Int,","}
Then, if you want to refer to the unit of Ints, you should use .Ints and NOT .List{#Int}, etc.
All these are explained in the examples (e.g., IMP, IMPPP, SIMPLE, KOOL, etc.). Hopefully we will have some tutorial or manual soon.
Sent: Saturday, December 03, 2011 1:26 PM
To: k-user AT cs.uiuc.edu
Subject: [K-user] Problem with lists
rule <cell> . => N |-> .List … </cell> ( N is matched as an #Int, there is other irrelevant stuff)
Replacing .List with .List{#Int} makes it say it doesn't expect token #IntDidn't expect token …</
rule <cell> . => N |-> . … </cell>
with a multiple distinct parses error.rule <cell> … N |-> (. => M … ) … </cell> ( M is matched as an #Int )
- [K-user] Problem with lists, Cosmin Radoi, 12/03/2011
- Re: [K-user] Problem with lists, Rosu, Grigore, 12/03/2011
- Re: [K-user] Problem with lists, Traian Florin Șerbănuță, 12/03/2011
- Message not available
- Re: [K-user] Problem with lists, Cosmin Radoi, 12/03/2011
- Message not available
- Re: [K-user] Problem with lists, Cosmin Radoi, 12/03/2011
Archive powered by MHonArc 2.6.16.