Skip to Content.
Sympa Menu

k-user - Re: [[K-user] ] something about initialization of the configuration cell

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

Re: [[K-user] ] something about initialization of the configuration cell


Chronological Thread 
  • From: Dorel Lucanu <dorel.lucanu AT gmail.com>
  • To: 璟临天下 <qjq793437528 AT 163.com>
  • Cc: k-user AT lists.cs.illinois.edu
  • Subject: Re: [[K-user] ] something about initialization of the configuration cell
  • Date: Wed, 28 Jun 2017 23:15:56 +0300

Here is a simple example:
module TEST

  syntax Exp ::= Int | Exp "+" Exp 

  configuration
    <k> $PGM </k>
    <a> $A </a>
    <b> $B </b>

endmodule

Supposing that the file ex.test includes "1+2", then we may execute the above definition over this file as follows:

$ ~/k-4.0/bin/krun ex.test -cA=3 -cB=4

<generatedTop> <k> 1 + 2 </k> <a> 3 </a> <b> 4 </b> </generatedTop>


I hope this helps you.

Best regards,

Dorel


On Wed, Jun 28, 2017 at 8:28 AM, 璟临天下 <qjq793437528 AT 163.com> wrote:
 i'm confused about the initialization of the configuration cell. in the tutorial,it is just talk about one builtin configuration variable. i have no idea about how to define other configuration variables.
do anyone have some paper about it or something else.


 





Archive powered by MHonArc 2.6.19.

Top of Page