k-user AT lists.cs.illinois.edu
Subject: K-user mailing list
List archive
- From: William Mansky <mansky1 AT illinois.edu>
- To: k-user AT cs.uiuc.edu
- Subject: [K-user] K input?
- Date: Wed, 17 Jul 2013 08:43:56 -0500
- List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user/>
- List-id: <k-user.cs.uiuc.edu>
I'm working on writing some K definitions for a custom language, and I'm
running into some weird errors. In particular, I'm trying to use the stdin
stream to input some data from the user, but it seems like any input
involving user-defined syntax fails to parse. I've shown a minimal example
below. Does anyone know whether I'm making a mistake here, or whether this is
a limitation of the current version of K?
module DUD
syntax Type ::= "word"
configuration <T color="yellow">
<k> .K </k>
<in color="magenta" stream="stdin"> .List </in>
<data> .K </data>
</T>
rule <in> ListItem(X:Type) => . ...</in>
<data> . => X </data>
endmodule
When I run a sample program (the content is ignored, so irrelevant) and enter "word" (without the quotes), the result
is a stuck configuration containing the term #parseToken("Type", "word") in <in>, rather than, as I'd
hope, the term "word" in <data>. Any advice would be appreciated.
Thanks,
William
- [K-user] K input?, William Mansky, 07/17/2013
- Re: [K-user] K input?, Stefan Ciobaca, 07/17/2013
- Re: [K-user] K input?, Traian Florin Șerbănuță, 07/17/2013
- Re: [K-user] K input?, Stefan Ciobaca, 07/17/2013
Archive powered by MHonArc 2.6.16.