maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
- From: Paco Durán <duran AT lcc.uma.es>
- To: "Bettaz, Mohamed" <bettamoh AT fit.cvut.cz>
- Cc: Francisco Durán <duran AT lcc.uma.es>, "maude-help AT cs.uiuc.edu" <maude-help AT cs.uiuc.edu>
- Subject: Re: [[maude-help] ] Maude error: bad token
- Date: Mon, 9 Jun 2025 10:00:44 +0200
Hi Mohamed,
Maude has very few restrictions on identifiers, allowing in identifiers
symbols like +, -, :, ... that in most languages are forbidden. This is good
because it allows us to define all kinds of operators. However, this comes at
a price, one must be very careful with spaces.
Given operator declarations
op a1: -> Activity .
op a2: -> Activity .
op a3: -> Activity .
op a4: -> Activity .
Maude doesn't know where you wanted to stop. Indeed, if you ask for a show
all (to see all details of your module, you would get an operator declaration
op a1: -> Activity . op a2: -> Activity . op a3: -> Activity . op a4: ->
Activity . op s : -> Event .
Your module doesn't have operators a1, a2, a3, a4 and s as you expect,
instead, there is an operator
a1: -> Activity . op a2: -> Activity . op a3: -> Activity . op a4: ->
Activity . op s
of sort Event.
Just add corresponding spaces between ai and the colon.
Cheers,
Francisco
> On 9 Jun 2025, at 09:09, Bettaz, Mohamed <bettamoh AT fit.cvut.cz> wrote:
>
> Hello,
>
> I am quite new user of Maude.
> I am trying a very simple example.
> Here is the example:
>
> The execution gives the error "bad token".
>
> Could you please advise?
>
> Thank you.
>
> Best regards,
>
>
> Mohamed Bettaz
> Faculty of Information Technology
> Czech Technical University in Prague
> Czech Republic
> WhatsApp: +420 736 285 790
>
> Below is the example:
>
> fmod BPMN-SIGNATURE is
> sorts Event Gateway Activity Concept .
> subsorts Event Gateway Activity < Concept .
> op __ : Concept Concept -> Concept [assoc comm id: null] .
> op null : -> Concept .
> op undefined : -> Concept .
> op a1: -> Activity .
> op a2: -> Activity .
> op a3: -> Activity .
> op a4: -> Activity .
> op s : -> Event .
> op e : -> Event .
> op p1 : -> Gateway .
> op p2 : -> Gateway .
> endfm
>
> mod BPMN is
> including BPMN-SIGNATURE .
> rl [s-a1] : s => a1 .
> rl [a1-p1] : a1 => p1 .
> rl [c1-a2-a3] : p1 => a2 a3 .
> rl [a2-a3-p2] : a2 a3 => p2 .
> rl [p2-a4] : p2 => a4 .
> rl [a4-e] : a4 => e .
> endm
>
> The execution:
>
> Maude 3.2
> Copyright 1997-2022 SRI International
> Mon Jun 9 08:36:02 2025
> Maude> load bpmn_signature.maude
> Maude> load bpmn.maude
> Warning: "bpmn.maude", line 3 (mod BPMN): bad token a1.
> Warning: "bpmn.maude", line 3 (mod BPMN): no parse for statement
> rl [s-a1] : s => a1 .
> Warning: "bpmn.maude", line 4 (mod BPMN): bad token a1.
> Warning: "bpmn.maude", line 4 (mod BPMN): no parse for statement
> rl [a1-p1] : a1 => p1 .
> Warning: "bpmn.maude", line 5 (mod BPMN): bad token a2.
> Warning: "bpmn.maude", line 5 (mod BPMN): no parse for statement
> rl [c1-a2-a3] : p1 => a2 a3 .
> Warning: "bpmn.maude", line 6 (mod BPMN): bad token a2.
> Warning: "bpmn.maude", line 6 (mod BPMN): no parse for statement
> rl [a2-a3-p2] : a2 a3 => p2 .
> Warning: "bpmn.maude", line 7 (mod BPMN): bad token a4.
> Warning: "bpmn.maude", line 7 (mod BPMN): no parse for statement
> rl [p2-a4] : p2 => a4 .
> Warning: "bpmn.maude", line 8 (mod BPMN): bad token a4.
> Warning: "bpmn.maude", line 8 (mod BPMN): no parse for statement
> rl [a4-e] : a4 => e .
> Maude>
-
[[maude-help] ] Maude error: bad token,
Bettaz, Mohamed, 06/09/2025
- Re: [[maude-help] ] Maude error: bad token, Paco Durán, 06/09/2025
Archive powered by MHonArc 2.6.24.