Skip to Content.
Sympa Menu

maude-help - Re: [Maude-help] why have syntax error when same as example in book

maude-help AT lists.cs.illinois.edu

Subject: Maude-help mailing list

List archive

Re: [Maude-help] why have syntax error when same as example in book


Chronological Thread 
  • From: Francisco Durán <duran AT lcc.uma.es>
  • To: Lee Martin CCNP <tesleft AT hotmail.com>
  • Cc: "maude-help AT cs.uiuc.edu" <maude-help AT cs.uiuc.edu>
  • Subject: Re: [Maude-help] why have syntax error when same as example in book
  • Date: Thu, 8 May 2014 18:23:00 +0200
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help/>
  • List-id: <maude-help.cs.uiuc.edu>

Martin,

It should be rl, from rule, not r1. 

Francisco

On 08/05/2014, at 15:44, Lee Martin CCNP <tesleft AT hotmail.com> wrote:

book All about maude page 133

Maude> load vend2.maude
Warning: "vend2.maude", line 4 (mod VENDING-MACHINE): syntax error

vend2.maude
mod VENDING-MACHINE is
    including VENDING-MACHINE-SIGNATURE .
    var M : Marking .
    r1 [add-q] : M => M q .
    r1 [add-$] : M => M $ .
    r1 [buy-c] : $ => c .
    r1 [buy-a] : $ => a q .
    r1 [change] : q q q q => $ .
 endm

vend1.maude
fmod VENDING-MACHINE-SIGNATURE is
    sorts Coin Item Marking .
    subsorts Coin Item < Marking .
    op __ : Marking Marking -> Marking [assoc comm id: null] .
    op null : -> Marking .
    op $ : -> Coin [format (r! o)] .
    op q : -> Coin [format (r! o)] .
    op a : -> Coin [format (b! o)] .
    op c : -> Coin [format (b! o)] .
 endfm
_______________________________________________
Maude-help mailing list
Maude-help AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/maude-help




Archive powered by MHonArc 2.6.16.

Top of Page