$ echo ‘parsetree(appl(prod([], cf(sort(“Dummy”)), attrs([term(my_attr(cons(“Foo”))),term(cons(“dummy”))])), []), 0)’|implode-asfix
Foo

The problem seems to be in stratego-libraries/sglr/lib/stratego/asfix/implode/constructor.str (Constr0 and get-cons).

Something like
Constr0: prod(_, _, as) -> x where <attrs(fetch-elem(?term(cons(x)))) <+ id> as

instead of
/**
* @todo Optimize the oncetd
*/
Constr0 :
prod(_, _, as) -> x
where
<oncetd(?cons(x))> as

should do what we expect. The same change should be done in get-cons/0.

Submitted on 21 March 2009 at 14:03

Log in to post comments