maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
Re: [[maude-help] ] parsing a file format using a maude module
- From: Steven Eker <steveneker AT gmail.com>
- To: maude-help AT lists.cs.illinois.edu
- Subject: Re: [[maude-help] ] parsing a file format using a maude module
- Date: Thu, 7 Dec 2023 16:49:24 -0800
[resending to the list because it bounces if sent from my SRI email no matter which address I used for the list]
You need to fix your operator declaration and the colon in the
term you want to parse must be followed by a space (Maude does not
support user defined lexical syntax), but otherwise this works:
fmod FOO is
inc LIST{Nat} .
sort MySort .
op Card_:_|_ : Nat List{Nat} List{Nat} -> MySort [ctor] .
endfm
red Card 1 : 41 48 83 86 17 | 83 86 6 31 17 9 48 53 .
Steven
Assuming I define an op likeop Card_:_|_ : -> Nat List{Nat} List{Nat} [ctor] .I would like to parse a line of this form with the help of the module this op is defined in.Card 1: 41 48 83 86 17 | 83 86 6 31 17 9 48 53
Is there a way I can use a module to parse a format like this from a String?
-
[[maude-help] ] parsing a file format using a maude module,
Raghu Ranganathan, 12/07/2023
- Re: [[maude-help] ] parsing a file format using a maude module, Steven Eker, 12/07/2023
Archive powered by MHonArc 2.6.24.