k-legacy
k-legacy copied to clipboard
Usage questions
How to separate variables with newlines using KList? For example, I want to separate like this "x \n y \n z", not "x,y,z".
Sorry for the delay in replying. You can declare a list whose elements are separated by white spaces, as follows:
syntax YouList ::= List{YourElem, ""}
Note that K doesn't distinguish different white spaces. Indeed, K parser ignores all white spaces. That means the above list will accept all in below:
x \n y \n z
x \t y \t z
x y z
x \n y z
...