Skip to Content.
Sympa Menu

k-user - [K-user] Problem with lists

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

[K-user] Problem with lists


Chronological Thread 
  • From: Cosmin Radoi <cos AT illinois.edu>
  • To: k-user AT cs.uiuc.edu
  • Subject: [K-user] Problem with lists
  • Date: Sat, 3 Dec 2011 13:26:24 -0600
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user>
  • List-id: <k-user.cs.uiuc.edu>


We're having problems with a very basic scenario. For some reason, the lists are behaving unintuitively.

First:
rule <cell> . => N |-> .List  … </cell> ( N is matched as an #Int, there is other irrelevant stuff)
Raises the warning:
Didn't expect token …</
Replacing .List with .List{#Int} makes it say it doesn't expect token #Int

If we replace that with:
rule <cell> . => N |-> .  … </cell>
it gets past this but breaks a following rule:
rule <cell> … N |-> (. => M … ) … </cell> ( M is matched as an #Int )
with a multiple distinct parses error.

We've played with multiple variations of these rules but they don't seem to work. We are trying to make something seemingly simple, a Map with #Int keys and List{#Int} values.

Thanks,

Cosmin




Archive powered by MHonArc 2.6.16.

Top of Page