Skip to Content.
Sympa Menu

k-user - [K-user] Condition: Not-empty List

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

[K-user] Condition: Not-empty List


Chronological Thread 
  • From: Omar Duhaiby <3omarz AT gmail.com>
  • To: k-user AT cs.uiuc.edu
  • Subject: [K-user] Condition: Not-empty List
  • Date: Sun, 11 May 2014 17:30:18 +0300
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user/>
  • List-id: <k-user.cs.uiuc.edu>

Hello,

If I have defined Vals as:

syntax Vals ::= List{Val, ","}
syntax Val ::= Int

and I have a cell initiated with ".List" that I want to hold Vals.
".List" is matched when the list is empty, but how do I check if the cell is not empty, i.e., the list has at least one Val?

Also I want to be able to initiate the cell with .Vals instead of .List but the compile refuses.

Thank you



Archive powered by MHonArc 2.6.16.

Top of Page