Skip to Content.
Sympa Menu

k-user - [K-user] concrete syntax for maps?

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

[K-user] concrete syntax for maps?


Chronological Thread 
  • From: Robby Findler <robby AT eecs.northwestern.edu>
  • To: "k-user AT cs.uiuc.edu" <k-user AT cs.uiuc.edu>
  • Subject: [K-user] concrete syntax for maps?
  • Date: Thu, 1 Nov 2012 17:18:07 -0500
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user/>
  • List-id: <k-user.cs.uiuc.edu>

Is there a way to write down a map as part of an input program, in a way sort of like how one can write down lists? That is, I can write 

    syntax LoS ::= List{Sting,","}
 
somewhere in a program and then I can write

  "a","b","c"

in a program somewhere and get a list. I'd like to write something like:

    syntax MoS ::= Map{Sting,"|->",","}

and then I can write:

  "a" |-> 0, "b" |-> 1

and have that come out as a K map?

Robby




Archive powered by MHonArc 2.6.16.

Top of Page